audio_submitbox_misc_sections

Filters the audio attachment metadata fields to be shown in the publish meta box.

Description

apply_filters( 'audio_submitbox_misc_sections', (callback) $array ); 

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.
  1. $array = apply_filters( 'audio_submitbox_misc_sections', $array ); 
  2.  
  3. if ( !empty( $array ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the audio_submitbox_misc_sections callback 
  2. function filter_audio_submitbox_misc_sections( $array ) { 
  3. // make filter magic happen here... 
  4. return $array
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'audio_submitbox_misc_sections', 'filter_audio_submitbox_misc_sections', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. 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  
  1. $audio_fields = apply_filters( 'audio_submitbox_misc_sections', array(