Make WordPress Core

Ticket #12061: 12061.diff

File 12061.diff, 623 bytes (added by mdawaffe, 10 years ago)

Add no_unautop_shortcodes filter.

  • wp-includes/formatting.php

     
    476476                return $pee;
    477477        }
    478478
    479         $tagregexp = join( '|', array_map( 'preg_quote', array_keys( $shortcode_tags ) ) );
     479        $no_unautop_shortcodes = apply_filters( 'no_unautop_shortcodes', array() );
     480
     481        $unautop_shortcodes = array_diff( array_keys( $shortcode_tags ), $no_unautop_shortcodes );
     482
     483        $tagregexp = join( '|', array_map( 'preg_quote', $unautop_shortcodes ) );
    480484        $spaces = wp_spaces_regexp();
    481485
    482486        $pattern =