Wordpress - Where do the favicons for Media Files come from
Well, I think you only need to modify the favicon.ico
file in your WordPress root directory.
Previous answer:
I guess you want to change this icon (/wp-includes/images/media/document.png
):
that shows up for PDF documents in the Media Library
.
You could then use the wp_mime_type_icon
filter to change the icon:
add_filter( 'wp_mime_type_icon', function( $icon, $mime, $post_id )
{
if( 'application/pdf' === $mime && $post_id > 0 )
$icon = 'http://example.tld/pdf.png'; // Modify this to your needs!
return $icon;
}, 10, 3 );
But for favicons, you can check out my answer here.