media_upload_mime_type_links

Filters the media upload mime type list items.

Description

apply_filters( 'media_upload_mime_type_links', (array) $type_links ); 

Returned values should begin with an

  • tag.

  • Parameters (1)

    0. $type_links (array)
    An array of list items containing mime type link HTML.

    Usage

    To run the hook, copy the example below.
    1. $type_links = apply_filters( 'media_upload_mime_type_links', $type_links ); 
    2.  
    3. if ( !empty( $type_links ) ) { 
    4.  
    5. // everything has led up to this point... 
    6.  
    7.  
    The following example is for adding a hook callback.
    1. // define the media_upload_mime_type_links callback 
    2. function filter_media_upload_mime_type_links( $type_links ) { 
    3. // make filter magic happen here... 
    4. return $type_links
    5. }; 
    6.  
    7. // add the filter 
    8. add_filter( 'media_upload_mime_type_links', 'filter_media_upload_mime_type_links', 10, 1 ); 
    To remove a hook callback, use the example below.
    1. // remove the filter 
    2. remove_filter( 'media_upload_mime_type_links', 'filter_media_upload_mime_type_links', 10, 1 ); 

    Defined (1)

    The filter is defined in the following location(s).

    /wp-admin/includes/media.php  
    1. echo implode(' | </li>', apply_filters( 'media_upload_mime_type_links', $type_links ) ) . '</li>';