media_upload_mime_type_links
Filters the media upload mime type list items.
Returned values should begin with an <li> tag.
Использование
add_filter( 'media_upload_mime_type_links', 'wp_kama_media_upload_mime_type_links_filter' ); /** * Function for `media_upload_mime_type_links` filter-hook. * * @param string[] $type_links An array of list items containing mime type link HTML. * * @return string[] */ function wp_kama_media_upload_mime_type_links_filter( $type_links ){ // filter... return $type_links; }
- $type_links(string[])
- An array of list items containing mime type link HTML.
Список изменений
С версии 3.1.0 | Введена. |
Где вызывается хук
media_upload_mime_type_links
wp-admin/includes/media.php 2822
echo implode( ' | </li>', apply_filters( 'media_upload_mime_type_links', $type_links ) ) . '</li>';