Skip to content

Instantly share code, notes, and snippets.

@nirrosenbaum
Forked from billerickson/functions.php
Last active April 27, 2019 05:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nirrosenbaum/68c1e8178ac4f06d8f36 to your computer and use it in GitHub Desktop.
Save nirrosenbaum/68c1e8178ac4f06d8f36 to your computer and use it in GitHub Desktop.
<?php
function prefix_add_site_icon_size( $sizes ) {
$sizes[] = 152;
return $sizes;
}
add_filter( 'site_icon_image_sizes', 'prefix_add_site_icon_size' );
function prefix_add_site_icon_tag( $meta_tags ) {
$meta_tags[] = sprintf(
'<link rel="icon" href="%s" sizes="152x152" />',
esc_url( get_site_icon_url( null, 152 ) )
);
return $meta_tags;
}
add_filter( 'site_icon_meta_tags', 'prefix_add_site_icon_tag' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment