audio_submitbox_misc_sections
Filters the audio attachment metadata fields to be shown in the publish meta box.
Description
The key for each item in the array should correspond to an attachment metadata key, and the value should be the desired label.
Parameters (1)
- 0. $array — Optional. (callback) =>
array( 'dataformat' => __( 'Audio Format:' ), 'codec' => __( 'Audio Codec:' ) )
- An array of the attachment metadata keys and labels.
Usage
- To run the hook, copy the example below.
- $array = apply_filters( 'audio_submitbox_misc_sections', $array );
- if ( !empty( $array ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the audio_submitbox_misc_sections callback
- function filter_audio_submitbox_misc_sections( $array ) {
- // make filter magic happen here...
- return $array;
- };
- // add the filter
- add_filter( 'audio_submitbox_misc_sections', 'filter_audio_submitbox_misc_sections', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'audio_submitbox_misc_sections', 'filter_audio_submitbox_misc_sections', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /wp-admin/includes/media.php
- $audio_fields = apply_filters( 'audio_submitbox_misc_sections', array(