bbp_admin_get_settings_fields

The bbPress bbp admin get settings fields hook.

Description

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

Parameters (1)

0. $array — Optional. (callback) => array('bbp_settings_users' => array('_bbp_edit_lock' => array( 'title' => __( 'Disallow editing after', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_editlock', 'sanitize_callback' => 'intval', 'args' => array() ),'_bbp_throttle_time' => array( 'title' => __( 'Throttle posting every', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_throttle', 'sanitize_callback' => 'intval', 'args' => array() ),'_bbp_allow_anonymous' => array( 'title' => __( 'Anonymous posting', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_anonymous', 'sanitize_callback' => 'intval', 'args' => array() ),'_bbp_allow_global_access' => array( 'title' => __( 'Auto role', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_global_access', 'sanitize_callback' => 'intval', 'args' => array() ),'_bbp_default_role' => array( 'sanitize_callback' => 'sanitize_text_field', 'args' => array() ) ),'bbp_settings_features' => array('_bbp_allow_revisions' => array( 'title' => __( 'Revisions', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_revisions', 'sanitize_callback' => 'intval', 'args' => array() ),'_bbp_enable_favorites' => array( 'title' => __( 'Favorites', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_favorites', 'sanitize_callback' => 'intval', 'args' => array() ),'_bbp_enable_subscriptions' => array( 'title' => __( 'Subscriptions', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_subscriptions', 'sanitize_callback' => 'intval', 'args' => array() ),'_bbp_allow_topic_tags' => array( 'title' => __( 'Topic tags', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_topic_tags', 'sanitize_callback' => 'intval', 'args' => array() ),'_bbp_allow_search' => array( 'title' => __( 'Search', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_search', 'sanitize_callback' => 'intval', 'args' => array() ),'_bbp_use_wp_editor' => array( 'title' => __( 'Post Formatting', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_use_wp_editor', 'args' => array(), 'sanitize_callback' => 'intval' ),'_bbp_use_autoembed' => array( 'title' => __( 'Auto-embed links', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_use_autoembed', 'sanitize_callback' => 'intval', 'args' => array() ),'_bbp_thread_replies_depth' => array( 'title' => __( 'Reply Threading', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_thread_replies_depth', 'sanitize_callback' => 'intval', 'args' => array() ),'_bbp_allow_threaded_replies' => array( 'sanitize_callback' => 'intval', 'args' => array() ) ),'bbp_settings_theme_compat' => array('_bbp_theme_package_id' => array( 'title' => __( 'Current Package', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_subtheme_id', 'sanitize_callback' => 'esc_sql', 'args' => array() ) ),'bbp_settings_per_page' => array('_bbp_topics_per_page' => array( 'title' => __( 'Topics', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_topics_per_page', 'sanitize_callback' => 'intval', 'args' => array() ),'_bbp_replies_per_page' => array( 'title' => __( 'Replies', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_replies_per_page', 'sanitize_callback' => 'intval', 'args' => array() ) ),'bbp_settings_per_rss_page' => array('_bbp_topics_per_rss_page' => array( 'title' => __( 'Topics', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_topics_per_rss_page', 'sanitize_callback' => 'intval', 'args' => array() ),'_bbp_replies_per_rss_page' => array( 'title' => __( 'Replies', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_replies_per_rss_page', 'sanitize_callback' => 'intval', 'args' => array() ) ),'bbp_settings_root_slugs' => array('_bbp_root_slug' => array( 'title' => __( 'Forum Root', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_root_slug', 'sanitize_callback' => 'bbp_sanitize_slug', 'args' => array() ),'_bbp_include_root' => array( 'title' => __( 'Forum Prefix', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_include_root', 'sanitize_callback' => 'intval', 'args' => array() ),'_bbp_show_on_root' => array( 'title' => __( 'Forum root should show', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_show_on_root', 'sanitize_callback' => 'sanitize_text_field', 'args' => array() ), ),'bbp_settings_single_slugs' => array('_bbp_forum_slug' => array( 'title' => __( 'Forum', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_forum_slug', 'sanitize_callback' => 'bbp_sanitize_slug', 'args' => array() ),'_bbp_topic_slug' => array( 'title' => __( 'Topic', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_topic_slug', 'sanitize_callback' => 'bbp_sanitize_slug', 'args' => array() ),'_bbp_topic_tag_slug' => array( 'title' => __( 'Topic Tag', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_topic_tag_slug', 'sanitize_callback' => 'bbp_sanitize_slug', 'args' => array() ),'_bbp_view_slug' => array( 'title' => __( 'Topic View', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_view_slug', 'sanitize_callback' => 'bbp_sanitize_slug', 'args' => array() ),'_bbp_reply_slug' => array( 'title' => __( 'Reply', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_reply_slug', 'sanitize_callback' => 'bbp_sanitize_slug', 'args' => array() ),'_bbp_search_slug' => array( 'title' => __( 'Search', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_search_slug', 'sanitize_callback' => 'bbp_sanitize_slug', 'args' => array() ) ),'bbp_settings_user_slugs' => array('_bbp_user_slug' => array( 'title' => __( 'User Base', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_user_slug', 'sanitize_callback' => 'bbp_sanitize_slug', 'args' => array() ),'_bbp_topic_archive_slug' => array( 'title' => __( 'Topics Started', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_topic_archive_slug', 'sanitize_callback' => 'bbp_sanitize_slug', 'args' => array() ),'_bbp_reply_archive_slug' => array( 'title' => __( 'Replies Created', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_reply_archive_slug', 'sanitize_callback' => 'bbp_sanitize_slug', 'args' => array() ),'_bbp_user_favs_slug' => array( 'title' => __( 'Favorite Topics', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_user_favs_slug', 'sanitize_callback' => 'bbp_sanitize_slug', 'args' => array() ),'_bbp_user_subs_slug' => array( 'title' => __( 'Topic Subscriptions', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_user_subs_slug', 'sanitize_callback' => 'bbp_sanitize_slug', 'args' => array() ) ),'bbp_settings_buddypress' => array('_bbp_enable_group_forums' => array( 'title' => __( 'Enable Group Forums', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_group_forums', 'sanitize_callback' => 'intval', 'args' => array() ),'_bbp_group_forums_root_id' => array( 'title' => __( 'Group Forums Parent', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_group_forums_root_id', 'sanitize_callback' => 'intval', 'args' => array() ) ),'bbp_settings_akismet' => array('_bbp_enable_akismet' => array( 'title' => __( 'Use Akismet', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_akismet', 'sanitize_callback' => 'intval', 'args' => array() ) ) )
The array.

Usage

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

Defined (1)

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

/includes/admin/settings.php  
  1. return (array) apply_filters( 'bbp_admin_get_settings_fields', array(