Changeset 46554 for trunk/src/wp-includes/shortcodes.php
- Timestamp:
- 10/15/2019 07:34:31 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/shortcodes.php
r46465 r46554 489 489 * 490 490 * @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 494 493 * @return array|string List of attribute values. 495 494 * Returns empty array if trim( $text ) == '""'. … … 500 499 $atts = array(); 501 500 $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 ); 509 502 if ( preg_match_all( $pattern, $text, $match, PREG_SET_ORDER ) ) { 510 503 foreach ( $match as $m ) {
Note: See TracChangeset
for help on using the changeset viewer.