示例#1
0
function wpgrade_callback_shortcode_filters($content)
{
    // including Wordpress plugin.php for is_plugin_active function
    include_once ABSPATH . 'wp-admin/includes/plugin.php';
    if (is_plugin_active('pixcodes/pixcodes.php')) {
        $content = wpgrade_remove_spaces_around_shortcodes($content);
    }
    return $content;
}
示例#2
0
function pix_builder_display_content($content = '')
{
    // since we cannot apply "the_content" filter on some content blocks we should apply at least these bellow
    $content = apply_filters('wptexturize', $content);
    $content = apply_filters('convert_smilies', $content);
    $content = apply_filters('convert_chars', $content);
    $content = wpautop($content);
    if (function_exists('wpgrade_remove_spaces_around_shortcodes')) {
        $content = wpgrade_remove_spaces_around_shortcodes($content);
    }
    //	$content = shortcode_unautop ($content);
    $content = apply_filters('prepend_attachment', $content);
    // in case there is a shortcode
    //	return nl2br( $content );
    //	return do_shortcode( $content );
    return $content;
}