Changeset 24547 for trunk/wp-includes/media.php
- Timestamp:
- 07/03/2013 08:19:00 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/media.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/media.php
r24400 r24547 2071 2071 if ( 0 === strpos( $embed, 'http' ) ) { 2072 2072 if ( strstr( $embed, home_url() ) ) { 2073 $post->format_content[ $cache_key ] = do_shortcode( sprintf( '[%s src="%s"]', $type, $embed ) ); 2073 2074 $format_content = ''; 2075 $attr = array( 'src' => $embed ); 2076 2077 if ( 'audio' == $type ) 2078 $format_content = wp_audio_shortcode( $attr ); 2079 elseif ( 'video' == $type ) 2080 $format_content = wp_video_shortcode( $attr ); 2081 2082 $post->format_content[ $cache_key ] = $format_content; 2074 2083 } else { 2075 2084 $post->format_content[ $cache_key ] = $wp_embed->autoembed( $embed ); … … 2085 2094 $media = reset( $medias ); 2086 2095 $url = wp_get_attachment_url( $media->ID ); 2087 $shortcode = sprintf( '[%s src="%s"]', $type, $url ); 2088 $post->format_content[ $cache_key ] = do_shortcode( $shortcode ); 2096 2097 $format_content = ''; 2098 $attr = array( 'src' => $url ); 2099 2100 if ( 'audio' == $type ) 2101 $format_content = wp_audio_shortcode( $attr ); 2102 elseif ( 'video' == $type ) 2103 $format_content = wp_video_shortcode( $attr ); 2104 2105 $post->format_content[ $cache_key ] = $format_content; 2089 2106 return $post->format_content[ $cache_key ]; 2090 2107 } … … 2165 2182 $captions[] = $shortcode[0]; 2166 2183 if ( $html ) 2167 $tags[] = do_shortcode ( $shortcode[0]);2184 $tags[] = do_shortcode_tag( $shortcode ); 2168 2185 } 2169 2186 … … 2411 2428 if ( strstr( $shortcode[0], $url ) ) { 2412 2429 if ( ! $matched ) 2413 $matched = do_shortcode ( $shortcode[0]);2430 $matched = do_shortcode_tag( $shortcode ); 2414 2431 // $content = str_replace( $shortcode[0], '', $content, $count ); 2415 2432 }
Note: See TracChangeset
for help on using the changeset viewer.