AMP for WP – Accelerated Mobile Pages - Version 1.0.77.13

Version Description

(16th July 2021) = * Fixed: FooGallery plugin not working with AMP #5090 * Fixed: Console error when Back to Top link option is enabled #5091 * Fixed: Exclude Categories is not working #5088 * Fixed: Long word post title not breaking in mobile view #5092

Download this release

Release Info

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

Code changes from version 1.0.77.12 to 1.0.77.13

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.8
7
- Stable tag: 1.0.77.12
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -197,6 +197,12 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
197
 
198
  == Changelog ==
199
 
 
 
 
 
 
 
200
  = 1.0.77.12 (12th July 2021) =
201
  * Fixed: Exclude categories loop not working #5088
202
  * Fixed: Endpoint '?amp' not working with plain permalink #5087
@@ -207,9 +213,4 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
207
  * Fixed: Removed the percentage symbol beside AMP icon in dashboard #5082
208
  * Fixed: Gallery thumbnail image improved #5003
209
 
210
- = 1.0.77.10 (5th July 2021) =
211
- * Improvements: Unused CSS and Scripts are removed in AMP Optimizer (SSR) #5070
212
- * Improvements: Added data-hero attribute in AMP logo #5083
213
- * Fixed: Webp images not appearing with Litespeed cache #5081
214
-
215
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.8
7
+ Stable tag: 1.0.77.13
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.13 (16th July 2021) =
201
+ * Fixed: FooGallery plugin not working with AMP #5090
202
+ * Fixed: Console error when Back to Top link option is enabled #5091
203
+ * Fixed: Exclude Categories is not working #5088
204
+ * Fixed: Long word post title not breaking in mobile view #5092
205
+
206
  = 1.0.77.12 (12th July 2021) =
207
  * Fixed: Exclude categories loop not working #5088
208
  * Fixed: Endpoint '?amp' not working with plain permalink #5087
213
  * Fixed: Removed the percentage symbol beside AMP icon in dashboard #5082
214
  * Fixed: Gallery thumbnail image improved #5003
215
 
 
 
 
 
 
216
  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.12
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.12');
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.77.13
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.13');
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,11 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
3
  = 1.0.77.12 (12th July 2021) =
4
  * Fixed: Exclude categories loop not working #5088
5
  * Fixed: Endpoint '?amp' not working with plain permalink #5087
1
  == Changelog ==
2
 
3
+ = 1.0.77.13 (16th July 2021) =
4
+ * Fixed: FooGallery plugin not working with AMP #5090
5
+ * Fixed: Console error when Back to Top link option is enabled #5091
6
+ * Fixed: Exclude Categories is not working #5088
7
+ * Fixed: Long word post title not breaking in mobile view #5092
8
+
9
  = 1.0.77.12 (12th July 2021) =
10
  * Fixed: Exclude categories loop not working #5088
11
  * Fixed: Endpoint '?amp' not working with plain permalink #5087
