Make WordPress Core


Ignore:
Timestamp:
12/10/2009 08:03:26 AM (15 years ago)
Author:
markjaquith
Message:

Provide visual feedback for "Use as thumbnail" when clicked immediately after uploading the image. fixes #11140

File:
1 edited

Legend:

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

    r12352 r12355  
    12461246        $calling_post_id = $post->post_parent;
    12471247    if ( 'image' == $type && $calling_post_id && current_theme_supports( 'post-thumbnails', get_post_type( $calling_post_id ) ) && get_post_thumbnail_id( $calling_post_id ) != $attachment_id )
    1248         $thumbnail = "<a class='wp-post-thumbnail' href='#' onclick='WPSetAsThumbnail(\"$attachment_id\");return false;'>" . esc_html__( "Use as thumbnail" ) . "</a>";
     1248        $thumbnail = "<a class='wp-post-thumbnail' id='wp-post-thumbnail-" . $attachment_id . "' href='#' onclick='WPSetAsThumbnail(\"$attachment_id\");return false;'>" . esc_html__( "Use as thumbnail" ) . "</a>";
    12491249
    12501250    if ( ( $send || $thumbnail || $delete ) && !isset($form_fields['buttons']) )
Note: See TracChangeset for help on using the changeset viewer.