Skip to content

Commit

Permalink
Merge pull request #4149 from ahmedkaludi/1.0-deploy
Browse files Browse the repository at this point in the history
1.0.22  merge in to master.
  • Loading branch information
MohammedKaludi committed Feb 6, 2020
2 parents 00b79a4 + a7cfcfd commit 75e5e5d
Show file tree
Hide file tree
Showing 13 changed files with 87 additions and 61 deletions.
28 changes: 11 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -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)
6 changes: 4 additions & 2 deletions accelerated-moblie-pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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');
Expand Down Expand Up @@ -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');
Expand All @@ -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";}
Expand Down
10 changes: 10 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -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

Expand Down
15 changes: 15 additions & 0 deletions includes/admin-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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");}
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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){
Expand Down
11 changes: 10 additions & 1 deletion includes/ampforwp-fields-array.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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')
),
Expand Down
2 changes: 1 addition & 1 deletion includes/features/analytics/analytics-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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!=""){?>
<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
<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
}
}else{
if($gtm_id!=""){?>
Expand Down
2 changes: 1 addition & 1 deletion includes/features/analytics/analytics-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
1 change: 1 addition & 0 deletions includes/features/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
25 changes: 9 additions & 16 deletions includes/options/admin-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -970,17 +959,21 @@ function ampforwp_check_extensions(){
<p>No. There are no setup fees on any of our plans</p>
</li>
<li>
<span>what\'s the time span for your contracts?</span>
<span>What\'s the time span for your contracts?</span>
<p>All the plans are year-to-year which are subscribed annually.</p>
</li>
<li>
<span>What payment methods are accepted?</span>
<p>All the plans are year-to-year which are subscribed annually.</p>
<p>We accepts PayPal and Credit Card payments.</p>
</li>
<li>
<span>Do you offer support if I need help?</span>
<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>
</li>
<li>
<span>Can I use the plugins after my subscription is expired?</span>
<p>Yes, you can use the plugins but you will not get future updates for those plugins.</p>
</li>
</ul>
</div>
<div class="rt">
Expand All @@ -999,7 +992,7 @@ function ampforwp_check_extensions(){
</li>
<li>
<span>Do I get updates for the premium plugin?</span>
<p>All the plans are year-to-year which are subscribed annually.</p>
<p>Yes, you will get updates for all the premium plugins until your subscription is active.</p>
</li>
</ul>
</div>
Expand Down Expand Up @@ -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 = '<a class="technical_support_btn_txt" href="https://ampforwp.com/support/" target="_blank">'.esc_html__('Technical Support','accelerated-mobile-pages').'</a>';
$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> ';
if($ampforwp_nameOfUser!=""){
$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>";
}elseif($ampforwp_is_productActivated){
Expand Down
1 change: 1 addition & 0 deletions includes/options/redux-core/assets/css/redux-admin.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 75e5e5d

Please sign in to comment.