bbp_slug_conflict_check

The bbPress bbp slug conflict check hook.

Description

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

Parameters (1)

0. $array — Optional. (callback) => array('post_base' => array( 'name' => __( 'Posts', 'bbpress' ), 'default' => 'post', 'context' => 'WordPress' ), 'page_base' => array( 'name' => __( 'Pages', 'bbpress' ), 'default' => 'page', 'context' => 'WordPress' ), 'revision_base' => array( 'name' => __( 'Revisions', 'bbpress' ), 'default' => 'revision', 'context' => 'WordPress' ), 'attachment_base' => array( 'name' => __( 'Attachments', 'bbpress' ), 'default' => 'attachment', 'context' => 'WordPress' ), 'nav_menu_base' => array( 'name' => __( 'Menus', 'bbpress' ), 'default' => 'nav_menu_item', 'context' => 'WordPress' ),'tag_base' => array( 'name' => __( 'Tag base', 'bbpress' ), 'default' => 'tag', 'context' => 'WordPress' ),'category_base' => array( 'name' => __( 'Category base', 'bbpress' ), 'default' => 'category', 'context' => 'WordPress' ),'_bbp_root_slug' => array( 'name' => __( 'Forums base', 'bbpress' ), 'default' => 'forums', 'context' => 'bbPress' ),'_bbp_topic_archive_slug' => array( 'name' => __( 'Topics base', 'bbpress' ), 'default' => 'topics', 'context' => 'bbPress' ),'_bbp_forum_slug' => array( 'name' => __( 'Forum slug', 'bbpress' ), 'default' => 'forum', 'context' => 'bbPress' ),'_bbp_topic_slug' => array( 'name' => __( 'Topic slug', 'bbpress' ), 'default' => 'topic', 'context' => 'bbPress' ),'_bbp_reply_slug' => array( 'name' => __( 'Reply slug', 'bbpress' ), 'default' => 'reply', 'context' => 'bbPress' ),'_bbp_user_slug' => array( 'name' => __( 'User base', 'bbpress' ), 'default' => 'users', 'context' => 'bbPress' ),'_bbp_view_slug' => array( 'name' => __( 'View base', 'bbpress' ), 'default' => 'view', 'context' => 'bbPress' ),'_bbp_topic_tag_slug' => array( 'name' => __( 'Topic tag slug', 'bbpress' ), 'default' => 'topic-tag', 'context' => 'bbPress' ), )
The array.

Usage

To run the hook, copy the example below.
  1. $array = apply_filters( 'bbp_slug_conflict_check', $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_slug_conflict_check callback 
  2. function filter_bbp_slug_conflict_check( $array ) { 
  3. // make filter magic happen here... 
  4. return $array
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'bbp_slug_conflict_check', 'filter_bbp_slug_conflict_check', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'bbp_slug_conflict_check', 'filter_bbp_slug_conflict_check', 10, 1 ); 

Defined (1)

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

/includes/admin/settings.php  
  1. $core_slugs = apply_filters( 'bbp_slug_conflict_check', array(