Changeset 24021 for trunk/wp-includes/media.php
- Timestamp:
- 04/17/2013 08:57:44 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/media.php
r24006 r24021 2075 2075 if ( has_post_format( $type, $post ) ) { 2076 2076 $meta = get_post_format_meta( $post->ID ); 2077 if ( ! empty( $meta[$type] ) ) { 2078 if ( is_integer( $meta[$type] ) ) { 2079 $url = wp_get_attachment_url( $meta[$type] ); 2077 if ( ! empty( $meta[$type . '_embed'] ) ) { 2078 $value = $meta[$type . '_embed']; 2079 if ( is_integer( $value ) ) { 2080 $url = wp_get_attachment_url( $value ); 2080 2081 $shortcode = sprintf( '[%s src="%s"]', $type, $url ); 2081 } elseif ( preg_match( '/' . get_shortcode_regex() . '/s', $ meta[$type]) ) {2082 $shortcode = $ meta[$type];2083 } elseif ( preg_match( '#<[^>]+>#', $ meta[$type]) ) {2084 $post->format_content = $ meta[$type];2082 } elseif ( preg_match( '/' . get_shortcode_regex() . '/s', $value ) ) { 2083 $shortcode = $value; 2084 } elseif ( preg_match( '#<[^>]+>#', $value ) ) { 2085 $post->format_content = $value; 2085 2086 return $post->format_content; 2086 } elseif ( 0 === strpos( $ meta[$type], 'http' ) ) {2087 $post->split_content = str_replace( $ meta[$type], '', $post->post_content, $count );2088 if ( strstr( $ meta[$type], home_url() ) ) {2089 $shortcode = sprintf( '[%s src="%s"]', $type, $ meta[$type]);2087 } elseif ( 0 === strpos( $value, 'http' ) ) { 2088 $post->split_content = str_replace( $value, '', $post->post_content, $count ); 2089 if ( strstr( $value, home_url() ) ) { 2090 $shortcode = sprintf( '[%s src="%s"]', $type, $value ); 2090 2091 } else { 2091 $post->format_content = $wp_embed->autoembed( $ meta[$type]);2092 $post->format_content = $wp_embed->autoembed( $value ); 2092 2093 return $post->format_content; 2093 2094 }
Note: See TracChangeset
for help on using the changeset viewer.