Version Description
- Date: 12.July.2021 Bug Fixed : User end issue: Apple splash icon not working properly #200 Bug Fixed : Centralize image with background color not getting saved. #205
Download this release
Release Info
Developer | superpwa |
Plugin | Super Progressive Web Apps |
Version | 2.1.15 |
Comparing to | |
See all releases |
Code changes from version 2.1.14 to 2.1.15
- addons/apple-touch-icons.php +26 -25
- readme.txt +5 -0
- superpwa.php +2 -2
addons/apple-touch-icons.php
CHANGED
@@ -24,12 +24,21 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
24 |
*/
|
25 |
function superpwa_ati_add_apple_touch_icons( $tags ) {
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
//Ios splash screen
|
34 |
$iosScreenSetting = get_option( 'superpwa_apple_icons_uploaded' );
|
35 |
if( $iosScreenSetting && isset($iosScreenSetting['ios_splash_icon']) && !empty($iosScreenSetting['ios_splash_icon']) ) {
|
@@ -37,21 +46,12 @@ function superpwa_ati_add_apple_touch_icons( $tags ) {
|
|
37 |
foreach ( $iosScreenSetting['ios_splash_icon'] as $key => $value ) {
|
38 |
if( !empty($value) && !empty($key) && isset($iconsInfo[$key]) ) {
|
39 |
$screenData = $iconsInfo[$key];
|
40 |
-
|
41 |
}//if closed
|
42 |
}//foreach closed
|
43 |
}
|
44 |
-
|
45 |
-
$
|
46 |
-
|
47 |
-
$tags .= '<meta name="apple-mobile-web-app-title" content="'.esc_attr($settings['app_name']).'">' . PHP_EOL;
|
48 |
-
$tags .= '<meta name="application-name" content="'.esc_attr($settings['app_name']).'">' . PHP_EOL;
|
49 |
-
$tags .= '<meta name="apple-mobile-web-app-capable" content="yes">' . PHP_EOL;
|
50 |
-
$tags .= '<meta name="apple-mobile-web-app-status-bar-style" content="black">' . PHP_EOL;
|
51 |
-
$tags .= '<meta name="mobile-web-app-capable" content="yes">' . PHP_EOL;
|
52 |
-
$tags .= '<meta name="apple-touch-fullscreen" content="yes">' . PHP_EOL;
|
53 |
-
|
54 |
-
return $tags;
|
55 |
}
|
56 |
add_filter( 'superpwa_wp_head_tags', 'superpwa_ati_add_apple_touch_icons' );
|
57 |
|
@@ -87,10 +87,10 @@ function superpwa_apple_icons_get_settings() {
|
|
87 |
|
88 |
$defaults = array(
|
89 |
'background_color' => '#cdcdcd',
|
90 |
-
'
|
91 |
);
|
92 |
|
93 |
-
return get_option( 'superpwa_apple_icons_settings'
|
94 |
}
|
95 |
/**
|
96 |
* Register Apple icons & splash screen settings
|
@@ -178,7 +178,8 @@ function superpwa_apple_icons_splash_screen_cb() {
|
|
178 |
|
179 |
function superpwa_apple_icons_splash_with_centre_screen_cb() {
|
180 |
$splashIcons = superpwa_apple_icons_get_settings();
|
181 |
-
|
|
|
182 |
}
|
183 |
|
184 |
/**
|
@@ -187,8 +188,9 @@ function superpwa_apple_icons_splash_with_centre_screen_cb() {
|
|
187 |
* @since 2.1.7
|
188 |
*/
|
189 |
function superpwa_apple_icons_splash_color_screen_cb() {
|
|
|
190 |
?>
|
191 |
-
<input type="text" name="superpwa_apple_icons_settings[background_color]" class="superpwa-colorpicker" id="ios-splash-color" value="<?php echo isset($splashIcons['screen_icon'])? $splashIcons['screen_icon']: '
|
192 |
<?php
|
193 |
}
|
194 |
|
@@ -248,9 +250,8 @@ function superpwa_apple_icons_validater_sanitizer( $settings ) {
|
|
248 |
|
249 |
// Sanitize and validate campaign source. Campaign source cannot be empty.
|
250 |
$settings['background_color'] = sanitize_text_field( $settings['background_color'] ) == '' ? '' : sanitize_text_field( $settings['background_color'] );
|
251 |
-
|
252 |
-
|
253 |
-
}
|
254 |
|
255 |
return $settings;
|
256 |
}
|
24 |
*/
|
25 |
function superpwa_ati_add_apple_touch_icons( $tags ) {
|
26 |
|
27 |
+
// Get the icons added via SuperPWA > Settings
|
28 |
+
$icons = superpwa_get_pwa_icons();
|
29 |
+
// Get settings
|
30 |
+
$settings = superpwa_get_settings();
|
31 |
+
|
32 |
+
$tags .= '<meta name="mobile-web-app-capable" content="yes">' . PHP_EOL;
|
33 |
+
$tags .= '<meta name="apple-touch-fullscreen" content="yes">' . PHP_EOL;
|
34 |
+
$tags .= '<meta name="apple-mobile-web-app-title" content="'.esc_attr($settings['app_name']).'">' . PHP_EOL;
|
35 |
+
$tags .= '<meta name="application-name" content="'.esc_attr($settings['app_name']).'">' . PHP_EOL;
|
36 |
+
$tags .= '<meta name="apple-mobile-web-app-capable" content="yes">' . PHP_EOL;
|
37 |
+
$tags .= '<meta name="apple-mobile-web-app-status-bar-style" content="default">' . PHP_EOL;
|
38 |
+
|
39 |
+
foreach( $icons as $icon ) {
|
40 |
+
$tags .= '<link rel="apple-touch-icon" sizes="' . $icon['sizes'] . '" href="' . $icon['src'] . '">' . PHP_EOL;
|
41 |
+
}
|
42 |
//Ios splash screen
|
43 |
$iosScreenSetting = get_option( 'superpwa_apple_icons_uploaded' );
|
44 |
if( $iosScreenSetting && isset($iosScreenSetting['ios_splash_icon']) && !empty($iosScreenSetting['ios_splash_icon']) ) {
|
46 |
foreach ( $iosScreenSetting['ios_splash_icon'] as $key => $value ) {
|
47 |
if( !empty($value) && !empty($key) && isset($iconsInfo[$key]) ) {
|
48 |
$screenData = $iconsInfo[$key];
|
49 |
+
$tags .= '<link rel="apple-touch-startup-image" media="screen and (device-width: '.$screenData['device-width'].') and (device-height: '.$screenData['device-height'].') and (-webkit-device-pixel-ratio: '.$screenData['ratio'].') and (orientation: '.$screenData['orientation'].')" href="'.$value.'"/>'."\n";
|
50 |
}//if closed
|
51 |
}//foreach closed
|
52 |
}
|
53 |
+
|
54 |
+
return $tags;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
}
|
56 |
add_filter( 'superpwa_wp_head_tags', 'superpwa_ati_add_apple_touch_icons' );
|
57 |
|
87 |
|
88 |
$defaults = array(
|
89 |
'background_color' => '#cdcdcd',
|
90 |
+
'screen_centre_icon'=> ''
|
91 |
);
|
92 |
|
93 |
+
return get_option( 'superpwa_apple_icons_settings',$defaults);
|
94 |
}
|
95 |
/**
|
96 |
* Register Apple icons & splash screen settings
|
178 |
|
179 |
function superpwa_apple_icons_splash_with_centre_screen_cb() {
|
180 |
$splashIcons = superpwa_apple_icons_get_settings();
|
181 |
+
|
182 |
+
echo '<input type="checkbox" id="center-mode" value="center" name="superpwa_apple_icons_settings[screen_centre_icon]" '.(isset( $splashIcons['screen_centre_icon']) && $splashIcons['screen_centre_icon']=='center'? 'checked': '') .'/>';
|
183 |
}
|
184 |
|
185 |
/**
|
188 |
* @since 2.1.7
|
189 |
*/
|
190 |
function superpwa_apple_icons_splash_color_screen_cb() {
|
191 |
+
$splashIcons = superpwa_apple_icons_get_settings();
|
192 |
?>
|
193 |
+
<input type="text" name="superpwa_apple_icons_settings[background_color]" class="superpwa-colorpicker" id="ios-splash-color" value="<?php echo (isset($splashIcons['screen_icon']) && !empty($splashIcons['screen_icon']))? $splashIcons['screen_icon']: $splashIcons['background_color'] ?>">
|
194 |
<?php
|
195 |
}
|
196 |
|
250 |
|
251 |
// Sanitize and validate campaign source. Campaign source cannot be empty.
|
252 |
$settings['background_color'] = sanitize_text_field( $settings['background_color'] ) == '' ? '' : sanitize_text_field( $settings['background_color'] );
|
253 |
+
|
254 |
+
$settings['screen_centre_icon'] = sanitize_text_field( $settings['screen_centre_icon'] ) == '' ? '' : sanitize_text_field( $settings['screen_centre_icon'] );
|
|
|
255 |
|
256 |
return $settings;
|
257 |
}
|
readme.txt
CHANGED
@@ -186,6 +186,11 @@ Feel free to get in touch if you have any questions.
|
|
186 |
|
187 |
== Changelog ==
|
188 |
|
|
|
|
|
|
|
|
|
|
|
189 |
= 2.1.14 =
|
190 |
* Date: [30.June.2021](https://superpwa.com/superpwa-2-1-14-release-note/?utm_source=wordpress.org&utm_medium=changelog)
|
191 |
Enhancement: Need to Improve Admin UI #196
|
186 |
|
187 |
== Changelog ==
|
188 |
|
189 |
+
= 2.1.15 =
|
190 |
+
* Date: [12.July.2021](https://superpwa.com/superpwa-2-1-15-release-note/?utm_source=wordpress.org&utm_medium=changelog)
|
191 |
+
Bug Fixed : User end issue: Apple splash icon not working properly #200
|
192 |
+
Bug Fixed : Centralize image with background color not getting saved. #205
|
193 |
+
|
194 |
= 2.1.14 =
|
195 |
* Date: [30.June.2021](https://superpwa.com/superpwa-2-1-14-release-note/?utm_source=wordpress.org&utm_medium=changelog)
|
196 |
Enhancement: Need to Improve Admin UI #196
|
superpwa.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Author: SuperPWA
|
7 |
* Author URI: https://profiles.wordpress.org/superpwa/
|
8 |
* Contributors: SuperPWA
|
9 |
-
* Version: 2.1.
|
10 |
* Text Domain: super-progressive-web-apps
|
11 |
* Domain Path: /languages
|
12 |
* License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
@@ -43,7 +43,7 @@ if ( ! defined('ABSPATH') ) exit;
|
|
43 |
* @since 1.0
|
44 |
*/
|
45 |
if ( ! defined( 'SUPERPWA_VERSION' ) ) {
|
46 |
-
define( 'SUPERPWA_VERSION' , '2.1.
|
47 |
}
|
48 |
|
49 |
/**
|
6 |
* Author: SuperPWA
|
7 |
* Author URI: https://profiles.wordpress.org/superpwa/
|
8 |
* Contributors: SuperPWA
|
9 |
+
* Version: 2.1.15
|
10 |
* Text Domain: super-progressive-web-apps
|
11 |
* Domain Path: /languages
|
12 |
* License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
43 |
* @since 1.0
|
44 |
*/
|
45 |
if ( ! defined( 'SUPERPWA_VERSION' ) ) {
|
46 |
+
define( 'SUPERPWA_VERSION' , '2.1.15' );
|
47 |
}
|
48 |
|
49 |
/**
|