Plugin Directory

Changeset 712889


Ignore:
Timestamp:
05/14/2013 11:58:34 AM (13 years ago)
Author:
zemanta
Message:

Thumbnailer supports WP3.6 Image Post Format

Location:
related-posts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • related-posts/tags/2.7.3/thumbnailer.php

    r712853 r712889  
    195195    }
    196196
     197    if (!$image_id) {
     198        // Image post format. Check wp-includes/media.php:get_the_post_format_image for the reference.
     199        $meta = get_post_format_meta($related_post->ID);
     200        if (!empty($meta['image'])) {
     201            if (is_numeric($meta['image'])) {
     202                $image_id = absint($meta['image']);
     203            } else {
     204                $image_id = img_html_to_post_id($meta['image']);
     205            }
     206        }
     207    }
     208
    197209    if ($image_id === null) {
    198210        return null;
  • related-posts/trunk/thumbnailer.php

    r712853 r712889  
    195195    }
    196196
     197    if (!$image_id) {
     198        // Image post format. Check wp-includes/media.php:get_the_post_format_image for the reference.
     199        $meta = get_post_format_meta($related_post->ID);
     200        if (!empty($meta['image'])) {
     201            if (is_numeric($meta['image'])) {
     202                $image_id = absint($meta['image']);
     203            } else {
     204                $image_id = img_html_to_post_id($meta['image']);
     205            }
     206        }
     207    }
     208
    197209    if ($image_id === null) {
    198210        return null;
Note: See TracChangeset for help on using the changeset viewer.