bbp_deregister_view

Deregister a bbPress view.

Description

bbp_deregister_view( (string) $view ); 

Parameters (1)

0. $view (string)
The view.

Usage

  1. if ( !function_exists( 'bbp_deregister_view' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/core/functions.php'; 
  3.  
  4. // The view. 
  5. $view = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bbp_deregister_view($view); 
  9.  

Defined (1)

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

/includes/core/functions.php  
  1. function bbp_deregister_view( $view ) { 
  2. $bbp =bbpress); 
  3. $view = sanitize_title( $view ); 
  4.  
  5. if ( !isset( $bbp->views[$view] ) ) 
  6. return false; 
  7.  
  8. unset( $bbp->views[$view] ); 
  9.  
  10. return true;