bp_deregister_template_stack

Deregister a previously registered template stack location.

Description

bp_deregister_template_stack( (string) $location_callback = '', (int) $priority = 10 ); 

Parameters (2)

0. $location_callback — Optional. (string) => ''
Callback function that returns the stack location.
1. $priority — Optional. (int) => 10
The priority.

Usage

  1. if ( !function_exists( 'bp_deregister_template_stack' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-template-loader.php'; 
  3.  
  4. // Callback function that returns the stack location. 
  5. $location_callback = ''; 
  6.  
  7. // The priority. 
  8. $priority = 10; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bp_deregister_template_stack($location_callback, $priority); 
  12.  

Defined (1)

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

/bp-core/bp-core-template-loader.php  
  1. function bp_deregister_template_stack( $location_callback = '', $priority = 10 ) { 
  2.  
  3. // Bail if no location, or function/method is not callable. 
  4. if ( empty( $location_callback ) || ! is_callable( $location_callback ) ) { 
  5. return false; 
  6.  
  7. // Add location callback to template stack. 
  8. return remove_filter( 'bp_template_stack', $location_callback, (int) $priority );