Changeset 27657 for trunk/src/wp-admin/edit-form-advanced.php
- Timestamp:
- 03/23/2014 02:34:39 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit-form-advanced.php
r27469 r27657 25 25 $action = isset($action) ? $action : ''; 26 26 27 $media_type = false; 28 if ( 'attachment' === $post_type && $post_ID ) { 29 $post = get_post( $post_ID ); 30 $media_type = post_supports_thumbnails( $post ); 31 } 32 33 if ( post_type_supports( $post_type, 'editor' ) || post_type_supports( $post_type, 'thumbnail' ) || $media_type ) { 27 $media_support = theme_supports_thumbnails( $post ) || post_supports_thumbnails( $post ); 28 29 if ( post_type_supports( $post_type, 'editor' ) || post_type_supports( $post_type, 'thumbnail' ) || $media_support ) { 34 30 add_thickbox(); 35 31 wp_enqueue_media( array( 'post' => $post_ID ) ); … … 170 166 add_meta_box('pageparentdiv', 'page' == $post_type ? __('Page Attributes') : __('Attributes'), 'page_attributes_meta_box', null, 'side', 'core'); 171 167 172 $audio_post_support = $video_post_support = false; 173 $theme_support = current_theme_supports( 'post-thumbnails', $post_type ) && post_type_supports( $post_type, 'thumbnail' ); 174 if ( 'attachment' === $post_type && ! empty( $post->post_mime_type ) ) { 175 $audio_post_support = 0 === strpos( $post->post_mime_type, 'audio/' ) && current_theme_supports( 'post-thumbnails', 'attachment:audio' ) && post_type_supports( 'attachment:audio', 'thumbnail' ); 176 $video_post_support = 0 === strpos( $post->post_mime_type, 'video/' ) && current_theme_supports( 'post-thumbnails', 'attachment:video' ) && post_type_supports( 'attachment:video', 'thumbnail' ); 177 } 178 179 if ( $theme_support || $audio_post_support || $video_post_support ) 168 if ( current_theme_supports( 'post-thumbnails', $post_type ) || post_supports_thumbnails( $post ) ) 180 169 add_meta_box('postimagediv', __('Featured Image'), 'post_thumbnail_meta_box', null, 'side', 'low'); 181 170
Note: See TracChangeset
for help on using the changeset viewer.