-
-
Save billerickson/c16576fec21351a1c139c6cc5bafb76a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Large Favicon | |
* | |
* @author Bill Erickson | |
* @see https://www.billerickson.net/code/large-favicon/ | |
* | |
* @param string $url, favicon image url | |
* @param int $size, size in pixels | |
* @return string $url | |
* | |
*/ | |
function ea_large_favicon( $url, $size ) { | |
if( intval( $size ) >= 128 ) { | |
$favicon_id = 88; // uploaded to media library | |
$url = wp_get_attachment_image_url( $favicon_id, array( $size, $size ) ); | |
} | |
return $url; | |
} | |
add_filter( 'get_site_icon_url', 'ea_large_favicon', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment