Example #1
0
/**
 * Output all of the allowed tags in HTML format with attributes.
 *
 * This is useful for displaying in the post area, which elements and
 * attributes are supported. As well as any plugins which want to display it.
 *
 * @since bbPress (r2780)
 *
 * @uses bbp_get_allowed_tags()
 */
function bbp_allowed_tags()
{
    echo bbp_get_allowed_tags();
}
 function wp_sh_allow_tags_in_bbpress()
 {
     global $wp_sh_setting_opt;
     if ($wp_sh_setting_opt['bbpress_hl_bt_guest'] == 1 && bbp_is_anonymous() || !bbp_is_anonymous()) {
         $bbp_root = get_option('_bbp_root_slug');
         if (get_option('_bbp_include_root') == true) {
             $bbp_forum = "/" . get_option('_bbp_root_slug') . "/" . get_option('_bbp_forum_slug') . "/";
             $bbp_topic = "/" . get_option('_bbp_root_slug') . "/" . get_option('_bbp_topic_slug') . "/";
             $bbp_reply = "/" . get_option('_bbp_root_slug') . "/" . get_option('_bbp_reply_slug') . "/";
         } else {
             $bbp_forum = "/" . get_option('_bbp_forum_slug') . "/";
             $bbp_topic = "/" . get_option('_bbp_topic_slug') . "/";
             $bbp_reply = "/" . get_option('_bbp_reply_slug') . "/";
         }
         if (strpos($_SERVER['REQUEST_URI'], '?post_type=forum') || strpos($_SERVER['REQUEST_URI'], '?forum=') || strpos($_SERVER['REQUEST_URI'], '?topic=') || strpos($_SERVER['REQUEST_URI'], '?reply=') || strpos($_SERVER['REQUEST_URI'], $bbp_root) || strpos($_SERVER['REQUEST_URI'], $bbp_forum) || strpos($_SERVER['REQUEST_URI'], $bbp_topic) || strpos($_SERVER['REQUEST_URI'], $bbp_reply)) {
             add_filter('bbp_get_allowed_tags', 'wp_sh_allow_tags_and_attribs');
             bbp_get_allowed_tags();
             if (!current_user_can('unfiltered_html')) {
                 wp_sh_allow_posttags_and_attribs();
             }
         }
     }
 }