bbp_shortcodes

The bbPress bbp shortcodes hook.

Description

apply_filters( 'bbp_shortcodes', (callback) $array ); 

Parameters (1)

0. $array — Optional. (callback) => array('bbp-forum-index' => array( $this, 'display_forum_index' ), 'bbp-forum-form' => array( $this, 'display_forum_form' ), 'bbp-single-forum' => array( $this, 'display_forum' ),'bbp-topic-index' => array( $this, 'display_topic_index' ), 'bbp-topic-form' => array( $this, 'display_topic_form' ), 'bbp-single-topic' => array( $this, 'display_topic' ),'bbp-topic-tags' => array( $this, 'display_topic_tags' ), 'bbp-single-tag' => array( $this, 'display_topics_of_tag' ),'bbp-reply-form' => array( $this, 'display_reply_form' ), 'bbp-single-reply' => array( $this, 'display_reply' ),'bbp-single-view' => array( $this, 'display_view' ),'bbp-search-form' => array( $this, 'display_search_form' ), 'bbp-search' => array( $this, 'display_search' ),'bbp-login' => array( $this, 'display_login' ), 'bbp-register' => array( $this, 'display_register' ), 'bbp-lost-pass' => array( $this, 'display_lost_pass' ),'bbp-stats' => array( $this, 'display_stats' ), )
The array.

Usage

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

Defined (1)

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

/includes/common/shortcodes.php  
  1. $this->codes = apply_filters( 'bbp_shortcodes', array(