WordPress.org

Make WordPress Core

Changeset 12137


Ignore:
Timestamp:
11/02/2009 06:00:41 PM (12 years ago)
Author:
ryan
Message:

Call get_post_image_id() only if current_theme_supports( 'post-thumbnails' ).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/media.php

    r12130 r12137  
    12101210    if ( $delete )
    12111211        $delete = current_user_can('delete_post', $attachment_id) ? "<a href=\"$trash_href\" id=\"del[$attachment_id]\" class=\"delete\">" . __('Move to Trash') . "</a> <a href=\"$untrash_href\" id=\"undo[$attachment_id]\" class=\"undo hidden\">" . __('Undo?') . "</a>" : "";
    1212     if ( 'image' == $type && get_post_image_id($_GET['post_id']) != $attachment_id )
     1212    if ( 'image' == $type && current_theme_supports( 'post-thumbnails' ) && get_post_image_id($_GET['post_id']) != $attachment_id )
    12131213        $thumbnail = "<a class='wp-post-thumbnail' href='#' onclick='WPSetAsThumbnail(\"$attachment_id\");return false;'>" . esc_html__( "Use as thumbnail" ) . "</a>";
    12141214
Note: See TracChangeset for help on using the changeset viewer.