Changeset 24006 for trunk/wp-includes/media.php
- Timestamp:
- 04/17/2013 04:08:46 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/media.php
r24003 r24006 2407 2407 2408 2408 if ( ! empty( $meta['image'] ) ) { 2409 $post->format_content = sprintf( $link_fmt, wp_get_attachment_image( $meta['image'], $attached_size ) ); 2409 if ( is_numeric( $meta['image'] ) ) 2410 $image = wp_get_attachment_image( absint( $meta['image'] ), $attached_size ); 2411 elseif ( preg_match( '/' . get_shortcode_regex() . '/s', $meta['image'] ) ) 2412 $image = do_shortcode( $meta['image'] ); 2413 elseif ( ! preg_match( '#<[^>]+>#', $meta['image'] ) ) 2414 $image = sprintf( '<img src="%s" alt="" />', esc_url( $meta['image'] ) ); 2415 else 2416 $image = $meta['image']; 2417 2418 $post->format_content = sprintf( $link_fmt, $image ); 2410 2419 return $post->format_content; 2411 2420 }
Note: See TracChangeset
for help on using the changeset viewer.