Make WordPress Core

Ticket #12061: 12061.3.diff

File 12061.3.diff, 766 bytes (added by aaroncampbell, 9 years ago)
  • src/wp-includes/formatting.php

    diff --git src/wp-includes/formatting.php src/wp-includes/formatting.php
    index 44376e5..b1f997f 100644
    function shortcode_unautop( $pee ) { 
    486486                return $pee;
    487487        }
    488488
    489         $tagregexp = join( '|', array_map( 'preg_quote', array_keys( $shortcode_tags ) ) );
     489        /**
     490         * Filter the list of shortcodes to run through the 'unautop' routine.
     491         *
     492         * @since 4.1.0
     493         *
     494         * @param array $shortcode_tags Shortcode tags to run through the 'unautop' routine.
     495         */
     496        $unautop_shortcode_tags = apply_filters( 'unautop_shortcodes', array_keys( $shortcode_tags ) );
     497
     498        $tagregexp = join( '|', array_map( 'preg_quote', $unautop_shortcode_tags ) );
    490499        $spaces = wp_spaces_regexp();
    491500
    492501        $pattern =