mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-04 22:57:20 +00:00
Turn on thumbnail support for attachment:audio and attachment:video. Change conditionals to check for theme OR post type support when determining whether to turn on the Featured Image UI pieces in the admin.
Fixes #27460. git-svn-id: https://develop.svn.wordpress.org/trunk@27657 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2445,7 +2445,7 @@ function wp_enqueue_media( $args = array() ) {
|
||||
'nonce' => wp_create_nonce( 'update-post_' . $post->ID ),
|
||||
);
|
||||
|
||||
if ( theme_supports_thumbnails( $post ) && post_supports_thumbnails( $post ) ) {
|
||||
if ( theme_supports_thumbnails( $post ) || post_supports_thumbnails( $post ) ) {
|
||||
$featured_image_id = get_post_meta( $post->ID, '_thumbnail_id', true );
|
||||
$settings['post']['featuredImageId'] = $featured_image_id ? $featured_image_id : -1;
|
||||
}
|
||||
|
||||
@@ -74,6 +74,8 @@ function create_initial_post_types() {
|
||||
'delete_with_user' => true,
|
||||
'supports' => array( 'title', 'author', 'comments' ),
|
||||
) );
|
||||
add_post_type_support( 'attachment:audio', 'thumbnail' );
|
||||
add_post_type_support( 'attachment:video', 'thumbnail' );
|
||||
|
||||
register_post_type( 'revision', array(
|
||||
'labels' => array(
|
||||
|
||||
Reference in New Issue
Block a user