Get_the_title() is where is located the filter 'the_title', the one the plugin is using to prefix topic title.


apply_filters( 'bpbbpst_donot_change_topic_title', (bool) $bpbbpst_is_sidebar ); 

The problem is that there's no context to this filter so that we are sure get_the_title() is called to actually display the topic title just before the topic content.

get_the_title() or the_title() can be used in header, widgets, breadcrumbs, meta tags... So there will allways be a place where the plugin shouldn't filter the title. If you're a plugin/theme developer and you want to get rid of this prefix, you simply need to add these lines before and after your use of get_the_title() :

add_filter( bpbbpst_donot_change_topic_title,, __return_true );


remove_filter( bpbbpst_donot_change_topic_title,, __return_true );

If you want to completely get rid of it, just use the first line in the above example

The prefix is only appended when on the topic single and edit bbPress templates. If on this template, a sidebar widget displaying the recent topics for instance could have the prefix appended, but not on all other pages of the site. So to be consistent, i chose to disable the prefix filter in dynamic sidebars.

Parameters (1)

0. $bpbbpst_is_sidebar (bool) => bpbbpst_is_sidebar()
True to avoid the prefix to be appended to the_title, false otherwise


To run the hook, copy the example below.
  1. $bpbbpst_is_sidebar = apply_filters( 'bpbbpst_donot_change_topic_title', $bpbbpst_is_sidebar ); 
  3. if ( !empty( $bpbbpst_is_sidebar ) ) { 
  5. // everything has led up to this point... 
The following example is for adding a hook callback.
  1. // define the bpbbpst_donot_change_topic_title callback 
  2. function filter_bpbbpst_donot_change_topic_title( $bpbbpst_is_sidebar ) { 
  3. // make filter magic happen here... 
  4. return $bpbbpst_is_sidebar
  5. }; 
  7. // add the filter 
  8. add_filter( 'bpbbpst_donot_change_topic_title', 'filter_bpbbpst_donot_change_topic_title', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'bpbbpst_donot_change_topic_title', 'filter_bpbbpst_donot_change_topic_title', 10, 1 ); 

Defined (1)

The filter is defined in the following location(s).

  1. $do_not_prefix = apply_filters( 'bpbbpst_donot_change_topic_title', bpbbpst_is_sidebar() );