diff --git wp-includes/media.php wp-includes/media.php
index e74cd02..f9d3850 100644
|
|
function get_the_post_format_image( $attached_size = 'full', &$post = null ) { |
2371 | 2371 | return $post->format_content; |
2372 | 2372 | |
2373 | 2373 | $meta = get_post_format_meta( $post->ID ); |
| 2374 | |
| 2375 | $link_fmt = ''; |
| 2376 | if ( ! empty( $meta['url'] ) ) |
| 2377 | $link_fmt = '<a href="' . esc_url( $meta['url'] ) . '">%s</a>'; |
| 2378 | |
2374 | 2379 | if ( ! empty( $meta['image'] ) ) { |
2375 | | $post->format_content = wp_get_attachment_image( $meta['image'], $attached_size ); |
| 2380 | $image = wp_get_attachment_image( $meta['image'], $attached_size ); |
| 2381 | $post->format_content = ! empty( $link_fmt ) ? sprintf( $link_fmt, $image ) : $image; |
2376 | 2382 | return $post->format_content; |
2377 | 2383 | } |
2378 | 2384 | |
… |
… |
function get_the_post_format_image( $attached_size = 'full', &$post = null ) { |
2383 | 2389 | |
2384 | 2390 | $urls = array(); |
2385 | 2391 | foreach ( $sizes as $size ) { |
2386 | | $urls[] = reset( wp_get_attachment_image_src( $media->ID, $size ) ); |
2387 | | $urls[] = get_attachment_link( $media->ID ); |
| 2392 | $image = wp_get_attachment_image_src( $media->ID, $size ); |
| 2393 | if ( $image ) { |
| 2394 | $urls[] = reset( $image ); |
| 2395 | $urls[] = get_attachment_link( $media->ID ); |
| 2396 | } |
2388 | 2397 | } |
2389 | 2398 | |
2390 | 2399 | $count = 1; |
… |
… |
function get_the_post_format_image( $attached_size = 'full', &$post = null ) { |
2414 | 2423 | } |
2415 | 2424 | |
2416 | 2425 | $post->split_content = $content; |
2417 | | $post->format_content = wp_get_attachment_image( $media->ID, $attached_size ); |
| 2426 | $image = wp_get_attachment_image( $media->ID, $attached_size ); |
| 2427 | $post->format_content = ! empty( $link_fmt ) ? sprintf( $link_fmt, $image ) : $image; |
2418 | 2428 | return $post->format_content; |
2419 | 2429 | } |
2420 | 2430 | |
… |
… |
function get_the_post_format_image( $attached_size = 'full', &$post = null ) { |
2423 | 2433 | if ( ! empty( $htmls ) ) { |
2424 | 2434 | $html = reset( $htmls ); |
2425 | 2435 | $post->split_content = $content; |
2426 | | $post->format_content = $html; |
| 2436 | $post->format_content = ! empty( $link_fmt ) ? sprintf( $link_fmt, $html ) : $html; |
2427 | 2437 | return $post->format_content; |
2428 | 2438 | } |
2429 | 2439 | } |