From 53321a009302ba515188e5d985dc79bb8ae636b3 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 2 Nov 2009 18:00:41 +0000 Subject: [PATCH] Call get_post_image_id() only if current_theme_supports( 'post-thumbnails' ). git-svn-id: https://develop.svn.wordpress.org/trunk@12137 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/media.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 0449c5739a..a9a5e94fa7 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -1209,7 +1209,7 @@ function get_media_item( $attachment_id, $args = null ) { $send = ""; if ( $delete ) $delete = current_user_can('delete_post', $attachment_id) ? "" . __('Move to Trash') . " " . __('Undo?') . "" : ""; - if ( 'image' == $type && get_post_image_id($_GET['post_id']) != $attachment_id ) + if ( 'image' == $type && current_theme_supports( 'post-thumbnails' ) && get_post_image_id($_GET['post_id']) != $attachment_id ) $thumbnail = "" . esc_html__( "Use as thumbnail" ) . ""; if ( ( $send || $thumbnail || $delete ) && !isset($form_fields['buttons']) )