Skip to:
Content

bbPress.org

Opened 7 months ago

Closed 7 months ago

#3602 closed defect (bug) (fixed)

Stop "Private:" being prepended to Private forum titles

Reported by: johnjamesjacoby's profile johnjamesjacoby Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.7 Priority: normal
Severity: normal Version:
Component: Component - Forums Keywords: has-screenshots
Cc:

Description

Related to the private_title_format hook, and get_the_title().

Incoming screenshot.

Attachments (1)

jjj-2024-06-29-at-16-33-33-UTC@2x.png (138.7 KB) - added by johnjamesjacoby 7 months ago.

Download all attachments as: .zip

Change History (2)

#1 @johnjamesjacoby
7 months ago

  • Owner set to johnjamesjacoby
  • Resolution set to fixed
  • Status changed from new to closed

In 7276:

Posts: strip "Protected/Private" for bbPress post types

This change prevents post title hints from being prepended to titles of Forums, Topics, or Replies, which was happening as a consequence of calling get_the_title() which assumes every protected/private post title needs it.

It does this by including the following code changes:

  • introduce the bbp_no_title_status_hints() filter function, which hooks into 2 WordPress filters and maybe overrides the return value
  • replace a few get_the_title() calls with get_post_field( 'post_title' ) to bypass the above filters when they would never be desirable

Committer note: this could be considered a small back-compat break (because it alters long-standing theme-side output) but ultimately it is a design decision to output all of the forum content as it was saved by the community members. Forums that prefer the old behavior can unhook bbp_no_title_status_hints and continue to customize child template parts to insert custom forum status hints.

Fixes #3602.

Note: See TracTickets for help on using tickets.