Bring Featured Images back into the main media dialog.
Most users don't realize that the Featured Image meta box exists; if they do, few use it. Restores the old meta box UI, including the admin_post_thumbnail_html filter. If a plugin is using _wp_post_thumbnail_html() in conjunction with Thickbox elsewhere, it will also magically still work. Specific underlying changes: * Converts the modal view to use the view manager, which means that a call to open() will automatically call render and attach if necessary. * Doesn't automatically set a state in wp.media, to allow code to customize the states to be added before activation. props koopersmith. fixes #21776. git-svn-id: http://core.svn.wordpress.org/trunk@22979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -199,14 +199,6 @@ function edit_post( $post_data = null ) {
|
||||
set_post_format( $post_ID, false );
|
||||
}
|
||||
|
||||
// Featured Images
|
||||
if ( isset( $post_data['thumbnail_id'] ) ) {
|
||||
if ( '-1' == $post_data['thumbnail_id'] )
|
||||
delete_post_thumbnail( $post_ID );
|
||||
else
|
||||
set_post_thumbnail( $post_ID, $post_data['thumbnail_id'] );
|
||||
}
|
||||
|
||||
// Meta Stuff
|
||||
if ( isset($post_data['meta']) && $post_data['meta'] ) {
|
||||
foreach ( $post_data['meta'] as $key => $value ) {
|
||||
|
||||
Reference in New Issue
Block a user