AMP for WP – Accelerated Mobile Pages - Version 1.0.32

Version Description

(6th March 2020) = * Fixed: Syntax breaking in advanced google analytics section #4228 * Fixed: Optimize CSS (Tree shaking) not clearing on post update #4234 * Fixed: Compatibility with the CIARO theme #4220 * Fixed: Custom JavaScript are not allowed issue #4233 * Fixed: Need to remove search option when header type 2 is selected #4214 * Fixed: CSS of the CTA button in AMP page builder is disturbed in the mobile view #4215 * Fixed: image broken in light speed cache plugin #4231 * Fixed: Youtube video is not working in " The issue" Theme #4223 * Fixed: Removed '/amp' in menu with custom link #4221 * Fixed: Wrong Yoast Canonical when amp link added #4229 * Fixed: Call to undefined function session_start() in redirect.php:67 #4236 * Fixed: Content Sneak Peek issue with below the content ads in Mozilla browser. #4178 * Fixed: The mandatory attribute 'target' is missing in tag form #4239 * Fixed: Query Monitor queries should be visible in amp pages too when logged in. #4250 * Fixed: The input should be cleared When search button is clicked in AMP options Panel#4247 * Fixed: Multiple debug warnings. #4242

Download this release

Release Info

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

Code changes from version 1.0.31 to 1.0.32

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.31
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -194,6 +194,24 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
194
 
195
  == Changelog ==
196
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
197
  = 1.0.31 (28th February 2020) =
198
  * Improvement: Added option to hide vukkle comments emoji #4194
199
  * Improvement: Added alt for images in Slider module of AMP page builder #4193
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.32
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.32 (6th March 2020) =
198
+ * Fixed: Syntax breaking in advanced google analytics section #4228
199
+ * Fixed: Optimize CSS (Tree shaking) not clearing on post update #4234
200
+ * Fixed: Compatibility with the CIARO theme #4220
201
+ * Fixed: Custom JavaScript are not allowed issue #4233
202
+ * Fixed: Need to remove search option when header type 2 is selected #4214
203
+ * Fixed: CSS of the CTA button in AMP page builder is disturbed in the mobile view #4215
204
+ * Fixed: image broken in light speed cache plugin #4231
205
+ * Fixed: Youtube video is not working in " The issue" Theme #4223
206
+ * Fixed: Removed '/amp' in menu with custom link #4221
207
+ * Fixed: Wrong Yoast Canonical when amp link added #4229
208
+ * Fixed: Call to undefined function session_start() in redirect.php:67 #4236
209
+ * Fixed: Content Sneak Peek issue with below the content ads in Mozilla browser. #4178
210
+ * Fixed: The mandatory attribute 'target' is missing in tag form #4239
211
+ * Fixed: Query Monitor queries should be visible in amp pages too when logged in. #4250
212
+ * Fixed: The input should be cleared When search button is clicked in AMP options Panel#4247
213
+ * Fixed: Multiple debug warnings. #4242
214
+
215
  = 1.0.31 (28th February 2020) =
216
  * Improvement: Added option to hide vukkle comments emoji #4194
217
  * Improvement: Added alt for images in Slider module of AMP page builder #4193
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.31
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.31');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  if(!defined('AMPFROWP_HOST_NAME')){
26
  $urlinfo = get_bloginfo('url');
@@ -1340,67 +1340,52 @@ function ampforwp_automattic_notice_delete(){
1340
  exit();
1341
  }
1342
 
1343
- add_action('admin_init','ampforwp_replace_redux_comments');
1344
- function ampforwp_replace_redux_comments(){
1345
-
1346
  if(current_user_can( 'manage_options' )){
1347
- $replaced_redux_comments = get_transient('replaced_redux_comments_updated');
1348
-
1349
- if(!$replaced_redux_comments){
1350
- $redux_val = get_option('redux_builder_amp',array());
1351
-
1352
- if ( empty($redux_val) || ! is_array($redux_val)) {
1353
- return;
1354
- }
1355
-
1356
- $search = '/******* Paste your Custom CSS in this Editor *******/';
1357
- $rep = str_replace("$search", "", $redux_val);
1358
-
1359
- //FOR GA
1360
- $pattern = '/\s*/m';
1361
- $replace = '';
1362
-
1363
- $ga_val = $redux_val['ampforwp-ga-field-advance'];
1364
- $rep = preg_replace( $pattern, $replace,$ga_val);
1365
- $search = '/***EnteryourAdvancedAnalyticscodehere*/';
1366
- $rep = str_replace("$search", "", $rep);
1367
- $search = '//ReplacethiswithyourTrackingID';
1368
- $rep = str_replace("$search", "", $rep);
1369
- $jsonstr = "";
1370
-
1371
- for($i=0;$i<strlen($rep);$i++){
1372
- $resp = $rep[$i];
1373
- $jsonstr.=$resp;
1374
- if($resp=='{' || $resp=='}'){
1375
- $jsonstr.=PHP_EOL;
1376
- }
1377
- }
1378
- $redux_val['ampforwp-ga-field-advance'] = $jsonstr;
1379
- // GA CLOSE
1380
-
1381
- //FOR GTM
1382
- $gml_val = $redux_val['ampforwp-gtm-field-advance'];
1383
- $rep = preg_replace( $pattern, $replace,$gml_val);
1384
- $search = '/***EnteryourAdvancedAnalyticscodehere*/';
1385
- $rep = str_replace("$search", "", $rep);
1386
- $search = '/*ReplacethiswithyourTrackingID*/';
1387
- $rep = str_replace("$search", "", $rep);
1388
-
1389
- $jsonstr = "";
1390
- for($i=0;$i<strlen($rep);$i++){
1391
- $resp = $rep[$i];
1392
- $jsonstr.=$resp;
1393
- if($resp=='{' || $resp=='}'){
1394
- $jsonstr.=PHP_EOL;
1395
- }
1396
- }
1397
- //GTM CLOSE
1398
-
1399
- $redux_val['ampforwp-gtm-field-advance'] = $jsonstr;
1400
- update_option('redux_builder_amp',$redux_val);
1401
- set_transient('replaced_redux_comments_updated',1);
1402
- }
1403
- }
1404
  }
