Ticket #25171: 25171.diff
File 25171.diff, 2.0 KB (added by , 7 years ago) |
---|
-
src/wp-admin/includes/media.php
2453 2453 <?php 2454 2454 if ( preg_match( '#^audio|video#', $post->post_mime_type ) ): 2455 2455 2456 $fields = array( 2456 /** 2457 * Audio and video metadata fields to be shown in the publish meta box. 2458 * 2459 * @since 3.7.0 2460 * 2461 * @param array $fields { 2462 * An array of the attachment metadata keys and labels. 2463 * 2464 * @type string Label to be shown before the field data. 2465 * } 2466 */ 2467 $fields = apply_filters( 'media_submitbox_misc_sections', array( 2457 2468 'mime_type' => __( 'Mime-type:' ), 2458 2469 'year' => __( 'Year:' ), 2459 2470 'genre' => __( 'Genre:' ), 2460 2471 'length_formatted' => __( 'Length:' ), 2461 ) ;2472 ) ); 2462 2473 2463 2474 foreach ( $fields as $key => $label ): 2464 2475 if ( ! empty( $meta[$key] ) ) : ?> 2465 <div class="misc-pub-section misc-pub-mime-meta ">2476 <div class="misc-pub-section misc-pub-mime-meta misc-pub-<?php echo sanitize_html_class( $key ); ?>"> 2466 2477 <?php echo $label ?> <strong><?php echo esc_html( $meta[$key] ); ?></strong> 2467 2478 </div> 2468 2479 <?php … … 2482 2493 <?php 2483 2494 endif; 2484 2495 2485 $audio_fields = array( 2496 /** 2497 * Audio attachment metadata fields to be shown in the publish meta box. 2498 * 2499 * @since 3.7.0 2500 * 2501 * @param array $fields { 2502 * An array of the attachment metadata keys and labels. 2503 * 2504 * @type string Label to be shown before the field data. 2505 * } 2506 */ 2507 $audio_fields = apply_filters( 'audio_submitbox_misc_sections', array( 2486 2508 'dataformat' => __( 'Audio Format:' ), 2487 2509 'codec' => __( 'Audio Codec:' ) 2488 ) ;2510 ) ); 2489 2511 2490 2512 foreach ( $audio_fields as $key => $label ): 2491 2513 if ( ! empty( $meta['audio'][$key] ) ) : ?> 2492 <div class="misc-pub-section misc-pub-audio ">2514 <div class="misc-pub-section misc-pub-audio misc-pub-<?php echo sanitize_html_class( $key ); ?>"> 2493 2515 <?php echo $label; ?> <strong><?php echo esc_html( $meta['audio'][$key] ); ?></strong> 2494 2516 </div> 2495 2517 <?php