• Resolved benwallis

    (@benwallis)


    Hi,

    Can you please provide a way to disable wpautop ?

    I’m using the More Info Description box to display a custom shortcode (using get_template_part) but the HTML it returns is getting mangled by <br> and <p> tags.

    The plugin is calling wpautop() directly, so currently the only way to stop it is to edit the source code.

    It’s line 524 in /draw-attention/public/class-drawattention.php (version 1.6.10):

    $description_html = ( !empty( $hotspot['description'] ) ) ? wpautop( do_shortcode ( $wp_embed->run_shortcode( $hotspot['description'] ) ) ) : '';

    Please could you add an option somewhere so that wpautop() is not called there?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author NSquared

    (@croixhaug)

    Hi there,

    That’s a great point, we’ve made a change and just released version 1.6.11 with this fix 🙂

    We’ve changed it from a hardcoded wpautop() call to a filter ‘da_description’

    So you can now remove it by adding this code to your theme’s functions.php file (or somewhere in your custom plugins)

    remove_filter( ‘da_description’, ‘wpautop’ );

    Thanks again for the suggestion, let us know if v1.6.11 and this fix work for you!

    Nathan

    Plugin Author NSquared

    (@croixhaug)

    remove_filter( ‘da_description’, ‘wpautop’ );

    PS. paste this version in so it doesn’t have any browser formatting on the single-quote marks

    Thread Starter benwallis

    (@benwallis)

    Wow, that’s awesome!

    Thanks for the very swift update!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Please let us disable wpautop’ is closed to new replies.