AMP for WP – Accelerated Mobile Pages - Version 1.0.77.37

Version Description

(2nd March 2022) = * Improvements: Added feedback form with auto email system #5223 * Improvements: Added new infinite scrolling experience #4791 * Improvements: Added An option to add lang_ and privacyMode values in Quantcast #5206 * Improvements: Added FireWork compatibility #5210 * Fixed: AMP autocomplete tag is not working #5217 * Fixed: Autoplay functionality not working in video module #5219 * Fixed: Fonts loading twice in Global font family #5220 * Fixed: Unable to connect to Matomo analytics #5221

Download this release

Release Info

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

Code changes from version 1.0.77.36 to 1.0.77.37

README.md CHANGED
@@ -3,8 +3,8 @@ Contributors: mohammed_kaludi, ahmedkaludi, ampforwp
3
  Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
- Tested up to: 5.9
7
- Stable tag: 1.0.77.36
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -197,6 +197,16 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
197
 
198
  == Changelog ==
199
 
 
 
 
 
 
 
 
 
 
 
200
  = 1.0.77.36 (18th February 2022) =
201
  * Fixed: If the server-side cache is aggressive then the pagination URL with ?amp=1 is redirecting to non-AMP #5208
202
  * Fixed: Errror getting in featured-image.php, on line 77 #5207
@@ -210,10 +220,4 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
210
  * Fixed: VKontakte social media not working in social media profile links #5196
211
  * Fixed: PHP Notice: tag_rewrite_rules is deprecated #5197
212
 
213
- = 1.0.77.34 (11th January 2022) =
214
- * Fixed: External stylesheet Errors using Vinkmag theme #5189
215
- * Fixed: AMP Takeover functionality is not working on the blog posts #5188
216
- * Fixed: Replace webvitalsdev to Microwork #5183
217
- * Fixed: Wrong Notice for first time installation #5184
218
-
219
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
3
  Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
+ Tested up to: 5.9.1
7
+ Stable tag: 1.0.77.37
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
197
 
198
  == Changelog ==
199
 
200
+ = 1.0.77.37 (2nd March 2022) =
201
+ * Improvements: Added feedback form with auto email system #5223
202
+ * Improvements: Added new infinite scrolling experience #4791
203
+ * Improvements: Added An option to add lang_ and privacyMode values in Quantcast #5206
204
+ * Improvements: Added FireWork compatibility #5210
205
+ * Fixed: AMP autocomplete tag is not working #5217
206
+ * Fixed: Autoplay functionality not working in video module #5219
207
+ * Fixed: Fonts loading twice in Global font family #5220
208
+ * Fixed: Unable to connect to Matomo analytics #5221
209
+
210
  = 1.0.77.36 (18th February 2022) =
211
  * Fixed: If the server-side cache is aggressive then the pagination URL with ?amp=1 is redirecting to non-AMP #5208
212
  * Fixed: Errror getting in featured-image.php, on line 77 #5207
220
  * Fixed: VKontakte social media not working in social media profile links #5196
221
  * Fixed: PHP Notice: tag_rewrite_rules is deprecated #5197
222
 
 
 
 
 
 
 
223
  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.77.36
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.77.36');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  if(!defined('AMPFROWP_HOST_NAME')){
26
  $urlinfo = get_bloginfo('url');
@@ -640,6 +640,8 @@ if ( ! class_exists( 'Ampforwp_Init', false ) ) {
640
  require_once AMPFORWP_PLUGIN_DIR."includes/features/structure-data/structured-data-functions.php";
641
  require_once AMPFORWP_PLUGIN_DIR."includes/features/notice-bar/notice-bar-functions.php";
642
  require_once AMPFORWP_PLUGIN_DIR."includes/features/push-notification/push-notification-functions.php";
 
 
643
  }
644
  }
645
  }
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.77.37
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.77.37');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  if(!defined('AMPFROWP_HOST_NAME')){
26
  $urlinfo = get_bloginfo('url');
640
  require_once AMPFORWP_PLUGIN_DIR."includes/features/structure-data/structured-data-functions.php";
641
  require_once AMPFORWP_PLUGIN_DIR."includes/features/notice-bar/notice-bar-functions.php";
642
  require_once AMPFORWP_PLUGIN_DIR."includes/features/push-notification/push-notification-functions.php";
643
+ require_once AMPFORWP_PLUGIN_DIR."includes/mb-helper-function.php";
644
+
645
  }
646
  }
647
  }
changelog.txt CHANGED
@@ -1,5 +1,15 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
 
 
3
  = 1.0.77.36 (18th February 2022) =
