AMP for WP – Accelerated Mobile Pages - Version 1.0.22

Version Description

(6th February 2020) = * Fixed: Console error - Uncaught TypeError: Cannot read property 'on' of null #4102 * Fixed: When Insert post ads plugin is enable then AMP settings panel is not showing. #4107 * Fixed: Search console error fixed on WooCommerce wishlist page #4097 * Fixed: GTM Added in Basic Setup and code improvements #4108 * Fixed: The meta tags was not working in Head section #4116 * Fixed: Upgrade to Pro button was missing in the AMP setting panel #4118 * Fixed: Upgrade to Pro option was removing in the setting panel when we activate PWA for WP plugin #4117 * Fixed: FAQ section improved #4119

Download this release

Release Info

Developer mohammed_kaludi
Plugin Icon 128x128 AMP for WP – Accelerated Mobile Pages
Version 1.0.22
Comparing to
See all releases

Code changes from version 1.0.21 to 1.0.22

README.md CHANGED
@@ -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.21
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -194,6 +194,16 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
194
 
195
  == Changelog ==
196
 
 
 
 
 
 
 
 
 
 
 
197
  = 1.0.21 (4th February 2020) =
198
  * Fixed: Fatal error when AMP theme framework is active #4128
199
 
@@ -204,20 +214,4 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
204
  * Fixed: Pages won't save apostophies in AMP page builder text module. #4074
205
  * Fixed: Warring in console : [DOM] Found 2 elements with non-unique id #amp-search #3946
206
 
207
- = 1.0.19 (29th January 2020) =
208
- * Improvement: EWWW Image Optimizer plugin Compatibility #3984
209
- * Fixed: WP Admin toolbar CSS is not loading when user is logged in #4076
210
- * Fixed: AMP Options panel UI improvements done. #4088
211
- * Fixed: video is not displaying in AMP when a video is inserted from gutenberg video module #4086
212
- * Fixed: Performance section all features not working when Ezoic integration plugin is active. #4092
213
- * Fixed: Playbuzz is not working #4085
214
- * Fixed: RECENT POSTS label visible if no posts are available #4011
215
- * Fixed: data-block-on-consent is missing for Vuukle comments when gdpr is enabled #4095
216
- * Fixed: Remove Purge AMP CDN cache Settings buuton: #4099
217
- * Fixed: When categories that we exclude from AMP through the plugin configuration present redirection problem along with mobile redirection option #4075
218
- * Fixed: Alignment issue in GDPR Privacy link. #4101
219
-
220
- = 1.0.18 (27th January 2020) =
221
- * Fixed: Debug warnings with Imagify plugin #3908
222
-
223
  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.22
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
194
 
195
  == Changelog ==
196
 
197
+ = 1.0.22 (6th February 2020) =
198
+ * Fixed: Console error - Uncaught TypeError: Cannot read property 'on' of null #4102
199
+ * Fixed: When Insert post ads plugin is enable then AMP settings panel is not showing. #4107
200
+ * Fixed: Search console error fixed on WooCommerce wishlist page #4097
201
+ * Fixed: GTM Added in Basic Setup and code improvements #4108
202
+ * Fixed: The meta tags was not working in Head section #4116
203
+ * Fixed: Upgrade to Pro button was missing in the AMP setting panel #4118
204
+ * Fixed: Upgrade to Pro option was removing in the setting panel when we activate PWA for WP plugin #4117
205
+ * Fixed: FAQ section improved #4119
206
+
207
  = 1.0.21 (4th February 2020) =
208
  * Fixed: Fatal error when AMP theme framework is active #4128
209
 
214
  * Fixed: Pages won't save apostophies in AMP page builder text module. #4074
215
  * Fixed: Warring in console : [DOM] Found 2 elements with non-unique id #amp-search #3946
216
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
accelerated-moblie-pages.php CHANGED
@@ -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.21
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.21');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  if(!defined('AMPFROWP_HOST_NAME')){
26
  $urlinfo = get_bloginfo('url');
