Changeset 23840
- Timestamp:
- 03/28/2013 07:28:27 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/media.php
r23821 r23840 2070 2070 } 2071 2071 2072 $medias = call_user_func( 'get_attached_' . $type );2073 if ( ! empty( $medias ) ) {2074 $media = reset( $medias );2075 $url = wp_get_attachment_url( $media->ID );2076 $shortcode = sprintf( '[%s src="%s"]', $type, $url );2077 $post->format_content = do_shortcode( $shortcode );2078 return $post->format_content;2079 }2080 2081 2072 // these functions expected a reference, not a value 2082 2073 $_content = $post->post_content; … … 2107 2098 } 2108 2099 2100 $medias = call_user_func( 'get_attached_' . $type ); 2101 if ( ! empty( $medias ) ) { 2102 $media = reset( $medias ); 2103 $url = wp_get_attachment_url( $media->ID ); 2104 $shortcode = sprintf( '[%s src="%s"]', $type, $url ); 2105 $post->format_content = do_shortcode( $shortcode ); 2106 return $post->format_content; 2107 } 2108 2109 2109 return ''; 2110 2110 }
Note: See TracChangeset
for help on using the changeset viewer.