Make WordPress Core


Ignore:
Timestamp:
10/15/2019 07:34:31 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Shortcodes: Revert [46369] for now to allow more time to investigate and prepare for backward compatibility changes.

Also reverts follow-up changes in [46370] and [46465].

See #47863.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/shortcodes.php

    r46465 r46554  
    489489 *
    490490 * @since 2.5.0
    491  * @since 5.3.0 Added support of a full shortcode input.
    492  *
    493  * @param string $text Any single shortcode of any format or key/value pair string.
     491 *
     492 * @param string $text
    494493 * @return array|string List of attribute values.
    495494 *                      Returns empty array if trim( $text ) == '""'.
     
    500499    $atts    = array();
    501500    $pattern = get_shortcode_atts_regex();
    502     $text    = trim( preg_replace( "/[\x{00a0}\x{200b}]+/u", ' ', $text ) );
    503 
    504     // Remove everything but attributes from shortcode.
    505     if ( preg_match( '#^\[[\w-]+([^\]]*?)\/?\]#', $text, $matches ) ) {
    506         $text = $matches[1];
    507     }
    508 
     501    $text    = preg_replace( "/[\x{00a0}\x{200b}]+/u", ' ', $text );
    509502    if ( preg_match_all( $pattern, $text, $match, PREG_SET_ORDER ) ) {
    510503        foreach ( $match as $m ) {
Note: See TracChangeset for help on using the changeset viewer.