array( 'title' => esc_html__( 'Forum User Settings', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_user_section', 'page' => 'discussion' ), 'bbp_settings_features' => array( 'title' => esc_html__( 'Forum Features', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_features_section', 'page' => 'discussion' ), 'bbp_settings_theme_compat' => array( 'title' => esc_html__( 'Forum Theme Packages', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_subtheme_section', 'page' => 'general' ), 'bbp_settings_per_page' => array( 'title' => esc_html__( 'Topics and Replies Per Page', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_per_page_section', 'page' => 'reading' ), 'bbp_settings_per_rss_page' => array( 'title' => esc_html__( 'Topics and Replies Per RSS Page', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_per_rss_page_section', 'page' => 'reading', ), 'bbp_settings_root_slugs' => array( 'title' => esc_html__( 'Forum Root Slug', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_root_slug_section', 'page' => 'permalink' ), 'bbp_settings_single_slugs' => array( 'title' => esc_html__( 'Forum Single Slugs', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_single_slug_section', 'page' => 'permalink', ), 'bbp_settings_user_slugs' => array( 'title' => esc_html__( 'Forum User Slugs', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_user_slug_section', 'page' => 'permalink', ), // Extend 'bbp_settings_buddypress' => array( 'title' => esc_html__( 'Forum Integration for BuddyPress', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_buddypress_section', 'page' => 'buddypress', ), 'bbp_settings_akismet' => array( 'title' => esc_html__( 'Forum Integration for Akismet', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_akismet_section', 'page' => 'discussion' ), // Converter 'bbp_converter_connection' => array( 'title' => esc_html__( 'Database Settings', 'bbpress' ), 'callback' => 'bbp_converter_setting_callback_main_section', 'page' => 'converter' ), 'bbp_converter_options' => array( 'title' => esc_html__( 'Options', 'bbpress' ), 'callback' => 'bbp_converter_setting_callback_options_section', 'page' => 'converter' ) ) ); } /** * Get all of the settings fields. * * @since 2.1.0 bbPress (r4001) * * @return array */ function bbp_admin_get_settings_fields() { // Filter & return return (array) apply_filters( 'bbp_admin_get_settings_fields', array( /** User Section ******************************************************/ 'bbp_settings_users' => array( // Default role setting '_bbp_default_role' => array( 'sanitize_callback' => 'sanitize_text_field', 'args' => array() ), // Allow global access '_bbp_allow_global_access' => array( 'title' => esc_html__( 'Roles', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_global_access', 'sanitize_callback' => 'intval', 'args' => array() ), // Allow content throttling '_bbp_allow_content_throttle' => array( 'sanitize_callback' => 'intval', 'args' => array() ), // Throttle setting '_bbp_throttle_time' => array( 'title' => esc_html__( 'Flooding', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_throttle', 'sanitize_callback' => 'intval', 'args' => array() ), // Allow content editing '_bbp_allow_content_edit' => array( 'sanitize_callback' => 'intval', 'args' => array() ), // Edit lock setting '_bbp_edit_lock' => array( 'title' => esc_html__( 'Editing', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_editlock', 'sanitize_callback' => 'intval', 'args' => array() ), // Allow anonymous posting setting '_bbp_allow_anonymous' => array( 'title' => esc_html__( 'Anonymous', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_anonymous', 'sanitize_callback' => 'intval', 'args' => array() ) ), /** Features Section **************************************************/ 'bbp_settings_features' => array( // Allow auto embedding setting '_bbp_use_autoembed' => array( 'title' => esc_html__( 'Auto-embed links', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_use_autoembed', 'sanitize_callback' => 'intval', 'args' => array() ), // Set reply threading level '_bbp_thread_replies_depth' => array( 'title' => esc_html__( 'Reply Threading', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_thread_replies_depth', 'sanitize_callback' => 'intval', 'args' => array() ), // Allow threaded replies '_bbp_allow_threaded_replies' => array( 'sanitize_callback' => 'intval', 'args' => array() ), // Allow topic and reply revisions '_bbp_allow_revisions' => array( 'title' => esc_html__( 'Revisions', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_revisions', 'sanitize_callback' => 'intval', 'args' => array() ), // Allow favorites setting '_bbp_enable_favorites' => array( 'title' => esc_html__( 'Favorites', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_favorites', 'sanitize_callback' => 'intval', 'args' => array() ), // Allow subscriptions setting '_bbp_enable_subscriptions' => array( 'title' => esc_html__( 'Subscriptions', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_subscriptions', 'sanitize_callback' => 'intval', 'args' => array() ), // Allow engagements setting '_bbp_enable_engagements' => array( 'title' => esc_html__( 'Engagements', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_engagements', 'sanitize_callback' => 'intval', 'args' => array() ), // Allow topic tags '_bbp_allow_topic_tags' => array( 'title' => esc_html__( 'Topic tags', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_topic_tags', 'sanitize_callback' => 'intval', 'args' => array() ), // Allow topic tags '_bbp_allow_search' => array( 'title' => esc_html__( 'Search', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_search', 'sanitize_callback' => 'intval', 'args' => array() ), // Allow fancy editor setting '_bbp_use_wp_editor' => array( 'title' => esc_html__( 'Post Formatting', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_use_wp_editor', 'args' => array(), 'sanitize_callback' => 'intval' ), // Allow per-forum moderators '_bbp_allow_forum_mods' => array( 'title' => esc_html__( 'Forum Moderators', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_forum_mods', 'sanitize_callback' => 'intval', 'args' => array() ), // Allow moderators to edit users '_bbp_allow_super_mods' => array( 'title' => esc_html__( 'Super Moderators', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_super_mods', 'sanitize_callback' => 'intval', 'capability' => 'edit_users', 'args' => array() ) ), /** Theme Packages ****************************************************/ 'bbp_settings_theme_compat' => array( // Theme package setting '_bbp_theme_package_id' => array( 'title' => esc_html__( 'Current Package', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_subtheme_id', 'sanitize_callback' => 'esc_sql', 'args' => array() ) ), /** Per Page Section **************************************************/ 'bbp_settings_per_page' => array( // Topics per page setting '_bbp_topics_per_page' => array( 'title' => esc_html__( 'Topics', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_topics_per_page', 'sanitize_callback' => 'intval', 'args' => array( 'label_for' => '_bbp_topics_per_page' ) ), // Replies per page setting '_bbp_replies_per_page' => array( 'title' => esc_html__( 'Replies', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_replies_per_page', 'sanitize_callback' => 'intval', 'args' => array( 'label_for' => '_bbp_replies_per_page' ) ) ), /** Per RSS Page Section **********************************************/ 'bbp_settings_per_rss_page' => array( // Topics per page setting '_bbp_topics_per_rss_page' => array( 'title' => esc_html__( 'Topics', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_topics_per_rss_page', 'sanitize_callback' => 'intval', 'args' => array( 'label_for' => '_bbp_topics_per_rss_page' ) ), // Replies per page setting '_bbp_replies_per_rss_page' => array( 'title' => esc_html__( 'Replies', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_replies_per_rss_page', 'sanitize_callback' => 'intval', 'args' => array( 'label_for' => '_bbp_replies_per_rss_page' ) ) ), /** Front Slugs *******************************************************/ 'bbp_settings_root_slugs' => array( // Root slug setting '_bbp_root_slug' => array( 'title' => esc_html__( 'Forum Root', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_root_slug', 'sanitize_callback' => 'bbp_sanitize_slug', 'args' => array( 'label_for' => '_bbp_root_slug' ) ), // Include root setting '_bbp_include_root' => array( 'title' => esc_html__( 'Forum Prefix', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_include_root', 'sanitize_callback' => 'intval', 'args' => array() ), // What to show on Forum Root '_bbp_show_on_root' => array( 'title' => esc_html__( 'Forum root should show', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_show_on_root', 'sanitize_callback' => 'sanitize_text_field', 'args' => array( 'label_for'=>'_bbp_show_on_root' ) ), ), /** Single Slugs ******************************************************/ 'bbp_settings_single_slugs' => array( // Forum slug setting '_bbp_forum_slug' => array( 'title' => esc_html__( 'Forum', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_forum_slug', 'sanitize_callback' => 'bbp_sanitize_slug', 'args' => array( 'label_for'=>'_bbp_forum_slug' ) ), // Topic slug setting '_bbp_topic_slug' => array( 'title' => esc_html__( 'Topic', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_topic_slug', 'sanitize_callback' => 'bbp_sanitize_slug', 'args' => array( 'label_for'=>'_bbp_topic_slug' ) ), // Topic tag slug setting '_bbp_topic_tag_slug' => array( 'title' => esc_html__( 'Topic Tag', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_topic_tag_slug', 'sanitize_callback' => 'bbp_sanitize_slug', 'args' => array( 'label_for'=>'_bbp_topic_tag_slug' ) ), // View slug setting '_bbp_view_slug' => array( 'title' => esc_html__( 'Topic View', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_view_slug', 'sanitize_callback' => 'bbp_sanitize_slug', 'args' => array( 'label_for'=>'_bbp_view_slug' ) ), // Reply slug setting '_bbp_reply_slug' => array( 'title' => _x( 'Reply', 'noun', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_reply_slug', 'sanitize_callback' => 'bbp_sanitize_slug', 'args' => array( 'label_for'=>'_bbp_reply_slug' ) ), // Edit slug setting '_bbp_edit_slug' => array( 'title' => esc_html__( 'Edit', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_edit_slug', 'sanitize_callback' => 'bbp_sanitize_slug', 'args' => array( 'label_for'=>'_bbp_edit_slug' ) ), // Search slug setting '_bbp_search_slug' => array( 'title' => esc_html__( 'Search', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_search_slug', 'sanitize_callback' => 'bbp_sanitize_slug', 'args' => array( 'label_for'=>'_bbp_search_slug' ) ) ), /** User Slugs ********************************************************/ 'bbp_settings_user_slugs' => array( // User slug setting '_bbp_user_slug' => array( 'title' => esc_html__( 'User Base', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_user_slug', 'sanitize_callback' => 'bbp_sanitize_slug', 'args' => array( 'label_for'=>'_bbp_user_slug' ) ), // Topics slug setting '_bbp_topic_archive_slug' => array( 'title' => esc_html__( 'Topics Started', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_topic_archive_slug', 'sanitize_callback' => 'bbp_sanitize_slug', 'args' => array( 'label_for'=>'_bbp_topic_archive_slug' ) ), // Replies slug setting '_bbp_reply_archive_slug' => array( 'title' => esc_html__( 'Replies Created', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_reply_archive_slug', 'sanitize_callback' => 'bbp_sanitize_slug', 'args' => array( 'label_for'=>'_bbp_reply_archive_slug' ) ), // Favorites slug setting '_bbp_user_favs_slug' => array( 'title' => esc_html__( 'Favorite Topics', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_user_favs_slug', 'sanitize_callback' => 'bbp_sanitize_slug', 'args' => array( 'label_for'=>'_bbp_user_favs_slug' ) ), // Subscriptions slug setting '_bbp_user_subs_slug' => array( 'title' => esc_html__( 'Subscriptions', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_user_subs_slug', 'sanitize_callback' => 'bbp_sanitize_slug', 'args' => array( 'label_for'=>'_bbp_user_subs_slug' ) ), // Engagements slug setting '_bbp_user_engs_slug' => array( 'title' => esc_html__( 'Engagements', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_user_engagements_slug', 'sanitize_callback' => 'bbp_sanitize_slug', 'args' => array( 'label_for'=>'_bbp_user_engs_slug' ) ) ), /** BuddyPress ********************************************************/ 'bbp_settings_buddypress' => array( // Are group forums enabled? '_bbp_enable_group_forums' => array( 'title' => esc_html__( 'Group Forums', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_group_forums', 'sanitize_callback' => 'intval', 'args' => array() ), // Group forums parent forum ID '_bbp_group_forums_root_id' => array( 'title' => esc_html__( 'Primary Forum', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_group_forums_root_id', 'sanitize_callback' => 'intval', 'args' => array( 'label_for'=>'_bbp_group_forums_root_id' ) ) ), /** Akismet ***********************************************************/ 'bbp_settings_akismet' => array( // Should we use Akismet '_bbp_enable_akismet' => array( 'title' => esc_html__( 'Use Akismet', 'bbpress' ), 'callback' => 'bbp_admin_setting_callback_akismet', 'sanitize_callback' => 'intval', 'args' => array() ) ), /** Converter Page ****************************************************/ // Connection 'bbp_converter_connection' => array( // System Select '_bbp_converter_platform' => array( 'title' => esc_html__( 'Select Platform', 'bbpress' ), 'callback' => 'bbp_converter_setting_callback_platform', 'sanitize_callback' => 'sanitize_text_field', 'args' => array( 'label_for'=> '_bbp_converter_platform' ) ), // Database Server '_bbp_converter_db_server' => array( 'title' => esc_html__( 'Database Server', 'bbpress' ), 'callback' => 'bbp_converter_setting_callback_dbserver', 'sanitize_callback' => 'sanitize_text_field', 'args' => array( 'label_for'=> '_bbp_converter_db_server' ) ), // Database Server Port '_bbp_converter_db_port' => array( 'title' => esc_html__( 'Database Port', 'bbpress' ), 'callback' => 'bbp_converter_setting_callback_dbport', 'sanitize_callback' => 'intval', 'args' => array( 'label_for'=> '_bbp_converter_db_port' ) ), // Database Name '_bbp_converter_db_name' => array( 'title' => esc_html__( 'Database Name', 'bbpress' ), 'callback' => 'bbp_converter_setting_callback_dbname', 'sanitize_callback' => 'sanitize_text_field', 'args' => array( 'label_for'=> '_bbp_converter_db_name' ) ), // Database User '_bbp_converter_db_user' => array( 'title' => esc_html__( 'Database User', 'bbpress' ), 'callback' => 'bbp_converter_setting_callback_dbuser', 'sanitize_callback' => 'sanitize_text_field', 'args' => array( 'label_for'=> '_bbp_converter_db_user' ) ), // Database Password '_bbp_converter_db_pass' => array( 'title' => esc_html__( 'Database Password', 'bbpress' ), 'callback' => 'bbp_converter_setting_callback_dbpass', 'sanitize_callback' => 'sanitize_text_field', 'args' => array( 'label_for'=> '_bbp_converter_db_pass' ) ), // Database Prefix '_bbp_converter_db_prefix' => array( 'title' => esc_html__( 'Table Prefix', 'bbpress' ), 'callback' => 'bbp_converter_setting_callback_dbprefix', 'sanitize_callback' => 'sanitize_text_field', 'args' => array( 'label_for'=> '_bbp_converter_db_prefix' ) ) ), // Options 'bbp_converter_options' => array( // Rows Limit '_bbp_converter_rows' => array( 'title' => esc_html__( 'Rows Limit', 'bbpress' ), 'callback' => 'bbp_converter_setting_callback_rows', 'sanitize_callback' => 'intval', 'args' => array( 'label_for'=> '_bbp_converter_rows' ) ), // Delay Time '_bbp_converter_delay_time' => array( 'title' => esc_html__( 'Delay Time', 'bbpress' ), 'callback' => 'bbp_converter_setting_callback_delay_time', 'sanitize_callback' => 'intval', 'args' => array( 'label_for'=> '_bbp_converter_delay_time' ) ), // Convert Users '_bbp_converter_convert_users' => array( 'title' => esc_html__( 'Convert Users', 'bbpress' ), 'callback' => 'bbp_converter_setting_callback_convert_users', 'sanitize_callback' => 'intval', 'args' => array( 'label_for'=> '_bbp_converter_convert_users' ) ), // Halt '_bbp_converter_halt' => array( 'title' => esc_html__( 'Stop on Error', 'bbpress' ), 'callback' => 'bbp_converter_setting_callback_halt', 'sanitize_callback' => 'intval', 'args' => array( 'label_for'=> '_bbp_converter_halt' ) ), // Restart '_bbp_converter_restart' => array( 'title' => esc_html__( 'Start Over', 'bbpress' ), 'callback' => 'bbp_converter_setting_callback_restart', 'sanitize_callback' => 'intval', 'args' => array( 'label_for'=> '_bbp_converter_restart' ) ), // Clean '_bbp_converter_clean' => array( 'title' => esc_html__( 'Helper Data', 'bbpress' ), 'callback' => 'bbp_converter_setting_callback_clean', 'sanitize_callback' => 'intval', 'args' => array( 'label_for'=> '_bbp_converter_clean' ) ) ) ) ); } /** * Get settings fields by section. * * @since 2.1.0 bbPress (r4001) * * @param string $section_id ID of the section to get fields for * @staticvar array $fields All of the available fields * @return mixed False if section is invalid, array of fields otherwise. */ function bbp_admin_get_settings_fields_for_section( $section_id = '' ) { static $fields = array(); // Default return value $retval = array(); // Bail if section is empty if ( empty( $section_id ) ) { return false; } // Get all of the fields (so we can snag one section of them) if ( empty( $fields ) ) { $fields = bbp_admin_get_settings_fields(); } // Get the field by section if ( isset( $fields[ $section_id ] ) ) { $retval = $fields[ $section_id ]; } // Filter & return return (array) apply_filters( 'bbp_admin_get_settings_fields_for_section', $retval, $section_id ); } /** User Section **************************************************************/ /** * User settings section description for the settings page * * @since 2.0.0 bbPress (r2786) */ function bbp_admin_setting_callback_user_section() { ?>
' . $forum_archive . '' ); ?>
/> /> /> /> /> /> /> /> /> /> /> /> /> />localhost' ); ?>
/>3306' ); ?>
/> /> /> />wp_bb_' ); ?>
/>' . esc_html__( 'This screen provides access to all of the Forums settings.', 'bbpress' ) . '
' . '' . esc_html__( 'Please see the additional help tabs for more information on each individual section.', 'bbpress' ) . '
' ) ); // Main Settings $current_screen->add_help_tab( array( 'id' => 'main_settings', 'title' => esc_html__( 'Main Settings', 'bbpress' ), 'content' => '' . esc_html__( 'The "Main Settings" section includes a number of options:', 'bbpress' ) . '
' . '' . '
' . esc_html__( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.', 'bbpress' ) . '
' ) ); // Theme Package $current_screen->add_help_tab( array( 'id' => 'theme_packages', 'title' => esc_html__( 'Theme Packages', 'bbpress' ), 'content' => '' . esc_html__( 'The "Theme Packages" section allows you to choose which theme package should be used.', 'bbpress' ) . '
' . '' . '
' . esc_html__( 'The "Per Page" section allows you to control the number of topics and replies appear on each page.', 'bbpress' ) . '
' . '' ) ); // Slugs $current_screen->add_help_tab( array( 'id' => 'slugs', 'title' => esc_html__( 'Slugs', 'bbpress' ), 'content' => '
' . esc_html__( 'The "Slugs" section allows you to control the permalink structure for your forums.', 'bbpress' ) . '
' . '' ) ); // Help Sidebar $current_screen->set_help_sidebar( '
' . esc_html__( 'For more information:', 'bbpress' ) . '
' . '' . __( 'bbPress Documentation', 'bbpress' ) . '
' . '' . __( 'bbPress Support Forums', 'bbpress' ) . '
' ); } /** * Disable a settings field if it is forcibly set in the global options array. * * @since 2.2.0 bbPress (r4347) * * @param string $option_key */ function bbp_maybe_admin_setting_disabled( $option_key = '' ) { disabled( isset( bbpress()->options[ $option_key ] ) ); } /** * Output settings API option * * @since 2.0.0 bbPress (r3203) * * @param string $option * @param string $default * @param bool $slug */ function bbp_form_option( $option, $default = '', $slug = false ) { echo bbp_get_form_option( $option, $default, $slug ); } /** * Return settings API option * * @since 2.0.0 bbPress (r3203) * * @param string $option * @param string $default * @param bool $is_slug * * @return mixed */ function bbp_get_form_option( $option, $default = '', $is_slug = false ) { // Get the option and sanitize it $value = get_option( $option, $default ); // Slug? if ( true === $is_slug ) { $value = esc_attr( apply_filters( 'editable_slug', $value ) ); // Not a slug } else { $value = esc_attr( $value ); } // Fallback to default, unless numeric (allow zero) if ( empty( $value ) && ! is_numeric( $value ) ) { $value = $default; } // Filter & return return apply_filters( 'bbp_get_form_option', $value, $option, $default, $is_slug ); } /** * Used to check if a bbPress slug conflicts with an existing known slug. * * @since 2.0.0 bbPress (r3306) * * @param string $slug * @param string $default */ function bbp_form_slug_conflict_check( $slug, $default ) { // Only set the slugs once ver page load static $the_core_slugs = array(); // Get the form value $this_slug = bbp_get_form_option( $slug, $default, true ); if ( empty( $the_core_slugs ) ) { // Slugs to check $core_slugs = apply_filters( 'bbp_slug_conflict_check', array( /** WordPress Core ****************************************************/ // Core Post Types 'post_base' => array( 'name' => esc_html__( 'Posts', 'bbpress' ), 'default' => 'post', 'context' => 'WordPress' ), 'page_base' => array( 'name' => esc_html__( 'Pages', 'bbpress' ), 'default' => 'page', 'context' => 'WordPress' ), 'revision_base' => array( 'name' => esc_html__( 'Revisions', 'bbpress' ), 'default' => 'revision', 'context' => 'WordPress' ), 'attachment_base' => array( 'name' => esc_html__( 'Attachments', 'bbpress' ), 'default' => 'attachment', 'context' => 'WordPress' ), 'nav_menu_base' => array( 'name' => esc_html__( 'Menus', 'bbpress' ), 'default' => 'nav_menu_item', 'context' => 'WordPress' ), // Post Tags 'tag_base' => array( 'name' => esc_html__( 'Tag base', 'bbpress' ), 'default' => 'tag', 'context' => 'WordPress' ), // Post Categories 'category_base' => array( 'name' => esc_html__( 'Category base', 'bbpress' ), 'default' => 'category', 'context' => 'WordPress' ), /** bbPress Core ******************************************************/ // Forum archive slug '_bbp_root_slug' => array( 'name' => esc_html__( 'Forums base', 'bbpress' ), 'default' => 'forums', 'context' => 'bbPress' ), // Topic archive slug '_bbp_topic_archive_slug' => array( 'name' => esc_html__( 'Topics base', 'bbpress' ), 'default' => 'topics', 'context' => 'bbPress' ), // Forum slug '_bbp_forum_slug' => array( 'name' => esc_html__( 'Forum slug', 'bbpress' ), 'default' => 'forum', 'context' => 'bbPress' ), // Topic slug '_bbp_topic_slug' => array( 'name' => esc_html__( 'Topic slug', 'bbpress' ), 'default' => 'topic', 'context' => 'bbPress' ), // Reply slug '_bbp_reply_slug' => array( 'name' => esc_html__( 'Reply slug', 'bbpress' ), 'default' => 'reply', 'context' => 'bbPress' ), // Edit slug '_bbp_edit_slug' => array( 'name' => esc_html__( 'Edit slug', 'bbpress' ), 'default' => 'edit', 'context' => 'bbPress' ), // User profile slug '_bbp_user_slug' => array( 'name' => esc_html__( 'User base', 'bbpress' ), 'default' => 'users', 'context' => 'bbPress' ), // View slug '_bbp_view_slug' => array( 'name' => esc_html__( 'View base', 'bbpress' ), 'default' => 'view', 'context' => 'bbPress' ), // Topic tag slug '_bbp_topic_tag_slug' => array( 'name' => esc_html__( 'Topic tag slug', 'bbpress' ), 'default' => 'topic-tag', 'context' => 'bbPress' ), ) ); /** BuddyPress Core *******************************************************/ if ( defined( 'BP_VERSION' ) ) { $bp = buddypress(); // Loop through root slugs and check for conflict if ( ! empty( $bp->pages ) ) { foreach ( $bp->pages as $page => $page_data ) { $page_base = $page . '_base'; $page_title = sprintf( esc_html__( '%s page', 'bbpress' ), $page_data->title ); $core_slugs[ $page_base ] = array( 'name' => $page_title, 'default' => $page_data->slug, 'context' => 'BuddyPress' ); } } } // Set the static $the_core_slugs = apply_filters( 'bbp_slug_conflict', $core_slugs ); } // Loop through slugs to check foreach ( $the_core_slugs as $key => $value ) { // Get the slug $slug_check = bbp_get_form_option( $key, $value['default'], true ); // Compare if ( ( $slug !== $key ) && ( $slug_check === $this_slug ) ) : ?> ' . $value['name'] . '' ); ?>