Changeset 41581
- Timestamp:
- 09/23/2017 05:06:40 PM (7 years ago)
- Location:
- trunk/src/wp-admin/includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/media.php
r41328 r41581 2900 2900 2901 2901 if ( preg_match( '#^(audio|video)/#', $post->post_mime_type ) ) { 2902 $fields = array( 2903 'length_formatted' => __( 'Length:' ), 2904 'bitrate' => __( 'Bitrate:' ), 2905 ); 2902 2906 2903 2907 /** … … 2908 2912 * 2909 2913 * @since 3.7.0 2914 * @since 4.9.0 Added the `$post` parameter. 2910 2915 * 2911 * @param array $fields An array of the attachment metadata keys and labels. 2916 * @param array $fields An array of the attachment metadata keys and labels. 2917 * @param WP_Post $post WP_Post object for the current attachment. 2912 2918 */ 2913 $fields = apply_filters( 'media_submitbox_misc_sections', array( 2914 'length_formatted' => __( 'Length:' ), 2915 'bitrate' => __( 'Bitrate:' ), 2916 ) ); 2919 $fields = apply_filters( 'media_submitbox_misc_sections', $fields, $post ); 2917 2920 2918 2921 foreach ( $fields as $key => $label ) { … … 2939 2942 } 2940 2943 2944 $fields = array( 2945 'dataformat' => __( 'Audio Format:' ), 2946 'codec' => __( 'Audio Codec:' ) 2947 ); 2948 2941 2949 /** 2942 2950 * Filters the audio attachment metadata fields to be shown in the publish meta box. … … 2946 2954 * 2947 2955 * @since 3.7.0 2956 * @since 4.9.0 Added the `$post` parameter. 2948 2957 * 2949 * @param array $fields An array of the attachment metadata keys and labels. 2958 * @param array $fields An array of the attachment metadata keys and labels. 2959 * @param WP_Post $post WP_Post object for the current attachment. 2950 2960 */ 2951 $audio_fields = apply_filters( 'audio_submitbox_misc_sections', array( 2952 'dataformat' => __( 'Audio Format:' ), 2953 'codec' => __( 'Audio Codec:' ) 2954 ) ); 2961 $audio_fields = apply_filters( 'audio_submitbox_misc_sections', $fields, $post ); 2955 2962 2956 2963 foreach ( $audio_fields as $key => $label ) { -
trunk/src/wp-admin/includes/meta-boxes.php
r41563 r41581 245 245 * 246 246 * @since 2.7.0 247 */ 248 do_action( 'post_submitbox_start' ); 247 * @since 4.9.0 Added the `$post` parameter. 248 * 249 * @param WP_Post|null $post WP_Post object for the current post on Edit Post screen, 250 * null on Edit Link screen. 251 */ 252 do_action( 'post_submitbox_start', $post ); 249 253 ?> 250 254 <div id="delete-action"> … … 327 331 * 328 332 * @since 3.5.0 333 * @since 4.9.0 Added the `$post` parameter. 334 * 335 * @param WP_Post $post WP_Post object for the current attachment. 329 336 */ 330 do_action( 'attachment_submitbox_misc_actions' );337 do_action( 'attachment_submitbox_misc_actions', $post ); 331 338 ?> 332 339 </div><!-- #misc-publishing-actions --> … … 915 922 <?php 916 923 /** This action is documented in wp-admin/includes/meta-boxes.php */ 917 do_action( 'post_submitbox_start' );924 do_action( 'post_submitbox_start', null ); 918 925 ?> 919 926 <div id="delete-action">
Note: See TracChangeset
for help on using the changeset viewer.