4
  * Fixed: If the server-side cache is aggressive then the pagination URL with ?amp=1 is redirecting to non-AMP #5208
5
  * Fixed: Errror getting in featured-image.php, on line 77 #5207
1
  == Changelog ==
2
 
3
+ = 1.0.77.37 (2nd March 2022) =
4
+ * Improvements: Added feedback form with auto email system #5223
5
+ * Improvements: Added new infinite scrolling experience #4791
6
+ * Improvements: Added An option to add lang_ and privacyMode values in Quantcast #5206
7
+ * Improvements: Added FireWork compatibility #5210
8
+ * Fixed: AMP autocomplete tag is not working #5217
9
+ * Fixed: Autoplay functionality not working in video module #5219
10
+ * Fixed: Fonts loading twice in Global font family #5220
11
+ * Fixed: Unable to connect to Matomo analytics #5221
12
+
13
  = 1.0.77.36 (18th February 2022) =
14
  * Fixed: If the server-side cache is aggressive then the pagination URL with ?amp=1 is redirecting to non-AMP #5208
15
  * Fixed: Errror getting in featured-image.php, on line 77 #5207
includes/admin-script.js CHANGED
@@ -484,7 +484,6 @@ jQuery(function($) {
484
  selected = 'selected';
485
  }
486
  $('#amp_font_selector-select').append($('<option value="'+ fontDetail +'" data-font-number="'+ i +'" '+ selected +'> '+ fontDetail +' </option>'));
487
- $('#amp_font_selector-select').append($('<option value="'+ fontDetail +'" data-font-number="'+ i +'"> '+ fontDetail +' </option>'));
488
  $('#amp_font_selector_content_single-select').append($('<option value="'+ fontDetail +'" data-font-number="'+ i +'"> '+ fontDetail +' </option>'));
489
  }
490
  $('#amp_font_selector-select').append($('<option value="sans-serif" data-font-number="'+ i +'"> sans-serif </option>'));
484
  selected = 'selected';
485
  }
486
  $('#amp_font_selector-select').append($('<option value="'+ fontDetail +'" data-font-number="'+ i +'" '+ selected +'> '+ fontDetail +' </option>'));
 
487
  $('#amp_font_selector_content_single-select').append($('<option value="'+ fontDetail +'" data-font-number="'+ i +'"> '+ fontDetail +' </option>'));
488
  }
489
  $('#amp_font_selector-select').append($('<option value="sans-serif" data-font-number="'+ i +'"> sans-serif </option>'));
