Skip to content

Instantly share code, notes, and snippets.

@yhira
Last active May 31, 2020 13:30
Show Gist options
  • Save yhira/3920be4b9f437a363e764d0107c24445 to your computer and use it in GitHub Desktop.
Save yhira/3920be4b9f437a363e764d0107c24445 to your computer and use it in GitHub Desktop.
Cocoonのデフォルトサイトアイコンを変更する
//デフォルトのサイトアイコンを変更する
add_filter('add_default_site_icon_tag', function ($tag){
$tag = '<link rel="icon" href="32x32画像のURL" sizes="32x32" />'.PHP_EOL;
$tag .= '<link rel="icon" href="192x192画像のURL" sizes="192x192" />'.PHP_EOL;
$tag .= '<link rel="apple-touch-icon" href="180x180画像のURL" />'.PHP_EOL;
$tag .= '<meta name="msapplication-TileImage" content="270x270画像のURL" />'.PHP_EOL;
return $tag;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment