summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2016-04-18 11:42:44 -0400
committerAnthony G. Basile <blueness@gentoo.org>2016-04-18 11:42:44 -0400
commitc3ce6c82a853dc176b73186736f95438cfef713d (patch)
tree7af35526ebccb8bd381ab7646b1f8cf67511dac7 /plugins/wordpress-mobile-pack/frontend/themes
parentUpdate plugin public-post-preview to 2.5.0 (diff)
downloadblogs-gentoo-c3ce6c82a853dc176b73186736f95438cfef713d.tar.gz
blogs-gentoo-c3ce6c82a853dc176b73186736f95438cfef713d.tar.bz2
blogs-gentoo-c3ce6c82a853dc176b73186736f95438cfef713d.zip
Update pluging wordpress-mobile-pack to 2.2.2
Diffstat (limited to 'plugins/wordpress-mobile-pack/frontend/themes')
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/.htaccess0
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/app1/category.php0
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-1-fonts-1.css0
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-1-fonts-2.css0
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-1-fonts-3.css0
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-2-fonts-1.css0
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-2-fonts-2.css0
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-2-fonts-3.css0
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-3-fonts-1.css0
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-3-fonts-2.css0
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-3-fonts-3.css0
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/app1/index.php0
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/app1/js/app.js0
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/app1/others/credits.json0
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/app1/page.php0
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/app1/scss/phone.scss0
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/app1/single.php0
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/app1/snapshots/1-preview-phone-cover.pngbin292291 -> 292291 bytes
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/app1/snapshots/2-preview-phone-categories.pngbin175123 -> 175123 bytes
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/app1/snapshots/3-preview-phone-menu.pngbin234747 -> 234747 bytes
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/app1/snapshots/4-preview-phone-article.pngbin146073 -> 146073 bytes
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/app1/snapshots/5-preview-phone-comments.pngbin72347 -> 72347 bytes
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/app1/template.php0
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/premium/category.php29
-rwxr-xr-xplugins/wordpress-mobile-pack/frontend/themes/premium/config-premium.php11
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/premium/index.php13
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/premium/page.php73
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/premium/single.php36
-rwxr-xr-x[-rw-r--r--]plugins/wordpress-mobile-pack/frontend/themes/premium/template.php692
29 files changed, 410 insertions, 444 deletions
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/.htaccess b/plugins/wordpress-mobile-pack/frontend/themes/.htaccess
index d2e1ee02..d2e1ee02 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/.htaccess
+++ b/plugins/wordpress-mobile-pack/frontend/themes/.htaccess
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/app1/category.php b/plugins/wordpress-mobile-pack/frontend/themes/app1/category.php
index 0c47c52e..0c47c52e 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/app1/category.php
+++ b/plugins/wordpress-mobile-pack/frontend/themes/app1/category.php
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-1-fonts-1.css b/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-1-fonts-1.css
index aa2d514b..aa2d514b 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-1-fonts-1.css
+++ b/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-1-fonts-1.css
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-1-fonts-2.css b/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-1-fonts-2.css
index 5129de75..5129de75 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-1-fonts-2.css
+++ b/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-1-fonts-2.css
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-1-fonts-3.css b/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-1-fonts-3.css
index 8e834f24..8e834f24 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-1-fonts-3.css
+++ b/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-1-fonts-3.css
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-2-fonts-1.css b/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-2-fonts-1.css
index b62066da..b62066da 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-2-fonts-1.css
+++ b/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-2-fonts-1.css
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-2-fonts-2.css b/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-2-fonts-2.css
index 00ed2042..00ed2042 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-2-fonts-2.css
+++ b/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-2-fonts-2.css
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-2-fonts-3.css b/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-2-fonts-3.css
index 18439713..18439713 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-2-fonts-3.css
+++ b/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-2-fonts-3.css
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-3-fonts-1.css b/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-3-fonts-1.css
index 2a30bb28..2a30bb28 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-3-fonts-1.css
+++ b/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-3-fonts-1.css
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-3-fonts-2.css b/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-3-fonts-2.css
index 94fc6f43..94fc6f43 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-3-fonts-2.css
+++ b/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-3-fonts-2.css
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-3-fonts-3.css b/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-3-fonts-3.css
index 000f5f30..000f5f30 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-3-fonts-3.css
+++ b/plugins/wordpress-mobile-pack/frontend/themes/app1/css/colors-3-fonts-3.css
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/app1/index.php b/plugins/wordpress-mobile-pack/frontend/themes/app1/index.php
index ff061938..ff061938 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/app1/index.php
+++ b/plugins/wordpress-mobile-pack/frontend/themes/app1/index.php
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/app1/js/app.js b/plugins/wordpress-mobile-pack/frontend/themes/app1/js/app.js
index 10e23151..10e23151 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/app1/js/app.js
+++ b/plugins/wordpress-mobile-pack/frontend/themes/app1/js/app.js
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/app1/others/credits.json b/plugins/wordpress-mobile-pack/frontend/themes/app1/others/credits.json
index 1fc4f37a..1fc4f37a 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/app1/others/credits.json
+++ b/plugins/wordpress-mobile-pack/frontend/themes/app1/others/credits.json
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/app1/page.php b/plugins/wordpress-mobile-pack/frontend/themes/app1/page.php
index 61b4b9c1..61b4b9c1 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/app1/page.php
+++ b/plugins/wordpress-mobile-pack/frontend/themes/app1/page.php
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/app1/scss/phone.scss b/plugins/wordpress-mobile-pack/frontend/themes/app1/scss/phone.scss
index 7c83ecbb..7c83ecbb 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/app1/scss/phone.scss
+++ b/plugins/wordpress-mobile-pack/frontend/themes/app1/scss/phone.scss
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/app1/single.php b/plugins/wordpress-mobile-pack/frontend/themes/app1/single.php
index e0213193..e0213193 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/app1/single.php
+++ b/plugins/wordpress-mobile-pack/frontend/themes/app1/single.php
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/app1/snapshots/1-preview-phone-cover.png b/plugins/wordpress-mobile-pack/frontend/themes/app1/snapshots/1-preview-phone-cover.png
index 0a32062a..0a32062a 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/app1/snapshots/1-preview-phone-cover.png
+++ b/plugins/wordpress-mobile-pack/frontend/themes/app1/snapshots/1-preview-phone-cover.png
Binary files differ
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/app1/snapshots/2-preview-phone-categories.png b/plugins/wordpress-mobile-pack/frontend/themes/app1/snapshots/2-preview-phone-categories.png
index 1273ae1c..1273ae1c 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/app1/snapshots/2-preview-phone-categories.png
+++ b/plugins/wordpress-mobile-pack/frontend/themes/app1/snapshots/2-preview-phone-categories.png
Binary files differ
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/app1/snapshots/3-preview-phone-menu.png b/plugins/wordpress-mobile-pack/frontend/themes/app1/snapshots/3-preview-phone-menu.png
index 530e44ce..530e44ce 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/app1/snapshots/3-preview-phone-menu.png
+++ b/plugins/wordpress-mobile-pack/frontend/themes/app1/snapshots/3-preview-phone-menu.png
Binary files differ
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/app1/snapshots/4-preview-phone-article.png b/plugins/wordpress-mobile-pack/frontend/themes/app1/snapshots/4-preview-phone-article.png
index b75a47e6..b75a47e6 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/app1/snapshots/4-preview-phone-article.png
+++ b/plugins/wordpress-mobile-pack/frontend/themes/app1/snapshots/4-preview-phone-article.png
Binary files differ
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/app1/snapshots/5-preview-phone-comments.png b/plugins/wordpress-mobile-pack/frontend/themes/app1/snapshots/5-preview-phone-comments.png
index a823a986..a823a986 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/app1/snapshots/5-preview-phone-comments.png
+++ b/plugins/wordpress-mobile-pack/frontend/themes/app1/snapshots/5-preview-phone-comments.png
Binary files differ
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/app1/template.php b/plugins/wordpress-mobile-pack/frontend/themes/app1/template.php
index a1415350..a1415350 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/app1/template.php
+++ b/plugins/wordpress-mobile-pack/frontend/themes/app1/template.php
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/premium/category.php b/plugins/wordpress-mobile-pack/frontend/themes/premium/category.php
index 367cd3bf..6b4d240f 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/premium/category.php
+++ b/plugins/wordpress-mobile-pack/frontend/themes/premium/category.php
@@ -1,29 +1,26 @@
<?php
+
+require_once('config-premium.php');
+
$category_id_param = '';
$category_name = single_cat_title("", false);
if ($category_name){
-
+
$category_obj = get_term_by('name', $category_name, 'category');
-
- if ($category_obj && isset($category_obj->term_id) && is_numeric($category_obj->term_id)){
- $category_id_param = '#categoryWp/'.$category_obj->term_id;
- }
-}
-// load config json for the premium theme
-$premium_manager = new WMobilePack_Premium();
-$json_config_premium = $premium_manager->set_premium_config();
-
-$arr_config_premium = null;
-if ($json_config_premium !== false) {
- $arr_config_premium = json_decode($json_config_premium, true);
+ if ($category_obj && isset($category_obj->slug) && isset($category_obj->term_id) && is_numeric($category_obj->term_id)){
+
+ if ($kit_type == 'classic')
+ $category_id_param = '#categoryWp/'.$category_obj->term_id;
+ else
+ $category_id_param = "/#category/".$category_obj->slug.'/'.$category_obj->term_id;
+ }
}
// check if we have a valid domain
if (isset($arr_config_premium['domain_name']) && filter_var('http://'.$arr_config_premium['domain_name'], FILTER_VALIDATE_URL)) {
- header("Location: http://".$arr_config_premium['domain_name'].$category_id_param);
+ header("Location: http://".$arr_config_premium['domain_name'].$category_id_param);
} else {
- header("Location: ".home_url().$category_id_param);
+ header("Location: ".home_url().$category_id_param);
}
-?> \ No newline at end of file
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/premium/config-premium.php b/plugins/wordpress-mobile-pack/frontend/themes/premium/config-premium.php
new file mode 100755
index 00000000..73b99db0
--- /dev/null
+++ b/plugins/wordpress-mobile-pack/frontend/themes/premium/config-premium.php
@@ -0,0 +1,11 @@
+<?php
+
+// Load JSON data (config json)
+$premium_manager = new WMobilePack_Premium();
+$arr_config_premium = $premium_manager->get_premium_config();
+
+// Check if we have classic (old) style or wpmp app settings
+$kit_type = 'classic';
+if (isset($arr_config_premium['kit_type']) && $arr_config_premium['kit_type'] == 'wpmp'){
+ $kit_type = 'wpmp';
+} \ No newline at end of file
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/premium/index.php b/plugins/wordpress-mobile-pack/frontend/themes/premium/index.php
index 12372686..b1813d89 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/premium/index.php
+++ b/plugins/wordpress-mobile-pack/frontend/themes/premium/index.php
@@ -1,3 +1,12 @@
<?php
- require_once('template.php');// load app
-?> \ No newline at end of file
+
+$app_settings = WMobilePack_Application::load_app_settings_premium();
+
+// if we have a valid domain, redirect to it
+if (isset($app_settings['domain_name']) && filter_var('http://'.$app_settings['domain_name'], FILTER_VALIDATE_URL)) {
+ header("Location: http://".$app_settings['domain_name']);
+ exit();
+}
+
+// load app
+require_once('template.php');
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/premium/page.php b/plugins/wordpress-mobile-pack/frontend/themes/premium/page.php
index 1893113d..ac2c47f1 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/premium/page.php
+++ b/plugins/wordpress-mobile-pack/frontend/themes/premium/page.php
@@ -1,37 +1,50 @@
<?php
-// get the page url
-$pageUrlParam = '';
-
-$permalink = get_permalink();
-
-if (is_numeric(get_the_ID()) && filter_var($permalink, FILTER_VALIDATE_URL)){
- $permalink = rawurlencode($permalink);
- $permalink = str_replace('.','%2E',$permalink);
-
- $pageUrlParam = '#pageUrl/'.$permalink;
-}
-
-// load config json for the premium theme
-$premium_manager = new WMobilePack_Premium();
-$json_config_premium = $premium_manager->set_premium_config();
-
-$arr_config_premium = null;
-if ($json_config_premium !== false) {
- $arr_config_premium = json_decode($json_config_premium, true);
-}
-
-// check if front page is a static page
+// check if the front page is a static page
if(get_option('show_on_front') == 'page' && get_option('page_on_front') == get_the_ID()){
- require_once('template.php');// load app
+
+ // load app
+ $app_settings = WMobilePack_Application::load_app_settings_premium();
+
+ // if we have a valid domain, redirect to it
+ if (isset($app_settings['domain_name']) && filter_var('http://'.$app_settings['domain_name'], FILTER_VALIDATE_URL)) {
+ header("Location: http://".$app_settings['domain_name']);
+ exit();
+ }
+
+ require_once('template.php');
+
} else {
-
+
+ require_once('config-premium.php');
+
+ // get the page url
+ $pageUrlParam = '';
+
+ if (is_numeric(get_the_ID())) {
+
+ if ($kit_type == 'classic') {
+
+ $permalink = get_permalink();
+
+ if (filter_var($permalink, FILTER_VALIDATE_URL)) {
+
+ $permalink = rawurlencode($permalink);
+ $permalink = str_replace('.', '%2E', $permalink);
+
+ $pageUrlParam = '#pageUrl/' . $permalink;
+ }
+
+ } else {
+
+ $pageUrlParam = '/#page/' . get_the_ID();
+ }
+ }
+
// check if we have a valid domain
- if (isset($arr_config_premium['domain_name']) && filter_var('http://'.$arr_config_premium['domain_name'], FILTER_VALIDATE_URL)) {
- header("Location: http://".$arr_config_premium['domain_name'].$pageUrlParam);
+ if (isset($arr_config_premium['domain_name']) && filter_var('http://' . $arr_config_premium['domain_name'], FILTER_VALIDATE_URL)) {
+ header("Location: http://" . $arr_config_premium['domain_name'] . $pageUrlParam);
} else {
- header("Location: ".home_url().$pageUrlParam);
- }
-
+ header("Location: " . home_url() . $pageUrlParam);
+ }
}
-?> \ No newline at end of file
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/premium/single.php b/plugins/wordpress-mobile-pack/frontend/themes/premium/single.php
index 145f6650..c6901e7f 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/premium/single.php
+++ b/plugins/wordpress-mobile-pack/frontend/themes/premium/single.php
@@ -1,23 +1,27 @@
<?php
+
+require_once('config-premium.php');
+
// get the post url
$articleUrlParam = '';
-$permalink = get_permalink();
-
-if (is_numeric(get_the_ID()) && filter_var($permalink, FILTER_VALIDATE_URL)){
- $permalink = rawurlencode($permalink);
- $permalink = str_replace('.','%2E',$permalink);
-
- $articleUrlParam = '#articleUrl/'.$permalink;
-}
-
-// load config json for the premium theme
-$premium_manager = new WMobilePack_Premium();
-$json_config_premium = $premium_manager->set_premium_config();
-
-$arr_config_premium = null;
-if ($json_config_premium !== false) {
- $arr_config_premium = json_decode($json_config_premium, true);
+if (is_numeric(get_the_ID())){
+
+ if ($kit_type == 'classic') {
+
+ $permalink = get_permalink();
+
+ if (filter_var($permalink, FILTER_VALIDATE_URL)) {
+
+ $permalink = rawurlencode($permalink);
+ $permalink = str_replace('.', '%2E', $permalink);
+
+ $articleUrlParam = '#articleUrl/' . $permalink;
+ }
+
+ } else {
+ $articleUrlParam = '/#article/' . get_the_ID();
+ }
}
// check if we have a valid domain
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/premium/template.php b/plugins/wordpress-mobile-pack/frontend/themes/premium/template.php
index 3b442b39..7e890363 100644..100755
--- a/plugins/wordpress-mobile-pack/frontend/themes/premium/template.php
+++ b/plugins/wordpress-mobile-pack/frontend/themes/premium/template.php
@@ -1,380 +1,312 @@
-<?php
-
- $premium_manager = new WMobilePack_Premium();
- $json_config_premium = $premium_manager->set_premium_config();
-
- $arr_config_premium = null;
- if ($json_config_premium !== false) {
- $arr_config_premium = json_decode($json_config_premium, true);
- }
-
- // check if we have a valid domain
- if (isset($arr_config_premium['domain_name']) && filter_var('http://'.$arr_config_premium['domain_name'], FILTER_VALIDATE_URL)) {
- header("Location: http://".$arr_config_premium['domain_name']);
- exit();
- }
-
- // check if we have a secure https connection
- $is_secure = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443;
-
- // Check if the browser supports the loading of gzipped files
- $supported_gzip = false;
- if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip'))
- $supported_gzip = true;
-
- // check if it is tablet
- if (!class_exists( 'WMobilePack_Detect' ) ) {
- require_once(WMP_PLUGIN_PATH.'frontend/class-detect.php');
- }
-
- $detect_manager = new WMobilePack_Detect();
- $is_tablet = $detect_manager->is_tablet();
-
- $cdn_kits = ($is_secure ? $arr_config_premium['cdn_kits_https'] : $arr_config_premium['cdn_kits']);
- $cdn_apps = ($is_secure ? $arr_config_premium['cdn_apps_https'] : $arr_config_premium['cdn_apps']);
-
- // Check if we have to load a custom theme
- if ( ($is_tablet == 0 && $arr_config_premium['phone']['theme'] != 0) || ($is_tablet == 1 && $arr_config_premium['tablet']['theme'] != 0)) {
- $kits_path = $cdn_kits."/app".($is_tablet == 0 ? $arr_config_premium['phone']['theme'] : $arr_config_premium['tablet']['theme']).'/'.$arr_config_premium['kit_version'].'/';
- } else {
- $kits_path = $cdn_apps."/".$arr_config_premium['shorten_url'].'/';
- }
-
- // ----------------------------------------- //
-
- // Process icons & startup screens timestamps
- $icon_timestamp = '';
- if (isset($arr_config_premium['icon_path']) && $arr_config_premium['icon_path'] != '') {
- $str = $arr_config_premium['icon_path'];
- $icon_timestamp = '_'.substr($str, strpos($str, '_') + 1 , strpos($str, '.') - strpos($str, '_') - 1);
- }
-
- $logo_timestamp = '';
- if (isset($arr_config_premium['logo_path']) && $arr_config_premium['logo_path'] != '') {
- $str = $arr_config_premium['logo_path'];
- $logo_timestamp = '_'.substr($str, strpos($str, '_') + 1 , strpos($str, '.') - strpos($str, '_') - 1);
- }
-
- // ----------------------------------------- //
-
- // Set cover settings
- $cover = '';
-
- if ($is_tablet == 0 && isset($arr_config_premium['phone']['cover']) && $arr_config_premium['phone']['cover'] != '')
- $cover = $arr_config_premium['phone']['cover'];
-
- if ($is_tablet == 1 && isset($arr_config_premium['tablet']['cover']) && $arr_config_premium['tablet']['cover'] != '')
- $cover = $arr_config_premium['tablet']['cover'];
-
- // ----------------------------------------- //
-
- // Set locale
- $locale = isset($arr_config_premium['locale']) && $arr_config_premium['locale'] != '' ? $arr_config_premium['locale'] : 'en_EN';
-
- // ----------------------------------------- //
-
- // Set device
- $device = $is_tablet == 0 ? 'phone' : 'tablet';
-?>
-<!DOCTYPE HTML>
-<html manifest="" lang="en-US">
-<head>
- <meta charset="UTF-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
- <meta name="apple-mobile-web-app-capable" content="yes" />
- <meta name="apple-touch-fullscreen" content="yes" />
- <meta name="apple-mobile-web-app-status-bar-style" content="black" />
- <link rel="apple-touch-icon-precomposed" href="" />
- <link rel="manifest" href="<?php echo plugins_url()."/".WMP_DOMAIN."/export/content.php?content=androidmanifest";?>" />
-
- <?php if (isset($arr_config_premium['icon_path']) && $arr_config_premium['icon_path'] != ''): // icon path for Firefox ?>
- <link rel="shortcut icon" href="<?php echo $cdn_apps."/".$arr_config_premium['shorten_url'].'/'.$arr_config_premium['icon_path'];?>"/>
- <?php endif;?>
-
- <title><?php echo $arr_config_premium['title'];?></title>
- <style type="text/css">
- /**
- * Example of an initial loading indicator.
- * It is recommended to keep this as minimal as possible to provide instant feedback
- * while other resources are still being loaded for the first time
- */
- html, body {
- height: 100%;
- width: 100%;
- margin: 0;
- padding: 0;
- background-color: #e5e8e3;
- }
-
- #appLoadingIndicator {
- position: absolute;
- top: 50%;
- margin-top: -8px;
- text-align: center;
- width: 100%;
- height: 16px;
- -webkit-animation-name: appLoadingIndicator;
- -webkit-animation-duration: 0.5s;
- -webkit-animation-iteration-count: infinite;
- -webkit-animation-direction: linear;
- animation-name: appLoadingIndicator;
- animation-duration: 0.5s;
- animation-iteration-count: infinite;
- animation-direction: linear;
- }
-
- #appLoadingIndicator > * {
- background-color: #c6cdbe;
- display: inline-block;
- height: 16px;
- width: 16px;
- -webkit-border-radius: 8px;
- -moz-border-radius: 8px;
- border-radius: 8px;
- margin: 0 2px;
- opacity: 0.8;
- }
-
- @-webkit-keyframes appLoadingIndicator{
- 0% {
- opacity: 0.8
- }
- 50% {
- opacity: 0
- }
- 100% {
- opacity: 0.8
- }
- }
-
- @keyframes appLoadingIndicator{
- 0% {
- opacity: 0.8
- }
- 50% {
- opacity: 0
- }
- 100% {
- opacity: 0.8
- }
- }
- </style>
-
- <script type="text/javascript" pagespeed_no_defer="">
- var appticles = {
- webApp: "<?php echo $arr_config_premium['webapp'];?>",
- title: "<?php echo addslashes($arr_config_premium['title']);?>", // to update the title tag with the same constant
-
- exportPath: '<?php echo $is_secure ? $arr_config_premium['api_content_https'] : $arr_config_premium['api_content'];?>',
- socialApiPath: '<?php echo $is_secure ? $arr_config_premium['api_social_https'] : $arr_config_premium['api_social'];?>',
-
- <?php if (isset($arr_config_premium['api_content_external'])):?>
- exportPathExternal: '<?php echo $arr_config_premium['api_content_external'];?>',
- <?php endif;?>
-
- defaultPath: '<?php echo $kits_path;?>',
- appPath: '<?php echo $cdn_apps."/".$arr_config_premium['shorten_url'];?>',
-
- logo: '<?php echo isset($arr_config_premium['logo_path']) && $arr_config_premium['logo_path'] != '' ? $cdn_apps."/".$arr_config_premium['shorten_url'].'/'.$arr_config_premium['logo_path'] : $cdn_kits."/app1/".$arr_config_premium['kit_version']."/resources/images/logo.png";?>',
- hasIcons: <?php echo intval(isset($arr_config_premium['icon_path']) && $arr_config_premium['icon_path'] != "");?>,
- hasStartups: <?php echo intval(isset($arr_config_premium['logo_path']) && $arr_config_premium['logo_path'] != "");?>,
- iconTimestamp: '<?php echo $icon_timestamp;?>',
- startupImageTimestamp: '<?php echo $logo_timestamp;?>',
-
- userCover: <?php echo $cover == "" ? 'false' : 'true' ;?>,
- defaultCover: "<?php echo $cover == "" ? $cdn_kits.'/others/covers/'.($is_tablet ? 'tablet' : 'phone').'/pattern-'.rand(1,8).'.jpg' : $cdn_apps."/".$arr_config_premium['shorten_url'].'/'.$cover;?>",
-
- appUrl: '<?php echo home_url();?>',
- websiteUrl: '<?php echo home_url(); echo parse_url(home_url(), PHP_URL_QUERY) ? '&' : '?'; echo WMobilePack_Cookie::$prefix; ?>theme_mode=desktop',
- canonicalUrl: '<?php echo home_url();?>',
-
- preview: 0,
- language: '<?php echo $locale;?>',
-
- // enable the social modules
- <?php if (isset($arr_config_premium['api_content_external'])):?>
- hasFacebook: false,
- hasTwitter: false,
- <?php else:?>
- hasFacebook: <?php echo !isset($arr_config_premium['enable_facebook']) || $arr_config_premium['enable_facebook'] == 1 ? 'true' : 'false';?>,
- hasTwitter: <?php echo !isset($arr_config_premium['enable_twitter']) || $arr_config_premium['enable_twitter'] == 1 ? 'true' : 'false';?>,
- <?php endif;?>
-
- <?php if ($arr_config_premium['has_phone_ads'] == 1 || $arr_config_premium['has_tablet_ads'] == 1):?>
- googleAds:{
- adsInterval: <?php echo isset($arr_config_premium[$device.'_ad_interval']) && $arr_config_premium[$device.'_ad_interval'] != '' ? $arr_config_premium[$device.'_ad_interval'] : 30;?>, // seconds between ads
-
- <?php if ($arr_config_premium['has_phone_ads'] == 1):?>
- phone: {
- networkCode: <?php echo $arr_config_premium['phone_network_code'];?>,
- adUnitCode: "<?php echo $arr_config_premium['phone_unit_name'];?>",
- sizes: <?php echo json_encode($arr_config_premium['phone_ad_sizes']);?>
- },
- <?php else: ?>
- phone : null,
- <?php endif;?>
-
- <?php if ($arr_config_premium['has_tablet_ads'] == 1):?>
- tablet: {
- networkCode: <?php echo $arr_config_premium['tablet_network_code'];?>,
- adUnitCode: "<?php echo $arr_config_premium['tablet_unit_name'];?>",
- sizes: <?php echo json_encode($arr_config_premium['tablet_ad_sizes']);?>
- },
- <?php else: ?>
- tablet : null,
- <?php endif;?>
- },
- <?php endif;?>
- };
- </script>
-
- <?php if (($arr_config_premium['has_phone_ads'] == 1 && $is_tablet == 0) || ($arr_config_premium['has_tablet_ads'] == 1 && $is_tablet == 1)):?>
-
- <!-- start Google Doubleclick for publishers -->
- <script type='text/javascript' pagespeed_no_defer="">
- var googletag = googletag || {};
- googletag.cmd = googletag.cmd || [];
- (function() {
- var gads = document.createElement('script');
- gads.async = true;
- gads.type = 'text/javascript';
- var useSSL = 'https:' == document.location.protocol;
- gads.src = (useSSL ? 'https:' : 'http:') +
- '//www.googletagservices.com/tag/js/gpt.js';
- var node = document.getElementsByTagName('script')[0];
- node.parentNode.insertBefore(gads, node);
- })();
-
- googletag.cmd.push(function() {
- googletag.pubads().enableSingleRequest();
- googletag.pubads().disableInitialLoad();
- googletag.pubads().collapseEmptyDivs(); // hide ad units when empty.
- googletag.enableServices();
- });
- </script>
- <!-- end Google Doubleclick for publishers -->
- <?php endif;?>
-
- <?php
-
- $theme_details = array(
- 'theme' => $arr_config_premium[$device]['theme'],
- 'color_scheme' => isset($arr_config_premium[$device]['color_scheme']) ? $arr_config_premium[$device]['color_scheme'] : 1,
- 'font_headlines' => isset($arr_config_premium[$device]['font_headlines']) ? $arr_config_premium[$device]['font_headlines'] : '',
- 'font_subtitles' => isset($arr_config_premium[$device]['font_subtitles']) ? $arr_config_premium[$device]['font_subtitles'] : '',
- 'font_paragraphs' => isset($arr_config_premium[$device]['font_paragraphs']) ? $arr_config_premium[$device]['font_paragraphs'] : '',
- 'theme_timestamp' => isset($arr_config_premium[$device]['theme_timestamp']) ? $arr_config_premium[$device]['theme_timestamp'] : '',
- );
-
- $arrLoadedFonts = array();
-
- if (is_numeric($theme_details['font_headlines']))
- $arrLoadedFonts[] = $theme_details['font_headlines'];
-
- if (!in_array($theme_details['font_subtitles'], $arrLoadedFonts) && is_numeric($theme_details['font_subtitles']))
- $arrLoadedFonts[] = $theme_details['font_subtitles'];
-
- if (!in_array($theme_details['font_paragraphs'], $arrLoadedFonts) && is_numeric($theme_details['font_paragraphs']))
- $arrLoadedFonts[] = $theme_details['font_paragraphs'];
-
- // Check if we have custom fonts, otherwise load at least one default font
- if (!isset($arr_config_premium[$device]['custom_fonts']) && count($arrLoadedFonts) == 0) {
- $arrLoadedFonts[] = 1;
- $theme_details['font_headlines'] = 1;
- }
- ?>
-
- <?php foreach ($arrLoadedFonts as $font_no):?>
- <link rel="stylesheet" href="<?php echo $cdn_kits;?>/resources/fonts/<?php echo $supported_gzip ? 'font-'.$font_no.'-css.gz' : 'font-'.$font_no.'.css' ;?>" type="text/css" />
- <?php endforeach; ?>
-
- <?php
-
- // load custom fonts
- $arrCustomFonts = array();
-
- if (isset($arr_config_premium[$device]['custom_fonts'])) {
-
- $arrFontsNo = explode(',', $arr_config_premium[$device]['custom_fonts']);
-
- foreach ($arrFontsNo as $font_no){
- if (is_numeric($font_no)){
- $arrCustomFonts[] = $font_no;
- }
- }
- }
- ?>
-
- <?php foreach ($arrCustomFonts as $font_no):?>
- <link rel="stylesheet" href="<?php echo $cdn_apps."/".$arr_config_premium['shorten_url'];?>/resources/css/<?php echo $supported_gzip ? 'font-'.$font_no.'-css.gz' : 'font-'.$font_no.'.css' ;?>" type="text/css" />
- <?php endforeach; ?>
-
- <?php if ($theme_details['theme'] == 0): // load custom theme ?>
- <link rel="stylesheet" href="<?php echo $kits_path;?>resources/css/<?php echo $device.'-'.$theme_details['theme_timestamp'].($supported_gzip ? '-css.gz' : '.css');?>" type="text/css" />
- <?php elseif ($theme_details['theme_timestamp'] != ''): // check if we have a generated css ?>
- <link rel="stylesheet" href="<?php echo $cdn_apps."/".$arr_config_premium['shorten_url'];?>/resources/css/<?php echo $device.'-'.$theme_details['theme_timestamp'].($supported_gzip ? '-css.gz' : '.css');?>" type="text/css" />
- <?php else: ?>
- <link rel="stylesheet" href="<?php echo $kits_path;?>resources/css/<?php echo $device.'/colors-'.$theme_details['color_scheme'].'-font-'.$theme_details['font_headlines'].($supported_gzip ? '-css.gz' : '.css');?>" type="text/css" />
- <?php endif;?>
-
- <script type="text/javascript" src="<?php echo $cdn_kits;?>/others/locales/<?php echo $locale.($supported_gzip ? '-js.gz' : '.js');?>"></script>
- <script type="text/javascript" src="<?php echo $kits_path;?>js/<?php echo $device.($supported_gzip ? '-js.gz' : '.js');?>"></script>
-
- <?php
- // check if google analytics id was set
- $google_analytics_id = isset($arr_config_premium['google_analytics_id']) ? $arr_config_premium['google_analytics_id'] : '';
- if ($google_analytics_id != ''):
- ?>
-
- <script type="text/javascript" pagespeed_no_defer="">
-
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', '<?php echo $google_analytics_id;?>']);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
-
- </script>
-
- <?php endif;?>
-
- <?php
- // check if google analytics id was set
- $google_internal_id = isset($arr_config_premium['google_internal_id']) ? $arr_config_premium['google_internal_id'] : '';
- if ($google_internal_id != ''):
- ?>
-
- <!-- add google universal analytics -->
- <script pagespeed_no_defer="">
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
- })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
-
- ga('create', 'UA-45917766-1');
-
- var dimensionValue = '<?php echo $arr_config_premium['google_internal_id'];?>';
- ga('set', 'dimension1', dimensionValue);
-
- ga('send', 'pageview');
-
- </script>
- <?php endif;?>
-
- <?php if (isset($arr_config_premium['google_webmasters_code']) && $arr_config_premium['google_webmasters_code'] != ""):?>
- <meta name="google-site-verification" content="<?php echo $arr_config_premium['google_webmasters_code'];?>" />
- <?php endif;?>
-
-</head>
-<body>
-<div id="appLoadingIndicator">
- <div></div>
- <div></div>
- <div></div>
-</div>
-</body>
-</html>
+<?php
+
+// Check if the browser supports the loading of gzipped files
+$supported_gzip = false;
+if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip'))
+ $supported_gzip = true;
+
+?>
+<!DOCTYPE HTML>
+<html manifest="" lang="<?php echo str_replace('_', '-', $app_settings['locale']);?>">
+<head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
+ <meta name="apple-mobile-web-app-capable" content="yes" />
+ <meta name="apple-touch-fullscreen" content="yes" />
+ <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+ <link rel="apple-touch-icon-precomposed" href="" />
+ <link rel="manifest" href="<?php echo plugins_url()."/".WMP_DOMAIN."/export/content.php?content=androidmanifest&premium=1";?>" />
+
+ <?php if ($app_settings['icon'] != ''): // icon path for Firefox ?>
+ <link rel="shortcut icon" href="<?php echo $app_settings['icon'];?>"/>
+ <?php endif;?>
+
+ <title><?php echo $app_settings['title'];?></title>
+ <style type="text/css">
+ /**
+ * Example of an initial loading indicator.
+ * It is recommended to keep this as minimal as possible to provide instant feedback
+ * while other resources are still being loaded for the first time
+ */
+ html, body {
+ height: 100%;
+ width: 100%;
+ margin: 0;
+ padding: 0;
+ background-color: #e5e8e3;
+ }
+
+ #appLoadingIndicator {
+ position: absolute;
+ top: 50%;
+ margin-top: -8px;
+ text-align: center;
+ width: 100%;
+ height: 16px;
+ -webkit-animation-name: appLoadingIndicator;
+ -webkit-animation-duration: 0.5s;
+ -webkit-animation-iteration-count: infinite;
+ -webkit-animation-direction: linear;
+ animation-name: appLoadingIndicator;
+ animation-duration: 0.5s;
+ animation-iteration-count: infinite;
+ animation-direction: linear;
+ }
+
+ #appLoadingIndicator > * {
+ background-color: #c6cdbe;
+ display: inline-block;
+ height: 16px;
+ width: 16px;
+ -webkit-border-radius: 8px;
+ -moz-border-radius: 8px;
+ border-radius: 8px;
+ margin: 0 2px;
+ opacity: 0.8;
+ }
+
+ @-webkit-keyframes appLoadingIndicator{
+ 0% {
+ opacity: 0.8
+ }
+ 50% {
+ opacity: 0
+ }
+ 100% {
+ opacity: 0.8
+ }
+ }
+
+ @keyframes appLoadingIndicator{
+ 0% {
+ opacity: 0.8
+ }
+ 50% {
+ opacity: 0
+ }
+ 100% {
+ opacity: 0.8
+ }
+ }
+ </style>
+
+ <script type="text/javascript" pagespeed_no_defer="">
+ var appticles = {
+
+ <?php if ($app_settings['kit_type'] == 'wpmp'):?>
+
+ exportPath: '<?php echo plugins_url()."/".WMP_DOMAIN."/export/";?>',
+
+ hasGoogle: <?php echo $app_settings['enable_google'] ? 'true' : 'false';?>,
+ commentsToken: "<?php echo $app_settings['comments_token'];?>",
+ articlesPerCard: <?php echo is_numeric($app_settings['posts_per_page']) ? $app_settings['posts_per_page'] : '"auto"' ;?>,
+ homeText: <?php echo str_replace('\n', '<br/>', json_encode($app_settings['cover_text']));?>,
+
+ <?php else:?>
+
+ webApp: "<?php echo $app_settings['webapp'];?>",
+ title: "<?php echo addslashes($app_settings['title']);?>",
+
+ exportPath: '<?php echo $app_settings['api_content'];?>',
+ socialApiPath: '<?php echo $app_settings['api_social'];?>',
+
+ <?php if (isset($app_settings['api_content_external'])):?>
+ exportPathExternal: '<?php echo $app_settings['api_content_external'];?>',
+ <?php endif;?>
+
+ defaultPath: '<?php echo $app_settings['kits_path'];?>',
+ appPath: '<?php echo $app_settings['cdn_apps']."/".$app_settings['shorten_url'];?>',
+ appUrl: '<?php echo home_url();?>',
+ canonicalUrl: '<?php echo home_url();?>',
+
+ preview: 0,
+ language: '<?php echo $app_settings['locale'];?>',
+
+ hasIcons: <?php echo intval($app_settings['icon'] != "");?>,
+ hasStartups: <?php echo intval($app_settings['logo'] != "");?>,
+ iconTimestamp: '<?php echo $app_settings['icon_timestamp'];?>',
+ startupImageTimestamp: '<?php echo $app_settings['logo_timestamp'];?>',
+
+ <?php endif;?>
+
+ <?php if (isset($app_settings['website_url']) && $app_settings['website_url'] != ''):?>
+ websiteUrl: '<?php echo $app_settings['website_url']; echo parse_url($app_settings['website_url'], PHP_URL_QUERY) ? '&' : '?'; echo WMobilePack_Cookie::$prefix; ?>theme_mode=desktop',
+ <?php endif;?>
+
+ logo: '<?php echo $app_settings['logo'];?>',
+ icon: '<?php echo $app_settings['icon'];?>',
+ defaultCover: "<?php echo $app_settings['cover'];?>",
+ userCover: <?php echo $app_settings['user_cover'] ? 'true' : 'false' ;?>,
+
+ hasFacebook: <?php echo $app_settings['enable_facebook'] ? 'true' : 'false';?>,
+ hasTwitter: <?php echo $app_settings['enable_twitter'] ? 'true' : 'false';?>,
+
+ <?php if ($app_settings['has_phone_ads'] == 1 || $app_settings['has_tablet_ads'] == 1):?>
+ googleAds:{
+ adsInterval: <?php echo isset($app_settings[$app_settings['device'].'_ad_interval']) && $app_settings[$app_settings['device'].'_ad_interval'] != '' ? $app_settings[$app_settings['device'].'_ad_interval'] : 30;?>, // seconds between ads
+
+ <?php if ($app_settings['has_phone_ads'] == 1):?>
+ phone: {
+ networkCode: <?php echo $app_settings['phone_network_code'];?>,
+ adUnitCode: "<?php echo $app_settings['phone_unit_name'];?>",
+ sizes: <?php echo json_encode($app_settings['phone_ad_sizes']);?>
+ },
+ <?php else: ?>
+ phone : null,
+ <?php endif;?>
+
+ <?php if ($app_settings['has_tablet_ads'] == 1):?>
+ tablet: {
+ networkCode: <?php echo $app_settings['tablet_network_code'];?>,
+ adUnitCode: "<?php echo $app_settings['tablet_unit_name'];?>",
+ sizes: <?php echo json_encode($app_settings['tablet_ad_sizes']);?>
+ },
+ <?php else: ?>
+ tablet : null,
+ <?php endif;?>
+ },
+ <?php endif;?>
+ };
+ </script>
+
+ <?php if (($app_settings['has_phone_ads'] == 1 && $app_settings['device'] == 'phone') ||
+ ($app_settings['has_tablet_ads'] == 1 && $app_settings['device'] == 'tablet')):?>
+
+ <!-- start Google Doubleclick for publishers -->
+ <script type='text/javascript' pagespeed_no_defer="">
+ var googletag = googletag || {};
+ googletag.cmd = googletag.cmd || [];
+ (function() {
+ var gads = document.createElement('script');
+ gads.async = true;
+ gads.type = 'text/javascript';
+ var useSSL = 'https:' == document.location.protocol;
+ gads.src = (useSSL ? 'https:' : 'http:') +
+ '//www.googletagservices.com/tag/js/gpt.js';
+ var node = document.getElementsByTagName('script')[0];
+ node.parentNode.insertBefore(gads, node);
+ })();
+
+ googletag.cmd.push(function() {
+ googletag.pubads().enableSingleRequest();
+ googletag.pubads().disableInitialLoad();
+ googletag.pubads().collapseEmptyDivs(); // hide ad units when empty.
+ googletag.enableServices();
+ });
+ </script>
+ <!-- end Google Doubleclick for publishers -->
+ <?php endif;?>
+
+ <?php
+
+ $arrLoadedFonts = array();
+
+ if (is_numeric($app_settings['font_headlines']))
+ $arrLoadedFonts[] = $app_settings['font_headlines'];
+
+ if (!in_array($app_settings['font_subtitles'], $arrLoadedFonts) && is_numeric($app_settings['font_subtitles']))
+ $arrLoadedFonts[] = $app_settings['font_subtitles'];
+
+ if (!in_array($app_settings['font_paragraphs'], $arrLoadedFonts) && is_numeric($app_settings['font_paragraphs']))
+ $arrLoadedFonts[] = $app_settings['font_paragraphs'];
+
+ // Check if we have custom fonts, otherwise load at least one default font
+ if ($app_settings['custom_fonts'] != '' && count($arrLoadedFonts) == 0) {
+ $arrLoadedFonts[] = 1;
+ $app_settings['font_headlines'] = 1;
+ }
+ ?>
+
+ <?php foreach ($arrLoadedFonts as $font_no):?>
+ <link rel="stylesheet" href="<?php echo $app_settings['cdn_kits'];?>/resources/fonts/<?php echo $supported_gzip ? 'font-'.$font_no.'-css.gz' : 'font-'.$font_no.'.css' ;?>" type="text/css" />
+ <?php endforeach; ?>
+
+ <?php
+ // load custom fonts
+ $arrCustomFonts = array();
+
+ if (isset($app_settings['custom_fonts'])) {
+
+ $arrFontsNo = explode(',', $app_settings['custom_fonts']);
+
+ foreach ($arrFontsNo as $font_no){
+ if (is_numeric($font_no)){
+ $arrCustomFonts[] = $font_no;
+ }
+ }
+ }
+ ?>
+
+ <?php foreach ($arrCustomFonts as $font_no):?>
+ <link rel="stylesheet" href="<?php echo $app_settings['cdn_apps']."/".$app_settings['shorten_url'];?>/resources/css/<?php echo $supported_gzip ? 'font-'.$font_no.'-css.gz' : 'font-'.$font_no.'.css' ;?>" type="text/css" />
+ <?php endforeach; ?>
+
+ <?php if ($app_settings['theme'] == 0): // load custom theme ?>
+ <link rel="stylesheet" href="<?php echo $app_settings['kits_path'];?>resources/css/<?php echo $app_settings['device'].'-'.$app_settings['theme_timestamp'].($supported_gzip ? '-css.gz' : '.css');?>" type="text/css" />
+ <?php elseif ($app_settings['theme_timestamp'] != ''): // check if we have a generated css ?>
+ <link rel="stylesheet" href="<?php echo $app_settings['cdn_apps']."/".$app_settings['shorten_url'];?>/resources/css/<?php echo $app_settings['device'].'-'.$app_settings['theme_timestamp'].($supported_gzip ? '-css.gz' : '.css');?>" type="text/css" />
+ <?php else: ?>
+ <link rel="stylesheet" href="<?php echo $app_settings['kits_path'];?>resources/css/<?php echo $app_settings['device'].'/colors-'.$app_settings['color_scheme'].'-font-'.$app_settings['font_headlines'].($supported_gzip ? '-css.gz' : '.css');?>" type="text/css" />
+ <?php endif;?>
+
+ <script type="text/javascript" src="<?php echo $app_settings['cdn_kits'];?>/others/<?php echo $app_settings['kit_type'] == 'classic' ? 'locales' : 'locales2';?>/<?php echo $app_settings['locale'].($supported_gzip ? '-js.gz' : '.js');?>"></script>
+ <script type="text/javascript" src="<?php echo $app_settings['kits_path'];?>js/<?php echo $app_settings['device'].($supported_gzip ? '-js.gz' : '.js');?>"></script>
+
+ <?php
+ // check if google analytics id was set
+ $google_analytics_id = isset($app_settings['google_analytics_id']) ? $app_settings['google_analytics_id'] : '';
+ if ($google_analytics_id != ''):
+ ?>
+
+ <script type="text/javascript" pagespeed_no_defer="">
+
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', '<?php echo $google_analytics_id;?>']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+
+ </script>
+
+ <?php endif;?>
+
+ <?php
+ // check if google analytics id was set
+ $google_internal_id = isset($app_settings['google_internal_id']) ? $app_settings['google_internal_id'] : '';
+ if ($google_internal_id != ''):
+ ?>
+
+ <!-- add google universal analytics -->
+ <script pagespeed_no_defer="">
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ ga('create', 'UA-45917766-1');
+
+ var dimensionValue = '<?php echo $google_internal_id;?>';
+ ga('set', 'dimension1', dimensionValue);
+
+ ga('send', 'pageview');
+
+ </script>
+ <?php endif;?>
+
+ <?php if (isset($app_settings['google_webmasters_code']) && $app_settings['google_webmasters_code'] != ""):?>
+ <meta name="google-site-verification" content="<?php echo $app_settings['google_webmasters_code'];?>" />
+ <?php endif;?>
+
+</head>
+<body>
+<div id="appLoadingIndicator">
+ <div></div>
+ <div></div>
+ <div></div>
+</div>
+</body>
+</html>