1405
  if(!function_exists('ampforwp_wp_plugin_action_link')){
1406
  function ampforwp_wp_plugin_action_link( $plugin, $action = 'activate' ) {
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.32
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.32');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  if(!defined('AMPFROWP_HOST_NAME')){
26
  $urlinfo = get_bloginfo('url');
1340
  exit();
1341
  }
1342
 
1343
+ add_action('current_screen','ampforwp_replace_redux_comments');
1344
+ function ampforwp_replace_redux_comments($screen){
 
1345
  if(current_user_can( 'manage_options' )){
1346
+ if ( 'toplevel_page_amp_options' == $screen->base ) {
1347
+ $replaced_redux_comments = get_transient('replaced_redux_comments_updated');
1348
+ if(!$replaced_redux_comments){
1349
+ $redux_val = get_option('redux_builder_amp',array());
1350
+ if ( empty($redux_val) || ! is_array($redux_val)) {
1351
+ return;
1352
+ }
1353
+ $ga_val = $redux_val['ampforwp-ga-field-advance'];
1354
+ if(preg_match('/\/\*(.*?)\*\//s', $ga_val)){
1355
+ $ga_val = preg_replace('/\/\*(.*?)\*\//s', '', $ga_val);
1356
+ $redux_val['ampforwp-ga-field-advance'] = $ga_val;
1357
+ update_option('redux_builder_amp',$redux_val);
1358
+ }
1359
+ if(preg_match('/\/\/Replace this with your Tracking ID/', $ga_val)){
1360
+ $ga_val = preg_replace('/\/\/Replace this with your Tracking ID/', '', $ga_val);
1361
+ $redux_val['ampforwp-ga-field-advance'] = $ga_val;
1362
+ update_option('redux_builder_amp',$redux_val);
1363
+ }
1364
+ // GA CLOSE
1365
+
1366
+ //FOR GTM
1367
+ $gml_val = $redux_val['ampforwp-gtm-field-advance'];
1368
+ if(preg_match('/\/\*(.*?)\*\//s', $gml_val)){
1369
+ $gml_val = preg_replace('/\/\*(.*?)\*\//s', '', $gml_val);
1370
+ $redux_val['ampforwp-gtm-field-advance'] = $gml_val;
1371
+ update_option('redux_builder_amp',$redux_val);
1372
+ }
1373
+ if(preg_match('/\/\/Replace this with your Tracking ID/', $gml_val)){
1374
+ $gml_val = preg_replace('/\/\/Replace this with your Tracking ID/', '', $gml_val);
1375
+ $redux_val['ampforwp-gtm-field-advance'] = $gml_val;
1376
+ update_option('redux_builder_amp',$redux_val);
1377
+ }
1378
+ // GLOBAL CSS EDITOR
1379
+ $css_editor = $redux_val['css_editor'];
1380
+ if(preg_match('/\/\*(.*?)\*\//s', $css_editor)){
1381
+ $css_editor = preg_replace('/\/\*(.*?)\*\//s', '', $css_editor);
1382
+ $redux_val['css_editor'] = $css_editor;
1383
+ update_option('redux_builder_amp',$redux_val);
1384
+ }
1385
+ set_transient('replaced_redux_comments_updated',1);
1386
+ }
1387
+ }
1388
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1389
  }
1390
  if(!function_exists('ampforwp_wp_plugin_action_link')){
1391
  function ampforwp_wp_plugin_action_link( $plugin, $action = 'activate' ) {
changelog.txt CHANGED
@@ -1,5 +1,23 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 1.0.31 (28th February 2020) =
4
  * Improvement: Added option to hide vukkle comments emoji #4194
5
  * Improvement: Added alt for images in Slider module of AMP page builder #4193
1
  == Changelog ==
2
 
3
+ = 1.0.32 (6th March 2020) =
4
+ * Fixed: Syntax breaking in advanced google analytics section #4228
5
+ * Fixed: Optimize CSS (Tree shaking) not clearing on post update #4234
6
+ * Fixed: Compatibility with the CIARO theme #4220
7
+ * Fixed: Custom JavaScript are not allowed issue #4233
8
+ * Fixed: Need to remove search option when header type 2 is selected #4214
9
+ * Fixed: CSS of the CTA button in AMP page builder is disturbed in the mobile view #4215
10
+ * Fixed: image broken in light speed cache plugin #4231
11
+ * Fixed: Youtube video is not working in " The issue" Theme #4223
12
+ * Fixed: Removed '/amp' in menu with custom link #4221
13
+ * Fixed: Wrong Yoast Canonical when amp link added #4229
14
+ * Fixed: Call to undefined function session_start() in redirect.php:67 #4236
15
+ * Fixed: Content Sneak Peek issue with below the content ads in Mozilla browser. #4178
16
+ * Fixed: The mandatory attribute 'target' is missing in tag form #4239
17
+ * Fixed: Query Monitor queries should be visible in amp pages too when logged in. #4250
18
+ * Fixed: The input should be cleared When search button is clicked in AMP options Panel#4247
19
+ * Fixed: Multiple debug warnings. #4242
20
+
21
  = 1.0.31 (28th February 2020) =
22
  * Improvement: Added option to hide vukkle comments emoji #4194
23
  * Improvement: Added alt for images in Slider module of AMP page builder #4193
components/components-core.php CHANGED
@@ -462,7 +462,10 @@ function amp_back_to_top_link(){
462
  global $redux_builder_amp;
463
  if(true == ampforwp_get_setting('ampforwp-footer-top')){?>
464
  <a id="scrollToTopButton" title="back to top" on="tap:backtotop.scrollTo(duration=500)" class="btt" ></a>
465
- <?php if(ampforwp_get_setting('ampforwp-amp-convert-to-wp')==false){?>
 
 
 
466
  <amp-animation id="showAnim"
467
  layout="nodisplay">
468
  <script type="application/json">
462
  global $redux_builder_amp;
463
  if(true == ampforwp_get_setting('ampforwp-footer-top')){?>
464
  <a id="scrollToTopButton" title="back to top" on="tap:backtotop.scrollTo(duration=500)" class="btt" ></a>
465
+ <?php
466
+ global $wp;
467
+ $current_url = home_url(add_query_arg(array($_GET), $wp->request));
468
+ if(ampforwp_get_setting('ampforwp-amp-convert-to-wp')==false || (strpos( $current_url,'/amp')!=false || strpos( $current_url,'?amp')!=false)){?>
469
  <amp-animation id="showAnim"
470
  layout="nodisplay">
471
  <script type="application/json">
includes/admin-script.js CHANGED
@@ -118,6 +118,60 @@ jQuery(function($) {
118
  $(this).find('.display_header').append('<span class="search-wrapper"><input class="redux_field_search" name="" type="text" placeholder="Search the controls" style="display:none"/><span class="redux-amp-search-icon"><i class="dashicons-before dashicons-search"></i></span></span>');
119
  $('.redux-amp-search-icon').click(function(){
120
  $('.redux_field_search').toggle('slide');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
  });
122
  reduxOptionSearch();
123
  }
118
  $(this).find('.display_header').append('<span class="search-wrapper"><input class="redux_field_search" name="" type="text" placeholder="Search the controls" style="display:none"/><span class="redux-amp-search-icon"><i class="dashicons-before dashicons-search"></i></span></span>');
119
  $('.redux-amp-search-icon').click(function(){
120
  $('.redux_field_search').toggle('slide');
121
+ var val = $('.redux_field_search').val();
122
+ var display = $('.redux_field_search').css('display');
123
+ if(val!='' && display=='block'){
124
+ $('.redux_field_search').val('');
125
+ var parent = jQuery('.redux_field_search').parents('.redux-container:first');
126
+ var expanded_options = parent.find('.expand_options');
127
+ if (expanded_options.hasClass('expanded')) {
128
+ expanded_options.click();
129
+ parent.find('.redux-main').removeClass('redux-search');
130
+ }
131
+ //parent.find('.redux-section-field, .redux-info-field, .redux-notice-field, .redux-container-group, .redux-section-desc, .redux-group-tab h3').show();
132
+
133
+ if($('.redux-group-tab-link-li.active').length>0){
134
+ var rel = $('.redux-group-tab-link-li.active a').attr('data-rel');
135
+ var selector = 'div#'+rel+'_section_group';
136
+ jQuery(selector).show();
137
+ jQuery(selector).css('display','block');
138
+
139
+ }else{
140
+ $('.redux-group-tab-link-li.activeChild').click();
141
+ $('div#'+rel+'_section_group').show();
142
+ $('#'+rel+'_section_group').css('display','block');
143
+ }
144
+ parent.find('.redux-field-container').each(function() {
145
+ $(this).parents('tr:first').show();
146
+ });
147
+ parent.find('.redux-group-tab').each(function() {
148
+ $(this).find("div.redux-section-field").each(function(){
149
+ var item = $(this);
150
+ if(item.hasClass('hide')){
151
+ return false;
152
+ }
153
+ var divSectionId = $(this).attr('id');
154
+ var splitResult = divSectionId.split("-");
155
+ splitResult.splice(1, 0, "table");
156
+ var divTableId = splitResult.join("-");
157
+ var totalTr = $("#"+divTableId).find('tr:visible').length;
158
+ if(totalTr>0){
159
+ $(this).show();
160
+ }
161
+ });
162
+ $(this).find('.form-table-section tbody').each(function(){
163
+ $(this).find('tr').each(function (i, el) {
164
+ var item = $(this);
165
+ if(item.hasClass('hide')){
166
+ item.hide();
167
+ }
168
+ if(item.hasClass('redux-section-indent-start')){
169
+ item.hide();
170
+ }
171
+ });
172
+ });
173
+ });
174
+ }
175
  });
176
  reduxOptionSearch();
177
  }
includes/features/advertisement/ads-functions.php CHANGED
@@ -259,7 +259,13 @@ function ampforwp_before_post_content_advert() {
259
  }
260
  }
261
  }
262
-
 
 
 
 
 
 
263
  // Below Content Single
264
  // Hook updated
265
  // add_action('ampforwp_inside_post_content_after','ampforwp_after_post_content_advert');
259
  }
260
  }
261
  }
262
+ add_action('pre_amp_render_post', 'ampforwp_after_post_firefox_ad');
263
+ function ampforwp_after_post_firefox_ad(){
264
+ if(true == ampforwp_get_setting('enable-amp-ads-4') && true == ampforwp_get_setting('content-sneak-peek')){
265
+ remove_action('ampforwp_after_post_content','ampforwp_after_post_content_advert');
266
+ add_action('ampforwp_after_the_post_content_wrp','ampforwp_after_post_content_advert');
267
+ }
268
+ }
269
  // Below Content Single
270
  // Hook updated
271
  // add_action('ampforwp_inside_post_content_after','ampforwp_after_post_content_advert');
includes/features/performance/performance-functions.php CHANGED
@@ -355,6 +355,8 @@ function ampforwp_clear_tree_shaking_on_activity($plugin='', $network=''){
355
  add_action( 'save_post', 'ampforwp_clear_tree_shaking_post');
356
  if( !function_exists("ampforwp_clear_tree_shaking_post") ) {
357
  function ampforwp_clear_tree_shaking_post() {
 
 
358
  if ( current_user_can( 'edit_posts' ) && is_user_logged_in() ){
359
  if(ampforwp_get_setting('ampforwp_css_tree_shaking')){
360
  if(ampforwp_is_home()){
@@ -368,19 +370,22 @@ if( !function_exists("ampforwp_clear_tree_shaking_post") ) {
368
  }elseif(is_archive()){
369
  $page_id = get_queried_object_id();
370
  $transient_filename = "archive-".intval($page_id);
371
- }
 
 
372
  if( is_user_logged_in() ){
373
  $transient_filename = $transient_filename.'-admin';
374
  }
375
- $upload_dir = wp_upload_dir();
376
- $ts_file = $upload_dir['basedir'] . '/' . 'ampforwp-tree-shaking/_transient_'.esc_attr($transient_filename).".css";
377
- if(file_exists($ts_file) && is_file($ts_file)){
378
- unlink($ts_file);
379
- }
 
 
380
  }
381
  }
382
  }
383
-
384
  }
385
 
386
  if(!function_exists('ampforwp_clear_css_on_transposh_rtl')){
355
  add_action( 'save_post', 'ampforwp_clear_tree_shaking_post');
356
  if( !function_exists("ampforwp_clear_tree_shaking_post") ) {
357
  function ampforwp_clear_tree_shaking_post() {
358
+ global $post;
359
+ $transient_filename = '';
360
  if ( current_user_can( 'edit_posts' ) && is_user_logged_in() ){
361
  if(ampforwp_get_setting('ampforwp_css_tree_shaking')){
362
  if(ampforwp_is_home()){
370
  }elseif(is_archive()){
371
  $page_id = get_queried_object_id();
372
  $transient_filename = "archive-".intval($page_id);
373
+ }elseif(is_object($post)){
374
+ $transient_filename = "post-".$post->ID;
375
+ }
376
  if( is_user_logged_in() ){
377
  $transient_filename = $transient_filename.'-admin';
378
  }
379
+ if($transient_filename != ''){
380
+ $upload_dir = wp_upload_dir();
381
+ $ts_file = $upload_dir['basedir'] . '/' . 'ampforwp-tree-shaking/_transient_'.esc_attr($transient_filename).".css";
382
+ if(file_exists($ts_file) && is_file($ts_file)){
383
+ unlink($ts_file);
384
+ }
385
+ }
386
  }
387
  }
388
  }
 
389
  }
390
 
391
  if(!function_exists('ampforwp_clear_css_on_transposh_rtl')){
includes/options/admin-config.php CHANGED
@@ -2625,6 +2625,21 @@ Redux::setSection( $opt_name, array(
2625
  'data' => 'tags',
2626
 
2627
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2628
  )
2629
  )
2630
  );
@@ -4370,7 +4385,8 @@ Redux::setSection( $opt_name, array(
4370
  'type' => 'switch',
4371
  'title' => esc_html__( 'Search', 'accelerated-mobile-pages' ),
4372
  'required' => array(
4373
- array('amp-design-selector', '=' , '4')
 
4374
  ),
4375
  'default' => '1'
4376
  ),
2625
  'data' => 'tags',
2626
 
2627
  ),
2628
+ array(
2629
+ 'id' => 'amp-other-tools',
2630
+ 'type' => 'section',
2631
+ 'title' => esc_html__('Others', 'accelerated-mobile-pages'),
2632
+ 'indent' => true,
2633
+ 'layout_type' => 'accordion',
2634
+ 'accordion-open'=> 1,
2635
+ ),
2636
+ array(
2637
+ 'id' => 'ampforwp-query-monitor',
2638
+ 'type' => 'switch',
2639
+ 'title' => esc_html__('Show Query Monitor data in AMP', 'accelerated-mobile-pages'),
2640
+ 'default' => 1,
2641
+ 'tooltip-subtitle' => esc_html__('Enable/Disable Query Monitor for amp when logged in as admin and Query Monitor Plugin installed', 'accelerated-mobile-pages'),
2642
+ ),
2643
  )
2644
  )
2645
  );
4385
  'type' => 'switch',
4386
  'title' => esc_html__( 'Search', 'accelerated-mobile-pages' ),
4387
  'required' => array(
4388
+ array('amp-design-selector', '=' , '4'),
4389
+ array('header-type', '!=' , '2'),
4390
  ),
4391
  'default' => '1'
4392
  ),
includes/redirect.php CHANGED
@@ -63,7 +63,7 @@ if(is_search() && 0 == ampforwp_get_setting('amp-redirection-search')){
63
  }
64
  }
65
  // Redirect ?nonamp=1 to normal url #3269
66
- if (( isset($_GET['nonamp']) && 1 == $_GET['nonamp'] ) ){
67
  session_start();
68
  $_SESSION['ampforwp_mobile'] = 'exit';
69
  $current_url = str_replace("?nonamp=1", '',$current_url);
63
  }
64
  }
65
  // Redirect ?nonamp=1 to normal url #3269
66
+ if (( isset($_GET['nonamp']) && 1 == $_GET['nonamp'] ) && function_exists('session_start')){
67
  session_start();
68
  $_SESSION['ampforwp_mobile'] = 'exit';
69
  $current_url = str_replace("?nonamp=1", '',$current_url);
includes/thirdparty-compatibility.php CHANGED
@@ -46,6 +46,9 @@ function ampforwp_thirdparty_compatibility(){
46
  if(function_exists('hotwp_get_option') && is_category()){
47
  remove_all_filters('get_the_archive_title');
48
  }
 
 
 
49
  }
50
 
51
  //Updater to check license
46
  if(function_exists('hotwp_get_option') && is_category()){
47
  remove_all_filters('get_the_archive_title');
48
  }
49
+ if(function_exists('thb_remove_youtube_controls')){
50
+ remove_filter( 'embed_handler_html', 'thb_remove_youtube_controls', 10, 2 );
51
+ }
52
  }
53
 
54
  //Updater to check license
pagebuilder/modules/cta-mod-module.php CHANGED
@@ -16,8 +16,8 @@ $css = '
16
  {{module-class}}.cta-mod .btn-txt{display: inline-block;color: {{txt_color_picker}};padding: 10px 20px;font-size: 26px;border: 3px solid {{brd_color_picker}};font-weight: 500;background: {{bg_color_picker}};}
17
  {{module-class}}.cta-mod .txt{display: block;color: {{subh_color_picker}};font-size: 16px;margin-top: 20px;}
18
  @media(max-width:768px){
19
- .cta-mod{display:inline-block;width:100%;text-align:center}
20
- .cta-mod .cta-btn{width: 100%;text-align: center;margin-top:15px;}
21
  }';
22
  $common_css = '.cta-mod .cta-btn{width: 40%;text-align: right;}';
23
  global $redux_builder_amp;
@@ -26,8 +26,8 @@ $common_css .= '
26
  /** RTL CSS **/
27
  .cta-mod .cta-btn { text-align: left;}
28
  @media(max-width:768px){
29
- .cta-mod{display:inline-block;width:100%;text-align:center}
30
- .cta-mod .cta-btn{width: 100%;text-align: center;margin-top:15px;}
31
  }
32
  ';
33
  }
