diff --git a/src/wp-admin/edit-form-advanced.php b/src/wp-admin/edit-form-advanced.php index 7f0ea62f6a..b1d0bf57fa 100644 --- a/src/wp-admin/edit-form-advanced.php +++ b/src/wp-admin/edit-form-advanced.php @@ -140,7 +140,7 @@ if ( 'attachment' == $post_type ) { add_meta_box( 'submitdiv', __('Save'), 'attachment_submit_meta_box', null, 'side', 'core' ); add_action( 'edit_form_after_title', 'edit_form_image_editor' ); - if ( preg_match( '#^audio#', $post->post_mime_type ) ) { + if ( 0 === strpos( $post->post_mime_type, 'audio/' ) ) { add_meta_box( 'attachment-id3', __( 'Metadata' ), 'attachment_id3_data_meta_box', null, 'normal', 'core' ); } } else { diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php index 47bbfdb509..91d558618a 100644 --- a/src/wp-admin/includes/media.php +++ b/src/wp-admin/includes/media.php @@ -2662,7 +2662,7 @@ function edit_form_image_editor( $post ) {


@@ -2688,7 +2688,7 @@ function edit_form_image_editor( $post ) { ?> post_content, 'attachment_content', $editor_args ); ?> @@ -2751,7 +2751,7 @@ function attachment_submitbox_metadata() { post_mime_type ) ): + if ( preg_match( '#^(audio|video)/#', $post->post_mime_type ) ): /** * Filter the audio and video metadata fields to be shown in the publish meta box. diff --git a/src/wp-admin/includes/meta-boxes.php b/src/wp-admin/includes/meta-boxes.php index f91df90347..f690f8b7e7 100644 --- a/src/wp-admin/includes/meta-boxes.php +++ b/src/wp-admin/includes/meta-boxes.php @@ -1071,7 +1071,7 @@ function attachment_id3_data_meta_box( $post ) { $meta = wp_get_attachment_metadata( $post->ID ); } - foreach ( wp_get_relevant_id3_keys() as $key => $label ): ?> + foreach ( wp_get_relevant_id3_keys( $post ) as $key => $label ): ?>

<# if ( data.image ) { #> - + <# } #>

“{{{ data.title }}}” - <# if ( data.meta.album ) { #>{{{ data.meta.album }}}<# } #> - <# if ( data.meta.artist ) { #>{{{ data.meta.artist }}}<# } #> + <# if ( data.meta.album ) { #>{{ data.meta.album }}<# } #> + <# if ( data.meta.artist ) { #>{{ data.meta.artist }}<# } #>