- $fields = array(
- 'mime_type' => __( 'Mime-type:' ),
- 'year' => __( 'Year:' ),
- 'genre' => __( 'Genre:' ),
+ if ( preg_match( '#^(audio|video)#', $post->post_mime_type ) ):
+
+ /**
+ * Audio and video metadata fields to be shown in the publish meta box.
+ *
+ * The key for each item in the array should correspond to an attachment
+ * metadata key, and the value should be the desired label.
+ *
+ * @since 3.7.0
+ *
+ * @param array $fields {
+ * An array of the attachment metadata keys and labels.
+ *
+ * @type string 'mime_type' Label to be shown before the field mime_type.
+ * @type string 'year' Label to be shown before the field year.
+ * @type string 'genre' Label to be shown before the field genre.
+ * @type string 'length_formatted' Label to be shown before the field length_formatted.
+ * }
+ */
+ $fields = apply_filters( 'media_submitbox_misc_sections', array(
+ 'mime_type' => __( 'Mime-type:' ),
+ 'year' => __( 'Year:' ),
+ 'genre' => __( 'Genre:' ),