From 41823a31715d76b1cd394bf8a61b23ff11bed017 Mon Sep 17 00:00:00 2001 From: ryan 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: http://svn.automattic.com/wordpress/trunk@12137 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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']) )