components/components-core.php CHANGED
@@ -683,6 +683,10 @@ function ampforwp_backtotop_global_css(){?>
683
  amp-call-tracking a {display: none;}
684
  @media only screen and (max-width: 480px) {
685
  svg {max-width: 250px;max-height: 250px;}
 
 
 
 
686
  }
687
  <?php if (function_exists('wp_pagenavi')) {?>
688
  .wp-pagenavi {
683
  amp-call-tracking a {display: none;}
684
  @media only screen and (max-width: 480px) {
685
  svg {max-width: 250px;max-height: 250px;}
686
+ }
687
+ h2.amp-post-title {
688
+ word-break: break-word;
689
+ word-wrap: break-word;
690
  }
691
  <?php if (function_exists('wp_pagenavi')) {?>
692
  .wp-pagenavi {
includes/features/functions.php CHANGED
@@ -101,7 +101,7 @@ function ampforwp_add_admin_styling($hook_suffix){
101
  $redux_data = apply_filters("ampforwp_custom_localize_data", $redux_data);
102
  wp_localize_script( 'ampforwp_admin_js', 'redux_data', $redux_data );
103
  $ampforwp_nonce = wp_create_nonce( 'ampforwp-verify-request' );
104
- wp_localize_script( 'ampforwp_admin_js', 'ampforwp_nonce', $ampforwp_nonce );
105
  wp_enqueue_script( 'wp-color-picker' );
106
  wp_enqueue_script( 'ampforwp_admin_js' );
107
  }
101
  $redux_data = apply_filters("ampforwp_custom_localize_data", $redux_data);
102
  wp_localize_script( 'ampforwp_admin_js', 'redux_data', $redux_data );
103
  $ampforwp_nonce = wp_create_nonce( 'ampforwp-verify-request' );
104
+ wp_localize_script( 'ampforwp_admin_js', 'ampforwp_nonce', array($ampforwp_nonce) );
105
  wp_enqueue_script( 'wp-color-picker' );
106
  wp_enqueue_script( 'ampforwp_admin_js' );
107
  }
includes/vendor/amp/includes/sanitizers/class-amp-img-sanitizer.php CHANGED
@@ -44,7 +44,7 @@ class AMP_Img_Sanitizer extends AMP_Base_Sanitizer {
44
  // Add Foo Gallery Support
45
  if ( $node->hasAttribute( 'data-src-fg' ) ) {
46
  $image_scr_from_data_src = $node->getAttribute( 'data-src-fg' ) ;
47
- if ( ! $node->hasAttribute( 'src' ) || '' === $node->getAttribute( 'src' ) ) {
48
  $node->setAttribute( 'src', $image_scr_from_data_src );
49
  }
50
  }
44
  // Add Foo Gallery Support
45
  if ( $node->hasAttribute( 'data-src-fg' ) ) {
46
  $image_scr_from_data_src = $node->getAttribute( 'data-src-fg' ) ;
47
+ if ( ! $node->hasAttribute( 'src' ) || '' === $node->getAttribute( 'src' ) || strpos($node->getAttribute( 'src' ), 'data:image') !== false ) {
48
  $node->setAttribute( 'src', $image_scr_from_data_src );
49
  }
50
  }
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.8
7
- Stable tag: 1.0.77.12
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -194,6 +194,12 @@ You can contact us from [here](https://ampforwp.com/contact/)
194
 
195
  == Changelog ==
196
 
 
 
 
 
 
 
197
  = 1.0.77.12 (12th July 2021) =
198
  * Fixed: Exclude categories loop not working #5088
199
  * Fixed: Endpoint '?amp' not working with plain permalink #5087
@@ -204,9 +210,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
204
  * Fixed: Removed the percentage symbol beside AMP icon in dashboard #5082
205
  * Fixed: Gallery thumbnail image improved #5003
206
 
207
- = 1.0.77.10 (5th July 2021) =
208
- * Improvements: Unused CSS and Scripts are removed in AMP Optimizer (SSR) #5070
209
- * Improvements: Added data-hero attribute in AMP logo #5083
210
- * Fixed: Webp images not appearing with Litespeed cache #5081
211
-
212
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.8
7
+ Stable tag: 1.0.77.13
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.77.13 (16th July 2021) =
198
+ * Fixed: FooGallery plugin not working with AMP #5090
199
+ * Fixed: Console error when Back to Top link option is enabled #5091
200
+ * Fixed: Exclude Categories is not working #5088
201
+ * Fixed: Long word post title not breaking in mobile view #5092
202
+
203
  = 1.0.77.12 (12th July 2021) =
204
  * Fixed: Exclude categories loop not working #5088
205
  * Fixed: Endpoint '?amp' not working with plain permalink #5087
210
  * Fixed: Removed the percentage symbol beside AMP icon in dashboard #5082
211
  * Fixed: Gallery thumbnail image improved #5003
212
 
 
 
 
 
 
213
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
templates/features.php CHANGED
@@ -6853,14 +6853,8 @@ function ampforwp_check_excerpt(){
6853
  // Back to top
6854
  add_action( 'ampforwp_body_beginning' ,'ampforwp_back_to_top_markup');
6855
  function ampforwp_back_to_top_markup(){
6856
- global $redux_builder_amp;
6857
  if(true == ampforwp_get_setting('ampforwp-footer-top')){
6858
- echo '<div id="backtotop"></div>
6859
- <div id="marker">
6860
- <amp-position-observer on="enter:hideAnim.start; exit:showAnim.start"
6861
- layout="nodisplay">
6862
- </amp-position-observer>
6863
- </div>';
6864
  }
6865
  }
6866
 
@@ -7054,7 +7048,8 @@ add_action('upload_mimes', 'ampforwp_upload_svg');
7054
  // Ajax functions
7055
  add_action( 'wp_ajax_ampforwp_categories', 'ampforwp_ajax_cats' );
7056
  function ampforwp_ajax_cats(){
7057
- if(!wp_verify_nonce($_GET['security'],'ampforwp-verify-request') ){
 
7058
  echo json_encode(array('status'=>403,'message'=>'user request is not allowed')) ;
7059
  die;
7060
  }
@@ -7070,7 +7065,8 @@ function ampforwp_ajax_cats(){
7070
  }
7071
  add_action( 'wp_ajax_ampforwp_tags', 'ampforwp_ajax_tags' );
7072
  function ampforwp_ajax_tags(){
7073
- if(!wp_verify_nonce($_GET['security'],'ampforwp-verify-request') ){
 
7074
  echo json_encode(array('status'=>403,'message'=>'user request is not allowed')) ;
7075
  die;
7076
  }
6853
  // Back to top
6854
  add_action( 'ampforwp_body_beginning' ,'ampforwp_back_to_top_markup');
6855
  function ampforwp_back_to_top_markup(){
 
6856
  if(true == ampforwp_get_setting('ampforwp-footer-top')){
6857
+ echo '<div id="backtotop"></div>';
 
 
 
 
 
6858
  }
6859
  }
6860
 
7048
  // Ajax functions
7049
  add_action( 'wp_ajax_ampforwp_categories', 'ampforwp_ajax_cats' );
7050
  function ampforwp_ajax_cats(){
7051
+ $ampforwp_nonce = wp_create_nonce( 'ampforwp-verify-request' );
7052
+ if(!wp_verify_nonce($ampforwp_nonce,'ampforwp-verify-request') ){
7053
  echo json_encode(array('status'=>403,'message'=>'user request is not allowed')) ;
7054
  die;
7055
  }
7065
  }
7066
  add_action( 'wp_ajax_ampforwp_tags', 'ampforwp_ajax_tags' );
7067
  function ampforwp_ajax_tags(){
7068
+ $ampforwp_nonce = wp_create_nonce( 'ampforwp-verify-request' );
7069
+ if(!wp_verify_nonce($ampforwp_nonce,'ampforwp-verify-request') ){
7070
  echo json_encode(array('status'=>403,'message'=>'user request is not allowed')) ;
7071
  die;
7072
  }