diff --git a/README.md b/README.md index 60101aad3..5798cf946 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go Donate link: https://www.paypal.me/Kaludi/25 Requires at least: 3.0 Tested up to: 5.3.2 -Stable tag: 1.0.21 +Stable tag: 1.0.22 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -194,6 +194,16 @@ Device testing done through [BrowserStack](https://www.browserstack.com) == Changelog == += 1.0.22 (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 + = 1.0.21 (4th February 2020) = * Fixed: Fatal error when AMP theme framework is active #4128 @@ -204,20 +214,4 @@ Device testing done through [BrowserStack](https://www.browserstack.com) * Fixed: Pages won't save apostophies in AMP page builder text module. #4074 * Fixed: Warring in console : [DOM] Found 2 elements with non-unique id #amp-search #3946 -= 1.0.19 (29th January 2020) = -* Improvement: EWWW Image Optimizer plugin Compatibility #3984 -* Fixed: WP Admin toolbar CSS is not loading when user is logged in #4076 -* Fixed: AMP Options panel UI improvements done. #4088 -* Fixed: video is not displaying in AMP when a video is inserted from gutenberg video module #4086 -* Fixed: Performance section all features not working when Ezoic integration plugin is active. #4092 -* Fixed: Playbuzz is not working #4085 -* Fixed: RECENT POSTS label visible if no posts are available #4011 -* Fixed: data-block-on-consent is missing for Vuukle comments when gdpr is enabled #4095 -* Fixed: Remove Purge AMP CDN cache Settings buuton: #4099 -* Fixed: When categories that we exclude from AMP through the plugin configuration present redirection problem along with mobile redirection option #4075 -* Fixed: Alignment issue in GDPR Privacy link. #4101 - -= 1.0.18 (27th January 2020) = -* Fixed: Debug warnings with Imagify plugin #3908 - Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt) \ No newline at end of file diff --git a/accelerated-moblie-pages.php b/accelerated-moblie-pages.php index 685da1feb..2f1702888 100644 --- a/accelerated-moblie-pages.php +++ b/accelerated-moblie-pages.php @@ -3,7 +3,7 @@ Plugin Name: Accelerated Mobile Pages Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/ Description: AMP for WP - Accelerated Mobile Pages for WordPress -Version: 1.0.21 +Version: 1.0.22 Author: Ahmed Kaludi, Mohammed Kaludi Author URI: https://ampforwp.com/ Donate link: https://www.paypal.me/Kaludi/25 @@ -20,7 +20,7 @@ define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html'); define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images'); define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) ); -define('AMPFORWP_VERSION','1.0.21'); +define('AMPFORWP_VERSION','1.0.22'); define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions'); if(!defined('AMPFROWP_HOST_NAME')){ $urlinfo = get_bloginfo('url'); @@ -905,6 +905,7 @@ function ampforwp_get_setup_info($ux_option=''){ $ux_content = ampforwp_get_setting('opt-media','url'); }else if($ux_option=="ampforwp-ux-analytics-section"){ $ga_field = ampforwp_get_setting('ga-feild'); + $ga_field_gtm = ampforwp_get_setting('amp-gtm-id'); $amp_fb_pixel_id = ampforwp_get_setting('amp-fb-pixel-id'); $sa_feild = ampforwp_get_setting('sa-feild'); $pa_feild = ampforwp_get_setting('pa-feild'); @@ -924,6 +925,7 @@ function ampforwp_get_setup_info($ux_option=''){ $analytics_txt = ""; $analytic_arr = array(); if(ampforwp_get_setting('ampforwp-ga-switch') && $ga_field!="UA-XXXXX-Y" && $ga_field!=""){$analytic_arr[]="Google Analytics";} + if(ampforwp_get_setting('amp-use-gtm-option') && $ga_field_gtm!="" && $ga_field_gtm!=""){$analytic_arr[]="Google Tag Manager";} if(ampforwp_get_setting('amp-fb-pixel') && $amp_fb_pixel_id!=""){$analytic_arr[]="Facebook Pixel";} if(ampforwp_get_setting('ampforwp-Segment-switch') && $sa_feild!="SEGMENT-WRITE-KEY" && $sa_feild!=""){$analytic_arr[]="Segment Analytics";} if(ampforwp_get_setting('ampforwp-Piwik-switch') && $pa_feild!="#" && $pa_feild!=""){ $analytic_arr[]="Matomo Analytics";} diff --git a/changelog.txt b/changelog.txt index 774af4caf..f7fc88a5f 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,15 @@ == Changelog == += 1.0.22 (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 + = 1.0.21 (4th February 2020) = * Fixed: Fatal error when AMP theme framework is active #4128 diff --git a/includes/admin-script.js b/includes/admin-script.js index 6be4a3a27..7f478f57d 100644 --- a/includes/admin-script.js +++ b/includes/admin-script.js @@ -1117,6 +1117,7 @@ jQuery(document).ready(function($) { button = "SET UP"; }else if(active_drower=='ampforwp-ux-analytics-section'){ var ga_field = $('#ga-feild').val(); + var ga_field_gtm = $('#amp-gtm-id').val(); var amp_fb_pixel_id = $('#amp-fb-pixel-id').val(); var sa_feild = $('#sa-feild').val(); var pa_feild = $('#pa-feild').val(); @@ -1138,6 +1139,7 @@ jQuery(document).ready(function($) { var data_href = $(this).attr('data-href'); var hasCls = $(this).hasClass('hide'); if(ga_field!="UA-XXXXX-Y" && ga_field!="" && !hasCls && data_href=='ampforwp-ga-switch'){analytic_arr.push("Google Analytics");} + if(ga_field_gtm!="" && !hasCls && data_href=='amp-use-gtm-option'){analytic_arr.push("Google Tag Manager");} if(amp_fb_pixel_id!="" && !hasCls && data_href=='amp-fb-pixel'){analytic_arr.push("Facebook Pixel");} if(sa_feild!="SEGMENT-WRITE-KEY" && sa_feild!="" && !hasCls && data_href=='ampforwp-Segment-switch'){analytic_arr.push("Segment Analytics");} if(pa_feild!="#" && pa_feild!="" && !hasCls && data_href=='ampforwp-Piwik-switch'){ analytic_arr.push("Matomo Analytics");} @@ -1426,6 +1428,7 @@ jQuery(document).ready(function($) { }); function ampforwp_check_analytics(data_href){ var ga_field = $('#ga-feild').val(); + var ga_field_gtm = $('#amp-gtm-id').val(); var amp_fb_pixel_id = $('#amp-fb-pixel-id').val(); var sa_feild = $('#sa-feild').val(); var pa_feild = $('#pa-feild').val(); @@ -1456,6 +1459,18 @@ jQuery(document).ready(function($) { $('[name="redux_builder_amp['+data_href+']"]').val(0); } } + }else if(data_href=='amp-use-gtm-option'){ + if(ga_field_gtm!=""){ + if(!checked){ + $('input[data-id="'+data_href+'"]').click(); + $('[name="redux_builder_amp['+data_href+']"]').val(1); + } + }else if(ga_field_gtm==""){ + if(checked){ + $('input[data-id="'+data_href+'"]').click(); + $('[name="redux_builder_amp['+data_href+']"]').val(0); + } + } }else if(data_href=='amp-fb-pixel'){ if(amp_fb_pixel_id!=""){ if(!checked){ diff --git a/includes/ampforwp-fields-array.php b/includes/ampforwp-fields-array.php index 18a7d5466..9e8f03301 100644 --- a/includes/ampforwp-fields-array.php +++ b/includes/ampforwp-fields-array.php @@ -12,7 +12,7 @@ $options[$page->ID] = $page->post_title; } } -$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'); +$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'); $analytics_default_option = ampforwp_get_setting('amp-analytics-select-option'); $analytics_default = 'ampforwp-ga-switch'; switch ($analytics_default_option) { @@ -217,6 +217,15 @@ function ampforwp_check_analytics_setup($type = ''){ 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')) ), array('field_type'=>'sub_section_end','field_data'=>array()), + array('field_type'=>'sub_section_start', + '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') + ), + array('field_type'=>'heading', + 'field_data'=>array('title'=>'Google Tag Manager','class'=>'child_opt child_opt_arrow') + ), + 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')) + ), + array('field_type'=>'sub_section_end','field_data'=>array()), array('field_type'=>'sub_section_start', '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') ), diff --git a/includes/features/analytics/analytics-functions.php b/includes/features/analytics/analytics-functions.php index 9ba6ba3ce..385b8431c 100644 --- a/includes/features/analytics/analytics-functions.php +++ b/includes/features/analytics/analytics-functions.php @@ -366,7 +366,7 @@ function ampforwp_add_advance_gtm_fields( $ampforwp_adv_gtm_fields ) { $ampforwp_adv_gtm_fields = preg_replace('/\n\s*\n/', '', $ampforwp_adv_gtm_fields); $ampforwp_adv_gtm_fields = preg_replace('/\/\/(.*?)\s(.*)/m', '$2', $ampforwp_adv_gtm_fields); if($gtm_id!=""){?> - data-block-on-consent >" data-block-on-consent > diff --git a/includes/features/analytics/analytics-options.php b/includes/features/analytics/analytics-options.php index 7458a2e88..f624d79f0 100644 --- a/includes/features/analytics/analytics-options.php +++ b/includes/features/analytics/analytics-options.php @@ -160,7 +160,7 @@ function ampforwp_analytics_options($opt_name){ ), ), array( - 'class'=>'child_opt', + 'class'=>'hide', 'id' =>'amp-gtm-analytics-code', 'type' => 'text', 'title' => esc_html__('Analytics ID','accelerated-mobile-pages'), diff --git a/includes/features/functions.php b/includes/features/functions.php index 87843ac2c..8612d7919 100644 --- a/includes/features/functions.php +++ b/includes/features/functions.php @@ -37,6 +37,7 @@ function ampforwp_add_admin_styling($hook_suffix){ $redux_data = array(); if( current_user_can("manage_options") && $hook_suffix=='toplevel_page_amp_options' ){ $redux_data = $redux_builder_amp; + wp_dequeue_script( 'insert-post-adschart-admin' ); }else{ $redux_data['ampforwp-amp-takeover'] = ampforwp_get_setting('ampforwp-amp-takeover'); } diff --git a/includes/options/admin-config.php b/includes/options/admin-config.php index 957bde889..b24ccd65c 100644 --- a/includes/options/admin-config.php +++ b/includes/options/admin-config.php @@ -252,17 +252,6 @@ 'is_activated'=>(is_plugin_active('amp-cache/ampforwp-cache.php')? 1 : 2), 'settingUrl'=>'{opt-go-amp-cache}', ), - array( - 'name'=>'PWA For WordPress', - 'desc'=>'Add Progressive Web App support for WordPress website', - 'img_src'=>AMPFORWP_IMAGE_DIR . '/pwa-icon.png', - 'price'=>'FREE', - 'url_link'=>'https://pwa-for-wp.com//#utm_source=options-panel&utm_medium=extension-tab_pwa-for-wordpress&utm_campaign=AMP%20Plugin', - 'plugin_active_path'=> 'pwa-for-wordpress/amp-pwa.php', - 'item_name'=>'PWA For WordPress', - 'is_activated'=>(is_plugin_active('pwa-for-wp/pwa-for-wp.php')? 1 : 2), - 'settingUrl'=>admin_url( 'admin.php?page=ampforwp-pwa' ), - ), array( 'name'=>'AMP Popup', '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(){ if($all_extensions_data){ foreach ($all_extensions_data as $extension ) { $is_extension_active = $extension['is_activated']; - if( 1 === $is_extension_active){ + if( 1 === $is_extension_active && 'PWA For WordPress' != $extension['item_name']){ return true; } } @@ -970,17 +959,21 @@ function ampforwp_check_extensions(){

