mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Media: Replace the thumbnail on post.php using a request variable instead of the referer. props ocean90. fixes #21391.
git-svn-id: https://develop.svn.wordpress.org/trunk@22807 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -711,7 +711,7 @@ function wp_save_image( $post_id ) {
|
||||
|
||||
if ( $target == 'thumbnail' || $target == 'all' || $target == 'full' ) {
|
||||
// Check if it's an image edit from attachment edit screen
|
||||
if ( false !== strpos( wp_get_referer(), 'post.php' ) ) {
|
||||
if ( ! empty( $_REQUEST['context'] ) && 'edit-attachment' == $_REQUEST['context'] ) {
|
||||
$thumb_url = wp_get_attachment_image_src( $post_id, array( 900, 600 ), true );
|
||||
$return->thumbnail = $thumb_url[0];
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user