From 804a008eb1ffce0a6c49aab942804c95f19db5b6 Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Mon, 13 Jul 2015 17:57:19 +0000 Subject: [PATCH] Site Icon: Add Android-specific app icon. Falling back to Apple app icons is deprecated behavior and will not work forever. 192px is the recommended size for that icon. Props kraftbj. Fixes #32964. git-svn-id: https://develop.svn.wordpress.org/trunk@33202 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-site-icon.php | 8 ++++++++ src/wp-includes/general-template.php | 1 + tests/phpunit/tests/template/general.php | 2 ++ 3 files changed, 11 insertions(+) diff --git a/src/wp-admin/includes/class-wp-site-icon.php b/src/wp-admin/includes/class-wp-site-icon.php index cb7dbbb1a2..e37ab9206f 100644 --- a/src/wp-admin/includes/class-wp-site-icon.php +++ b/src/wp-admin/includes/class-wp-site-icon.php @@ -39,6 +39,14 @@ class WP_Site_Icon { */ 270, + /* + * App icon for Android/Chrome. + * + * @link https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android + * @link https://developer.chrome.com/multidevice/android/installtohomescreen + */ + 192, + /* * App icons up to iPhone 6 Plus. * diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index a653bd6f68..25652a901e 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -2451,6 +2451,7 @@ function wp_site_icon() { $meta_tags = array( sprintf( '', esc_url( get_site_icon_url( null, 32 ) ) ), + sprintf( '', esc_url( get_site_icon_url( null, 192 ) ) ), sprintf( '', esc_url( get_site_icon_url( null, 180 ) ) ), sprintf( '', esc_url( get_site_icon_url( null, 270 ) ) ), ); diff --git a/tests/phpunit/tests/template/general.php b/tests/phpunit/tests/template/general.php index d2cb586bbc..c7f2ff74c4 100644 --- a/tests/phpunit/tests/template/general.php +++ b/tests/phpunit/tests/template/general.php @@ -67,6 +67,7 @@ class Tests_General_Template extends WP_UnitTestCase { $this->_set_site_icon(); $output = array( sprintf( '', esc_url( get_site_icon_url( null, 32 ) ) ), + sprintf( '', esc_url( get_site_icon_url( null, 192 ) ) ), sprintf( '', esc_url( get_site_icon_url( null, 180 ) ) ), sprintf( '', esc_url( get_site_icon_url( null, 270 ) ) ), '', @@ -89,6 +90,7 @@ class Tests_General_Template extends WP_UnitTestCase { $this->_set_site_icon(); $output = array( sprintf( '', esc_url( get_site_icon_url( null, 32 ) ) ), + sprintf( '', esc_url( get_site_icon_url( null, 192 ) ) ), sprintf( '', esc_url( get_site_icon_url( null, 180 ) ) ), sprintf( '', esc_url( get_site_icon_url( null, 270 ) ) ), sprintf( '', esc_url( get_site_icon_url( null, 150 ) ) ),