Ticket #36206: 36206.2.patch
File 36206.2.patch, 3.5 KB (added by , 8 years ago) |
---|
-
src/wp-admin/includes/media.php
2894 2894 endif; 2895 2895 2896 2896 if ( preg_match( '#^(audio|video)/#', $post->post_mime_type ) ) { 2897 $fields = array( 2898 'length_formatted' => __( 'Length:' ), 2899 'bitrate' => __( 'Bitrate:' ), 2900 ); 2897 2901 2898 2902 /** 2899 2903 * Filters the audio and video metadata fields to be shown in the publish meta box. … … 2902 2906 * metadata key, and the value should be the desired label. 2903 2907 * 2904 2908 * @since 3.7.0 2909 * @since 4.8.0 Added the `$post` parameter. 2905 2910 * 2906 * @param array $fields An array of the attachment metadata keys and labels. 2911 * @param array $fields An array of the attachment metadata keys and labels. 2912 * @param WP_Post $post WP_Post object for the current attachment. 2907 2913 */ 2908 $fields = apply_filters( 'media_submitbox_misc_sections', array( 2909 'length_formatted' => __( 'Length:' ), 2910 'bitrate' => __( 'Bitrate:' ), 2911 ) ); 2914 $fields = apply_filters( 'media_submitbox_misc_sections', $fields, $post ); 2912 2915 2913 2916 foreach ( $fields as $key => $label ) { 2914 2917 if ( empty( $meta[ $key ] ) ) { … … 2933 2936 <?php 2934 2937 } 2935 2938 2939 $fields = array( 2940 'dataformat' => __( 'Audio Format:' ), 2941 'codec' => __( 'Audio Codec:' ) 2942 ); 2943 2936 2944 /** 2937 2945 * Filters the audio attachment metadata fields to be shown in the publish meta box. 2938 2946 * … … 2940 2948 * metadata key, and the value should be the desired label. 2941 2949 * 2942 2950 * @since 3.7.0 2951 * @since 4.8.0 Added the `$post` parameter. 2943 2952 * 2944 * @param array $fields An array of the attachment metadata keys and labels. 2953 * @param array $fields An array of the attachment metadata keys and labels. 2954 * @param WP_Post $post WP_Post object for the current attachment. 2945 2955 */ 2946 $audio_fields = apply_filters( 'audio_submitbox_misc_sections', array( 2947 'dataformat' => __( 'Audio Format:' ), 2948 'codec' => __( 'Audio Codec:' ) 2949 ) ); 2956 $audio_fields = apply_filters( 'audio_submitbox_misc_sections', $fields, $post ); 2950 2957 2951 2958 foreach ( $audio_fields as $key => $label ) { 2952 2959 if ( empty( $meta['audio'][ $key ] ) ) { -
src/wp-admin/includes/meta-boxes.php
238 238 * Fires at the beginning of the publishing actions section of the Publish meta box. 239 239 * 240 240 * @since 2.7.0 241 * @since 4.8.0 Added the `$post` parameter. 242 * 243 * @param WP_Post|object $post WP_Post object for the current post on Edit Post screen, 244 * or link object for the current link on Edit Link screen. 241 245 */ 242 do_action( 'post_submitbox_start' );246 do_action( 'post_submitbox_start', $post ); 243 247 ?> 244 248 <div id="delete-action"> 245 249 <?php … … 320 324 * in the attachment editing screen. 321 325 * 322 326 * @since 3.5.0 327 * @since 4.8.0 Added the `$post` parameter. 328 * 329 * @param WP_Post $post WP_Post object for the current post. 323 330 */ 324 do_action( 'attachment_submitbox_misc_actions' );331 do_action( 'attachment_submitbox_misc_actions', $post ); 325 332 ?> 326 333 </div><!-- #misc-publishing-actions --> 327 334 <div class="clear"></div> … … 908 915 <div id="major-publishing-actions"> 909 916 <?php 910 917 /** This action is documented in wp-admin/includes/meta-boxes.php */ 911 do_action( 'post_submitbox_start' );918 do_action( 'post_submitbox_start', $link ); 912 919 ?> 913 920 <div id="delete-action"> 914 921 <?php