AMP for WP – Accelerated Mobile Pages - Version 1.0.66.1

Version Description

(26th October 2020) = * Fixed: Validation error due to amp-web-push AMP component script #4796 * Fixed: Validation error due to amp-fx-flying-carpet AMP component script #4794

Download this release

Release Info

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

Code changes from version 1.0.66 to 1.0.66.1

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.5
7
- Stable tag: 1.0.66
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -193,6 +193,10 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
193
 
194
  == Changelog ==
195
 
 
 
 
 
196
  = 1.0.66 (24th October 2020) =
197
  * Improvement: Added filter to modify GDPR popup output #4778
198
  * Improvement: Added Polylang string transaltion support #4784
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.5
7
+ Stable tag: 1.0.66.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
193
 
194
  == Changelog ==
195
 
196
+ = 1.0.66.1 (26th October 2020) =
197
+ * Fixed: Validation error due to amp-web-push AMP component script #4796
198
+ * Fixed: Validation error due to amp-fx-flying-carpet AMP component script #4794
199
+
200
  = 1.0.66 (24th October 2020) =
201
  * Improvement: Added filter to modify GDPR popup output #4778
202
  * Improvement: Added Polylang string transaltion support #4784
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.66
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.66');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  if(!defined('AMPFROWP_HOST_NAME')){
26
  $urlinfo = get_bloginfo('url');
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.66.1
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.66.1');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  if(!defined('AMPFROWP_HOST_NAME')){
26
  $urlinfo = get_bloginfo('url');
changelog.txt CHANGED
@@ -1,5 +1,9 @@
1
  == Changelog ==
2
 
 
 
 
 
3
  = 1.0.66 (24th October 2020) =
4
  * Improvement: Added filter to modify GDPR popup output #4778
5
  * Improvement: Added Polylang string transaltion support #4784
1
  == Changelog ==
2
 
3
+ = 1.0.66.1 (26th October 2020) =
4
+ * Fixed: Validation error due to amp-web-push AMP component script #4796
5
+ * Fixed: Validation error due to amp-fx-flying-carpet AMP component script #4794
6
+
7
  = 1.0.66 (24th October 2020) =
8
  * Improvement: Added filter to modify GDPR popup output #4778
9
  * Improvement: Added Polylang string transaltion support #4784
includes/features/push-notification/push-notification-functions.php CHANGED
@@ -261,7 +261,7 @@ function ampforwp_truepush_styling(){?>
261
  }
262
  <?php }
263
  function ampforwp_truepush_markup(){
264
- if (!checkAMPforPageBuilderStatus(get_the_ID()) && is_single()) {?>
265
  <amp-web-push-widget visibility="unsubscribed" layout="fixed" width="250" height="45">
266
  <button on="tap:amp-web-push.subscribe" class="amp-subscribe"><?php echo ampforwp_translation( ampforwp_get_setting('ampforwp-truepush-translator-subscribe'), 'Subscribe to updates' ); ?></button>
267
  </amp-web-push-widget>
261
  }
262
  <?php }
263
  function ampforwp_truepush_markup(){
264
+ if (!checkAMPforPageBuilderStatus(get_the_ID()) && is_single() && '4' == ampforwp_get_setting('ampforwp-web-push')) {?>
265
  <amp-web-push-widget visibility="unsubscribed" layout="fixed" width="250" height="45">
266
  <button on="tap:amp-web-push.subscribe" class="amp-subscribe"><?php echo ampforwp_translation( ampforwp_get_setting('ampforwp-truepush-translator-subscribe'), 'Subscribe to updates' ); ?></button>
267
  </amp-web-push-widget>
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.5
7
- Stable tag: 1.0.66
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -190,6 +190,10 @@ You can contact us from [here](https://ampforwp.com/contact/)
190
 
191
  == Changelog ==
192
 
 
 
 
 
193
  = 1.0.66 (24th October 2020) =
194
  * Improvement: Added filter to modify GDPR popup output #4778
195
  * Improvement: Added Polylang string transaltion support #4784
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.5
7
+ Stable tag: 1.0.66.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
190
 
191
  == Changelog ==
192
 
193
+ = 1.0.66.1 (26th October 2020) =
194
+ * Fixed: Validation error due to amp-web-push AMP component script #4796
195
+ * Fixed: Validation error due to amp-fx-flying-carpet AMP component script #4794
196
+
197
  = 1.0.66 (24th October 2020) =
198
  * Improvement: Added filter to modify GDPR popup output #4778
199
  * Improvement: Added Polylang string transaltion support #4784
templates/features.php CHANGED
@@ -8330,7 +8330,7 @@ function ampforwp_include_required_scripts($content){
8330
  }
8331
  }
8332
  //OTHER COMPONENT CHECK
8333
- $other_comp_arr = array('amp-mustache'=>'amp-mustache','amp-embed'=>'amp-ad','form'=>'amp-form','amp-access'=>'amp-access','amp-fx'=>'amp-fx-collection','amp-story-player'=>'amp-story-player');
8334
  foreach ($other_comp_arr as $key => $value) {
8335
  $ocomp = $value;
8336
  $celem = 'element';
@@ -8946,4 +8946,11 @@ function ampforwp_amp_bind_script($data) {
8946
  $data['amp_component_scripts']['amp-bind'] = 'https://cdn.ampproject.org/v0/amp-bind-latest.js';
8947
  }
8948
  return $data;
8949
- }
 
 
 
 
 
 
 
8330
  }
8331
  }
8332
  //OTHER COMPONENT CHECK
8333
+ $other_comp_arr = array('amp-mustache'=>'amp-mustache','amp-embed'=>'amp-ad','form'=>'amp-form','amp-access'=>'amp-access','amp-fx'=>'amp-fx-collection');
8334
  foreach ($other_comp_arr as $key => $value) {
8335
  $ocomp = $value;
8336
  $celem = 'element';
8946
  $data['amp_component_scripts']['amp-bind'] = 'https://cdn.ampproject.org/v0/amp-bind-latest.js';
8947
  }
8948
  return $data;
8949
+ }
8950
+ add_filter('ampforwp_post_template_data','ampforwp_amp_story_player_script');
8951
+ function ampforwp_amp_story_player_script($data) {
8952
+ if ( empty( $data['amp_component_scripts']['amp-story-player'] ) ) {
8953
+ $data['amp_component_scripts']['amp-story-player'] = 'https://cdn.ampproject.org/v0/amp-story-player-latest.js';
8954
+ }
8955
+ return $data;
8956
+ }