mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
set_post_thumbnail(). fixes #15192.
git-svn-id: https://develop.svn.wordpress.org/trunk@16388 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1420,13 +1420,8 @@ case 'set-post-thumbnail':
|
||||
die( _wp_post_thumbnail_html() );
|
||||
}
|
||||
|
||||
if ( $thumbnail_id && get_post( $thumbnail_id ) ) {
|
||||
$thumbnail_html = wp_get_attachment_image( $thumbnail_id, 'thumbnail' );
|
||||
if ( !empty( $thumbnail_html ) ) {
|
||||
update_post_meta( $post_ID, '_thumbnail_id', $thumbnail_id );
|
||||
die( _wp_post_thumbnail_html( $thumbnail_id ) );
|
||||
}
|
||||
}
|
||||
if ( set_post_thumbnail( $post_ID, $thumbnail_id ) )
|
||||
die( _wp_post_thumbnail_html( $thumbnail_id ) );
|
||||
die( '0' );
|
||||
break;
|
||||
case 'date_format' :
|
||||
|
||||
Reference in New Issue
Block a user