bp_forums_add_forum_topic_to_page_title

Append forum topic to page title.

Description

(string) bp_forums_add_forum_topic_to_page_title( (string) $title, (string) $original_title, (string) $sep, (string) $seplocation ); 

Returns (string)

Page title with forum topic title appended.

Parameters (4)

0. $title (string)
The title.
1. $original_title (string)
Original page title.
2. $sep (string)
How to separate the various items within the page title.
3. $seplocation (string)
Direction to display title.

Usage

  1. if ( !function_exists( 'bp_forums_add_forum_topic_to_page_title' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bp-forums-filters.php'; 
  3.  
  4. // The title. 
  5. $title = ''; 
  6.  
  7. // Original page title. 
  8. $original_title = ''; 
  9.  
  10. // How to separate the various items within the page title. 
  11. $sep = ''; 
  12.  
  13. // Direction to display title. 
  14. $seplocation = ''; 
  15.  
  16. // NOTICE! Understand what this does before running. 
  17. $result = bp_forums_add_forum_topic_to_page_title($title, $original_title, $sep, $seplocation); 
  18.  

Defined (1)

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

/bp-forums/bp-forums-filters.php  
  1. function bp_forums_add_forum_topic_to_page_title( $title, $original_title, $sep, $seplocation ) { 
  2.  
  3. if ( bp_is_current_action( 'forum' ) && bp_is_action_variable( 'topic', 0 ) ) 
  4. $title .= bp_get_the_topic_title() . " $sep "; 
  5.  
  6. return $title;