Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>solved this as best as possible by combining a slightly modified parse_shortcode_content function from Donal MacArthur (his originally manually calls wpautop... which i've removed. with the re-ordering of default filters to run wpautop much later... after the shortcode has already been processed instead of before. </p> <pre><code>//Clean Up WordPress Shortcode Formatting - important for nested shortcodes //adjusted from http://donalmacarthur.com/articles/cleaning-up-wordpress-shortcode-formatting/ function parse_shortcode_content( $content ) { /* Parse nested shortcodes and add formatting. */ $content = trim( do_shortcode( shortcode_unautop( $content ) ) ); /* Remove '' from the start of the string. */ if ( substr( $content, 0, 4 ) == '' ) $content = substr( $content, 4 ); /* Remove '' from the end of the string. */ if ( substr( $content, -3, 3 ) == '' ) $content = substr( $content, 0, -3 ); /* Remove any instances of ''. */ $content = str_replace( array( '&lt;p&gt;&lt;/p&gt;' ), '', $content ); $content = str_replace( array( '&lt;p&gt; &lt;/p&gt;' ), '', $content ); return $content; } </code></pre> <p>and moving the filters</p> <pre><code>//move wpautop filter to AFTER shortcode is processed remove_filter( 'the_content', 'wpautop' ); add_filter( 'the_content', 'wpautop' , 99); add_filter( 'the_content', 'shortcode_unautop',100 ); </code></pre> <p><strong>EDIT:</strong> </p> <p>The <code>parse_shortcode_content()</code> function is no longer required (if it ever was). Simply adjust the filter order.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload