Make WordPress Core


Ignore:
Timestamp:
11/22/2012 03:43:16 AM (12 years ago)
Author:
koopersmith
Message:

Media: Replace the thumbnail on post.php using a request variable instead of the referer. props ocean90. fixes #21391.

File:
1 edited

Legend:

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

    r22749 r22807  
    712712        if ( $target == 'thumbnail' || $target == 'all' || $target == 'full' ) {
    713713            // Check if it's an image edit from attachment edit screen
    714             if ( false !== strpos( wp_get_referer(), 'post.php' ) ) {
     714            if ( ! empty( $_REQUEST['context'] ) && 'edit-attachment' == $_REQUEST['context'] ) {
    715715                $thumb_url = wp_get_attachment_image_src( $post_id, array( 900, 600 ), true );
    716716                $return->thumbnail = $thumb_url[0];
Note: See TracChangeset for help on using the changeset viewer.