No. There are no setup fees on any of our plans

  • - what\'s the time span for your contracts? + What\'s the time span for your contracts?

    All the plans are year-to-year which are subscribed annually.

  • What payment methods are accepted? -

    All the plans are year-to-year which are subscribed annually.

    +

    We accepts PayPal and Credit Card payments.

  • Do you offer support if I need help?

    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.

  • +
  • + Can I use the plugins after my subscription is expired? +

    Yes, you can use the plugins but you will not get future updates for those plugins.

    +
  • @@ -999,7 +992,7 @@ function ampforwp_check_extensions(){
  • Do I get updates for the premium plugin? -

    All the plans are year-to-year which are subscribed annually.

    +

    Yes, you will get updates for all the premium plugins until your subscription is active.

  • @@ -1215,7 +1208,7 @@ function ampforwp_check_extensions(){ $upg_to_pro_url = 'https://ampforwp.com/membership/#utm_source=options-panel&utm_medium=view_pro_features_btn&utm_campaign=AMP%20Plugin'; $upg_to_pro_target = 'target="_blank"'; } -$proDetailsProvide = ''.esc_html__('Technical Support','accelerated-mobile-pages').''; +$proDetailsProvide = ''.esc_html__('Technical Support','accelerated-mobile-pages').' Upgrade to PRO '; if($ampforwp_nameOfUser!=""){ $proDetailsProvide = "Hello, ".esc_html($ampforwp_nameOfUser)." "; }elseif($ampforwp_is_productActivated){ diff --git a/includes/options/redux-core/assets/css/redux-admin.css b/includes/options/redux-core/assets/css/redux-admin.css index 8a854a22f..8b36d5414 100644 --- a/includes/options/redux-core/assets/css/redux-admin.css +++ b/includes/options/redux-core/assets/css/redux-admin.css @@ -511,6 +511,7 @@ background: linear-gradient(45deg, #E47B49 0%, #ea4c89 100%); top: 1px; left: 4px; } +.premium_features_btn:hover{background: #fff;color:#eb3349 !important; } .getting_started_listing .align_left{display: none} .getting_started_listing li a{width: 288px} .extension_listing li:hover{border-color:rgba(48, 63, 159, 0.35)} diff --git a/readme.txt b/readme.txt index 0335e43bb..df5c9fa2b 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go Donate link: https://www.paypal.me/Kaludi/25 Requires at least: 3.0 Tested up to: 5.3.2 -Stable tag: 1.0.21 +Stable tag: 1.0.22 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -191,6 +191,16 @@ You can contact us from [here](https://ampforwp.com/contact/) == Changelog == += 1.0.22 (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 + = 1.0.21 (4th February 2020) = * Fixed: Fatal error when AMP theme framework is active #4128 @@ -201,20 +211,4 @@ You can contact us from [here](https://ampforwp.com/contact/) * Fixed: Pages won't save apostophies in AMP page builder text module. #4074 * Fixed: Warring in console : [DOM] Found 2 elements with non-unique id #amp-search #3946 -= 1.0.19 (29th January 2020) = -* Improvement: EWWW Image Optimizer plugin Compatibility #3984 -* Fixed: WP Admin toolbar CSS is not loading when user is logged in #4076 -* Fixed: AMP Options panel UI improvements done. #4088 -* Fixed: video is not displaying in AMP when a video is inserted from gutenberg video module #4086 -* Fixed: Performance section all features not working when Ezoic integration plugin is active. #4092 -* Fixed: Playbuzz is not working #4085 -* Fixed: RECENT POSTS label visible if no posts are available #4011 -* Fixed: data-block-on-consent is missing for Vuukle comments when gdpr is enabled #4095 -* Fixed: Remove Purge AMP CDN cache Settings buuton: #4099 -* Fixed: When categories that we exclude from AMP through the plugin configuration present redirection problem along with mobile redirection option #4075 -* Fixed: Alignment issue in GDPR Privacy link. #4101 - -= 1.0.18 (27th January 2020) = -* Fixed: Debug warnings with Imagify plugin #3908 - Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt) \ No newline at end of file diff --git a/templates/custom-amp-content-button.js b/templates/custom-amp-content-button.js index 1ace8677c..a79e39b43 100644 --- a/templates/custom-amp-content-button.js +++ b/templates/custom-amp-content-button.js @@ -46,7 +46,8 @@ jQuery(document).ready(function($) { $('.amp-editor-content').hide(); } } - tinymce.get('ampforwp_custom_content_editor').on("keyup change paste",function(){ + if(document.getElementById('ampforwp_custom_content_editor')){ + tinymce.get('ampforwp_custom_content_editor').on("keyup change paste",function(){ var thisval = tinymce.get('ampforwp_custom_content_editor').getContent(); if(thisval!=""){ $('.amp-editor-content').hide(); @@ -63,5 +64,6 @@ jQuery(document).ready(function($) { }else{ $("#ampforwp-amp-content-error-msg").html("AMP contents is blank, Please enter content"); } - }); + }); + } }); \ No newline at end of file diff --git a/templates/features.php b/templates/features.php index 0f814f747..019a65710 100644 --- a/templates/features.php +++ b/templates/features.php @@ -251,6 +251,12 @@ function ampforwp_amphtml_generator(){ if(is_search() && 0 == ampforwp_get_setting('amp-redirection-search')){ return; } + if(function_exists('yith_wishlist_constructor')){ + $class = get_body_class(); + if(in_array("woocommerce-wishlist", $class)){ + return; + } + } // #872 no-amphtml if selected as hide from settings if ( is_category_amp_disabled() ) { return; @@ -1401,9 +1407,6 @@ function ampforwp_custom_yoast_meta_homepage(){ } } do_action( 'wpseo_opengraph' ); - if( ampforwp_get_setting('ampforwp-seo-custom-additional-meta') ){ - echo strip_tags( ampforwp_get_setting('ampforwp-seo-custom-additional-meta'), '' ); - } } } @@ -2259,7 +2262,9 @@ function ampforwp_global_head_scripts($data){ add_action('amp_post_template_head','ampforwp_header_html_output',11); function ampforwp_header_html_output() { - + if( ampforwp_get_setting('ampforwp-seo-custom-additional-meta') ){ + echo strip_tags( ampforwp_get_setting('ampforwp-seo-custom-additional-meta'), '' ); + } if( ampforwp_get_setting('amp-header-text-area-for-html') ) { $allhtml = ampforwp_get_setting('amp-header-text-area-for-html'); $allhtml = preg_replace('/<\/script>/','', $allhtml);