/** * Maybe return the root slug, based on whether or not it's included in the url * * @since 2.1.0 bbPress (r3759) * * @return string */ function bbp_maybe_get_root_slug() { $retval = ''; if (bbp_get_root_slug() && bbp_include_root_slug()) { $retval = trailingslashit(bbp_get_root_slug()); } return apply_filters('bbp_maybe_get_root_slug', $retval); }
/** * Include root slug setting field * * @since 2.0.0 bbPress (r2786) * * @uses checked() To display the checked attribute */ function bbp_admin_setting_callback_include_root() { ?> <input name="_bbp_include_root" id="_bbp_include_root" type="checkbox" value="1" <?php checked(bbp_include_root_slug()); bbp_maybe_admin_setting_disabled('_bbp_include_root'); ?> /> <label for="_bbp_include_root"><?php esc_html_e('Prefix all forum content with the Forum Root slug (Recommended)', 'bbpress'); ?> </label> <?php }