Make WordPress Core


Ignore:
Timestamp:
12/03/2012 02:38:10 AM (12 years ago)
Author:
nacin
Message:

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.

File:
1 edited

Legend:

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

    r22950 r22979  
    198198        elseif ( '0' == $post_data['post_format'] )
    199199            set_post_format( $post_ID, false );
    200     }
    201 
    202     // Featured Images
    203     if ( isset( $post_data['thumbnail_id'] ) ) {
    204         if ( '-1' == $post_data['thumbnail_id'] )
    205             delete_post_thumbnail( $post_ID );
    206         else
    207             set_post_thumbnail( $post_ID, $post_data['thumbnail_id'] );
    208200    }
    209201
Note: See TracChangeset for help on using the changeset viewer.