bbp_get_view_title

Get the view name aka title.

Description

(bool|string) bbp_get_view_title( (string) $view = '' ); 

If a view id is supplied, that is used. Otherwise the bbp_view query var is checked for.

Returns (bool|string)

Title on success, false on failure

Parameters (1)

0. $view — Optional. (string) => ''
View id

Usage

  1. if ( !function_exists( 'bbp_get_view_title' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/common/template.php'; 
  3.  
  4. // Optional. View id 
  5. $view = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bbp_get_view_title($view); 
  9.  

Defined (1)

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

/includes/common/template.php  
  1. function bbp_get_view_title( $view = '' ) { 
  2. $bbp =bbpress); 
  3.  
  4. $view = bbp_get_view_id( $view ); 
  5. if ( empty( $view ) ) 
  6. return false; 
  7.  
  8. return $bbp->views[$view]['title'];