WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/22/2012 03:43:16 AM (9 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/media.php

    r22783 r22807  
    22452245    $alt_text = get_post_meta( $post->ID, '_wp_attachment_image_alt', true );
    22462246
    2247     $post_mime_types = get_post_mime_types();
    2248     $keys = array_keys( wp_match_mime_types( array_keys( $post_mime_types ), $post->post_mime_type ) );
    2249     $type = array_shift( $keys );
    2250     $type_html = "<input type='hidden' id='type-of-$attachment_id' value='" . esc_attr( $type ) . "' />";
    2251 
    22522247    $media_dims = '';
    22532248    $meta = wp_get_attachment_metadata( $post->ID );
     
    22952290        echo '<input type="hidden" name="' . esc_attr( $hidden_field ) . '" value="' . esc_attr( $value ) . '" />' . "\n";
    22962291    }
     2292    echo '<input type="hidden" id="image-edit-context" value="edit-attachment" />' . "\n";
    22972293}
    22982294
Note: See TracChangeset for help on using the changeset viewer.