Changeset 20679 for trunk/wp-includes/media.php
- Timestamp:
- 05/02/2012 01:14:52 AM (14 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/media.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/media.php
r20562 r20679 725 725 */ 726 726 function img_caption_shortcode($attr, $content = null) { 727 // New-style shortcode with the caption inside the shortcode with the link and image tags. 728 if ( ! isset( $attr['caption'] ) ) { 729 if ( preg_match( '#((?:<a [^>]+>\s*)?<img [^>]+>(?:\s*</a>)?)(.*)#is', $content, $matches ) ) { 730 $content = $matches[1]; 731 $attr['caption'] = trim( $matches[2] ); 732 } 733 } 727 734 728 735 // Allow plugins/themes to override the default caption template.
Note: See TracChangeset
for help on using the changeset viewer.