16
  {{module-class}}.cta-mod .btn-txt{display: inline-block;color: {{txt_color_picker}};padding: 10px 20px;font-size: 26px;border: 3px solid {{brd_color_picker}};font-weight: 500;background: {{bg_color_picker}};}
17
  {{module-class}}.cta-mod .txt{display: block;color: {{subh_color_picker}};font-size: 16px;margin-top: 20px;}
18
  @media(max-width:768px){
19
+ {{module-class}}.cta-mod{display:inline-block;width:100%;text-align:center}
20
+ {{module-class}}.cta-mod .cta-btn{width: 100%;text-align: center;margin-top:15px;}
21
  }';
22
  $common_css = '.cta-mod .cta-btn{width: 40%;text-align: right;}';
23
  global $redux_builder_amp;
26
  /** RTL CSS **/
27
  .cta-mod .cta-btn { text-align: left;}
28
  @media(max-width:768px){
29
+ {{module-class}}.cta-mod{display:inline-block;width:100%;text-align:center}
30
+ {{module-class}}.cta-mod .cta-btn{width: 100%;text-align: center;margin-top:15px;}
31
  }
32
  ';
33
  }
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.31
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -191,6 +191,24 @@ You can contact us from [here](https://ampforwp.com/contact/)
191
 
192
  == Changelog ==
193
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
194
  = 1.0.31 (28th February 2020) =
195
  * Improvement: Added option to hide vukkle comments emoji #4194
196
  * Improvement: Added alt for images in Slider module of AMP page builder #4193
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.32
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.32 (6th March 2020) =
195
+ * Fixed: Syntax breaking in advanced google analytics section #4228
196
+ * Fixed: Optimize CSS (Tree shaking) not clearing on post update #4234
197
+ * Fixed: Compatibility with the CIARO theme #4220
198
+ * Fixed: Custom JavaScript are not allowed issue #4233
199
+ * Fixed: Need to remove search option when header type 2 is selected #4214
200
+ * Fixed: CSS of the CTA button in AMP page builder is disturbed in the mobile view #4215
201
+ * Fixed: image broken in light speed cache plugin #4231
202
+ * Fixed: Youtube video is not working in " The issue" Theme #4223
203
+ * Fixed: Removed '/amp' in menu with custom link #4221
204
+ * Fixed: Wrong Yoast Canonical when amp link added #4229
205
+ * Fixed: Call to undefined function session_start() in redirect.php:67 #4236
206
+ * Fixed: Content Sneak Peek issue with below the content ads in Mozilla browser. #4178
207
+ * Fixed: The mandatory attribute 'target' is missing in tag form #4239
208
+ * Fixed: Query Monitor queries should be visible in amp pages too when logged in. #4250
209
+ * Fixed: The input should be cleared When search button is clicked in AMP options Panel#4247
210
+ * Fixed: Multiple debug warnings. #4242
211
+
212
  = 1.0.31 (28th February 2020) =
213
  * Improvement: Added option to hide vukkle comments emoji #4194
214
  * Improvement: Added alt for images in Slider module of AMP page builder #4193
templates/design-manager/design-1/elements/content.php CHANGED
@@ -13,6 +13,7 @@ global $redux_builder_amp; ?>
13
  <div class="amp-wp-content the_content">
14
  <?php amp_content(); ?>
15
  </div>
 
16
  <?php
17
  if ( 'below-content' == ampforwp_get_setting('design-1-2-3-addthis-pos') ){
18
  echo ampforwp_addThis_support();
13
  <div class="amp-wp-content the_content">
14
  <?php amp_content(); ?>
15
  </div>
16
+ <?php do_action( 'ampforwp_after_the_post_content_wrp' ); ?>
17
  <?php
18
  if ( 'below-content' == ampforwp_get_setting('design-1-2-3-addthis-pos') ){
19
  echo ampforwp_addThis_support();
templates/design-manager/design-1/footer.php CHANGED
@@ -15,6 +15,13 @@ wp_reset_postdata(); ?>
15
  if ( $sanitized_sidebar) {
16
  $sidebar_output = $sanitized_sidebar->get_amp_content();
17
  $sidebar_output = apply_filters('ampforwp_modify_sidebars_content',$sidebar_output);
 
 
 
 
 
 
 
18
  }
19
  echo do_shortcode($sidebar_output);
20
  ?>
15
  if ( $sanitized_sidebar) {
16
  $sidebar_output = $sanitized_sidebar->get_amp_content();
17
  $sidebar_output = apply_filters('ampforwp_modify_sidebars_content',$sidebar_output);
18
+ $sidebar_output = preg_replace_callback('/<form(.*?)>(.*?)<\/form>/s', function($match){
19
+ if(strpos($match[1], 'target=') === false){
20
+ return '<form'.$match[1].' target="_top">'.$match[2].'</form>';
21
+ }else{
22
+ return '<form'.$match[1].'>'.$match[2].'</form>';
23
+ }
24
+ }, $sidebar_output);
25
  }
26
  echo do_shortcode($sidebar_output);
27
  ?>
templates/design-manager/design-2/elements/content.php CHANGED
@@ -8,6 +8,7 @@
8
  <div class="amp-wp-content the_content">
9
  <?php amp_content(); ?>
10
  </div>
 
11
  <?php
12
  if ( 'below-content' == ampforwp_get_setting('design-1-2-3-addthis-pos') ){
13
  echo ampforwp_addThis_support();
8
  <div class="amp-wp-content the_content">
9
  <?php amp_content(); ?>
10
  </div>
11
+ <?php do_action( 'ampforwp_after_the_post_content_wrp' ); ?>
12
  <?php
13
  if ( 'below-content' == ampforwp_get_setting('design-1-2-3-addthis-pos') ){
14
  echo ampforwp_addThis_support();
templates/design-manager/design-2/footer.php CHANGED
@@ -15,6 +15,13 @@ global $redux_builder_amp;
15
  if ( $sanitized_sidebar) {
16
  $sidebar_output = $sanitized_sidebar->get_amp_content();
17
  $sidebar_output = apply_filters('ampforwp_modify_sidebars_content',$sidebar_output);
 
 
 
 
 
 
 
18
  }
19
  echo do_shortcode($sidebar_output);
20
  ?>
15
  if ( $sanitized_sidebar) {
16
  $sidebar_output = $sanitized_sidebar->get_amp_content();
17
  $sidebar_output = apply_filters('ampforwp_modify_sidebars_content',$sidebar_output);
18
+ $sidebar_output = preg_replace_callback('/<form(.*?)>(.*?)<\/form>/s', function($match){
19
+ if(strpos($match[1], 'target=') === false){
20
+ return '<form'.$match[1].' target="_top">'.$match[2].'</form>';
21
+ }else{
22
+ return '<form'.$match[1].'>'.$match[2].'</form>';
23
+ }
24
+ }, $sidebar_output);
25
  }
26
  echo do_shortcode($sidebar_output);
27
  ?>
templates/design-manager/design-3/elements/content.php CHANGED
@@ -7,6 +7,7 @@
7
  <div class="amp-wp-content the_content">
8
  <?php amp_content(); ?>
9
  </div>
 
10
  <!--Post Content Ends here-->
11
  <?php
12
  if ( 'below-content' == ampforwp_get_setting('design-1-2-3-addthis-pos') ){
7
  <div class="amp-wp-content the_content">
8
  <?php amp_content(); ?>
9
  </div>
10
+ <?php do_action( 'ampforwp_after_the_post_content_wrp' ); ?>
11
  <!--Post Content Ends here-->
12
  <?php
13
  if ( 'below-content' == ampforwp_get_setting('design-1-2-3-addthis-pos') ){
templates/design-manager/design-3/footer.php CHANGED
@@ -15,6 +15,13 @@ global $redux_builder_amp;
15
  if ( $sanitized_sidebar) {
16
  $sidebar_output = $sanitized_sidebar->get_amp_content();
17
  $sidebar_output = apply_filters('ampforwp_modify_sidebars_content',$sidebar_output);
 
 
 
 
 
 
 
18
  }
19
  echo do_shortcode($sidebar_output);
20
  ?>
15
  if ( $sanitized_sidebar) {
16
  $sidebar_output = $sanitized_sidebar->get_amp_content();
17
  $sidebar_output = apply_filters('ampforwp_modify_sidebars_content',$sidebar_output);
18
+ $sidebar_output = preg_replace_callback('/<form(.*?)>(.*?)<\/form>/s', function($match){
19
+ if(strpos($match[1], 'target=') === false){
20
+ return '<form'.$match[1].' target="_top">'.$match[2].'</form>';
21
+ }else{
22
+ return '<form'.$match[1].'>'.$match[2].'</form>';
23
+ }
24
+ }, $sidebar_output);
25
  }
26
  echo do_shortcode($sidebar_output);
27
  ?>
templates/design-manager/swift/footer.php CHANGED
@@ -20,6 +20,13 @@ if ( isset($redux_builder_amp['footer-type']) && '1' == $redux_builder_amp['foot
20
  if ( $sanitized_sidebar) {
21
  $sidebar_output = $sanitized_sidebar->get_amp_content();
22
  $sidebar_output = apply_filters('ampforwp_modify_sidebars_content',$sidebar_output);
 
 
 
 
 
 
 
23
  }
24
  echo do_shortcode($sidebar_output); // amphtml content, no kses
25
  ?>
20
  if ( $sanitized_sidebar) {
21
  $sidebar_output = $sanitized_sidebar->get_amp_content();
22
  $sidebar_output = apply_filters('ampforwp_modify_sidebars_content',$sidebar_output);
23
+ $sidebar_output = preg_replace_callback('/<form(.*?)>(.*?)<\/form>/s', function($match){
24
+ if(strpos($match[1], 'target=') === false){
25
+ return '<form'.$match[1].' target="_top">'.$match[2].'</form>';
26
+ }else{
27
+ return '<form'.$match[1].'>'.$match[2].'</form>';
28
+ }
29
+ }, $sidebar_output);
30
  }
31
  echo do_shortcode($sidebar_output); // amphtml content, no kses
32
  ?>
templates/design-manager/swift/single.php CHANGED
@@ -47,6 +47,7 @@ global $redux_builder_amp; ?>
47
  } // Swift Featured Image ?>
48
  <?php amp_content(); ?>
49
  </div>
 
50
  <?php if (isset($redux_builder_amp['swift-social-position']) && 'below-content' == $redux_builder_amp['swift-social-position']){
51
  ampforwp_swift_social_icons();
52
  }
@@ -340,6 +341,7 @@ do_action("ampforwp_single_design_type_handle_d1");
340
  echo ampforwp_addThis_support();
341
  } ?>
342
  </div>
 
343
  <?php if( !checkAMPforPageBuilderStatus(get_the_ID()) ) { ?>
344
  <div class="ss-ic">
345
  <?php if (true == ampforwp_get_setting('swift-social-position') && 'below-content' == ampforwp_get_setting('swift-social-position')){
47
  } // Swift Featured Image ?>
48
  <?php amp_content(); ?>
49
  </div>
50
+ <?php do_action( 'ampforwp_after_the_post_content_wrp' ); ?>
51
  <?php if (isset($redux_builder_amp['swift-social-position']) && 'below-content' == $redux_builder_amp['swift-social-position']){
52
  ampforwp_swift_social_icons();
53
  }
341
  echo ampforwp_addThis_support();
342
  } ?>
343
  </div>
344
+ <?php do_action( 'ampforwp_after_the_post_content_wrp' ); ?>
345
  <?php if( !checkAMPforPageBuilderStatus(get_the_ID()) ) { ?>
346
  <div class="ss-ic">
347
  <?php if (true == ampforwp_get_setting('swift-social-position') && 'below-content' == ampforwp_get_setting('swift-social-position')){
templates/features.php CHANGED
@@ -1017,6 +1017,11 @@ function ampforwp_remove_schema_data() {
1017
  remove_filter( 'the_content', 'rocket_lazyload_iframes', PHP_INT_MAX );
1018
  add_filter( 'do_rocket_lazyload', '__return_false' );
1019
 
 
 
 
 
 
1020
  // Remove Popups and other elements added by Slider-in Plugin
1021
  define('WDSI_BOX_RENDERED', true, false); // when third argument is true, getting Deprecated debug warning in php 7.3.2
1022
 
@@ -2990,7 +2995,9 @@ function ampforwp_auto_add_amp_in_menu_link( $atts, $item, $args ) {
2990
  $atts['href'] = add_query_arg(AMPFORWP_AMP_QUERY_VAR,'1', $atts['href']);
2991
  }
2992
  else{
2993
- $atts['href'] = user_trailingslashit(trailingslashit( $atts['href'] ) . AMPFORWP_AMP_QUERY_VAR);
 
 
2994
  }
2995
 
2996
  return $atts;
@@ -5056,7 +5063,7 @@ add_action( 'wp_before_admin_bar_render', 'ampforwp_view_amp_admin_bar' );
5056
  if( ! function_exists( 'ampforwp_view_amp_admin_bar' ) ) {
5057
  function ampforwp_view_amp_admin_bar( ) {
5058
  global $wp_admin_bar, $post, $wp_post_types, $redux_builder_amp;
5059
- $post_type_title = '';
5060
  $supported_amp_post_types = array();
5061
 
5062
  // Get all post types supported by AMP
@@ -5126,15 +5133,15 @@ if( ! function_exists( 'ampforwp_view_amp_admin_bar' ) ) {
5126
  $current_url = get_term_link($term_id);
5127
  }else{
5128
  $post_type_title = ucfirst($post->post_type);
5129
- $amp_cur_url = get_permalink( $post->ID );
5130
  if(is_home()){
5131
- $amp_cur_url = home_url();
5132
  }
5133
  }
5134
  $wp_admin_bar->add_node(array(
5135
  'id' => 'ampforwp-view-amp',
5136
  'title' => 'View ' . esc_html($post_type_title) . ' (AMP)' ,
5137
- 'href' => ampforwp_url_controller($amp_cur_url)
5138
  ));
5139
  }
5140
  }
@@ -6121,7 +6128,15 @@ function ampforwp_modified_canonical( $data ) {
6121
  }
6122
  return $data;
6123
  }
6124
-
 
 
 
 
 
 
 
 
6125
  // #2220 Remove Space Shortcode by Pro Theme from THEMCO
6126
  add_action('pre_amp_render_post','ampforwp_remove_space_shortcodes');
6127
  function ampforwp_remove_space_shortcodes(){
@@ -7297,6 +7312,14 @@ function ampforwp_front_admin_menu_bar(){
7297
  if( is_user_logged_in() ){
7298
  $pref = get_user_option( "show_admin_bar_front", get_current_user_id() );
7299
  if($pref==="true"){
 
 
 
 
 
 
 
 
7300
  add_action("ampforwp_admin_menu_bar_front", function(){
7301
  add_action('wp_before_admin_bar_render','ampforwp_add_admin_menu_front');
7302
  wp_admin_bar_render();
@@ -7442,6 +7465,64 @@ function ampforwp_head_css(){
7442
  $wp->remove_node($node_arr[$i]);
7443
  }
7444
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7445
  function ampforwp_get_non_amp_url(){
7446
  global $post, $wp;
7447
  $nofollow = $page = $amp_url = $non_amp_url = '';
@@ -7993,6 +8074,7 @@ if(!function_exists('ampforwp_imagify_webp_compatibility')){
7993
  }
7994
  }
7995
  }
 
7996
  return $content;
7997
  }
7998
  }
@@ -8031,6 +8113,7 @@ function ampforwp_ewww_webp_compatibility($content){
8031
  }
8032
  }
8033
  }
 
8034
  return $content;
8035
  }
8036
  }
1017
  remove_filter( 'the_content', 'rocket_lazyload_iframes', PHP_INT_MAX );
1018
  add_filter( 'do_rocket_lazyload', '__return_false' );
1019
 
1020
+ // Compatibility with the CIARO theme #4220
1021
+ if(defined('CAIRO_THEME_VERSION')){
1022
+ remove_filter( 'amp_post_template_file', 'amp_set_custom_template');
1023
+ }
1024
+
1025
  // Remove Popups and other elements added by Slider-in Plugin
1026
  define('WDSI_BOX_RENDERED', true, false); // when third argument is true, getting Deprecated debug warning in php 7.3.2
1027
 
2995
  $atts['href'] = add_query_arg(AMPFORWP_AMP_QUERY_VAR,'1', $atts['href']);
2996
  }
2997
  else{
2998
+ if(false === strpos($atts['href'], "#")){
2999
+ $atts['href'] = user_trailingslashit(trailingslashit( $atts['href'] ) . AMPFORWP_AMP_QUERY_VAR);
3000
+ }
3001
  }
3002
 
3003
  return $atts;
5063
  if( ! function_exists( 'ampforwp_view_amp_admin_bar' ) ) {
5064
  function ampforwp_view_amp_admin_bar( ) {
5065
  global $wp_admin_bar, $post, $wp_post_types, $redux_builder_amp;
5066
+ $post_type_title = $current_url = '';
5067
  $supported_amp_post_types = array();
5068
 
5069
  // Get all post types supported by AMP
5133
  $current_url = get_term_link($term_id);
5134
  }else{
5135
  $post_type_title = ucfirst($post->post_type);
5136
+ $current_url = get_permalink( $post->ID );
5137
  if(is_home()){
5138
+ $current_url = home_url();
5139
  }
5140
  }
5141
  $wp_admin_bar->add_node(array(
5142
  'id' => 'ampforwp-view-amp',
5143
  'title' => 'View ' . esc_html($post_type_title) . ' (AMP)' ,
5144
+ 'href' => ampforwp_url_controller($current_url)
5145
  ));
5146
  }
5147
  }
6128
  }
6129
  return $data;
6130
  }
6131
+ if(class_exists('WPSEO_Frontend') && 'yoast' == ampforwp_get_setting('ampforwp-seo-selection') && true == ampforwp_get_setting('ampforwp-seo-yoast-canonical') ){
6132
+ add_filter('ampforwp_modify_rel_url','ampforwp_yoast_canonical');
6133
+ }
6134
+ function ampforwp_yoast_canonical($canonical){
6135
+ if(ampforwp_is_front_page()){
6136
+ $canonical = ampforwp_generate_canonical();
6137
+ }
6138
+ return $canonical;
6139
+ }
6140
  // #2220 Remove Space Shortcode by Pro Theme from THEMCO
6141
  add_action('pre_amp_render_post','ampforwp_remove_space_shortcodes');
6142
  function ampforwp_remove_space_shortcodes(){
7312
  if( is_user_logged_in() ){
7313
  $pref = get_user_option( "show_admin_bar_front", get_current_user_id() );
7314
  if($pref==="true"){
7315
+ if(class_exists('QM_Plugin') && ampforwp_get_setting('ampforwp-query-monitor')){
7316
+ $dis = QM_Dispatchers::get( 'html' );
7317
+ if($dis->did_footer==false){
7318
+ $dis->did_footer = true;
7319
+ add_action( 'amp_post_template_head', 'ampforwp_query_monitor_script' );
7320
+ add_action( 'amp_post_template_head', 'ampforwp_manual_qm_script', 11 );
7321
+ }
7322
+ }
7323
  add_action("ampforwp_admin_menu_bar_front", function(){
7324
  add_action('wp_before_admin_bar_render','ampforwp_add_admin_menu_front');
7325
  wp_admin_bar_render();
7465
  $wp->remove_node($node_arr[$i]);
7466
  }
7467
  }
7468
+ function ampforwp_manual_qm_script() {
7469
+ wp_print_scripts( array(
7470
+ 'query-monitor',
7471
+ ) );
7472
+ wp_print_styles( array(
7473
+ 'query-monitor',
7474
+ ) );
7475
+ }
7476
+ function ampforwp_query_monitor_script() {
7477
+ global $wp_locale;
7478
+ $qm = plugins_url();
7479
+ $deps = array(
7480
+ 'jquery',
7481
+ );
7482
+
7483
+ if ( defined( 'QM_NO_JQUERY' ) && QM_NO_JQUERY ) {
7484
+ $deps = array();
7485
+ }
7486
+
7487
+ $css = 'query-monitor';
7488
+ if ( method_exists( 'Dark_Mode', 'is_using_dark_mode' ) && is_user_logged_in() ) {
7489
+ if ( Dark_Mode::is_using_dark_mode() ) {
7490
+ $css .= '-dark';
7491
+ }
7492
+ } elseif ( defined( 'QM_DARK_MODE' ) && QM_DARK_MODE ) {
7493
+ $css .= '-dark';
7494
+ }
7495
+
7496
+ wp_enqueue_style(
7497
+ 'query-monitor',
7498
+ esc_attr($qm)."/query-monitor/assets/{$css}.css",
7499
+ array( 'dashicons' )
7500
+ );
7501
+ wp_enqueue_script(
7502
+ 'query-monitor',
7503
+ esc_attr($qm).'/query-monitor/assets/query-monitor.js',
7504
+ $deps,
7505
+ false
7506
+ );
7507
+ wp_localize_script(
7508
+ 'query-monitor',
7509
+ 'qm_number_format',
7510
+ $wp_locale->number_format
7511
+ );
7512
+ wp_localize_script(
7513
+ 'query-monitor',
7514
+ 'qm_l10n',
7515
+ array(
7516
+ 'ajax_error' => __( 'PHP Errors in Ajax Response', 'query-monitor' ),
7517
+ 'ajaxurl' => admin_url( 'admin-ajax.php' ),
7518
+ 'auth_nonce' => array(
7519
+ 'on' => wp_create_nonce( 'qm-auth-on' ),
7520
+ 'off' => wp_create_nonce( 'qm-auth-off' ),
7521
+ 'editor-set' => wp_create_nonce( 'qm-editor-set' ),
7522
+ ),
7523
+ )
7524
+ );
7525
+ }
7526
  function ampforwp_get_non_amp_url(){
7527
  global $post, $wp;
7528
  $nofollow = $page = $amp_url = $non_amp_url = '';
8074
  }
8075
  }
8076
  }
8077
+ $content = str_replace('.webp.webp','.webp',$content);
8078
  return $content;
8079
  }
8080
  }
8113
  }
8114
  }
8115
  }
8116
+ $content = str_replace('.webp.webp','.webp',$content);
8117
  return $content;
8118
  }
8119
  }