WordPress.org

Plugin Directory

Changeset 622440


Ignore:
Timestamp:
11/08/12 05:26:58 (18 months ago)
Author:
mdawaffe
Message:

PostImages: If a theme does not support post-thumbnails, get_post_thumbnail_id() won't exist.

Wrap in function_exists() check to prevent fatal error

Call to undefined function get_post_thumbnail_id() in wp-content/plugins/jetpack/class.jetpack-post-images.php on line 213

File:
1 edited

Legend:

Unmodified
Added
Removed
  • jetpack/trunk/class.jetpack-post-images.php

    r621465 r622440  
    211211    static function from_thumbnail( $post_id, $width = 200, $height = 200 ) { 
    212212        $images = array(); 
     213 
     214        if ( !function_exists( 'get_post_thumbnail_id' ) ) { 
     215            return $images; 
     216        } 
     217 
    213218        $thumb = get_post_thumbnail_id( $post_id ); 
    214219 
Note: See TracChangeset for help on using the changeset viewer.