Tagged: 

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #25503

    ‘/avia-shortcodes/textblock.php’:

    function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")

    {

    return "<div class='avia_textblock'>".wpautop( ShortcodeHelper::avia_remove_autop($content) )."</div>";

    }

    When I insert shortcodes from other plugins in textblock – code is broken because it adds <p> and tags to generated shortcode’s content. Without wpautop() function everything is OK except empty <p> tags and text without <p> tags in the beginning of the block.

    So, the best solution for me was change order of the functions:

    function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")

    {

    return "<div class='avia_textblock'>".ShortcodeHelper::avia_remove_autop( wpautop($content) )."</div>";

    }

    Also when I add border to images they looks blured because of CSS: box-sizing: border-box;

    The same for images with captions. This CSS fix it for me:

    div.wp-caption, img {

    -moz-box-sizing: content-box;

    -webkit-box-sizing: content-box;

    -o-box-sizing: content-box;

    box-sizing: content-box;

    }

    #top div.wp-caption img {

    width: auto;

    }

Viewing 1 post (of 1 total)
  • The topic ‘wpautop function broke shortcodes from other plugins’ is closed to new replies.