Version Description
(13th January 2020) = * Fixed: Warring in console : [DOM] Found 2 elements with non-unique id #amp-search #3946 * Fixed: New Relic script is getting added in AMP and causing validtion error #4018 * Fixed: Icons are not loading when creating theme compatibility #3766 * Fixed: Video doesn't work on AMP when inserted from Siteorigin pagebuilder (Video player widget) #3936 * Fixed: Minor issues with amp need to fix #3931 * Fixed: When from amp page builder adding text module then space is not coming in paragraph #3982 * Fixed: Getting error at home page when push notification option is enabled. #4026 * Fixed: Please Fix Errors in Google Lighthouse audit in Accessibility (using Swift, Amp Layouts) #3949 * Fixed: Remove offers from the panel #4027 * Fixed: Detect Component and add or remove script accordingly #4067 * Fixed: GTM tags are not working in the updated version 1.0.9 but Google Analytics is working,Also in version 1.0.0 both are working fine #4059 * Fixed: Matomo (Piwik) Analytics generating errors in Console. #4042
Release Info
Developer | mohammed_kaludi |
Plugin | AMP for WP – Accelerated Mobile Pages |
Version | 1.0.13 |
Comparing to | |
See all releases |
Code changes from version 1.0.12 to 1.0.13
- README.md +15 -1
- accelerated-moblie-pages.php +2 -2
- changelog.txt +14 -0
- components/comments/comments.php +1 -1
- components/search/search.php +1 -1
- includes/features/analytics/analytics-functions.php +29 -72
- includes/features/analytics/analytics-options.php +3 -11
- includes/features/functions.php +1 -1
- includes/features/performance/performance-functions.php +7 -0
- includes/features/push-notification/push-notification-functions.php +1 -1
- includes/options/admin-config.php +11 -17
- includes/options/redux-core/assets/css/redux-admin.css +4 -40
- readme.txt +15 -11
- templates/design-manager/design-1/style.php +17 -5
- templates/design-manager/design-3/style.php +20 -9
- templates/design-manager/swift/style.php +58 -47
- templates/features.php +55 -27
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
|
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.3.2
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -191,6 +191,20 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
191 |
|
192 |
== Changelog ==
|
193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
= 1.0.12 (12th January 2020) =
|
195 |
* Fixed: Detect Component and add or remove script accordingly #4067
|
196 |
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.3.2
|
7 |
+
Stable tag: 1.0.13
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
191 |
|
192 |
== Changelog ==
|
193 |
|
194 |
+
= 1.0.13 (13th January 2020) =
|
195 |
+
* Fixed: Warring in console : [DOM] Found 2 elements with non-unique id #amp-search #3946
|
196 |
+
* Fixed: New Relic script is getting added in AMP and causing validtion error #4018
|
197 |
+
* Fixed: Icons are not loading when creating theme compatibility #3766
|
198 |
+
* Fixed: Video doesn't work on AMP when inserted from Siteorigin pagebuilder (Video player widget) #3936
|
199 |
+
* Fixed: Minor issues with amp need to fix #3931
|
200 |
+
* Fixed: When from amp page builder adding text module then space is not coming in paragraph #3982
|
201 |
+
* Fixed: Getting error at home page when push notification option is enabled. #4026
|
202 |
+
* Fixed: Please Fix Errors in Google Lighthouse audit in Accessibility (using Swift, Amp Layouts) #3949
|
203 |
+
* Fixed: Remove offers from the panel #4027
|
204 |
+
* Fixed: Detect Component and add or remove script accordingly #4067
|
205 |
+
* Fixed: GTM tags are not working in the updated version 1.0.9 but Google Analytics is working,Also in version 1.0.0 both are working fine #4059
|
206 |
+
* Fixed: Matomo (Piwik) Analytics generating errors in Console. #4042
|
207 |
+
|
208 |
= 1.0.12 (12th January 2020) =
|
209 |
* Fixed: Detect Component and add or remove script accordingly #4067
|
210 |
|
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Accelerated Mobile Pages
|
4 |
Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
|
5 |
Description: AMP for WP - Accelerated Mobile Pages for WordPress
|
6 |
-
Version: 1.0.
|
7 |
Author: Ahmed Kaludi, Mohammed Kaludi
|
8 |
Author URI: https://ampforwp.com/
|
9 |
Donate link: https://www.paypal.me/Kaludi/25
|
@@ -20,7 +20,7 @@ define('AMPFORWP_PLUGIN_DIR_URI', plugin_dir_url(__FILE__));
|
|
20 |
define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
|
21 |
define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
|
22 |
define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
|
23 |
-
define('AMPFORWP_VERSION','1.0.
|
24 |
define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
|
25 |
if(!defined('AMPFROWP_HOST_NAME')){
|
26 |
$urlinfo = get_bloginfo('url');
|
3 |
Plugin Name: Accelerated Mobile Pages
|
4 |
Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
|
5 |
Description: AMP for WP - Accelerated Mobile Pages for WordPress
|
6 |
+
Version: 1.0.13
|
7 |
Author: Ahmed Kaludi, Mohammed Kaludi
|
8 |
Author URI: https://ampforwp.com/
|
9 |
Donate link: https://www.paypal.me/Kaludi/25
|
20 |
define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
|
21 |
define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
|
22 |
define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
|
23 |
+
define('AMPFORWP_VERSION','1.0.13');
|
24 |
define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
|
25 |
if(!defined('AMPFROWP_HOST_NAME')){
|
26 |
$urlinfo = get_bloginfo('url');
|
@@ -1,5 +1,19 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 1.0.12 (12th January 2020) =
|
4 |
* Fixed: Detect Component and add or remove script accordingly #4067
|
5 |
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 1.0.13 (13th January 2020) =
|
4 |
+
* Fixed: Warring in console : [DOM] Found 2 elements with non-unique id #amp-search #3946
|
5 |
+
* Fixed: New Relic script is getting added in AMP and causing validtion error #4018
|
6 |
+
* Fixed: Icons are not loading when creating theme compatibility #3766
|
7 |
+
* Fixed: Video doesn't work on AMP when inserted from Siteorigin pagebuilder (Video player widget) #3936
|
8 |
+
* Fixed: Minor issues with amp need to fix #3931
|
9 |
+
* Fixed: When from amp page builder adding text module then space is not coming in paragraph #3982
|
10 |
+
* Fixed: Getting error at home page when push notification option is enabled. #4026
|
11 |
+
* Fixed: Please Fix Errors in Google Lighthouse audit in Accessibility (using Swift, Amp Layouts) #3949
|
12 |
+
* Fixed: Remove offers from the panel #4027
|
13 |
+
* Fixed: Detect Component and add or remove script accordingly #4067
|
14 |
+
* Fixed: GTM tags are not working in the updated version 1.0.9 but Google Analytics is working,Also in version 1.0.0 both are working fine #4059
|
15 |
+
* Fixed: Matomo (Piwik) Analytics generating errors in Console. #4042
|
16 |
+
|
17 |
= 1.0.12 (12th January 2020) =
|
18 |
* Fixed: Detect Component and add or remove script accordingly #4067
|
19 |
|
@@ -228,7 +228,7 @@ function ampforwp_framework_get_vuukle_comments(){
|
|
228 |
|
229 |
$vuukle_html = '<amp-iframe width="600" height="350" layout="responsive" sandbox="allow-scripts allow-same-origin allow-modals allow-popups allow-forms" resizable frameborder="0" src="'.esc_url($srcUrl).'">
|
230 |
|
231 |
-
<div overflow tabindex="0" role="button" aria-label="Show comments">'.esc_html__('Show comments','accelerated-mobile-pages').'</div>';
|
232 |
echo $vuukle_html; // escaped above
|
233 |
}
|
234 |
|
228 |
|
229 |
$vuukle_html = '<amp-iframe width="600" height="350" layout="responsive" sandbox="allow-scripts allow-same-origin allow-modals allow-popups allow-forms" resizable frameborder="0" src="'.esc_url($srcUrl).'">
|
230 |
|
231 |
+
<div overflow tabindex="0" role="button" aria-label="Show comments">'.esc_html__('Show comments','accelerated-mobile-pages').'</div></amp-iframe>';
|
232 |
echo $vuukle_html; // escaped above
|
233 |
}
|
234 |
|
@@ -16,7 +16,7 @@ function ampforwp_framework_get_search_form() {
|
|
16 |
$amp_query_variable = 'amp';
|
17 |
$amp_query_variable_val = '1';
|
18 |
}
|
19 |
-
$form = '<form role="search" method="get"
|
20 |
<div class="amp-search-wrapper">
|
21 |
<label aria-label="Type your query" class="screen-reader-text" for="s">' . esc_html__($label,'accelerated-mobile-pages') . '</label>
|
22 |
<input type="text" placeholder="AMP" value="'.esc_attr($amp_query_variable_val).'" name="'.esc_attr($amp_query_variable).'" class="hidden"/>
|
16 |
$amp_query_variable = 'amp';
|
17 |
$amp_query_variable_val = '1';
|
18 |
}
|
19 |
+
$form = '<form role="search" method="get" class="amp-search" target="_top" action="' . esc_url($action_url) .'">
|
20 |
<div class="amp-search-wrapper">
|
21 |
<label aria-label="Type your query" class="screen-reader-text" for="s">' . esc_html__($label,'accelerated-mobile-pages') . '</label>
|
22 |
<input type="text" placeholder="AMP" value="'.esc_attr($amp_query_variable_val).'" name="'.esc_attr($amp_query_variable).'" class="hidden"/>
|
@@ -94,30 +94,23 @@ function ampforwp_analytics() {
|
|
94 |
|
95 |
// 10.3 Analytics Support added for Piwik
|
96 |
if( true == ampforwp_get_setting('ampforwp-Piwik-switch')){
|
97 |
-
$idsite =
|
98 |
$title = urlencode(get_the_title());
|
99 |
$url = get_the_permalink();
|
100 |
-
$url =
|
101 |
$rand = rand(1111,9999);
|
102 |
-
$pview =
|
103 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
?>
|
105 |
-
<amp-
|
106 |
-
<script type="application/json">
|
107 |
-
{
|
108 |
-
"triggers": {
|
109 |
-
"trackPageview": {
|
110 |
-
"on": "visible",
|
111 |
-
"request": "pageview"
|
112 |
-
}
|
113 |
-
},
|
114 |
-
"requests": {
|
115 |
-
"base": "https://piwik.example.org/piwik.php?idsite=<?php echo urlencode(esc_attr($idsite));?>&rec=1&action_name=<?php echo esc_attr($title);?>&url=<?php echo esc_url($url);?>&rand=<?php echo intval($rand);?>&apiv=1",
|
116 |
-
"pageview": "<?php echo esc_url($pview);?>"
|
117 |
-
}
|
118 |
-
}
|
119 |
-
</script>
|
120 |
-
</amp-analytics>
|
121 |
<?php }
|
122 |
|
123 |
// 10.4 Analytics Support added for quantcast
|
@@ -349,10 +342,7 @@ if ( ! function_exists('amp_activate') ) {
|
|
349 |
|
350 |
//Add GTM Analytics code right after the body tag
|
351 |
add_action('ampforwp_body_beginning','AMPforWP\\AMPVendor\\amp_post_template_add_analytics_data',10);
|
352 |
-
}
|
353 |
-
remove_filter( 'amp_post_template_analytics', 'amp_gtm_add_gtm_support' );
|
354 |
-
}
|
355 |
-
|
356 |
}
|
357 |
//Remove other analytics if GTM is enable
|
358 |
add_action('amp_post_template_footer','ampforwp_gtm_support', 9);
|
@@ -364,62 +354,29 @@ if ( ! function_exists('amp_activate') ) {
|
|
364 |
}
|
365 |
}
|
366 |
// Create GTM support
|
367 |
-
|
368 |
-
function amp_gtm_add_gtm_support( $analytics ) {
|
369 |
-
if(true == ampforwp_get_setting('ampforwp-gtm-field-advance-switch') ){
|
370 |
-
return $analytics;
|
371 |
-
}
|
372 |
-
if ( true == ampforwp_get_setting('amp-use-gtm-option') ) {
|
373 |
-
global $redux_builder_amp;
|
374 |
-
$gtm_id = "";
|
375 |
-
if ( ! is_array( $analytics ) ) {
|
376 |
-
$analytics = array();
|
377 |
-
}
|
378 |
-
$gtm_id = ampforwp_get_setting('amp-gtm-id');
|
379 |
-
$gtm_id = str_replace(" ", "", $gtm_id);
|
380 |
-
$gtm_code = esc_attr(ampforwp_get_setting('amp-gtm-analytics-code'));
|
381 |
-
$analytics['amp-gtm-googleanalytics'] = array(
|
382 |
-
'attributes' => array(
|
383 |
-
'id'=>'googletagmanager-'.esc_attr($gtm_id),
|
384 |
-
'type'=>'gtag',
|
385 |
-
),
|
386 |
-
'config_data' => array(
|
387 |
-
"vars" => array(
|
388 |
-
"gtag_id"=> "'".esc_attr($gtm_id)."'",
|
389 |
-
"config" => array(
|
390 |
-
"$gtm_code"=> array("groups"=> "default" ),
|
391 |
-
),
|
392 |
-
),
|
393 |
-
),
|
394 |
-
);
|
395 |
-
if(ampforwp_get_data_consent()){
|
396 |
-
$analytics['amp-gtm-googleanalytics']['attributes']['data-block-on-consent'] = '';
|
397 |
-
}
|
398 |
-
if ( true == ampforwp_get_setting('ampforwp-gtm-field-anonymizeIP') ) {
|
399 |
-
$analytics['amp-gtm-googleanalytics']['config_data']['vars']['anonymizeIP'] = 'true';
|
400 |
-
}
|
401 |
-
}
|
402 |
-
$gtm_fields = '';
|
403 |
-
$gtm_fields = apply_filters('ampforwp_advance_gtm_analytics', $gtm_fields );
|
404 |
-
if($gtm_fields && ampforwp_get_setting('ampforwp-gtm-field-advance-switch')){
|
405 |
-
$gtm_fields = preg_replace('!/\*.*?\*/!s', '', $gtm_fields);
|
406 |
-
$analytics['amp-gtm-googleanalytics']['config_data'] = json_decode($gtm_fields, true);
|
407 |
-
}
|
408 |
-
return $analytics;
|
409 |
-
}
|
410 |
add_action( 'ampforwp_body_beginning', 'ampforwp_add_advance_gtm_fields' );
|
411 |
function ampforwp_add_advance_gtm_fields( $ampforwp_adv_gtm_fields ) {
|
412 |
-
if(true == ampforwp_get_setting('amp-use-gtm-option')
|
|
|
|
|
413 |
$ampforwp_adv_gtm_fields = "";
|
414 |
$ampforwp_adv_gtm_fields = ampforwp_get_setting('ampforwp-gtm-field-advance');
|
415 |
$ampforwp_adv_gtm_fields = preg_replace('!/\*.*?\*/!s', '', $ampforwp_adv_gtm_fields);
|
416 |
$ampforwp_adv_gtm_fields = preg_replace('/\n\s*\n/', '', $ampforwp_adv_gtm_fields);
|
417 |
-
$ampforwp_adv_gtm_fields = preg_replace('/\/\/(.*?)\s(.*)/m', '$2', $ampforwp_adv_gtm_fields);
|
418 |
-
|
419 |
-
|
420 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
421 |
}
|
422 |
|
|
|
423 |
// 83. Advance Analytics(Google Analytics)
|
424 |
add_filter('ampforwp_advance_google_analytics','ampforwp_add_advance_ga_fields');
|
425 |
function ampforwp_add_advance_ga_fields($ga_fields){
|
94 |
|
95 |
// 10.3 Analytics Support added for Piwik
|
96 |
if( true == ampforwp_get_setting('ampforwp-Piwik-switch')){
|
97 |
+
$idsite = ampforwp_get_setting('pa-feild');
|
98 |
$title = urlencode(get_the_title());
|
99 |
$url = get_the_permalink();
|
100 |
+
$url = ampforwp_remove_protocol(ampforwp_url_controller($url));
|
101 |
$rand = rand(1111,9999);
|
102 |
+
$pview = ampforwp_remove_protocol(site_url());
|
103 |
+
$referer = $url;
|
104 |
+
if(isset($_SERVER['HTTP_REFERER'])) {
|
105 |
+
$referer = $_SERVER['HTTP_REFERER'];
|
106 |
+
}
|
107 |
+
$piwik_api = str_replace("YOUR_SITE_ID", '1', $idsite);
|
108 |
+
$piwik_api = str_replace("TITLE", esc_attr($title), $piwik_api);
|
109 |
+
$piwik_api = str_replace("DOCUMENT_REFERRER", esc_url($referer), $piwik_api);
|
110 |
+
$piwik_api = str_replace("CANONICAL_URL", esc_url($pview), $piwik_api);
|
111 |
+
$piwik_api = str_replace("RANDOM", intval($rand), $piwik_api);
|
112 |
?>
|
113 |
+
<amp-pixel src="<?php echo $piwik_api; // XXS ok, escaped above?>"></amp-pixel>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
<?php }
|
115 |
|
116 |
// 10.4 Analytics Support added for quantcast
|
342 |
|
343 |
//Add GTM Analytics code right after the body tag
|
344 |
add_action('ampforwp_body_beginning','AMPforWP\\AMPVendor\\amp_post_template_add_analytics_data',10);
|
345 |
+
}
|
|
|
|
|
|
|
346 |
}
|
347 |
//Remove other analytics if GTM is enable
|
348 |
add_action('amp_post_template_footer','ampforwp_gtm_support', 9);
|
354 |
}
|
355 |
}
|
356 |
// Create GTM support
|
357 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
358 |
add_action( 'ampforwp_body_beginning', 'ampforwp_add_advance_gtm_fields' );
|
359 |
function ampforwp_add_advance_gtm_fields( $ampforwp_adv_gtm_fields ) {
|
360 |
+
if(true == ampforwp_get_setting('amp-use-gtm-option')){
|
361 |
+
$gtm_id = ampforwp_get_setting('amp-gtm-id');
|
362 |
+
if(true == ampforwp_get_setting('ampforwp-gtm-field-advance-switch') ){
|
363 |
$ampforwp_adv_gtm_fields = "";
|
364 |
$ampforwp_adv_gtm_fields = ampforwp_get_setting('ampforwp-gtm-field-advance');
|
365 |
$ampforwp_adv_gtm_fields = preg_replace('!/\*.*?\*/!s', '', $ampforwp_adv_gtm_fields);
|
366 |
$ampforwp_adv_gtm_fields = preg_replace('/\n\s*\n/', '', $ampforwp_adv_gtm_fields);
|
367 |
+
$ampforwp_adv_gtm_fields = preg_replace('/\/\/(.*?)\s(.*)/m', '$2', $ampforwp_adv_gtm_fields);
|
368 |
+
if($gtm_id!=""){?>
|
369 |
+
<amp-analytics config="https://www.googletagmanager.com/amp.json?id=<?php echo esc_attr($gtm_id);?>" <?php if(ampforwp_get_data_consent()){?>data-block-on-consent <?php } ?>><script type="application/json"><?php echo sanitize_text_field($ampforwp_adv_gtm_fields) ?></script></amp-analytics><?php
|
370 |
+
}
|
371 |
+
}else{
|
372 |
+
if($gtm_id!=""){?>
|
373 |
+
<amp-analytics config="https://www.googletagmanager.com/amp.json?id=<?php echo esc_attr($gtm_id);?>" <?php if(ampforwp_get_data_consent()){?>data-block-on-consent <?php } ?>></amp-analytics> <?php
|
374 |
+
}
|
375 |
+
}
|
376 |
+
}
|
377 |
}
|
378 |
|
379 |
+
|
380 |
// 83. Advance Analytics(Google Analytics)
|
381 |
add_filter('ampforwp_advance_google_analytics','ampforwp_add_advance_ga_fields');
|
382 |
function ampforwp_add_advance_ga_fields($ga_fields){
|
@@ -186,7 +186,7 @@ function ampforwp_analytics_options($opt_name){
|
|
186 |
'id' => 'ampforwp-gtm-field-advance',
|
187 |
'type' => 'ace_editor',
|
188 |
'title' => esc_html__('Analytics Code in JSON Format', 'accelerated-mobile-pages'),
|
189 |
-
'tooltip-subtitle' => sprintf( '%s<a href="%s" target="_blank">%s</a>', esc_html__( 'Tutorial: ','accelerated-mobile-pages' ), esc_url('https://ampforwp.com/tutorials/article/
|
190 |
'required' => array(
|
191 |
array('amp-use-gtm-option', '=' , '1'),
|
192 |
array('ampforwp-gtm-field-advance-switch', '=' , '1')
|
@@ -195,16 +195,8 @@ function ampforwp_analytics_options($opt_name){
|
|
195 |
'theme' => 'monokai',
|
196 |
'desc' => '',
|
197 |
'default' => ('{
|
198 |
-
|
199 |
-
|
200 |
-
},
|
201 |
-
"triggers": {
|
202 |
-
"trackPageview": {
|
203 |
-
"on": "visible",
|
204 |
-
"request": "pageview"
|
205 |
-
}
|
206 |
-
}
|
207 |
-
}')
|
208 |
),
|
209 |
array(
|
210 |
'class' => 'child_opt',
|
186 |
'id' => 'ampforwp-gtm-field-advance',
|
187 |
'type' => 'ace_editor',
|
188 |
'title' => esc_html__('Analytics Code in JSON Format', 'accelerated-mobile-pages'),
|
189 |
+
'tooltip-subtitle' => sprintf( '%s<a href="%s" target="_blank">%s</a>', esc_html__( 'Tutorial: ','accelerated-mobile-pages' ), esc_url('https://ampforwp.com/tutorials/article/how-to-track-a-click-event-in-gtm-amp/'), esc_html__( 'How To Add Advanced Google Tag Manager in AMP?','accelerated-mobile-pages' ) ),
|
190 |
'required' => array(
|
191 |
array('amp-use-gtm-option', '=' , '1'),
|
192 |
array('ampforwp-gtm-field-advance-switch', '=' , '1')
|
195 |
'theme' => 'monokai',
|
196 |
'desc' => '',
|
197 |
'default' => ('{
|
198 |
+
"vars": { "account": "UA-XXXXXX-Y"}
|
199 |
+
}')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
),
|
201 |
array(
|
202 |
'class' => 'child_opt',
|
@@ -1064,7 +1064,7 @@ add_action("redux/options/redux_builder_amp/saved",'ampforwp_menu_transient_on_s
|
|
1064 |
// Protocol Remover
|
1065 |
if ( ! function_exists('ampforwp_remove_protocol') ) {
|
1066 |
function ampforwp_remove_protocol($url){
|
1067 |
-
$url = preg_replace('#^https?://#', '', $url);
|
1068 |
return $url;
|
1069 |
}
|
1070 |
}
|
1064 |
// Protocol Remover
|
1065 |
if ( ! function_exists('ampforwp_remove_protocol') ) {
|
1066 |
function ampforwp_remove_protocol($url){
|
1067 |
+
$url = preg_replace('#^https?://#', '//', $url);
|
1068 |
return $url;
|
1069 |
}
|
1070 |
}
|
@@ -9,6 +9,13 @@ function ampforwp_minify_html_output($content_buffer){
|
|
9 |
//Removed trbidi attribute #3687
|
10 |
$content_buffer = str_replace('trbidi="on"', '', $content_buffer);
|
11 |
$content_buffer = str_replace("trbidi='on'", '', $content_buffer);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
if (defined('W3TC') && strpos($content_buffer, 'frameborder') !== false) {
|
13 |
add_filter("w3tc_minify_html_enable",'__return_false');
|
14 |
}
|
9 |
//Removed trbidi attribute #3687
|
10 |
$content_buffer = str_replace('trbidi="on"', '', $content_buffer);
|
11 |
$content_buffer = str_replace("trbidi='on'", '', $content_buffer);
|
12 |
+
if(class_exists('SiteOrigin_Widgets_Bundle')){
|
13 |
+
$content_buffer = preg_replace('/<amp-video id="sow-player(.*?)" class="(.*?)"(.*?)<\/amp-video>/', '<amp-video id="sow-player$1" class="$2" autoplay $3</amp-video>', $content_buffer);
|
14 |
+
}
|
15 |
+
if(preg_match('/<script type="text\/javascript">.*?NREUM.*?;<\/script>/s', $content_buffer)!=0){
|
16 |
+
$content_buffer = preg_replace('/<script type="text\/javascript">.*?NREUM.*?;<\/script>/s', '', $content_buffer);
|
17 |
+
}
|
18 |
+
|
19 |
if (defined('W3TC') && strpos($content_buffer, 'frameborder') !== false) {
|
20 |
add_filter("w3tc_minify_html_enable",'__return_false');
|
21 |
}
|
@@ -131,7 +131,7 @@ if(!function_exists('ampforwp_onesignal_notifications_script')){
|
|
131 |
function ampforwp_onesignal_notifications_script( $data ){
|
132 |
global $redux_builder_amp;
|
133 |
$checker = false;
|
134 |
-
if ( (!checkAMPforPageBuilderStatus(get_the_ID()) &&
|
135 |
$checker = true;
|
136 |
}
|
137 |
if(ampforwp_get_setting('ampforwp-web-push-onesignal') && $checker ){
|
131 |
function ampforwp_onesignal_notifications_script( $data ){
|
132 |
global $redux_builder_amp;
|
133 |
$checker = false;
|
134 |
+
if ( (!checkAMPforPageBuilderStatus(get_the_ID()) && is_single() ) || true == ampforwp_get_setting('ampforwp-web-push-onesignal-header') || true == ampforwp_get_setting('ampforwp-web-push-onesignal-sticky') ){
|
135 |
$checker = true;
|
136 |
}
|
137 |
if(ampforwp_get_setting('ampforwp-web-push-onesignal') && $checker ){
|
@@ -716,7 +716,7 @@ $freepro_listing = '
|
|
716 |
<span class="ov"></span>
|
717 |
</div>
|
718 |
<div class="fp-cnt">
|
719 |
-
<h1>
|
720 |
<p>Take your AMP to the next level with more beautiful themes, great extensions and more powerful features.</p>
|
721 |
<a class="buy" href="#upgrade">BUY NOW</a>
|
722 |
</div>
|
@@ -883,10 +883,10 @@ $freepro_listing = '
|
|
883 |
</div>
|
884 |
<div class="pri-lst">
|
885 |
<div class="pri-tb">
|
886 |
-
<a href="https://accounts.ampforwp.com/order?edd_action=add_to_cart&
|
887 |
<h5>PERSONAL</h5>
|
888 |
<span class="d-amt"><sup>$</sup>149</span>
|
889 |
-
<span class="amt"><sup>$</sup>
|
890 |
<span class="s-amt">(Save $59)</span>
|
891 |
<span class="bil">Billed Annually</span>
|
892 |
<span class="s">1 Site License</span>
|
@@ -897,10 +897,10 @@ $freepro_listing = '
|
|
897 |
</a>
|
898 |
</div>
|
899 |
<div class="pri-tb rec">
|
900 |
-
<a href="https://accounts.ampforwp.com/order?edd_action=add_to_cart&
|
901 |
<h5>MULTIPLE</h5>
|
902 |
<span class="d-amt"><sup>$</sup>199</span>
|
903 |
-
<span class="amt"><sup>$</sup>
|
904 |
<span class="s-amt">(Save $79)</span>
|
905 |
<span class="bil">Billed Annually</span>
|
906 |
<span class="s">3 Site License</span>
|
@@ -912,10 +912,10 @@ $freepro_listing = '
|
|
912 |
</a>
|
913 |
</div>
|
914 |
<div class="pri-tb">
|
915 |
-
<a href="https://accounts.ampforwp.com/order?edd_action=add_to_cart&
|
916 |
<h5>WEBMASTER</h5>
|
917 |
<span class="d-amt"><sup>$</sup>249</span>
|
918 |
-
<span class="amt"><sup>$</sup>
|
919 |
<span class="s-amt">(Save $99)</span>
|
920 |
<span class="bil">Billed Annually</span>
|
921 |
<span class="s">10 Site License</span>
|
@@ -926,10 +926,10 @@ $freepro_listing = '
|
|
926 |
</a>
|
927 |
</div>
|
928 |
<div class="pri-tb">
|
929 |
-
<a href="https://accounts.ampforwp.com/order?edd_action=add_to_cart&
|
930 |
<h5>FREELANCER</h5>
|
931 |
<span class="d-amt"><sup>$</sup>299</span>
|
932 |
-
<span class="amt"><sup>$</sup>
|
933 |
<span class="s-amt">(Save $119)</span>
|
934 |
<span class="bil">Billed Annually</span>
|
935 |
<span class="s">25 Site License</span>
|
@@ -940,10 +940,10 @@ $freepro_listing = '
|
|
940 |
</a>
|
941 |
</div>
|
942 |
<div class="pri-tb">
|
943 |
-
<a href="https://accounts.ampforwp.com/order?edd_action=add_to_cart&
|
944 |
<h5>AGENCY</h5>
|
945 |
<span class="d-amt"><sup>$</sup>499</span>
|
946 |
-
<span class="amt"><sup>$</sup>
|
947 |
<span class="s-amt">(Save $199)</span>
|
948 |
<span class="bil">Billed Annually</span>
|
949 |
<span class="s">Unlimited</span>
|
@@ -1216,12 +1216,6 @@ if(get_theme_support('amp-template-mode')){
|
|
1216 |
$upg_to_pro_url = 'https://ampforwp.com/membership/#utm_source=options-panel&utm_medium=view_pro_features_btn&utm_campaign=AMP%20Plugin';
|
1217 |
$upg_to_pro_target = 'target="_blank"';
|
1218 |
}
|
1219 |
-
$proDetailsProvide = '<a class="technical_support_btn_txt" href="https://ampforwp.com/support/" target="_blank">'.esc_html__('Technical Support','accelerated-mobile-pages').'</a>
|
1220 |
-
<a class="premium_features_btn dof" href="'.$upg_to_pro_url.'" id="ampforwp-prem-upg-to" '.$upg_to_pro_target.'>
|
1221 |
-
<img src="'.AMPFORWP_IMAGE_DIR . '/dof.png" />
|
1222 |
-
<span>40% OFF on Upgrades & Renewals</span>
|
1223 |
-
</a>
|
1224 |
-
';
|
1225 |
if($ampforwp_nameOfUser!=""){
|
1226 |
$proDetailsProvide = "<span class='extension-menu-call'><span class='activated-plugins'>Hello, ".esc_html($ampforwp_nameOfUser)."</span> <a class='' href='".esc_url(admin_url('admin.php?page=amp_options&tabid=opt-go-premium'))."'><i class='dashicons-before dashicons-admin-generic'></i></a></span>";
|
1227 |
}elseif($ampforwp_is_productActivated){
|
716 |
<span class="ov"></span>
|
717 |
</div>
|
718 |
<div class="fp-cnt">
|
719 |
+
<h1>Upgrade to Pro</h1>
|
720 |
<p>Take your AMP to the next level with more beautiful themes, great extensions and more powerful features.</p>
|
721 |
<a class="buy" href="#upgrade">BUY NOW</a>
|
722 |
</div>
|
883 |
</div>
|
884 |
<div class="pri-lst">
|
885 |
<div class="pri-tb">
|
886 |
+
<a href="https://accounts.ampforwp.com/order?edd_action=add_to_cart&download_id=24570&edd_options[price_id]=1">
|
887 |
<h5>PERSONAL</h5>
|
888 |
<span class="d-amt"><sup>$</sup>149</span>
|
889 |
+
<span class="amt"><sup>$</sup>149</span>
|
890 |
<span class="s-amt">(Save $59)</span>
|
891 |
<span class="bil">Billed Annually</span>
|
892 |
<span class="s">1 Site License</span>
|
897 |
</a>
|
898 |
</div>
|
899 |
<div class="pri-tb rec">
|
900 |
+
<a href="https://accounts.ampforwp.com/order?edd_action=add_to_cart&download_id=24570&edd_options[price_id]=2">
|
901 |
<h5>MULTIPLE</h5>
|
902 |
<span class="d-amt"><sup>$</sup>199</span>
|
903 |
+
<span class="amt"><sup>$</sup>199</span>
|
904 |
<span class="s-amt">(Save $79)</span>
|
905 |
<span class="bil">Billed Annually</span>
|
906 |
<span class="s">3 Site License</span>
|
912 |
</a>
|
913 |
</div>
|
914 |
<div class="pri-tb">
|
915 |
+
<a href="https://accounts.ampforwp.com/order?edd_action=add_to_cart&download_id=24570&edd_options[price_id]=3">
|
916 |
<h5>WEBMASTER</h5>
|
917 |
<span class="d-amt"><sup>$</sup>249</span>
|
918 |
+
<span class="amt"><sup>$</sup>249</span>
|
919 |
<span class="s-amt">(Save $99)</span>
|
920 |
<span class="bil">Billed Annually</span>
|
921 |
<span class="s">10 Site License</span>
|
926 |
</a>
|
927 |
</div>
|
928 |
<div class="pri-tb">
|
929 |
+
<a href="https://accounts.ampforwp.com/order?edd_action=add_to_cart&download_id=24570&edd_options[price_id]=4">
|
930 |
<h5>FREELANCER</h5>
|
931 |
<span class="d-amt"><sup>$</sup>299</span>
|
932 |
+
<span class="amt"><sup>$</sup>299</span>
|
933 |
<span class="s-amt">(Save $119)</span>
|
934 |
<span class="bil">Billed Annually</span>
|
935 |
<span class="s">25 Site License</span>
|
940 |
</a>
|
941 |
</div>
|
942 |
<div class="pri-tb">
|
943 |
+
<a href="https://accounts.ampforwp.com/order?edd_action=add_to_cart&download_id=24570&edd_options[price_id]=5">
|
944 |
<h5>AGENCY</h5>
|
945 |
<span class="d-amt"><sup>$</sup>499</span>
|
946 |
+
<span class="amt"><sup>$</sup>499</span>
|
947 |
<span class="s-amt">(Save $199)</span>
|
948 |
<span class="bil">Billed Annually</span>
|
949 |
<span class="s">Unlimited</span>
|
1216 |
$upg_to_pro_url = 'https://ampforwp.com/membership/#utm_source=options-panel&utm_medium=view_pro_features_btn&utm_campaign=AMP%20Plugin';
|
1217 |
$upg_to_pro_target = 'target="_blank"';
|
1218 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1219 |
if($ampforwp_nameOfUser!=""){
|
1220 |
$proDetailsProvide = "<span class='extension-menu-call'><span class='activated-plugins'>Hello, ".esc_html($ampforwp_nameOfUser)."</span> <a class='' href='".esc_url(admin_url('admin.php?page=amp_options&tabid=opt-go-premium'))."'><i class='dashicons-before dashicons-admin-generic'></i></a></span>";
|
1221 |
}elseif($ampforwp_is_productActivated){
|
@@ -511,41 +511,6 @@ background: linear-gradient(45deg, #E47B49 0%, #ea4c89 100%);
|
|
511 |
top: 1px;
|
512 |
left: 4px;
|
513 |
}
|
514 |
-
/*.premium_features_btn:hover{background: #fff;color:#eb3349 !important; }*/
|
515 |
-
/** Discount Offer CSS **/
|
516 |
-
.premium_features_btn.dof{
|
517 |
-
background: linear-gradient(to right,#4CAF50,#4CAF50);
|
518 |
-
padding: 22px 14px 22px 47px;
|
519 |
-
border-radius: 0;
|
520 |
-
position: relative;
|
521 |
-
top: 0px;
|
522 |
-
right: -15px;
|
523 |
-
font-weight: 500;
|
524 |
-
font-size: 15px !important;
|
525 |
-
}
|
526 |
-
.redux-intro-text a.premium_features_btn:hover{color:#fff !important;}
|
527 |
-
.premium_features_btn.dof img{
|
528 |
-
width: 26px;
|
529 |
-
position: absolute;
|
530 |
-
left: 13px;
|
531 |
-
top: 20px;
|
532 |
-
}
|
533 |
-
#toplevel_page_amp_options > a{
|
534 |
-
position: relative;
|
535 |
-
}
|
536 |
-
#toplevel_page_amp_options .wp-menu-name:after{
|
537 |
-
content:"";
|
538 |
-
display:inline-block;
|
539 |
-
background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 512.003 512.003" style="enable-background:new 0 0 512.003 512.003;" xml:space="preserve"><g><g><path xmlns="http://www.w3.org/2000/svg" d="M477.958,262.633c-2.06-4.215-2.06-9.049,0-13.263l19.096-39.065c10.632-21.751,2.208-47.676-19.178-59.023l-38.41-20.38 c-4.144-2.198-6.985-6.11-7.796-10.729l-7.512-42.829c-4.183-23.846-26.241-39.87-50.208-36.479l-43.053,6.09 c-4.647,0.656-9.242-0.838-12.613-4.099l-31.251-30.232c-17.401-16.834-44.661-16.835-62.061,0L193.72,42.859 c-3.372,3.262-7.967,4.753-12.613,4.099l-43.053-6.09c-23.975-3.393-46.025,12.633-50.208,36.479l-7.512,42.827 c-0.811,4.62-3.652,8.531-7.795,10.73l-38.41,20.38c-21.386,11.346-29.81,37.273-19.178,59.024l19.095,39.064 c2.06,4.215,2.06,9.049,0,13.263l-19.096,39.064c-10.632,21.751-2.208,47.676,19.178,59.023l38.41,20.38 c4.144,2.198,6.985,6.11,7.796,10.729l7.512,42.829c3.808,21.708,22.422,36.932,43.815,36.93c2.107,0,4.245-0.148,6.394-0.452 l43.053-6.09c4.643-0.659,9.241,0.838,12.613,4.099l31.251,30.232c8.702,8.418,19.864,12.626,31.03,12.625 c11.163-0.001,22.332-4.209,31.03-12.625l31.252-30.232c3.372-3.261,7.968-4.751,12.613-4.099l43.053,6.09 c23.978,3.392,46.025-12.633,50.208-36.479l7.513-42.827c0.811-4.62,3.652-8.531,7.795-10.73l38.41-20.38 c21.386-11.346,29.81-37.273,19.178-59.024L477.958,262.633z M464.035,334.635l-38.41,20.38 c-12.246,6.499-20.645,18.057-23.04,31.713l-7.512,42.828c-1.415,8.068-8.874,13.487-16.987,12.342l-43.053-6.09 c-13.73-1.945-27.316,2.474-37.281,12.113L266.5,478.152c-5.886,5.694-15.109,5.694-20.997,0l-31.251-30.232 c-8.422-8.147-19.432-12.562-30.926-12.562c-2.106,0-4.229,0.148-6.355,0.449l-43.053,6.09 c-8.106,1.146-15.571-4.274-16.987-12.342l-7.513-42.829c-2.396-13.656-10.794-25.215-23.041-31.712l-38.41-20.38 c-7.236-3.839-10.086-12.61-6.489-19.969l19.096-39.065c6.088-12.456,6.088-26.742,0-39.198l-19.096-39.065 c-3.597-7.359-0.747-16.13,6.489-19.969l38.41-20.38c12.246-6.499,20.645-18.057,23.04-31.713l7.512-42.828 c1.416-8.068,8.874-13.488,16.987-12.342l43.053,6.09c13.725,1.943,27.316-2.474,37.281-12.113l31.252-30.232 c5.886-5.694,15.109-5.694,20.997,0l31.251,30.232c9.965,9.64,23.554,14.056,37.281,12.113l43.053-6.09 c8.107-1.147,15.572,4.274,16.987,12.342l7.512,42.829c2.396,13.656,10.794,25.215,23.041,31.712l38.41,20.38 c7.236,3.839,10.086,12.61,6.489,19.969l-19.096,39.064c-6.088,12.455-6.088,26.743,0,39.198l19.096,39.064 C474.121,322.024,471.271,330.796,464.035,334.635z" style="fill: white;"/></g></g><g><g><path xmlns="http://www.w3.org/2000/svg" d="M363.886,148.116c-5.765-5.766-15.115-5.766-20.881,0L148.116,343.006c-5.766,5.766-5.766,15.115,0,20.881 c2.883,2.883,6.662,4.325,10.44,4.325c3.778,0,7.558-1.441,10.44-4.325l194.889-194.889 C369.653,163.231,369.653,153.883,363.886,148.116z" style="fill: white;"/></g></g><g><g><path xmlns="http://www.w3.org/2000/svg" d="M196.941,123.116c-29.852,0-54.139,24.287-54.139,54.139s24.287,54.139,54.139,54.139s54.139-24.287,54.139-54.139 S226.793,123.116,196.941,123.116z M196.941,201.863c-13.569,0-24.608-11.039-24.608-24.609c0-13.569,11.039-24.608,24.608-24.608 c13.569,0,24.609,11.039,24.609,24.608C221.549,190.824,210.51,201.863,196.941,201.863z" style="fill: white;"/></g></g><g><g><path xmlns="http://www.w3.org/2000/svg" d="M315.061,280.61c-29.852,0-54.139,24.287-54.139,54.139s24.287,54.139,54.139,54.139 c29.852,0,54.139-24.287,54.139-54.139S344.913,280.61,315.061,280.61z M315.061,359.357c-13.569,0-24.609-11.039-24.609-24.608 s11.039-24.608,24.609-24.608c13.569,0,24.608,11.039,24.608,24.608S328.63,359.357,315.061,359.357z" style="fill: white;"/></g></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></svg>');
|
540 |
-
width: 20px;
|
541 |
-
height: 20px;
|
542 |
-
background-repeat: no-repeat;
|
543 |
-
position: absolute;
|
544 |
-
right: 20px;
|
545 |
-
top: 7px;
|
546 |
-
}
|
547 |
-
|
548 |
-
/** Discount Offer CSS Ends **/
|
549 |
.getting_started_listing .align_left{display: none}
|
550 |
.getting_started_listing li a{width: 288px}
|
551 |
.extension_listing li:hover{border-color:rgba(48, 63, 159, 0.35)}
|
@@ -755,7 +720,7 @@ background: linear-gradient(45deg, #E47B49 0%, #ea4c89 100%);
|
|
755 |
font-weight: 600;
|
756 |
}
|
757 |
.fp-cnt p{
|
758 |
-
margin-top:
|
759 |
color: #fff;
|
760 |
font-size:23px;
|
761 |
padding: 0 100px;
|
@@ -773,7 +738,6 @@ background: linear-gradient(45deg, #E47B49 0%, #ea4c89 100%);
|
|
773 |
background: -webkit-linear-gradient(to right, #a8e063, #56ab2f);
|
774 |
background: linear-gradient(to right, #a8e063, #56ab2f);
|
775 |
font-weight: 700;
|
776 |
-
margin-top: 4px;
|
777 |
text-shadow: 1px 1px 1px #27a52c;
|
778 |
}
|
779 |
.pvf{
|
@@ -786,7 +750,7 @@ background: linear-gradient(45deg, #E47B49 0%, #ea4c89 100%);
|
|
786 |
display: grid;
|
787 |
grid-template-columns: 1fr 1fr 1fr;
|
788 |
background: #f9f9f9;
|
789 |
-
padding:45px 0px 45px
|
790 |
}
|
791 |
.ex-1{
|
792 |
width:250px;
|
@@ -1006,7 +970,7 @@ background: linear-gradient(45deg, #E47B49 0%, #ea4c89 100%);
|
|
1006 |
color: #666;
|
1007 |
font-weight: 500;
|
1008 |
margin-bottom: 15px;
|
1009 |
-
display:
|
1010 |
text-decoration: line-through;
|
1011 |
}
|
1012 |
.d-amt sup{
|
@@ -1019,7 +983,7 @@ background: linear-gradient(45deg, #E47B49 0%, #ea4c89 100%);
|
|
1019 |
color: #4caf50;
|
1020 |
font-weight: 500;
|
1021 |
margin-bottom:10px;
|
1022 |
-
display:
|
1023 |
}
|
1024 |
.pri-tb .amt sup{
|
1025 |
font-size:22px;
|
511 |
top: 1px;
|
512 |
left: 4px;
|
513 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
514 |
.getting_started_listing .align_left{display: none}
|
515 |
.getting_started_listing li a{width: 288px}
|
516 |
.extension_listing li:hover{border-color:rgba(48, 63, 159, 0.35)}
|
720 |
font-weight: 600;
|
721 |
}
|
722 |
.fp-cnt p{
|
723 |
+
margin-top: 5px;
|
724 |
color: #fff;
|
725 |
font-size:23px;
|
726 |
padding: 0 100px;
|
738 |
background: -webkit-linear-gradient(to right, #a8e063, #56ab2f);
|
739 |
background: linear-gradient(to right, #a8e063, #56ab2f);
|
740 |
font-weight: 700;
|
|
|
741 |
text-shadow: 1px 1px 1px #27a52c;
|
742 |
}
|
743 |
.pvf{
|
750 |
display: grid;
|
751 |
grid-template-columns: 1fr 1fr 1fr;
|
752 |
background: #f9f9f9;
|
753 |
+
padding:45px 0px 45px 25px;
|
754 |
}
|
755 |
.ex-1{
|
756 |
width:250px;
|
970 |
color: #666;
|
971 |
font-weight: 500;
|
972 |
margin-bottom: 15px;
|
973 |
+
display: none;
|
974 |
text-decoration: line-through;
|
975 |
}
|
976 |
.d-amt sup{
|
983 |
color: #4caf50;
|
984 |
font-weight: 500;
|
985 |
margin-bottom:10px;
|
986 |
+
display: none;
|
987 |
}
|
988 |
.pri-tb .amt sup{
|
989 |
font-size:22px;
|
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
|
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.3.2
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -191,6 +191,20 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
191 |
|
192 |
== Changelog ==
|
193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
= 1.0.12 (12th January 2020) =
|
195 |
* Fixed: Detect Component and add or remove script accordingly #4067
|
196 |
|
@@ -202,14 +216,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
202 |
* Fixed: Scripts are not adding properly if user is adding the content through embed #4040
|
203 |
* Fixed: When Featured Image from The Content is turned on,the image is not displayed when Creating post from Gutenberg. #4022
|
204 |
|
205 |
-
= 1.0.9 (8th January 2020) =
|
206 |
-
* Fixed: Odd behaviour of Optimize CSS (Treeshaking),when turned off resolves the validation errors and when turned on adding unnecessary wp-block CSS. #4036
|
207 |
-
* Fixed: After enable the Tree shaking feature the CSS not loading properly #4034
|
208 |
-
* Fixed: fallback feature is not working on SVG images #4033
|
209 |
-
* Fixed: Need to update the Form Sanitizer to allow only the required from #4010
|
210 |
-
* Fixed: 404 error in console with Images having webp extension. #3983
|
211 |
-
|
212 |
-
= 1.0.8 (2nd January 2020) =
|
213 |
-
* Fixed: Need to add Rankmath's "Nofollow External Links" feature. #3970 (updated the code)
|
214 |
-
|
215 |
Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.3.2
|
7 |
+
Stable tag: 1.0.13
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
191 |
|
192 |
== Changelog ==
|
193 |
|
194 |
+
= 1.0.13 (13th January 2020) =
|
195 |
+
* Fixed: Warring in console : [DOM] Found 2 elements with non-unique id #amp-search #3946
|
196 |
+
* Fixed: New Relic script is getting added in AMP and causing validtion error #4018
|
197 |
+
* Fixed: Icons are not loading when creating theme compatibility #3766
|
198 |
+
* Fixed: Video doesn't work on AMP when inserted from Siteorigin pagebuilder (Video player widget) #3936
|
199 |
+
* Fixed: Minor issues with amp need to fix #3931
|
200 |
+
* Fixed: When from amp page builder adding text module then space is not coming in paragraph #3982
|
201 |
+
* Fixed: Getting error at home page when push notification option is enabled. #4026
|
202 |
+
* Fixed: Please Fix Errors in Google Lighthouse audit in Accessibility (using Swift, Amp Layouts) #3949
|
203 |
+
* Fixed: Remove offers from the panel #4027
|
204 |
+
* Fixed: Detect Component and add or remove script accordingly #4067
|
205 |
+
* Fixed: GTM tags are not working in the updated version 1.0.9 but Google Analytics is working,Also in version 1.0.0 both are working fine #4059
|
206 |
+
* Fixed: Matomo (Piwik) Analytics generating errors in Console. #4042
|
207 |
+
|
208 |
= 1.0.12 (12th January 2020) =
|
209 |
* Fixed: Detect Component and add or remove script accordingly #4067
|
210 |
|
216 |
* Fixed: Scripts are not adding properly if user is adding the content through embed #4040
|
217 |
* Fixed: When Featured Image from The Content is turned on,the image is not displayed when Creating post from Gutenberg. #4022
|
218 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
|
@@ -64,7 +64,19 @@ if(empty($cross_btn_bg_clr)){
|
|
64 |
}
|
65 |
if(empty($cross_btn_hvr_clr)){
|
66 |
$cross_btn_hvr_clr ='rgba(0, 0, 0, 0.45)';
|
67 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
#statcounter{width: 1px;height:1px;}
|
69 |
.amp-wp-article amp-addthis{bottom: -38px;margin-left: 6px;}
|
70 |
<?php if(1==ampforwp_get_setting('ampforwp-google-font-switch') && ( ampforwp_get_setting('amp_font_selector') == 1 || empty(ampforwp_get_setting('amp_font_selector') ) ) ) {?>
|
@@ -73,28 +85,28 @@ if(empty($cross_btn_hvr_clr)){
|
|
73 |
font-display: swap;
|
74 |
font-style: normal;
|
75 |
font-weight: 400;
|
76 |
-
src: local('Merriweather'), local('Merriweather-Regular'), url('<?php echo esc_url(
|
77 |
}
|
78 |
@font-face {
|
79 |
font-family: 'Merriweather';
|
80 |
font-display: swap;
|
81 |
font-style: normal;
|
82 |
font-weight: 700;
|
83 |
-
src: local('Merriweather Bold'), local('Merriweather-Bold'), url('<?php echo esc_url(
|
84 |
}
|
85 |
@font-face {
|
86 |
font-family: 'Merriweather';
|
87 |
font-display: swap;
|
88 |
font-style: italic;
|
89 |
font-weight: 400;
|
90 |
-
src: local('Merriweather Italic'), local('Merriweather-Italic'), url('<?php echo esc_url(
|
91 |
}
|
92 |
@font-face {
|
93 |
font-family: 'Merriweather';
|
94 |
font-display: swap;
|
95 |
font-style: italic;
|
96 |
font-weight: 700;
|
97 |
-
src: local('Merriweather Bold Italic'), local('Merriweather-BoldItalic'), url('<?php echo esc_url(
|
98 |
}
|
99 |
<?php } // fonts condition ends here ?>
|
100 |
.clearfix, .cb{clear:both}
|
64 |
}
|
65 |
if(empty($cross_btn_hvr_clr)){
|
66 |
$cross_btn_hvr_clr ='rgba(0, 0, 0, 0.45)';
|
67 |
+
}
|
68 |
+
|
69 |
+
$icon_url = plugin_dir_url(__FILE__) ;
|
70 |
+
$ds = ampforwp_get_setting('amp-design-selector');
|
71 |
+
$design = "swift";
|
72 |
+
if($ds!=4){
|
73 |
+
$design = "design-$ds";
|
74 |
+
}
|
75 |
+
preg_match('/accelerated-mobile-pages/i', $icon_url, $matches);
|
76 |
+
if(count($matches)==0){
|
77 |
+
$icon_url = plugin_dir_url('accelerated-mobile-pages/accelerated-moblie-pages.php').'templates/design-manager/'.esc_attr($design).'/';
|
78 |
+
}
|
79 |
+
?>
|
80 |
#statcounter{width: 1px;height:1px;}
|
81 |
.amp-wp-article amp-addthis{bottom: -38px;margin-left: 6px;}
|
82 |
<?php if(1==ampforwp_get_setting('ampforwp-google-font-switch') && ( ampforwp_get_setting('amp_font_selector') == 1 || empty(ampforwp_get_setting('amp_font_selector') ) ) ) {?>
|
85 |
font-display: swap;
|
86 |
font-style: normal;
|
87 |
font-weight: 400;
|
88 |
+
src: local('Merriweather'), local('Merriweather-Regular'), url('<?php echo esc_url($icon_url) ?>fonts/Merriweather-Regular.ttf');
|
89 |
}
|
90 |
@font-face {
|
91 |
font-family: 'Merriweather';
|
92 |
font-display: swap;
|
93 |
font-style: normal;
|
94 |
font-weight: 700;
|
95 |
+
src: local('Merriweather Bold'), local('Merriweather-Bold'), url('<?php echo esc_url($icon_url) ?>fonts/Merriweather-Bold.ttf');
|
96 |
}
|
97 |
@font-face {
|
98 |
font-family: 'Merriweather';
|
99 |
font-display: swap;
|
100 |
font-style: italic;
|
101 |
font-weight: 400;
|
102 |
+
src: local('Merriweather Italic'), local('Merriweather-Italic'), url('<?php echo esc_url($icon_url) ?>fonts/Merriweather-Italic.ttf');
|
103 |
}
|
104 |
@font-face {
|
105 |
font-family: 'Merriweather';
|
106 |
font-display: swap;
|
107 |
font-style: italic;
|
108 |
font-weight: 700;
|
109 |
+
src: local('Merriweather Bold Italic'), local('Merriweather-BoldItalic'), url('<?php echo esc_url($icon_url) ?>fonts/Merriweather-BoldItalic.ttf');
|
110 |
}
|
111 |
<?php } // fonts condition ends here ?>
|
112 |
.clearfix, .cb{clear:both}
|
@@ -20,6 +20,17 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
20 |
// Get template colors
|
21 |
$header_background_color = $get_customizer->get_customizer_setting( 'header_background_color' );
|
22 |
$header_color = $get_customizer->get_customizer_setting( 'header_color' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
?>
|
24 |
|
25 |
/* Global Styling */
|
@@ -68,14 +79,14 @@ ol, ul {list-style-position: inside;}
|
|
68 |
font-display: swap;
|
69 |
font-style: normal;
|
70 |
font-weight: 400;
|
71 |
-
src: local('Roboto Slab Regular'), local('RobotoSlab-Regular'), url('<?php echo esc_url(ampforwp_font_url(
|
72 |
}
|
73 |
@font-face {
|
74 |
font-family: 'Roboto Slab';
|
75 |
font-display: swap;
|
76 |
font-style: normal;
|
77 |
font-weight: 700;
|
78 |
-
src: local('Roboto Slab Bold'), local('RobotoSlab-Bold'), url('<?php echo esc_url(ampforwp_font_url(
|
79 |
}
|
80 |
<?php } // Primary Fonts ends here
|
81 |
if(1==ampforwp_get_setting('content-font-family-enable') && ( ampforwp_get_setting('amp_font_selector_content_single') == 1 || empty(ampforwp_get_setting('amp_font_selector_content_single') ) ) ) {?>
|
@@ -84,14 +95,14 @@ if(1==ampforwp_get_setting('content-font-family-enable') && ( ampforwp_get_setti
|
|
84 |
font-display: swap;
|
85 |
font-style: normal;
|
86 |
font-weight: 400;
|
87 |
-
src: local('PT Serif'), local('PTSerif-Regular'), url('<?php echo esc_url(ampforwp_font_url(
|
88 |
}
|
89 |
@font-face {
|
90 |
font-family: 'PT Serif';
|
91 |
font-display: swap;
|
92 |
font-style: normal;
|
93 |
font-weight: 700;
|
94 |
-
src: local('PT Serif Bold'), local('PTSerif-Bold'), url('<?php echo esc_url(ampforwp_font_url(
|
95 |
}
|
96 |
<?php } // Secondary Fonts Ends here?>
|
97 |
/* Template Styles */
|
@@ -665,11 +676,11 @@ if( ampforwp_get_setting('ampforwp-advertisement-sticky-type') == 3) {?>
|
|
665 |
@font-face {
|
666 |
font-family: 'icomoon';
|
667 |
font-display: swap;
|
668 |
-
src: url('<?php echo esc_url(
|
669 |
-
src: url('<?php echo esc_url(
|
670 |
-
url('<?php echo esc_url(
|
671 |
-
url('<?php echo esc_url(
|
672 |
-
url('<?php echo esc_url(
|
673 |
font-weight: normal;
|
674 |
font-style: normal;
|
675 |
}
|
20 |
// Get template colors
|
21 |
$header_background_color = $get_customizer->get_customizer_setting( 'header_background_color' );
|
22 |
$header_color = $get_customizer->get_customizer_setting( 'header_color' );
|
23 |
+
|
24 |
+
$icon_url = plugin_dir_url(__FILE__);
|
25 |
+
$ds = ampforwp_get_setting('amp-design-selector');
|
26 |
+
$design = "swift";
|
27 |
+
if($ds!=4){
|
28 |
+
$design = "design-$ds";
|
29 |
+
}
|
30 |
+
preg_match('/accelerated-mobile-pages/i', $icon_url, $matches);
|
31 |
+
if(count($matches)==0){
|
32 |
+
$icon_url = plugin_dir_url('accelerated-mobile-pages/accelerated-moblie-pages.php').'templates/design-manager/'.esc_attr($design).'/';
|
33 |
+
}
|
34 |
?>
|
35 |
|
36 |
/* Global Styling */
|
79 |
font-display: swap;
|
80 |
font-style: normal;
|
81 |
font-weight: 400;
|
82 |
+
src: local('Roboto Slab Regular'), local('RobotoSlab-Regular'), url('<?php echo esc_url(ampforwp_font_url($icon_url.'fonts/robotoslab/RobotoSlab-Regular.ttf')); ?>');
|
83 |
}
|
84 |
@font-face {
|
85 |
font-family: 'Roboto Slab';
|
86 |
font-display: swap;
|
87 |
font-style: normal;
|
88 |
font-weight: 700;
|
89 |
+
src: local('Roboto Slab Bold'), local('RobotoSlab-Bold'), url('<?php echo esc_url(ampforwp_font_url($icon_url.'fonts/robotoslab/RobotoSlab-Bold.ttf')); ?>');
|
90 |
}
|
91 |
<?php } // Primary Fonts ends here
|
92 |
if(1==ampforwp_get_setting('content-font-family-enable') && ( ampforwp_get_setting('amp_font_selector_content_single') == 1 || empty(ampforwp_get_setting('amp_font_selector_content_single') ) ) ) {?>
|
95 |
font-display: swap;
|
96 |
font-style: normal;
|
97 |
font-weight: 400;
|
98 |
+
src: local('PT Serif'), local('PTSerif-Regular'), url('<?php echo esc_url(ampforwp_font_url($icon_url.'fonts/ptserif/PT_Serif-Web-Regular.ttf')); ?>');
|
99 |
}
|
100 |
@font-face {
|
101 |
font-family: 'PT Serif';
|
102 |
font-display: swap;
|
103 |
font-style: normal;
|
104 |
font-weight: 700;
|
105 |
+
src: local('PT Serif Bold'), local('PTSerif-Bold'), url('<?php echo esc_url(ampforwp_font_url($icon_url.'fonts/ptserif/PT_Serif-Web-Bold.ttf')); ?>');
|
106 |
}
|
107 |
<?php } // Secondary Fonts Ends here?>
|
108 |
/* Template Styles */
|
676 |
@font-face {
|
677 |
font-family: 'icomoon';
|
678 |
font-display: swap;
|
679 |
+
src: url('<?php echo esc_url($icon_url .'fonts/icomoon.eot'); ?>');
|
680 |
+
src: url('<?php echo esc_url($icon_url .'fonts/icomoon.eot'); ?>') format('embedded-opentype'),
|
681 |
+
url('<?php echo esc_url($icon_url .'fonts/icomoon.ttf'); ?>') format('truetype'),
|
682 |
+
url('<?php echo esc_url($icon_url .'fonts/icomoon.woff'); ?>') format('woff'),
|
683 |
+
url('<?php echo esc_url($icon_url .'fonts/icomoon.svg'); ?>') format('svg');
|
684 |
font-weight: normal;
|
685 |
font-style: normal;
|
686 |
}
|
@@ -3,6 +3,16 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
3 |
exit;
|
4 |
}
|
5 |
global $redux_builder_amp;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
$font_content = '';
|
7 |
$font_content = ampforwp_get_setting('amp_font_selector_content_single');
|
8 |
$header_type = ampforwp_get_setting('header-type');
|
@@ -23,11 +33,11 @@ if ( empty($ampforwp_font_icon) ) {
|
|
23 |
?>
|
24 |
<?php if(1==ampforwp_get_setting('ampforwp-google-font-switch') && ( !isset($redux_builder_amp['amp_font_selector']) || $redux_builder_amp['amp_font_selector'] == 1 || empty($redux_builder_amp['amp_font_selector']) ) ) {
|
25 |
if(!ampforwp_levelup_compatibility('levelup_theme_and_elementor')){ // Level up Condition starts ?>
|
26 |
-
@font-face {font-family: 'Poppins';font-display: swap;font-style: normal;font-weight: 300;src: local('Poppins Light'), local('Poppins-Light'), url('<?php echo
|
27 |
-
@font-face {font-family: 'Poppins';font-display: swap;font-style: normal;font-weight: 400;src: local('Poppins Regular'), local('Poppins-Regular'), url('<?php echo
|
28 |
-
@font-face {font-family: 'Poppins';font-display: swap;font-style: normal;font-weight: 500;src: local('Poppins Medium'), local('Poppins-Medium'), url('<?php echo
|
29 |
-
@font-face {font-family: 'Poppins';font-display: swap;font-style: normal;font-weight: 600;src: local('Poppins SemiBold'), local('Poppins-SemiBold'), url('<?php echo
|
30 |
-
@font-face {font-family: 'Poppins';font-display: swap;font-style: normal;font-weight: 700;src: local('Poppins Bold'), local('Poppins-Bold'), url('<?php echo
|
31 |
<?php } // Level up Condition ends
|
32 |
} ?>
|
33 |
<?php
|
@@ -88,7 +98,7 @@ if( class_exists('\Elementor\Plugin') && \Elementor\Plugin::$instance->db->is_bu
|
|
88 |
else{ ?>.cntr {max-width: 1100px;margin: 0 auto;width:100%;padding:0px 20px} <?php } ?>
|
89 |
<?php if(!ampforwp_levelup_compatibility('levelup_elementor') ){ // Level up Condition starts
|
90 |
if ( $ampforwp_font_icon == 'swift-icons' || ( $ampforwp_font_icon == 'fontawesome-icons' && checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) ) ){ ?>
|
91 |
-
@font-face {font-family: 'icomoon';font-display: swap;font-style: normal;font-weight: normal;src: local('icomoon'), local('icomoon'), url('<?php echo
|
92 |
<?php } // Swift icomoon icons condition ends ?>
|
93 |
header .cntr{
|
94 |
<?php if( ampforwp_get_setting('swift-width-control') ){?>
|
@@ -437,8 +447,8 @@ if( ampforwp_is_home() || is_archive() || is_search() || (function_exists('is_sh
|
|
437 |
.fsp{margin: 15px;flex-basis: calc(33.33% - 30px);}
|
438 |
.fsp-img {margin-bottom:10px;}
|
439 |
.fsp h2, .fsp h3{margin:0px 0px 5px 0px;font-size:20px;line-height:1.4;font-weight:500;}
|
440 |
-
.at-dt{font-size:11px;color:#
|
441 |
-
.pt-dt{font-size:11px;color:#
|
442 |
.arch-tlt{margin:30px 0px 30px;display:inline-block;width:100%;}
|
443 |
.amp-archive-title, .amp-loop-label{font-weight:600;}
|
444 |
.amp-archive-desc{font-size: 14px;margin:8px 0px 0px 0px;color: #333;line-height:20px;}
|
@@ -608,11 +618,6 @@ table {
|
|
608 |
}
|
609 |
.artl-cnt table{ margin: 0 auto; text-align: center; width: 100%; }
|
610 |
p.nocomments {padding: 10px;color: #fff;}
|
611 |
-
<?php if($redux_builder_amp['single-new-features'] && $redux_builder_amp['ampforwp-underline-content-links']){ ?>
|
612 |
-
.artl-cnt a{
|
613 |
-
text-decoration: underline;
|
614 |
-
}
|
615 |
-
<?php } // Underline CSS Ends?>
|
616 |
.tl-exc{font-size: 16px;color: #444;margin-top: 10px;line-height:20px;}
|
617 |
.amp-category span:nth-child(1) {display: none;}
|
618 |
.amp-category span a, .amp-category span{color: <?php echo ampforwp_sanitize_color($swift_cs_color); ?>;font-size: 12px;font-weight: 500;text-transform: uppercase;}
|
@@ -682,39 +687,6 @@ if($redux_builder_amp['swift-social-position'] == 'below-content'){?>
|
|
682 |
|
683 |
|
684 |
.cntn-wrp{font-size:18px;color:#000;line-height:1.7;word-break: break-word;}
|
685 |
-
.cntn-wrp h1, .cntn-wrp h2, .cntn-wrp h3, .cntn-wrp h4, .cntn-wrp h5, h6{margin-bottom:5px;}
|
686 |
-
<?php // H1 - H6 Font Sizes
|
687 |
-
if(ampforwp_get_setting('swift_cnt') && ampforwp_get_setting('swift_cnt_h1') ){ ?>
|
688 |
-
.cntn-wrp h1{font-size:<?php echo esc_html( ampforwp_get_setting('swift_h1_sz') )?>;}
|
689 |
-
<?php } else { ?>
|
690 |
-
.cntn-wrp h1 {font-size: 32px;}
|
691 |
-
<?php } //H1 ends
|
692 |
-
if(ampforwp_get_setting('swift_cnt') && ampforwp_get_setting('swift_cnt_h2') ){ ?>
|
693 |
-
.cntn-wrp h2{font-size:<?php echo esc_html($redux_builder_amp['swift_h2_sz'])?>;}
|
694 |
-
<?php } else { ?>
|
695 |
-
.cntn-wrp h2 {font-size: 27px;}
|
696 |
-
<?php } // H2 Ends
|
697 |
-
if(ampforwp_get_setting('swift_cnt') && ampforwp_get_setting('swift_cnt_h3') ){ ?>
|
698 |
-
.cntn-wrp h3{font-size:<?php echo esc_html(ampforwp_get_setting('swift_h3_sz') )?>;}
|
699 |
-
<?php } else { ?>
|
700 |
-
.cntn-wrp h3 {font-size: 24px;}
|
701 |
-
<?php } // H3 Ends
|
702 |
-
if(ampforwp_get_setting('swift_cnt') && ampforwp_get_setting('swift_cnt_h4') ){ ?>
|
703 |
-
.cntn-wrp h4{font-size:<?php echo esc_html(ampforwp_get_setting('swift_h4_sz') )?>;}
|
704 |
-
<?php } else { ?>
|
705 |
-
.cntn-wrp h4 {font-size: 20px;}
|
706 |
-
<?php } // H4 Ends
|
707 |
-
if(ampforwp_get_setting('swift_cnt') && ampforwp_get_setting('swift_cnt_h5') ){ ?>
|
708 |
-
.cntn-wrp h5{font-size:<?php echo esc_html(ampforwp_get_setting('swift_h5_sz') )?>;}
|
709 |
-
<?php } else { ?>
|
710 |
-
.cntn-wrp h5 {font-size: 17px;}
|
711 |
-
<?php } // H5 Ends
|
712 |
-
if(ampforwp_get_setting('swift_cnt') && ampforwp_get_setting('swift_cnt_h6') ){ ?>
|
713 |
-
.cntn-wrp h6{font-size:<?php echo esc_html(ampforwp_get_setting('swift_h6_sz') )?>;}
|
714 |
-
<?php } else { ?>
|
715 |
-
.cntn-wrp h6 {font-size: 15px;}
|
716 |
-
<?php } // H6 Ends
|
717 |
-
// swift Content Heading Sizes Ends?>
|
718 |
.cntn-wrp small{font-size:11px;line-height:1.2;color:#111;}
|
719 |
.cntn-wrp p, .cntn-wrp ul, .cntn-wrp ol{margin:0px 0px 30px 0px;word-break: break-word;}
|
720 |
.cntn-wrp .wp-block-image,.wp-block-embed{margin:15px 0px;}
|
@@ -2136,7 +2108,8 @@ if (ampforwp_get_setting('enable-amp-ads-resp-6')){?>
|
|
2136 |
<?php } ?>
|
2137 |
<?php } // levelup condition ends here?>
|
2138 |
<?php if (checkAMPforPageBuilderStatus(get_the_ID())){ ?>
|
2139 |
-
.sp-cnt .cntr {max-width: 100%;margin:0;width:100%;padding:0}
|
|
|
2140 |
<?php } ?>
|
2141 |
<?php //Breadcrumbs
|
2142 |
if( !checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) && ( (is_single() && true == ampforwp_get_setting('ampforwp-bread-crumb')) || (is_page() && ampforwp_get_setting('ampforwp_pages_breadcrumbs')) )) {?>
|
@@ -2311,3 +2284,41 @@ if(ampforwp_get_setting('ampforwp-gallery-design-type')==3){?>
|
|
2311 |
padding: 0px 2px;
|
2312 |
border-radius: 2px;
|
2313 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
exit;
|
4 |
}
|
5 |
global $redux_builder_amp;
|
6 |
+
$icon_url = plugin_dir_url(__FILE__) ;
|
7 |
+
$ds = ampforwp_get_setting('amp-design-selector');
|
8 |
+
$design = "swift";
|
9 |
+
if($ds!=4){
|
10 |
+
$design = "design-$ds";
|
11 |
+
}
|
12 |
+
preg_match('/accelerated-mobile-pages/i', $icon_url, $matches);
|
13 |
+
if(count($matches)==0){
|
14 |
+
$icon_url = plugin_dir_url('accelerated-mobile-pages/accelerated-moblie-pages.php').'templates/design-manager/'.esc_attr($design).'/';
|
15 |
+
}
|
16 |
$font_content = '';
|
17 |
$font_content = ampforwp_get_setting('amp_font_selector_content_single');
|
18 |
$header_type = ampforwp_get_setting('header-type');
|
33 |
?>
|
34 |
<?php if(1==ampforwp_get_setting('ampforwp-google-font-switch') && ( !isset($redux_builder_amp['amp_font_selector']) || $redux_builder_amp['amp_font_selector'] == 1 || empty($redux_builder_amp['amp_font_selector']) ) ) {
|
35 |
if(!ampforwp_levelup_compatibility('levelup_theme_and_elementor')){ // Level up Condition starts ?>
|
36 |
+
@font-face {font-family: 'Poppins';font-display: swap;font-style: normal;font-weight: 300;src: local('Poppins Light'), local('Poppins-Light'), url('<?php echo $icon_url ?>fonts/Poppins-Light.ttf');}
|
37 |
+
@font-face {font-family: 'Poppins';font-display: swap;font-style: normal;font-weight: 400;src: local('Poppins Regular'), local('Poppins-Regular'), url('<?php echo $icon_url ?>fonts/Poppins-Regular.ttf');}
|
38 |
+
@font-face {font-family: 'Poppins';font-display: swap;font-style: normal;font-weight: 500;src: local('Poppins Medium'), local('Poppins-Medium'), url('<?php echo $icon_url ?>fonts/Poppins-Medium.ttf');}
|
39 |
+
@font-face {font-family: 'Poppins';font-display: swap;font-style: normal;font-weight: 600;src: local('Poppins SemiBold'), local('Poppins-SemiBold'), url('<?php echo $icon_url ?>fonts/Poppins-SemiBold.ttf'); }
|
40 |
+
@font-face {font-family: 'Poppins';font-display: swap;font-style: normal;font-weight: 700;src: local('Poppins Bold'), local('Poppins-Bold'), url('<?php echo $icon_url ?>fonts/Poppins-Bold.ttf'); }
|
41 |
<?php } // Level up Condition ends
|
42 |
} ?>
|
43 |
<?php
|
98 |
else{ ?>.cntr {max-width: 1100px;margin: 0 auto;width:100%;padding:0px 20px} <?php } ?>
|
99 |
<?php if(!ampforwp_levelup_compatibility('levelup_elementor') ){ // Level up Condition starts
|
100 |
if ( $ampforwp_font_icon == 'swift-icons' || ( $ampforwp_font_icon == 'fontawesome-icons' && checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) ) ){ ?>
|
101 |
+
@font-face {font-family: 'icomoon';font-display: swap;font-style: normal;font-weight: normal;src: local('icomoon'), local('icomoon'), url('<?php echo $icon_url ?>fonts/icomoon.ttf');}
|
102 |
<?php } // Swift icomoon icons condition ends ?>
|
103 |
header .cntr{
|
104 |
<?php if( ampforwp_get_setting('swift-width-control') ){?>
|
447 |
.fsp{margin: 15px;flex-basis: calc(33.33% - 30px);}
|
448 |
.fsp-img {margin-bottom:10px;}
|
449 |
.fsp h2, .fsp h3{margin:0px 0px 5px 0px;font-size:20px;line-height:1.4;font-weight:500;}
|
450 |
+
.at-dt{font-size:11px;color:#757575;margin:12px 0px 9px 0px; display: inline-flex;}
|
451 |
+
.pt-dt{font-size:11px;color:#757575;margin: 8px 0px 0px 0px;display: inline-flex;}
|
452 |
.arch-tlt{margin:30px 0px 30px;display:inline-block;width:100%;}
|
453 |
.amp-archive-title, .amp-loop-label{font-weight:600;}
|
454 |
.amp-archive-desc{font-size: 14px;margin:8px 0px 0px 0px;color: #333;line-height:20px;}
|
618 |
}
|
619 |
.artl-cnt table{ margin: 0 auto; text-align: center; width: 100%; }
|
620 |
p.nocomments {padding: 10px;color: #fff;}
|
|
|
|
|
|
|
|
|
|
|
621 |
.tl-exc{font-size: 16px;color: #444;margin-top: 10px;line-height:20px;}
|
622 |
.amp-category span:nth-child(1) {display: none;}
|
623 |
.amp-category span a, .amp-category span{color: <?php echo ampforwp_sanitize_color($swift_cs_color); ?>;font-size: 12px;font-weight: 500;text-transform: uppercase;}
|
687 |
|
688 |
|
689 |
.cntn-wrp{font-size:18px;color:#000;line-height:1.7;word-break: break-word;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
690 |
.cntn-wrp small{font-size:11px;line-height:1.2;color:#111;}
|
691 |
.cntn-wrp p, .cntn-wrp ul, .cntn-wrp ol{margin:0px 0px 30px 0px;word-break: break-word;}
|
692 |
.cntn-wrp .wp-block-image,.wp-block-embed{margin:15px 0px;}
|
2108 |
<?php } ?>
|
2109 |
<?php } // levelup condition ends here?>
|
2110 |
<?php if (checkAMPforPageBuilderStatus(get_the_ID())){ ?>
|
2111 |
+
.sp-cnt .cntr {max-width: 100%;margin:0;width:100%;padding:0}
|
2112 |
+
.amp_mod.text-mod p {margin: 0 0 1.5em;}
|
2113 |
<?php } ?>
|
2114 |
<?php //Breadcrumbs
|
2115 |
if( !checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) && ( (is_single() && true == ampforwp_get_setting('ampforwp-bread-crumb')) || (is_page() && ampforwp_get_setting('ampforwp_pages_breadcrumbs')) )) {?>
|
2284 |
padding: 0px 2px;
|
2285 |
border-radius: 2px;
|
2286 |
}
|
2287 |
+
.cntn-wrp h1, .cntn-wrp h2, .cntn-wrp h3, .cntn-wrp h4, .cntn-wrp h5, h6{margin-bottom:5px;}
|
2288 |
+
<?php // H1 - H6 Font Sizes
|
2289 |
+
if(ampforwp_get_setting('swift_cnt') && ampforwp_get_setting('swift_cnt_h1') ){ ?>
|
2290 |
+
.cntn-wrp h1{font-size:<?php echo esc_html( ampforwp_get_setting('swift_h1_sz') )?>;}
|
2291 |
+
<?php } else { ?>
|
2292 |
+
.cntn-wrp h1 {font-size: 32px;}
|
2293 |
+
<?php } //H1 ends
|
2294 |
+
if(ampforwp_get_setting('swift_cnt') && ampforwp_get_setting('swift_cnt_h2') ){ ?>
|
2295 |
+
.cntn-wrp h2{font-size:<?php echo esc_html($redux_builder_amp['swift_h2_sz'])?>;}
|
2296 |
+
<?php } else { ?>
|
2297 |
+
.cntn-wrp h2 {font-size: 27px;}
|
2298 |
+
<?php } // H2 Ends
|
2299 |
+
if(ampforwp_get_setting('swift_cnt') && ampforwp_get_setting('swift_cnt_h3') ){ ?>
|
2300 |
+
.cntn-wrp h3{font-size:<?php echo esc_html(ampforwp_get_setting('swift_h3_sz') )?>;}
|
2301 |
+
<?php } else { ?>
|
2302 |
+
.cntn-wrp h3 {font-size: 24px;}
|
2303 |
+
<?php } // H3 Ends
|
2304 |
+
if(ampforwp_get_setting('swift_cnt') && ampforwp_get_setting('swift_cnt_h4') ){ ?>
|
2305 |
+
.cntn-wrp h4{font-size:<?php echo esc_html(ampforwp_get_setting('swift_h4_sz') )?>;}
|
2306 |
+
<?php } else { ?>
|
2307 |
+
.cntn-wrp h4 {font-size: 20px;}
|
2308 |
+
<?php } // H4 Ends
|
2309 |
+
if(ampforwp_get_setting('swift_cnt') && ampforwp_get_setting('swift_cnt_h5') ){ ?>
|
2310 |
+
.cntn-wrp h5{font-size:<?php echo esc_html(ampforwp_get_setting('swift_h5_sz') )?>;}
|
2311 |
+
<?php } else { ?>
|
2312 |
+
.cntn-wrp h5 {font-size: 17px;}
|
2313 |
+
<?php } // H5 Ends
|
2314 |
+
if(ampforwp_get_setting('swift_cnt') && ampforwp_get_setting('swift_cnt_h6') ){ ?>
|
2315 |
+
.cntn-wrp h6{font-size:<?php echo esc_html(ampforwp_get_setting('swift_h6_sz') )?>;}
|
2316 |
+
<?php } else { ?>
|
2317 |
+
.cntn-wrp h6 {font-size: 15px;}
|
2318 |
+
<?php } // H6 Ends
|
2319 |
+
// swift Content Heading Sizes Ends
|
2320 |
+
if(ampforwp_get_setting('single-new-features') && ampforwp_get_setting('ampforwp-underline-content-links')){ ?>
|
2321 |
+
.artl-cnt a,.cntn-wrp a{
|
2322 |
+
text-decoration: underline;
|
2323 |
+
}
|
2324 |
+
<?php } // Underline CSS Ends?>
|
@@ -6169,7 +6169,7 @@ function ampforwp_vuukle_comments_markup() {
|
|
6169 |
if ( $display_comments_on ) {
|
6170 |
$vuukle_html .= '<amp-iframe width="600" height="350" layout="responsive" sandbox="allow-scripts allow-same-origin allow-modals allow-popups allow-forms" resizable frameborder="0" src="'.esc_url($srcUrl).'">
|
6171 |
|
6172 |
-
<div overflow tabindex="0" role="button" aria-label="Show comments" class="afwp-vuukle-support">Show comments</div>';
|
6173 |
}
|
6174 |
return $vuukle_html;
|
6175 |
}
|
@@ -7635,47 +7635,75 @@ function ampforwp_include_required_scripts($content){
|
|
7635 |
if($comp_to_include_json){
|
7636 |
$comp_to_include_arr = json_decode($comp_to_include_json, true);
|
7637 |
}
|
|
|
7638 |
for($i=0;$i<count($amp_comp);$i++){
|
7639 |
$comp = $amp_comp[$i];
|
7640 |
-
|
7641 |
-
|
7642 |
-
$
|
7643 |
-
|
7644 |
-
|
7645 |
-
|
7646 |
-
|
7647 |
-
|
7648 |
-
|
7649 |
-
|
7650 |
-
|
7651 |
-
|
7652 |
-
|
7653 |
-
|
7654 |
-
$
|
7655 |
-
|
7656 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7657 |
}
|
7658 |
}
|
7659 |
-
|
7660 |
-
|
7661 |
-
|
7662 |
-
|
7663 |
-
|
7664 |
-
|
7665 |
}
|
7666 |
}
|
7667 |
}
|
7668 |
}
|
|
|
7669 |
preg_match_all('/<script\scustom-element="(.*?)"(.*?)><\/script>/', $content, $matches);
|
7670 |
if(isset($matches[0])){
|
7671 |
if(isset($matches[1])){
|
|
|
|
|
|
|
|
|
|
|
7672 |
for($i=0;$i<count($matches[1]);$i++){
|
7673 |
if(isset($matches[1][$i])){
|
7674 |
$component = $matches[1][$i];
|
7675 |
-
|
7676 |
-
|
|
|
7677 |
$remove_comp = $matches[0][$i];
|
7678 |
$content = str_replace($remove_comp, '', $content);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7679 |
}
|
7680 |
}
|
7681 |
}
|
@@ -7683,4 +7711,4 @@ function ampforwp_include_required_scripts($content){
|
|
7683 |
}
|
7684 |
}
|
7685 |
return $content;
|
7686 |
-
}
|
6169 |
if ( $display_comments_on ) {
|
6170 |
$vuukle_html .= '<amp-iframe width="600" height="350" layout="responsive" sandbox="allow-scripts allow-same-origin allow-modals allow-popups allow-forms" resizable frameborder="0" src="'.esc_url($srcUrl).'">
|
6171 |
|
6172 |
+
<div overflow tabindex="0" role="button" aria-label="Show comments" class="afwp-vuukle-support">Show comments</div></amp-iframe>';
|
6173 |
}
|
6174 |
return $vuukle_html;
|
6175 |
}
|
7635 |
if($comp_to_include_json){
|
7636 |
$comp_to_include_arr = json_decode($comp_to_include_json, true);
|
7637 |
}
|
7638 |
+
$comp = '';
|
7639 |
for($i=0;$i<count($amp_comp);$i++){
|
7640 |
$comp = $amp_comp[$i];
|
7641 |
+
if(!preg_match('/story/', $comp)){
|
7642 |
+
$script_ver = 'latest';
|
7643 |
+
if($comp == 'auto-ads' || $comp == 'ad'){
|
7644 |
+
$script_ver = '0.1';
|
7645 |
+
}
|
7646 |
+
if($comp=='state'){
|
7647 |
+
$comp = 'bind';
|
7648 |
+
}
|
7649 |
+
$comp_url = 'https://cdn.ampproject.org/v0/amp-'.esc_attr($comp).'-'.esc_attr($script_ver).'.js';
|
7650 |
+
$is_script = false;
|
7651 |
+
|
7652 |
+
if(!in_array($comp, $comp_to_remove_arr) && !in_array($comp, $comp_to_include_arr) ){
|
7653 |
+
$headers = get_headers($comp_url);
|
7654 |
+
if(isset($headers[0])){
|
7655 |
+
$is_script = stripos($headers[0], "200 OK") ? TRUE : FALSE;
|
7656 |
+
if($comp=='state'){
|
7657 |
+
$is_script = true;
|
7658 |
+
}
|
7659 |
+
if($is_script){
|
7660 |
+
$comp_to_include_arr[] = $comp;
|
7661 |
+
$inc_json = json_encode($comp_to_include_arr);
|
7662 |
+
set_transient('ampforwp_amp_included_custom_element',$inc_json, 30 * DAY_IN_SECONDS);
|
7663 |
+
}else{
|
7664 |
+
$comp_to_remove_arr[] = $comp;
|
7665 |
+
$ex_json = json_encode($comp_to_remove_arr);
|
7666 |
+
set_transient('ampforwp_amp_exclude_custom_element',$ex_json, 30 * DAY_IN_SECONDS);
|
7667 |
+
}
|
7668 |
}
|
7669 |
}
|
7670 |
+
$comp_to_include_arr = apply_filters('ampforwp_amp_custom_element_to_include',$comp_to_include_arr);
|
7671 |
+
if(in_array($comp, $comp_to_include_arr)){
|
7672 |
+
if(!preg_match('/<script\scustom-element=\"amp-'.esc_attr($comp).'\"(.*?)><\/script>/', $content, $matches)){
|
7673 |
+
$script_tag = '<head><script custom-element="amp-'.esc_attr($comp).'" src="'.esc_url($comp_url).'" async></script>';
|
7674 |
+
$content = str_replace('<head>', $script_tag, $content);
|
7675 |
+
}
|
7676 |
}
|
7677 |
}
|
7678 |
}
|
7679 |
}
|
7680 |
+
|
7681 |
preg_match_all('/<script\scustom-element="(.*?)"(.*?)><\/script>/', $content, $matches);
|
7682 |
if(isset($matches[0])){
|
7683 |
if(isset($matches[1])){
|
7684 |
+
$excl_arr = array('amp-form','amp-bind','amp-access','amp-analytics','amp-access-laterpay','amp-access-poool','amp-dynamic-css-classes','amp-fx-collection','amp-inputmask','amp-lightbox-gallery','amp-inputmask','amp-mustache','amp-subscriptions-google','amp-subscriptions','amp-video-docking','amp-story');
|
7685 |
+
$inc_elem_arr = array();
|
7686 |
+
for($r=0;$r<count($comp_to_remove_arr);$r++){
|
7687 |
+
$inc_elem_arr[] = 'amp-'.$comp_to_remove_arr[$r];
|
7688 |
+
}
|
7689 |
for($i=0;$i<count($matches[1]);$i++){
|
7690 |
if(isset($matches[1][$i])){
|
7691 |
$component = $matches[1][$i];
|
7692 |
+
$headers = get_headers($comp_url);
|
7693 |
+
if(!in_array($component,$excl_arr)){
|
7694 |
+
if(!preg_match("/<\/$component>/", $content) && !$is_script){
|
7695 |
$remove_comp = $matches[0][$i];
|
7696 |
$content = str_replace($remove_comp, '', $content);
|
7697 |
+
}else if(in_array($component, $inc_elem_arr )){
|
7698 |
+
for($rc=0;$rc<count($inc_elem_arr);$rc++){
|
7699 |
+
$rcomp = $inc_elem_arr[$rc];
|
7700 |
+
if(preg_match('/<script\scustom-element="'.$rcomp.'"(.*?)<\/script>/', $content,$rmc)){
|
7701 |
+
if(isset($rmc[0])){
|
7702 |
+
$remove_comp = $rmc[0];
|
7703 |
+
$content = str_replace($remove_comp, '', $content);
|
7704 |
+
}
|
7705 |
+
}
|
7706 |
+
}
|
7707 |
}
|
7708 |
}
|
7709 |
}
|
7711 |
}
|
7712 |
}
|
7713 |
return $content;
|
7714 |
+
}
|