Changeset 33627 for trunk/src/wp-includes/shortcodes.php
- Timestamp:
- 08/17/2015 09:38:24 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/shortcodes.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/shortcodes.php
r33600 r33627 209 209 $pattern = get_shortcode_regex(); 210 210 $content = preg_replace_callback( "/$pattern/s", 'do_shortcode_tag', $content ); 211 211 212 212 // Always restore square braces so we don't break things like <!--[if IE ]> 213 213 $content = unescape_invalid_shortcodes( $content ); 214 214 215 215 return $content; 216 216 } … … 332 332 $content = strtr( $content, $trans ); 333 333 $trans = array( '[' => '[', ']' => ']' ); 334 334 335 335 $pattern = get_shortcode_regex(); 336 336 $textarr = wp_html_split( $content ); … … 369 369 continue; 370 370 } 371 371 372 372 // Get element name 373 373 $front = array_shift( $attributes ); … … 376 376 preg_match('%[a-zA-Z0-9]+%', $front, $matches); 377 377 $elname = $matches[0]; 378 378 379 379 // Look for shortcodes in each attribute separately. 380 380 foreach ( $attributes as &$attr ) { … … 408 408 } 409 409 $element = $front . implode( '', $attributes ) . $back; 410 410 411 411 // Now encode any remaining [ or ] chars. 412 412 $element = strtr( $element, $trans ); 413 413 } 414 414 415 415 $content = implode( '', $textarr ); 416 416 417 417 return $content; 418 418 } … … 430 430 $trans = array( '[' => '[', ']' => ']' ); 431 431 $content = strtr( $content, $trans ); 432 432 433 433 return $content; 434 434 } … … 540 540 // Always restore square braces so we don't break things like <!--[if IE ]> 541 541 $content = unescape_invalid_shortcodes( $content ); 542 542 543 543 return $content; 544 544 }
Note: See TracChangeset
for help on using the changeset viewer.