summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/wordpress-mobile-pack/export/class-export-settings.php')
-rwxr-xr-xplugins/wordpress-mobile-pack/export/class-export-settings.php50
1 files changed, 30 insertions, 20 deletions
diff --git a/plugins/wordpress-mobile-pack/export/class-export-settings.php b/plugins/wordpress-mobile-pack/export/class-export-settings.php
index f68e2a39..e0ba8d7c 100755
--- a/plugins/wordpress-mobile-pack/export/class-export-settings.php
+++ b/plugins/wordpress-mobile-pack/export/class-export-settings.php
@@ -94,7 +94,8 @@ if ( ! class_exists( 'WMobilePack_Export_Settings' ) ) {
if (isset($_GET['content']) && $_GET['content'] == 'androidmanifest') {
$arr_manifest = array(
- 'name' => $blog_name,
+ 'name' => $blog_name,
+ 'short_name' => $blog_name,
'start_url' => home_url(),
'display' => 'standalone',
'orientation' => 'any'
@@ -130,30 +131,39 @@ if ( ! class_exists( 'WMobilePack_Export_Settings' ) ) {
// load icon from the local settings and folder
$icon_path = WMobilePack_Options::get_setting('icon');
- if ($icon_path != '') {
+ if ($icon_path != '' && $_GET['content'] == 'androidmanifest') {
- $WMP_Uploads = $this->get_uploads_manager();
- $icon_path = $WMP_Uploads->get_file_url($icon_path);
- }
+ $base_path = $icon_path;
+ $arr_manifest['icons'] = array();
+ $WMP_Uploads = $this->get_uploads_manager();
- // set icon depending on the manifest file type
- if ($icon_path != '') {
+ foreach (WMobilePack_Uploads::$manifest_sizes as $manifest_size) {
- if ($_GET['content'] == 'androidmanifest') {
+ $icon_path = $WMP_Uploads->get_file_url($manifest_size . $base_path);
- $arr_manifest['icons'] = array(
- array(
- "src" => $icon_path,
- "sizes" => "192x192"
- )
- );
+ if ($icon_path != '') {
+
+ $arr_manifest['icons'][] = array(
+ "src" => $icon_path,
+ "sizes" => $manifest_size . 'x' . $manifest_size,
+ "type" => "image/png"
+ );
+ }
+
+ }
+ } elseif ($icon_path != '') {
+ $WMP_Uploads = $this->get_uploads_manager();
+
+ $icon_path = $WMP_Uploads->get_file_url($icon_path);
+
+ if ($icon_path != '') {
+
+ $arr_manifest['icons'] = array(
+ '152' => $icon_path,
+ );
+ }
+ }
- } else {
- $arr_manifest['icons'] = array(
- '152' => $icon_path,
- );
- }
- }
return json_encode($arr_manifest);