diff options
Diffstat (limited to 'plugins/wordpress-mobile-pack/export/class-export-settings.php')
-rwxr-xr-x | plugins/wordpress-mobile-pack/export/class-export-settings.php | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/plugins/wordpress-mobile-pack/export/class-export-settings.php b/plugins/wordpress-mobile-pack/export/class-export-settings.php index e0ba8d7c..12d3e6e0 100755 --- a/plugins/wordpress-mobile-pack/export/class-export-settings.php +++ b/plugins/wordpress-mobile-pack/export/class-export-settings.php @@ -170,97 +170,6 @@ if ( ! class_exists( 'WMobilePack_Export_Settings' ) ) { } /** - * Export manifest files for Android or Mozilla (Premium settings). - * - * The method receives a single GET param: - * - * - content = 'androidmanifest' or 'mozillamanifest' - * - * @return string - */ - public function export_manifest_premium(){ - - if (WMobilePack_Options::get_setting('premium_active') == 1 && WMobilePack_Options::get_setting('premium_api_key') != ''){ - - if (!class_exists('WMobilePack_Premium')) - require_once(WMP_PLUGIN_PATH.'inc/class-wmp-premium.php'); - - $premium_manager = new WMobilePack_Premium(); - $arr_config_premium = $premium_manager->get_premium_config(); - - if ($arr_config_premium !== null){ - - if (!isset($arr_config_premium['domain_name']) || $arr_config_premium['domain_name'] == '') { - - $blog_name = $arr_config_premium['title']; - - if (isset($arr_config_premium['kit_type']) && $arr_config_premium['kit_type'] == 'wpmp') { - $blog_name = urldecode($blog_name); - } - - // init response depending on the manifest type - if (isset($_GET['content']) && $_GET['content'] == 'androidmanifest') { - - $arr_manifest = array( - 'name' => $blog_name, - 'start_url' => home_url(), - 'display' => 'standalone' - ); - - } else { - - // remove domain name from the launch path - $launch_path = home_url(); - $launch_path = str_replace('http://' . $_SERVER['HTTP_HOST'], '', $launch_path); - $launch_path = str_replace('https://' . $_SERVER['HTTP_HOST'], '', $launch_path); - - $arr_manifest = array( - 'name' => $blog_name, - 'launch_path' => $launch_path, - 'developer' => array( - "name" => $blog_name - ) - ); - } - - // load icon path - $icon_path = false; - - if (isset($arr_config_premium['icon_path']) && $arr_config_premium['icon_path'] != '') { - - // Check if we have a secure https connection - $is_secure = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443; - - $cdn_apps = $is_secure ? $arr_config_premium['cdn_apps_https'] : $arr_config_premium['cdn_apps']; - $icon_path = $cdn_apps . "/" . $arr_config_premium['shorten_url'] . '/' . $arr_config_premium['icon_path']; - } - - // set icon depending on the manifest file type - if ($icon_path != false) { - - if ($_GET['content'] == 'androidmanifest') { - - $arr_manifest['icons'] = array( - array( - "src" => $icon_path, - "sizes" => "192x192" - ) - ); - - } else { - $arr_manifest['icons'] = array( - '152' => $icon_path, - ); - } - } - - return json_encode($arr_manifest); - } - } - } - } - - /** * * Export settings file. * |