bp_modify_page_title

Filters the older 'wp_title' page title for BuddyPress pages.

Description

apply_filters( 'bp_modify_page_title', (string) $new_title, (string) $title, (string) $sep, (string) $seplocation ); 

Parameters (4)

0. $new_title (string)
The BuddyPress page title.
1. $title (string)
The original WordPress page title.
2. $sep (string)
The title parts separator.
3. $seplocation (string)
Location of the separator (left or right).

Usage

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

Defined (1)

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

/bp-core/bp-core-filters.php  
  1. return apply_filters( 'bp_modify_page_title', $new_title, $title, $sep, $seplocation );