includes/deactivate-feedback.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $reasons = array(
3
+ 1 => '<li><label><input type="radio" name="ampforwp_disable_reason" value="temporary"/>' . esc_html__('It is only temporary', 'accelerated-mobile-pages') . '</label></li>',
4
+ 2 => '<li><label><input type="radio" name="ampforwp_disable_reason" value="stopped showing ads"/>' . esc_html__('I stopped showing ads on my site', 'accelerated-mobile-pages') . '</label></li>',
5
+ 3 => '<li><label><input type="radio" name="ampforwp_disable_reason" value="missing feature"/>' . esc_html__('I miss a feature', 'accelerated-mobile-pages') . '</label></li>
6
+ <li><input type="text" name="ampforwp_disable_text[]" value="" placeholder="Please describe the feature"/></li>',
7
+ 4 => '<li><label><input type="radio" name="ampforwp_disable_reason" value="technical issue"/>' . esc_html__('Technical Issue', 'accelerated-mobile-pages') . '</label></li>
8
+ <li><textarea name="ampforwp_disable_text[]" placeholder="' . esc_html__('Can we help? Please describe your problem', 'accelerated-mobile-pages') . '"></textarea></li>',
9
+ 5 => '<li><label><input type="radio" name="ampforwp_disable_reason" value="other plugin"/>' . esc_html__('I switched to another plugin', 'accelerated-mobile-pages') . '</label></li>
10
+ <li><input type="text" name="ampforwp_disable_text[]" value="" placeholder="Name of the plugin"/></li>',
11
+ 6 => '<li><label><input type="radio" name="ampforwp_disable_reason" value="other"/>' . esc_html__('Other reason', 'accelerated-mobile-pages') . '</label></li>
12
+ <li><textarea name="ampforwp_disable_text[]" placeholder="' . esc_html__('Please specify, if possible', 'accelerated-mobile-pages') . '"></textarea></li>',
13
+ );
14
+ shuffle($reasons);
15
+ ?>
16
+
17
+
18
+ <div id="ampforwp-reloaded-feedback-overlay" style="display: none;">
19
+ <div id="ampforwp-reloaded-feedback-content">
20
+ <form action="" method="post">
21
+ <h3><strong><?php echo esc_html__('If you have a moment, please let us know why you are deactivating:', 'accelerated-mobile-pages'); ?></strong></h3>
22
+ <ul>
23
+ <?php
24
+ foreach ($reasons as $reason){
25
+ echo $reason;
26
+ }
27
+ ?>
28
+ </ul>
29
+ <?php if ($email) : ?>
30
+ <input type="hidden" name="ampforwp_disable_from" value="<?php echo $email; ?>"/>
31
+ <?php endif; ?>
32
+ <input id="ampforwp-reloaded-feedback-submit" class="button button-primary" type="submit" name="ampforwp_disable_submit" value="<?php echo esc_html__('Submit & Deactivate', 'accelerated-mobile-pages'); ?>"/>
33
+ <a class="button"><?php echo esc_html__('Only Deactivate', 'accelerated-mobile-pages'); ?></a>
34
+ <a class="ampforwp-for-wp-feedback-not-deactivate" href="#"><?php echo esc_html__('Don\'t deactivate', 'accelerated-mobile-pages'); ?></a>
35
+ </form>
36
+ </div>
37
+ </div>
includes/features/analytics/analytics-functions.php CHANGED
@@ -134,7 +134,7 @@ function ampforwp_analytics() {
134
  if(isset($_SERVER['HTTP_REFERER'])) {
135
  $referer = $_SERVER['HTTP_REFERER'];
136
  }
137
- $piwik_api = str_replace("YOUR_SITE_ID", '1', $idsite);
138
  $piwik_api = str_replace("TITLE", esc_attr($title), $piwik_api);
139
  $piwik_api = str_replace("DOCUMENT_REFERRER", esc_url($referer), $piwik_api);
140
  $piwik_api = str_replace("CANONICAL_URL", esc_url($url), $piwik_api);
134
  if(isset($_SERVER['HTTP_REFERER'])) {
135
  $referer = $_SERVER['HTTP_REFERER'];
136
  }
137
+ $piwik_api = str_replace("YOUR_SITE_ID", '1', $idsite[0]);
138
  $piwik_api = str_replace("TITLE", esc_attr($title), $piwik_api);
139
  $piwik_api = str_replace("DOCUMENT_REFERRER", esc_url($referer), $piwik_api);
140
  $piwik_api = str_replace("CANONICAL_URL", esc_url($url), $piwik_api);
includes/features/analytics/analytics-options.php CHANGED
@@ -334,7 +334,7 @@ function ampforwp_analytics_options($opt_name){
334
  array(
335
  'id' => 'pa-feild',
336
  'class' => 'child_opt',
337
- 'type' => 'text',
338
  'title' => esc_html__( ' Enter Your Piwik Analytics URL', 'accelerated-mobile-pages' ),
339
  'desc'=>sprintf( 'Example -
340
  https://YOUR_PIWIK_BASE_INSTALLATION_URL/piwik.php?idsite=1&amp;rec=1&amp;
334
  array(
335
  'id' => 'pa-feild',
336
  'class' => 'child_opt',
337
+ 'type' => 'multi_text',
338
  'title' => esc_html__( ' Enter Your Piwik Analytics URL', 'accelerated-mobile-pages' ),
339
  'desc'=>sprintf( 'Example -
340
  https://YOUR_PIWIK_BASE_INSTALLATION_URL/piwik.php?idsite=1&amp;rec=1&amp;
includes/features/notice-bar/notice-bar-options.php CHANGED
@@ -259,6 +259,22 @@ function ampforwp_notice_bar_options($opt_name){
259
  'placeholder'=> 'TestMeOut',
260
  'required' => array('amp-quantcast-notice-switch', '=' , '1'),
261
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
262
  array(
263
  'class' => 'amp-popup-fld',
264
  'id' => 'info_normal_amp_popup',
259
  'placeholder'=> 'TestMeOut',
260
  'required' => array('amp-quantcast-notice-switch', '=' , '1'),
261
  ),
262
+ array(
263
+ 'class' => 'child_opt',
264
+ 'id' =>'amp-quantcast-privacy-mode',
265
+ 'type' => 'text',
266
+ 'title' => esc_html__('Privacy Mode', 'accelerated-mobile-pages'),
267
+ 'placeholder'=> 'GDPR',
268
+ 'required' => array('amp-quantcast-notice-switch', '=' , '1'),
269
+ ),
270
+ array(
271
+ 'class' => 'child_opt',
272
+ 'id' =>'amp-quantcast-lang',
273
+ 'type' => 'text',
274
+ 'title' => esc_html__('Language', 'accelerated-mobile-pages'),
275
+ 'placeholder'=> 'en',
276
+ 'required' => array('amp-quantcast-notice-switch', '=' , '1'),
277
+ ),
278
  array(
279
  'class' => 'amp-popup-fld',
280
  'id' => 'info_normal_amp_popup',
includes/features/performance/performance-functions.php CHANGED
@@ -88,6 +88,9 @@ function ampforwp_minify_html_output($content_buffer){
88
  if (function_exists('qoxag_setup')) {
89
  $content_buffer = preg_replace('/<link rel="stylesheet"(.*?)href="(.*?).css">/', '', $content_buffer);
90
  }
 
 
 
91
  global $redux_builder_amp;
92
  if(!$redux_builder_amp['ampforwp_cache_minimize_mode']){
93
  return $content_buffer;
88
  if (function_exists('qoxag_setup')) {
89
  $content_buffer = preg_replace('/<link rel="stylesheet"(.*?)href="(.*?).css">/', '', $content_buffer);
90
  }
91
+ if(preg_match('/<fw-embed-feed(.*?)<\/fw-embed-feed>/', $content_buffer)){
92
+ $content_buffer = preg_replace('/<fw-embed-feed(.*?)<\/fw-embed-feed>/', '', $content_buffer);
93
+ }
94
  global $redux_builder_amp;
95
  if(!$redux_builder_amp['ampforwp_cache_minimize_mode']){
96
  return $content_buffer;
includes/make-better-admin.css ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* makebetter admin css*/
2
+
3
+ /**
4
+ PLUGINS ADMIN PAGE
5
+ */
6
+ #ampforwp-reloaded-feedback-overlay {
7
+ /* Height & width depends on how you want to reveal the overlay (see JS below) */
8
+ height: 100%;
9
+ width: 100%;
10
+ position: fixed; /* Stay in place */
11
+ z-index: 10000; /* Sit on top */
12
+ left: 0;
13
+ top: 0;
14
+ background-color: rgb(120,120,120); /* Black fallback color */
15
+ background-color: rgba(0,0,0, 0.5); /* Black w/opacity */
16
+ }
17
+ #ampforwp-reloaded-feedback-content {
18
+ position: relative;
19
+ top: 25%; /* 25% from the top */
20
+ width: 500px;
21
+ max-width: 100%;
22
+ margin: auto;
23
+ margin-top: 30px; /* 30px top margin to avoid conflict with the close button on smaller screens */
24
+ max-height: 50%;
25
+ padding: 20px;
26
+ background-color: #fff;
27
+ overflow-y: auto;
28
+ }
29
+ #ampforwp-reloaded-feedback-content textarea,
30
+ #ampforwp-reloaded-feedback-content input[type="text"] { display:none;width:100%; }
31
+ .ampforwp-for-wp-feedback-not-deactivate { display: block; text-align: right; }
32
+
33
+ #ampforwp-reloaded-feedback-content h3{
34
+ margin:5px;
35
+ }
36
+
37
+ @media screen and (max-width:400px){
38
+ #ampforwp-reloaded-feedback-content {
39
+ padding:0px;
40
+ padding-bottom:50px;
41
+ }
42
+ }
includes/make-better-admin.js ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var strict;
2
+
3
+ jQuery(document).ready(function ($) {
4
+ /**
5
+ * DEACTIVATION FEEDBACK FORM
6
+ */
7
+ // show overlay when clicked on "deactivate"
8
+ ampforwp_deactivate_link = $('.wp-admin.plugins-php tr[data-slug="accelerated-mobile-pages"] .row-actions .deactivate a');
9
+ ampforwp_deactivate_link_url = ampforwp_deactivate_link.attr('href');
10
+
11
+ ampforwp_deactivate_link.click(function (e) {
12
+ e.preventDefault();
13
+
14
+ // only show feedback form once per 30 days
15
+ var c_value = ampforwp_admin_get_cookie("ampforwp_hide_deactivate_feedback");
16
+
17
+ if (c_value === undefined) {
18
+ $('#ampforwp-reloaded-feedback-overlay').show();
19
+ } else {
20
+ // click on the link
21
+ window.location.href = ampforwp_deactivate_link_url;
22
+ }
23
+ });
24
+ // show text fields
25
+ $('#ampforwp-reloaded-feedback-content input[type="radio"]').click(function () {
26
+ // show text field if there is one
27
+ $(this).parents('li').next('li').children('input[type="text"], textarea').show();
28
+ });
29
+ // send form or close it
30
+ $('#ampforwp-reloaded-feedback-content .button').click(function (e) {
31
+ e.preventDefault();
32
+ // set cookie for 30 days
33
+ var exdate = new Date();
34
+ exdate.setSeconds(exdate.getSeconds() + 2592000);
35
+ document.cookie = "ampforwp_hide_deactivate_feedback=1; expires=" + exdate.toUTCString() + "; path=/";
36
+
37
+ $('#ampforwp-reloaded-feedback-overlay').hide();
38
+ if ('ampforwp-reloaded-feedback-submit' === this.id) {
39
+ // Send form data
40
+ $.ajax({
41
+ type: 'POST',
42
+ url: ajaxurl,
43
+ dataType: 'json',
44
+ data: {
45
+ action: 'ampforwp_send_feedback',
46
+ data: $('#ampforwp-reloaded-feedback-content form').serialize()
47
+ },
48
+ complete: function (MLHttpRequest, textStatus, errorThrown) {
49
+ // deactivate the plugin and close the popup
50
+ $('#ampforwp-reloaded-feedback-overlay').remove();
51
+ window.location.href = ampforwp_deactivate_link_url;
52
+
53
+ }
54
+ });
55
+ } else {
56
+ $('#ampforwp-reloaded-feedback-overlay').remove();
57
+ window.location.href = ampforwp_deactivate_link_url;
58
+ }
59
+ });
60
+ // close form without doing anything
61
+ $('.ampforwp-for-wp-feedback-not-deactivate').click(function (e) {
62
+ $('#ampforwp-reloaded-feedback-overlay').hide();
63
+ });
64
+
65
+ function ampforwp_admin_get_cookie (name) {
66
+ var i, x, y, ampforwp_cookies = document.cookie.split( ";" );
67
+ for (i = 0; i < ampforwp_cookies.length; i++)
68
+ {
69
+ x = ampforwp_cookies[i].substr( 0, ampforwp_cookies[i].indexOf( "=" ) );
70
+ y = ampforwp_cookies[i].substr( ampforwp_cookies[i].indexOf( "=" ) + 1 );
71
+ x = x.replace( /^\s+|\s+$/g, "" );
72
+ if (x === name)
73
+ {
74
+ return unescape( y );
75
+ }
76
+ }
77
+ }
78
+
79
+ }); // document ready
includes/mb-helper-function.php ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ // Exit if accessed directly
5
+ if( !defined( 'ABSPATH' ) )
6
+ exit;
7
+
8
+ /**
9
+ * Helper method to check if user is in the plugins page.
10
+ *
11
+ * @author
12
+ * @since 1.4.0
13
+ *
14
+ * @return bool
15
+ */
16
+ function ampforwp_is_plugins_page() {
17
+ global $pagenow;
18
+
19
+ return ( 'plugins.php' === $pagenow );
20
+ }
21
+
22
+ /**
23
+ * display deactivation logic on plugins page
24
+ *
25
+ * @since 1.4.0
26
+ */
27
+
28
+
29
+ function ampforwp_add_deactivation_feedback_modal() {
30
+
31
+
32
+ if( !is_admin() && !ampforwp_is_plugins_page()) {
33
+ return;
34
+ }
35
+
36
+ $current_user = wp_get_current_user();
37
+ if( !($current_user instanceof WP_User) ) {
38
+ $email = '';
39
+ } else {
40
+ $email = trim( $current_user->user_email );
41
+ }
42
+
43
+ require_once AMPFORWP_PLUGIN_DIR."/includes/deactivate-feedback.php";
44
+
45
+ }
46
+
47
+ /**
48
+ * send feedback via email
49
+ *
50
+ * @since 1.4.0
51
+ */
52
+ function ampforwp_send_feedback() {
53
+
54
+ if( isset( $_POST['data'] ) ) {
55
+ parse_str( $_POST['data'], $form );
56
+ }
57
+
58
+ $text = '';
59
+ if( isset( $form['ampforwp_disable_text'] ) ) {
60
+ $text = implode( "\n\r", $form['ampforwp_disable_text'] );
61
+ }
62
+
63
+ $headers = array();
64
+
65
+ $from = isset( $form['ampforwp_disable_from'] ) ? $form['ampforwp_disable_from'] : '';
66
+ if( $from ) {
67
+ $headers[] = "From: $from";
68
+ $headers[] = "Reply-To: $from";
69
+ }
70
+
71
+ $subject = isset( $form['ampforwp_disable_reason'] ) ? $form['ampforwp_disable_reason'] : '(no reason given)';
72
+
73
+ if($subject == 'technical issue'){
74
+
75
+ $text = trim($text);
76
+
77
+ if(!empty($text)){
78
+
79
+ $text = 'technical issue description: '.$text;
80
+
81
+ }else{
82
+
83
+ $text = 'no description: '.$text;
84
+ }
85
+
86
+ }
87
+
88
+ $success = wp_mail( 'makebetter@magazine3.in', $subject, $text, $headers );
89
+
90
+ die();
91
+ }
92
+ add_action( 'wp_ajax_ampforwp_send_feedback', 'ampforwp_send_feedback' );
93
+
94
+
95
+
96
+ add_action( 'admin_enqueue_scripts', 'ampforwp_enqueue_makebetter_email_js' );
97
+
98
+ function ampforwp_enqueue_makebetter_email_js(){
99
+
100
+ if( !is_admin() && !ampforwp_is_plugins_page()) {
101
+ return;
102
+ }
103
+
104
+ wp_enqueue_script( 'ampforwp-make-better-js', AMPFORWP_PLUGIN_DIR_URI . 'includes/make-better-admin.js', array( 'jquery' ), AMPFORWP_VERSION);
105
+
106
+ wp_enqueue_style( 'ampforwp-make-better-css', AMPFORWP_PLUGIN_DIR_URI . 'includes/make-better-admin.css', false , AMPFORWP_VERSION);
107
+ }
108
+
109
+ if( is_admin() && ampforwp_is_plugins_page()) {
110
+ add_filter('admin_footer', 'ampforwp_add_deactivation_feedback_modal');
111
+ }
112
+
113
+
includes/options/redux-core/assets/css/redux-admin.css CHANGED
@@ -1574,4 +1574,7 @@ div#\34_section_group.amp-ads .redux-section-desc {
1574
  }
1575
  table#section-table-amp-ads_0 {
1576
  border-color: #ff4954;
 
 
 
1577
  }
1574
  }
1575
  table#section-table-amp-ads_0 {
1576
  border-color: #ff4954;
1577
+ }
1578
+ #pa-feild-ul a.deletion.redux-multi-text-remove , #redux_builder_amp-pa-feild a.button.button-primary.redux-multi-text-add{
1579
+ display: none;
1580
  }
includes/vendor/amp/includes/sanitizers/class-amp-allowed-tags-generated.php CHANGED
@@ -482,6 +482,59 @@ class AMP_Allowed_Tags_Generated {
482
  ),
483
  ),
484
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
485
  'amp-beopinion' => array(
486
  array(
487
  'attr_spec_list' => array(
482
  ),
483
  ),
484
  ),
485
+ 'amp-autocomplete' => array(
486
+ array(
487
+ 'attr_spec_list' => array(
488
+ 'data-amp-bind-src' => array(),
489
+ 'filter' => array(
490
+ 'mandatory' => true,
491
+ ),
492
+ 'filter-expr' => array(
493
+ 'requires_extension' => array(
494
+ 'amp-bind',
495
+ ),
496
+ ),
497
+ 'filter-value' => array(),
498
+ 'highlight-user-entry' => array(),
499
+ 'inline' => array(),
500
+ 'items' => array(),
501
+ 'max-entries' => array(),
502
+ 'max-items' => array(),
503
+ 'media' => array(),
504
+ 'min-characters' => array(),
505
+ 'noloading' => array(
506
+ 'value' => array(
507
+ '',
508
+ ),
509
+ ),
510
+ 'prefetch' => array(),
511
+ 'query' => array(),
512
+ 'src' => array(
513
+ 'value_url' => array(
514
+ 'allow_relative' => true,
515
+ 'protocol' => array(
516
+ 'https',
517
+ ),
518
+ ),
519
+ ),
520
+ 'submit-on-enter' => array(),
521
+ 'suggest-first' => array(),
522
+ 'template' => array(),
523
+ ),
524
+ 'tag_spec' => array(
525
+ 'amp_layout' => array(
526
+ 'supported_layouts' => array(
527
+ 5,
528
+ ),
529
+ ),
530
+ 'requires_extension' => array(
531
+ 'amp-autocomplete',
532
+ ),
533
+ 'spec_name' => 'amp-autocomplete',
534
+ 'spec_url' => 'https://amp.dev/documentation/components/amp-autocomplete/',
535
+ ),
536
+ ),
537
+ ),
538
  'amp-beopinion' => array(
539
  array(
540
  'attr_spec_list' => array(
pagebuilder/modules/video-module.php CHANGED
@@ -23,6 +23,7 @@ $output = '
23
  <amp-youtube {{if_id}}id="{{id}}"{{ifend_id}}
24
  data-videoid="{{youtube_video_id}}"
25
  {{if_condition_hide_rel_video==1}} data-param-rel="0" {{ifend_condition_hide_rel_video_1}}
 
26
  layout="responsive"
27
  width="{{width}}" height="{{height}}"></amp-youtube>
28
  {{ifend_condition_video_option_youtube}}
@@ -116,6 +117,20 @@ return array(
116
  'video_option'=>'youtube',
117
  ),
118
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  array(
120
  'type' =>'checkbox_bool',
121
  'name' =>"hide_rel_video",
23
  <amp-youtube {{if_id}}id="{{id}}"{{ifend_id}}
24
  data-videoid="{{youtube_video_id}}"
25
  {{if_condition_hide_rel_video==1}} data-param-rel="0" {{ifend_condition_hide_rel_video_1}}
26
+ {{if_condition_autoplay_video==1}} autoplay {{ifend_condition_autoplay_video_1}}
27
  layout="responsive"
28
  width="{{width}}" height="{{height}}"></amp-youtube>
29
  {{ifend_condition_video_option_youtube}}
117
  'video_option'=>'youtube',
118
  ),
119
  ),
120
+ array(
121
+ 'type' =>'checkbox_bool',
122
+ 'name' =>"autoplay_video",
123
+ 'label' =>'Autoplay',
124
+ 'tab' =>'customizer',
125
+ 'default' =>1,
126
+ 'options' =>array(
127
+ array(
128
+ 'value'=>1,
129
+ ),
130
+ ),
131
+ 'content_type'=>'html',
132
+ 'required' => array('video_option'=>'youtube'),
133
+ ),
134
  array(
135
  'type' =>'checkbox_bool',
136
  'name' =>"hide_rel_video",
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: mohammed_kaludi, ahmedkaludi, ampforwp
3
  Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
- Tested up to: 5.9
7
- Stable tag: 1.0.77.36
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -33,7 +33,7 @@ Bug reports for AMP for WP are [welcomed on GitHub](https://github.com/ahmedkalu
33
  * NEW - Google PageSpeed Optimization with SSR (Server Side Rendering)
34
  * NEW - CSS Optimization (Tree Shaking) - This will automatically remove all the unused CSS from your AMP pages
35
  * NEW - Google Font API and Local Fonts Support For All Designs
36
- * Out of the box compatiblity for Yoast SEO, All in One Seo, Rank Math, Genesis, SEOPress, Bridge Qode SEO, The SEO Framework, SmartCrawl and Squrilly SEO Plugin.
37
  * Introducing Page Builder 3.0 for AMP! [Learn More & Video](https://ampforwp.com/tutorials/article/amp-page-builder-installation/)
38
  * New Default Theme for AMP called Swift
39
  * 3 Pre-built AMP Layouts for Business websites and landing pages
@@ -194,6 +194,16 @@ You can contact us from [here](https://ampforwp.com/contact/)
194
 
195
  == Changelog ==
196
 
 
 
 
 
 
 
 
 
 
 
197
  = 1.0.77.36 (18th February 2022) =
198
  * Fixed: If the server-side cache is aggressive then the pagination URL with ?amp=1 is redirecting to non-AMP #5208
199
  * Fixed: Errror getting in featured-image.php, on line 77 #5207
@@ -207,10 +217,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
207
  * Fixed: VKontakte social media not working in social media profile links #5196
208
  * Fixed: PHP Notice: tag_rewrite_rules is deprecated #5197
209
 
210
- = 1.0.77.34 (11th January 2022) =
211
- * Fixed: External stylesheet Errors using Vinkmag theme #5189
212
- * Fixed: AMP Takeover functionality is not working on the blog posts #5188
213
- * Fixed: Replace webvitalsdev to Microwork #5183
214
- * Fixed: Wrong Notice for first time installation #5184
215
-
216
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
3
  Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
+ Tested up to: 5.9.1
7
+ Stable tag: 1.0.77.37
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
33
  * NEW - Google PageSpeed Optimization with SSR (Server Side Rendering)
34
  * NEW - CSS Optimization (Tree Shaking) - This will automatically remove all the unused CSS from your AMP pages
35
  * NEW - Google Font API and Local Fonts Support For All Designs
36
+ * Out of the box compatibility for Yoast SEO, All in One Seo, Rank Math, Genesis, SEOPress, Bridge Qode SEO, The SEO Framework, SmartCrawl and Squrilly SEO Plugin.
37
  * Introducing Page Builder 3.0 for AMP! [Learn More & Video](https://ampforwp.com/tutorials/article/amp-page-builder-installation/)
38
  * New Default Theme for AMP called Swift
39
  * 3 Pre-built AMP Layouts for Business websites and landing pages
194
 
195
  == Changelog ==
196
 
197
+ = 1.0.77.37 (2nd March 2022) =
198
+ * Improvements: Added feedback form with auto email system #5223
199
+ * Improvements: Added new infinite scrolling experience #4791
200
+ * Improvements: Added An option to add lang_ and privacyMode values in Quantcast #5206
201
+ * Improvements: Added FireWork compatibility #5210
202
+ * Fixed: AMP autocomplete tag is not working #5217
203
+ * Fixed: Autoplay functionality not working in video module #5219
204
+ * Fixed: Fonts loading twice in Global font family #5220
205
+ * Fixed: Unable to connect to Matomo analytics #5221
206
+
207
  = 1.0.77.36 (18th February 2022) =
208
  * Fixed: If the server-side cache is aggressive then the pagination URL with ?amp=1 is redirecting to non-AMP #5208
209
  * Fixed: Errror getting in featured-image.php, on line 77 #5207
217
  * Fixed: VKontakte social media not working in social media profile links #5196
218
  * Fixed: PHP Notice: tag_rewrite_rules is deprecated #5197
219
 
 
 
 
 
 
 
220
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
templates/features.php CHANGED
@@ -2399,6 +2399,15 @@ function ampforwp_footer_html_output() {
2399
  $hashcode = ampforwp_get_setting('amp-quantcast-hashcode');
2400
  $country = ampforwp_get_setting('amp-quantcast-publishercountrycode');
2401
  $name = ampforwp_get_setting('amp-quantcast-publishername');
 
 
 
 
 
 
 
 
 
2402
  if (!empty($id) && !empty($hashcode) && !empty($country) && !empty($name) ) {?>
2403
  <amp-consent id="quantcast" layout="nodisplay">
2404
  <script type="application/json">
@@ -2410,7 +2419,7 @@ function ampforwp_footer_html_output() {
2410
  "clientConfig": {
2411
  "coreConfig": {
2412
  "quantcastAccountId": "<?php echo esc_html($id); ?>",
2413
- "privacyMode": ["GDPR"],
2414
  "hashCode": "<?php echo esc_html($hashcode); ?>",
2415
  "publisherCountryCode": "<?php echo esc_html($country); ?>",
2416
  "publisherName": "<?php echo esc_html($name); ?>",
@@ -2420,7 +2429,7 @@ function ampforwp_footer_html_output() {
2420
  "vendorSpecialFeaturesIds": [1, 2],
2421
  "vendorSpecialPurposesIds": [1, 2],
2422
  "googleEnabled": false,
2423
- "lang_": "en",
2424
  "displayUi": "always",
2425
  "publisherConsentRestrictionIds": [],
2426
  "publisherLIRestrictionIds": [],
2399
  $hashcode = ampforwp_get_setting('amp-quantcast-hashcode');
2400
  $country = ampforwp_get_setting('amp-quantcast-publishercountrycode');
2401
  $name = ampforwp_get_setting('amp-quantcast-publishername');
2402
+ $privacy = ampforwp_get_setting('amp-quantcast-privacy-mode');
2403
+ $lang = ampforwp_get_setting('amp-quantcast-lang');
2404
+ if (empty($privacy)) {
2405
+ $privacy = 'GDPR';
2406
+ }
2407
+ if (empty($lang)) {
2408
+ $lang = 'en';
2409
+ }
2410
+
2411
  if (!empty($id) && !empty($hashcode) && !empty($country) && !empty($name) ) {?>
2412
  <amp-consent id="quantcast" layout="nodisplay">
2413
  <script type="application/json">
2419
  "clientConfig": {
2420
  "coreConfig": {
2421
  "quantcastAccountId": "<?php echo esc_html($id); ?>",
2422
+ "privacyMode": ["<?php echo esc_html($privacy); ?>"],
2423
  "hashCode": "<?php echo esc_html($hashcode); ?>",
2424
  "publisherCountryCode": "<?php echo esc_html($country); ?>",
2425
  "publisherName": "<?php echo esc_html($name); ?>",
2429
  "vendorSpecialFeaturesIds": [1, 2],
2430
  "vendorSpecialPurposesIds": [1, 2],
2431
  "googleEnabled": false,
2432
+ "lang_": "<?php echo esc_html($lang); ?>",
2433
  "displayUi": "always",
2434
  "publisherConsentRestrictionIds": [],
2435
  "publisherLIRestrictionIds": [],