@@ -905,6 +905,7 @@ if(!function_exists('ampforwp_get_setup_info')){
905
  $ux_content = ampforwp_get_setting('opt-media','url');
906
  }else if($ux_option=="ampforwp-ux-analytics-section"){
907
  $ga_field = ampforwp_get_setting('ga-feild');
 
908
  $amp_fb_pixel_id = ampforwp_get_setting('amp-fb-pixel-id');
909
  $sa_feild = ampforwp_get_setting('sa-feild');
910
  $pa_feild = ampforwp_get_setting('pa-feild');
@@ -924,6 +925,7 @@ if(!function_exists('ampforwp_get_setup_info')){
924
  $analytics_txt = "";
925
  $analytic_arr = array();
926
  if(ampforwp_get_setting('ampforwp-ga-switch') && $ga_field!="UA-XXXXX-Y" && $ga_field!=""){$analytic_arr[]="Google Analytics";}
 
927
  if(ampforwp_get_setting('amp-fb-pixel') && $amp_fb_pixel_id!=""){$analytic_arr[]="Facebook Pixel";}
928
  if(ampforwp_get_setting('ampforwp-Segment-switch') && $sa_feild!="SEGMENT-WRITE-KEY" && $sa_feild!=""){$analytic_arr[]="Segment Analytics";}
929
  if(ampforwp_get_setting('ampforwp-Piwik-switch') && $pa_feild!="#" && $pa_feild!=""){ $analytic_arr[]="Matomo Analytics";}
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.22
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.22');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  if(!defined('AMPFROWP_HOST_NAME')){
26
  $urlinfo = get_bloginfo('url');
905
  $ux_content = ampforwp_get_setting('opt-media','url');
906
  }else if($ux_option=="ampforwp-ux-analytics-section"){
907
  $ga_field = ampforwp_get_setting('ga-feild');
908
+ $ga_field_gtm = ampforwp_get_setting('amp-gtm-id');
909
  $amp_fb_pixel_id = ampforwp_get_setting('amp-fb-pixel-id');
910
  $sa_feild = ampforwp_get_setting('sa-feild');
911
  $pa_feild = ampforwp_get_setting('pa-feild');
925
  $analytics_txt = "";
926
  $analytic_arr = array();
927
  if(ampforwp_get_setting('ampforwp-ga-switch') && $ga_field!="UA-XXXXX-Y" && $ga_field!=""){$analytic_arr[]="Google Analytics";}
928
+ if(ampforwp_get_setting('amp-use-gtm-option') && $ga_field_gtm!="" && $ga_field_gtm!=""){$analytic_arr[]="Google Tag Manager";}
929
  if(ampforwp_get_setting('amp-fb-pixel') && $amp_fb_pixel_id!=""){$analytic_arr[]="Facebook Pixel";}
930
  if(ampforwp_get_setting('ampforwp-Segment-switch') && $sa_feild!="SEGMENT-WRITE-KEY" && $sa_feild!=""){$analytic_arr[]="Segment Analytics";}
931
  if(ampforwp_get_setting('ampforwp-Piwik-switch') && $pa_feild!="#" && $pa_feild!=""){ $analytic_arr[]="Matomo Analytics";}
changelog.txt CHANGED
@@ -1,5 +1,15 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
 
 
3
  = 1.0.21 (4th February 2020) =
4
  * Fixed: Fatal error when AMP theme framework is active #4128
5
 
1
  == Changelog ==
2
 
3
+ = 1.0.22 (6th February 2020) =
4
+ * Fixed: Console error - Uncaught TypeError: Cannot read property 'on' of null #4102
5
+ * Fixed: When Insert post ads plugin is enable then AMP settings panel is not showing. #4107
6
+ * Fixed: Search console error fixed on WooCommerce wishlist page #4097
7
+ * Fixed: GTM Added in Basic Setup and code improvements #4108
8
+ * Fixed: The meta tags was not working in Head section #4116
9
+ * Fixed: Upgrade to Pro button was missing in the AMP setting panel #4118
10
+ * Fixed: Upgrade to Pro option was removing in the setting panel when we activate PWA for WP plugin #4117
11
+ * Fixed: FAQ section improved #4119
12
+
13
  = 1.0.21 (4th February 2020) =
14
  * Fixed: Fatal error when AMP theme framework is active #4128
15
 
includes/admin-script.js CHANGED
@@ -1117,6 +1117,7 @@ jQuery(document).ready(function($) {
1117
  button = "SET UP";
1118
  }else if(active_drower=='ampforwp-ux-analytics-section'){
1119
  var ga_field = $('#ga-feild').val();
 
1120
  var amp_fb_pixel_id = $('#amp-fb-pixel-id').val();
1121
  var sa_feild = $('#sa-feild').val();
1122
  var pa_feild = $('#pa-feild').val();
@@ -1138,6 +1139,7 @@ jQuery(document).ready(function($) {
1138
  var data_href = $(this).attr('data-href');
1139
  var hasCls = $(this).hasClass('hide');
1140
  if(ga_field!="UA-XXXXX-Y" && ga_field!="" && !hasCls && data_href=='ampforwp-ga-switch'){analytic_arr.push("Google Analytics");}
 
1141
  if(amp_fb_pixel_id!="" && !hasCls && data_href=='amp-fb-pixel'){analytic_arr.push("Facebook Pixel");}
1142
  if(sa_feild!="SEGMENT-WRITE-KEY" && sa_feild!="" && !hasCls && data_href=='ampforwp-Segment-switch'){analytic_arr.push("Segment Analytics");}
1143
  if(pa_feild!="#" && pa_feild!="" && !hasCls && data_href=='ampforwp-Piwik-switch'){ analytic_arr.push("Matomo Analytics");}
@@ -1426,6 +1428,7 @@ jQuery(document).ready(function($) {
1426
  });
1427
  function ampforwp_check_analytics(data_href){
1428
  var ga_field = $('#ga-feild').val();
 
1429
  var amp_fb_pixel_id = $('#amp-fb-pixel-id').val();
1430
  var sa_feild = $('#sa-feild').val();
1431
  var pa_feild = $('#pa-feild').val();
@@ -1456,6 +1459,18 @@ jQuery(document).ready(function($) {
1456
  $('[name="redux_builder_amp['+data_href+']"]').val(0);
1457
  }
1458
  }
 
 
 
 
 
 
 
 
 
 
 
 
1459
  }else if(data_href=='amp-fb-pixel'){
1460
  if(amp_fb_pixel_id!=""){
1461
  if(!checked){
1117
  button = "SET UP";
1118
  }else if(active_drower=='ampforwp-ux-analytics-section'){
1119
  var ga_field = $('#ga-feild').val();
1120
+ var ga_field_gtm = $('#amp-gtm-id').val();
1121
  var amp_fb_pixel_id = $('#amp-fb-pixel-id').val();
1122
  var sa_feild = $('#sa-feild').val();
1123
  var pa_feild = $('#pa-feild').val();
1139
  var data_href = $(this).attr('data-href');
1140
  var hasCls = $(this).hasClass('hide');
1141
  if(ga_field!="UA-XXXXX-Y" && ga_field!="" && !hasCls && data_href=='ampforwp-ga-switch'){analytic_arr.push("Google Analytics");}
1142
+ if(ga_field_gtm!="" && !hasCls && data_href=='amp-use-gtm-option'){analytic_arr.push("Google Tag Manager");}
1143
  if(amp_fb_pixel_id!="" && !hasCls && data_href=='amp-fb-pixel'){analytic_arr.push("Facebook Pixel");}
1144
  if(sa_feild!="SEGMENT-WRITE-KEY" && sa_feild!="" && !hasCls && data_href=='ampforwp-Segment-switch'){analytic_arr.push("Segment Analytics");}
1145
  if(pa_feild!="#" && pa_feild!="" && !hasCls && data_href=='ampforwp-Piwik-switch'){ analytic_arr.push("Matomo Analytics");}
1428
  });
1429
  function ampforwp_check_analytics(data_href){
1430
  var ga_field = $('#ga-feild').val();
1431
+ var ga_field_gtm = $('#amp-gtm-id').val();
1432
  var amp_fb_pixel_id = $('#amp-fb-pixel-id').val();
1433
  var sa_feild = $('#sa-feild').val();
1434
  var pa_feild = $('#pa-feild').val();
1459
  $('[name="redux_builder_amp['+data_href+']"]').val(0);
1460
  }
1461
  }
1462
+ }else if(data_href=='amp-use-gtm-option'){
1463
+ if(ga_field_gtm!=""){
1464
+ if(!checked){
1465
+ $('input[data-id="'+data_href+'"]').click();
1466
+ $('[name="redux_builder_amp['+data_href+']"]').val(1);
1467
+ }
1468
+ }else if(ga_field_gtm==""){
1469
+ if(checked){
1470
+ $('input[data-id="'+data_href+'"]').click();
1471
+ $('[name="redux_builder_amp['+data_href+']"]').val(0);
1472
+ }
1473
+ }
1474
  }else if(data_href=='amp-fb-pixel'){
1475
  if(amp_fb_pixel_id!=""){
1476
  if(!checked){
includes/ampforwp-fields-array.php CHANGED
@@ -12,7 +12,7 @@ if($current_page=="amp_options"){
12
  $options[$page->ID] = $page->post_title;
13
  }
14
  }
15
- $analytics_options = array(''=>'Add Analytics Type','ampforwp-ga-switch'=>'Google Analytics','ampforwp-Segment-switch'=>'Segment Analytics','ampforwp-Piwik-switch'=>'Matomo (Piwik) Analytics','ampforwp-Quantcast-switch'=>'Quantcast Measurement','ampforwp-comScore-switch'=>'comScore', 'ampforwp-Effective-switch'=>'Effective Measure','ampforwp-StatCounter-switch'=>'StatCounter','ampforwp-Histats-switch'=>'Histats Analytics','ampforwp-Yandex-switch'=>'Yandex Metrika','ampforwp-Chartbeat-switch'=>'Chartbeat Analytics','ampforwp-Alexa-switch'=>'Alexa Metrics','ampforwp-afs-analytics-switch'=>'AFS Analytics','amp-fb-pixel'=>'Facebook Pixel','amp-clicky-switch'=>'Clicky Analytics');
16
  $analytics_default_option = ampforwp_get_setting('amp-analytics-select-option');
17
  $analytics_default = 'ampforwp-ga-switch';
18
  switch ($analytics_default_option) {
@@ -217,6 +217,15 @@ $amp_ux_fields = array(
217
  array('field_type'=>'text', 'field_data'=>array('title'=>'Tracking ID','id'=>'amp-ux-ga','class'=>'amp-ux-ga google-analytics analytics-text','required'=>array(),'data-text'=>'ga-feild','element-class'=>'ux-label trac-id','default'=>ampforwp_get_setting('ga-feild'))
218
  ),
219
  array('field_type'=>'sub_section_end','field_data'=>array()),
 
 
 
 
 
 
 
 
 
220
  array('field_type'=>'sub_section_start',
221
  'field_data'=>array('id'=>'ampforwp-ux-segment-analytics-section','class'=>'ampforwp-ux-sub-section ampforwp-ux-ana-sub','default'=>ampforwp_check_analytics_setup('Segment Analytics'),'closable'=>1,'data-href'=>'ampforwp-Segment-switch')
222
  ),
12
  $options[$page->ID] = $page->post_title;
13
  }
14
  }
15
+ $analytics_options = array(''=>'Add Analytics Type','ampforwp-ga-switch'=>'Google Analytics','amp-use-gtm-option'=>'Google Tag Manager','ampforwp-Segment-switch'=>'Segment Analytics','ampforwp-Piwik-switch'=>'Matomo (Piwik) Analytics','ampforwp-Quantcast-switch'=>'Quantcast Measurement','ampforwp-comScore-switch'=>'comScore', 'ampforwp-Effective-switch'=>'Effective Measure','ampforwp-StatCounter-switch'=>'StatCounter','ampforwp-Histats-switch'=>'Histats Analytics','ampforwp-Yandex-switch'=>'Yandex Metrika','ampforwp-Chartbeat-switch'=>'Chartbeat Analytics','ampforwp-Alexa-switch'=>'Alexa Metrics','ampforwp-afs-analytics-switch'=>'AFS Analytics','amp-fb-pixel'=>'Facebook Pixel','amp-clicky-switch'=>'Clicky Analytics');
16
  $analytics_default_option = ampforwp_get_setting('amp-analytics-select-option');
17
  $analytics_default = 'ampforwp-ga-switch';
18
  switch ($analytics_default_option) {
217
  array('field_type'=>'text', 'field_data'=>array('title'=>'Tracking ID','id'=>'amp-ux-ga','class'=>'amp-ux-ga google-analytics analytics-text','required'=>array(),'data-text'=>'ga-feild','element-class'=>'ux-label trac-id','default'=>ampforwp_get_setting('ga-feild'))
218
  ),
219
  array('field_type'=>'sub_section_end','field_data'=>array()),
220
+ array('field_type'=>'sub_section_start',
221
+ 'field_data'=>array('id'=>'ampforwp-ux-gtm-analytics-section','class'=>'ampforwp-ux-sub-section ampforwp-ux-ana-sub','default'=>ampforwp_check_analytics_setup('Google Tag Manager'),'closable'=>1,'data-href'=>'amp-use-gtm-option')
222
+ ),
223
+ array('field_type'=>'heading',
224
+ 'field_data'=>array('title'=>'Google Tag Manager','class'=>'child_opt child_opt_arrow')
225
+ ),
226
+ array('field_type'=>'text', 'field_data'=>array('title'=>'Tag Manager ID (Container ID)','id'=>'amp-ux-gtm','class'=>'amp-ux-gtm analytics-text','required'=>array(),'data-text'=>'amp-gtm-id','element-class'=>'ux-label trac-id','default'=>ampforwp_get_setting('amp-gtm-id'))
227
+ ),
228
+ array('field_type'=>'sub_section_end','field_data'=>array()),
229
  array('field_type'=>'sub_section_start',
230
  'field_data'=>array('id'=>'ampforwp-ux-segment-analytics-section','class'=>'ampforwp-ux-sub-section ampforwp-ux-ana-sub','default'=>ampforwp_check_analytics_setup('Segment Analytics'),'closable'=>1,'data-href'=>'ampforwp-Segment-switch')
231
  ),
includes/features/analytics/analytics-functions.php CHANGED
@@ -366,7 +366,7 @@ function ampforwp_add_advance_gtm_fields( $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!=""){?>
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!=""){?>
includes/features/analytics/analytics-options.php CHANGED
@@ -160,7 +160,7 @@ function ampforwp_analytics_options($opt_name){
160
  ),
161
  ),
162
  array(
163
- 'class'=>'child_opt',
164
  'id' =>'amp-gtm-analytics-code',
165
  'type' => 'text',
166
  'title' => esc_html__('Analytics ID','accelerated-mobile-pages'),
160
  ),
161
  ),
162
  array(
163
+ 'class'=>'hide',
164
  'id' =>'amp-gtm-analytics-code',
165
  'type' => 'text',
166
  'title' => esc_html__('Analytics ID','accelerated-mobile-pages'),
includes/features/functions.php CHANGED
@@ -37,6 +37,7 @@ function ampforwp_add_admin_styling($hook_suffix){
37
  $redux_data = array();
38
  if( current_user_can("manage_options") && $hook_suffix=='toplevel_page_amp_options' ){
39
  $redux_data = $redux_builder_amp;
 
40
  }else{
41
  $redux_data['ampforwp-amp-takeover'] = ampforwp_get_setting('ampforwp-amp-takeover');
42
  }
37
  $redux_data = array();
38
  if( current_user_can("manage_options") && $hook_suffix=='toplevel_page_amp_options' ){
39
  $redux_data = $redux_builder_amp;
40
+ wp_dequeue_script( 'insert-post-adschart-admin' );
41
  }else{
42
  $redux_data['ampforwp-amp-takeover'] = ampforwp_get_setting('ampforwp-amp-takeover');
43
  }
includes/options/admin-config.php CHANGED
@@ -252,17 +252,6 @@ $extension_listing_array = array(
252
  'is_activated'=>(is_plugin_active('amp-cache/ampforwp-cache.php')? 1 : 2),
253
  'settingUrl'=>'{opt-go-amp-cache}',
254
  ),
255
- array(
256
- 'name'=>'PWA For WordPress',
257
- 'desc'=>'Add Progressive Web App support for WordPress website',
258
- 'img_src'=>AMPFORWP_IMAGE_DIR . '/pwa-icon.png',
259
- 'price'=>'FREE',
260
- 'url_link'=>'https://pwa-for-wp.com//#utm_source=options-panel&utm_medium=extension-tab_pwa-for-wordpress&utm_campaign=AMP%20Plugin',
261
- 'plugin_active_path'=> 'pwa-for-wordpress/amp-pwa.php',
262
- 'item_name'=>'PWA For WordPress',
263
- 'is_activated'=>(is_plugin_active('pwa-for-wp/pwa-for-wp.php')? 1 : 2),
264
- 'settingUrl'=>admin_url( 'admin.php?page=ampforwp-pwa' ),
265
- ),
266
  array(
267
  'name'=>'AMP Popup',
268
  'desc'=>'Pop-Up Functionality for AMP in WordPress. Most easiest and the best way to include Pop-Up in AMP.',
@@ -700,7 +689,7 @@ function ampforwp_check_extensions(){
700
  if($all_extensions_data){
701
  foreach ($all_extensions_data as $extension ) {
702
  $is_extension_active = $extension['is_activated'];
703
- if( 1 === $is_extension_active){
704
  return true;
705
  }
706
  }
@@ -970,17 +959,21 @@ $freepro_listing = '
970
  <p>No. There are no setup fees on any of our plans</p>
971
  </li>
972
  <li>
973
- <span>what\'s the time span for your contracts?</span>
974
  <p>All the plans are year-to-year which are subscribed annually.</p>
975
  </li>
976
  <li>
977
  <span>What payment methods are accepted?</span>
978
- <p>All the plans are year-to-year which are subscribed annually.</p>
979
  </li>
980
  <li>
981
  <span>Do you offer support if I need help?</span>
982
  <p>Yes! Top-notch customer support for our paid customers is key for a quality product, so we’ll do our very best to resolve any issues you encounter via our support page.</p>
983
  </li>
 
 
 
 
984
  </ul>
985
  </div>
986
  <div class="rt">
@@ -999,7 +992,7 @@ $freepro_listing = '
999
  </li>
1000
  <li>
1001
  <span>Do I get updates for the premium plugin?</span>
1002
- <p>All the plans are year-to-year which are subscribed annually.</p>
1003
  </li>
1004
  </ul>
1005
  </div>
@@ -1215,7 +1208,7 @@ if(get_theme_support('amp-template-mode')){
1215
  $upg_to_pro_url = 'https://ampforwp.com/membership/#utm_source=options-panel&utm_medium=view_pro_features_btn&utm_campaign=AMP%20Plugin';
1216
  $upg_to_pro_target = 'target="_blank"';
1217
  }
1218
- $proDetailsProvide = '<a class="technical_support_btn_txt" href="https://ampforwp.com/support/" target="_blank">'.esc_html__('Technical Support','accelerated-mobile-pages').'</a>';
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){
252
  'is_activated'=>(is_plugin_active('amp-cache/ampforwp-cache.php')? 1 : 2),
253
  'settingUrl'=>'{opt-go-amp-cache}',
254
  ),
 
 
 
 
 
 
 
 
 
 
 
255
  array(
256
  'name'=>'AMP Popup',
257
  'desc'=>'Pop-Up Functionality for AMP in WordPress. Most easiest and the best way to include Pop-Up in AMP.',
689
  if($all_extensions_data){
690
  foreach ($all_extensions_data as $extension ) {
691
  $is_extension_active = $extension['is_activated'];
692
+ if( 1 === $is_extension_active && 'PWA For WordPress' != $extension['item_name']){
693
  return true;
694
  }
695
  }
959
  <p>No. There are no setup fees on any of our plans</p>
960
  </li>
961
  <li>
962
+ <span>What\'s the time span for your contracts?</span>
963
  <p>All the plans are year-to-year which are subscribed annually.</p>
964
  </li>
965
  <li>
966
  <span>What payment methods are accepted?</span>
967
+ <p>We accepts PayPal and Credit Card payments.</p>
968
  </li>
969
  <li>
970
  <span>Do you offer support if I need help?</span>
971
  <p>Yes! Top-notch customer support for our paid customers is key for a quality product, so we’ll do our very best to resolve any issues you encounter via our support page.</p>
972
  </li>
973
+ <li>
974
+ <span>Can I use the plugins after my subscription is expired?</span>
975
+ <p>Yes, you can use the plugins but you will not get future updates for those plugins.</p>
976
+ </li>
977
  </ul>
978
  </div>
979
  <div class="rt">
992
  </li>
993
  <li>
994
  <span>Do I get updates for the premium plugin?</span>
995
+ <p>Yes, you will get updates for all the premium plugins until your subscription is active.</p>
996
  </li>
997
  </ul>
998
  </div>
1208
  $upg_to_pro_url = 'https://ampforwp.com/membership/#utm_source=options-panel&utm_medium=view_pro_features_btn&utm_campaign=AMP%20Plugin';
1209
  $upg_to_pro_target = 'target="_blank"';
1210
  }
1211
+ $proDetailsProvide = '<a class="technical_support_btn_txt" href="https://ampforwp.com/support/" target="_blank">'.esc_html__('Technical Support','accelerated-mobile-pages').'</a> <a class="premium_features_btn" href="https://ampforwp.com/membership/#utm_source=options-panel&utm_medium=view_pro_features_btn&utm_campaign=AMP%20Plugin" target="_blank">Upgrade to PRO</a> ';
1212
  if($ampforwp_nameOfUser!=""){
1213
  $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>";
1214
  }elseif($ampforwp_is_productActivated){
includes/options/redux-core/assets/css/redux-admin.css CHANGED
@@ -511,6 +511,7 @@ background: linear-gradient(45deg, #E47B49 0%, #ea4c89 100%);
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)}
511
  top: 1px;
512
  left: 4px;
513
  }
514
+ .premium_features_btn:hover{background: #fff;color:#eb3349 !important; }
515
  .getting_started_listing .align_left{display: none}
516
  .getting_started_listing li a{width: 288px}
517
  .extension_listing li:hover{border-color:rgba(48, 63, 159, 0.35)}
readme.txt CHANGED
@@ -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.21
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -191,6 +191,16 @@ You can contact us from [here](https://ampforwp.com/contact/)
191
 
192
  == Changelog ==
193
 
 
 
 
 
 
 
 
 
 
 
194
  = 1.0.21 (4th February 2020) =
195
  * Fixed: Fatal error when AMP theme framework is active #4128
196
 
@@ -201,20 +211,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
201
  * Fixed: Pages won't save apostophies in AMP page builder text module. #4074
202
  * Fixed: Warring in console : [DOM] Found 2 elements with non-unique id #amp-search #3946
203
 
204
- = 1.0.19 (29th January 2020) =
205
- * Improvement: EWWW Image Optimizer plugin Compatibility #3984
206
- * Fixed: WP Admin toolbar CSS is not loading when user is logged in #4076
207
- * Fixed: AMP Options panel UI improvements done. #4088
208
- * Fixed: video is not displaying in AMP when a video is inserted from gutenberg video module #4086
209
- * Fixed: Performance section all features not working when Ezoic integration plugin is active. #4092
210
- * Fixed: Playbuzz is not working #4085
211
- * Fixed: RECENT POSTS label visible if no posts are available #4011
212
- * Fixed: data-block-on-consent is missing for Vuukle comments when gdpr is enabled #4095
213
- * Fixed: Remove Purge AMP CDN cache Settings buuton: #4099
214
- * Fixed: When categories that we exclude from AMP through the plugin configuration present redirection problem along with mobile redirection option #4075
215
- * Fixed: Alignment issue in GDPR Privacy link. #4101
216
-
217
- = 1.0.18 (27th January 2020) =
218
- * Fixed: Debug warnings with Imagify plugin #3908
219
-
220
  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.22
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.22 (6th February 2020) =
195
+ * Fixed: Console error - Uncaught TypeError: Cannot read property 'on' of null #4102
196
+ * Fixed: When Insert post ads plugin is enable then AMP settings panel is not showing. #4107
197
+ * Fixed: Search console error fixed on WooCommerce wishlist page #4097
198
+ * Fixed: GTM Added in Basic Setup and code improvements #4108
199
+ * Fixed: The meta tags was not working in Head section #4116
200
+ * Fixed: Upgrade to Pro button was missing in the AMP setting panel #4118
201
+ * Fixed: Upgrade to Pro option was removing in the setting panel when we activate PWA for WP plugin #4117
202
+ * Fixed: FAQ section improved #4119
203
+
204
  = 1.0.21 (4th February 2020) =
205
  * Fixed: Fatal error when AMP theme framework is active #4128
206
 
211
  * Fixed: Pages won't save apostophies in AMP page builder text module. #4074
212
  * Fixed: Warring in console : [DOM] Found 2 elements with non-unique id #amp-search #3946
213
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
214
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
templates/custom-amp-content-button.js CHANGED
@@ -46,7 +46,8 @@ jQuery(document).ready(function($) {
46
  $('.amp-editor-content').hide();
47
  }
48
  }
49
- tinymce.get('ampforwp_custom_content_editor').on("keyup change paste",function(){
 
50
  var thisval = tinymce.get('ampforwp_custom_content_editor').getContent();
51
  if(thisval!=""){
52
  $('.amp-editor-content').hide();
@@ -63,5 +64,6 @@ jQuery(document).ready(function($) {
63
  }else{
64
  $("#ampforwp-amp-content-error-msg").html("AMP contents is blank, Please enter content");
65
  }
66
- });
 
67
  });
46
  $('.amp-editor-content').hide();
47
  }
48
  }
49
+ if(document.getElementById('ampforwp_custom_content_editor')){
50
+ tinymce.get('ampforwp_custom_content_editor').on("keyup change paste",function(){
51
  var thisval = tinymce.get('ampforwp_custom_content_editor').getContent();
52
  if(thisval!=""){
53
  $('.amp-editor-content').hide();
64
  }else{
65
  $("#ampforwp-amp-content-error-msg").html("AMP contents is blank, Please enter content");
66
  }
67
+ });
68
+ }
69
  });
templates/features.php CHANGED
@@ -251,6 +251,12 @@ define('AMPFORWP_COMMENTS_PER_PAGE', ampforwp_define_comments_number() );
251
  if(is_search() && 0 == ampforwp_get_setting('amp-redirection-search')){
252
  return;
253
  }
 
 
 
 
 
 
254
  // #872 no-amphtml if selected as hide from settings
255
  if ( is_category_amp_disabled() ) {
256
  return;
@@ -1401,9 +1407,6 @@ function ampforwp_custom_yoast_meta_homepage(){
1401
  }
1402
  }
1403
  do_action( 'wpseo_opengraph' );
1404
- if( ampforwp_get_setting('ampforwp-seo-custom-additional-meta') ){
1405
- echo strip_tags( ampforwp_get_setting('ampforwp-seo-custom-additional-meta'), '<link><meta>' );
1406
- }
1407
  }
1408
  }
1409
 
@@ -2259,7 +2262,9 @@ function ampforwp_global_head_scripts($data){
2259
 
2260
  add_action('amp_post_template_head','ampforwp_header_html_output',11);
2261
  function ampforwp_header_html_output() {
2262
-
 
 
2263
  if( ampforwp_get_setting('amp-header-text-area-for-html') ) {
2264
  $allhtml = ampforwp_get_setting('amp-header-text-area-for-html');
2265
  $allhtml = preg_replace('/<script(.*?)custom-element=\"(.*?)\"(.*?)src=\"(.*?)\"(.*?)><\/script>/','', $allhtml);
251
  if(is_search() && 0 == ampforwp_get_setting('amp-redirection-search')){
252
  return;
253
  }
254
+ if(function_exists('yith_wishlist_constructor')){
255
+ $class = get_body_class();
256
+ if(in_array("woocommerce-wishlist", $class)){
257
+ return;
258
+ }
259
+ }
260
  // #872 no-amphtml if selected as hide from settings
261
  if ( is_category_amp_disabled() ) {
262
  return;
1407
  }
1408
  }
1409
  do_action( 'wpseo_opengraph' );
 
 
 
1410
  }
1411
  }
1412
 
2262
 
2263
  add_action('amp_post_template_head','ampforwp_header_html_output',11);
2264
  function ampforwp_header_html_output() {
2265
+ if( ampforwp_get_setting('ampforwp-seo-custom-additional-meta') ){
2266
+ echo strip_tags( ampforwp_get_setting('ampforwp-seo-custom-additional-meta'), '<link><meta>' );
2267
+ }
2268
  if( ampforwp_get_setting('amp-header-text-area-for-html') ) {
2269
  $allhtml = ampforwp_get_setting('amp-header-text-area-for-html');
2270
  $allhtml = preg_replace('/<script(.*?)custom-element=\"(.*?)\"(.*?)src=\"(.*?)\"(.*?)><\/script>/','', $allhtml);