AMP for WP – Accelerated Mobile Pages - Version 1.0.77.26

Version Description

(20th October 2021) = * Improvements: Added FV Gravatar Cache Compatibility in AMP #5149 * Fixed: Images not loading when destination structure is document root in WebP Express #5150

Download this release

Release Info

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

Code changes from version 1.0.77.25 to 1.0.77.26

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.25
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -197,6 +197,10 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
197
 
198
  == Changelog ==
199
 
 
 
 
 
200
  = 1.0.77.25 (1st October 2021) =
201
  * Improvements: Added Plausible analytics compatible in AMP #5142
202
  * Fixed: The amp-minute-media-player tag is getting stripped from the content #5146
@@ -214,9 +218,4 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
214
  * Fixed: Some design issues on one specific users #5134
215
  * Fixed: Debug Warnings - Use of undefined constant AUTH_KEY and SECURE_AUTH_KEY #5035
216
 
217
- = 1.0.77.23 (16th September 2021) =
218
- * Improvements: Added Top Mail Ru analytics support in amp #5130
219
- * Improvements: Added an option to move sponsorship label above the ad
220
- * Improvements: Updated the facebook instant articles to 50 when limit is not set #5131
221
-
222
  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.26
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.26 (20th October 2021) =
201
+ * Improvements: Added FV Gravatar Cache Compatibility in AMP #5149
202
+ * Fixed: Images not loading when destination structure is document root in WebP Express #5150
203
+
204
  = 1.0.77.25 (1st October 2021) =
205
  * Improvements: Added Plausible analytics compatible in AMP #5142
206
  * Fixed: The amp-minute-media-player tag is getting stripped from the content #5146
218
  * Fixed: Some design issues on one specific users #5134
219
  * Fixed: Debug Warnings - Use of undefined constant AUTH_KEY and SECURE_AUTH_KEY #5035
220
 
 
 
 
 
 
221
  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.25
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.25');
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.26
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.26');
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.77.25 (1st October 2021) =
4
  * Improvements: Added Plausible analytics compatible in AMP #5142
5
  * Fixed: The amp-minute-media-player tag is getting stripped from the content #5146
1
  == Changelog ==
2
 
3
+ = 1.0.77.26 (20th October 2021) =
4
+ * Improvements: Added FV Gravatar Cache Compatibility in AMP #5149
5
+ * Fixed: Images not loading when destination structure is document root in WebP Express #5150
6
+
7
  = 1.0.77.25 (1st October 2021) =
8
  * Improvements: Added Plausible analytics compatible in AMP #5142
9
  * Fixed: The amp-minute-media-player tag is getting stripped from the content #5146
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.25
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -194,6 +194,10 @@ You can contact us from [here](https://ampforwp.com/contact/)
194
 
195
  == Changelog ==
196
 
 
 
 
 
197
  = 1.0.77.25 (1st October 2021) =
198
  * Improvements: Added Plausible analytics compatible in AMP #5142
199
  * Fixed: The amp-minute-media-player tag is getting stripped from the content #5146
@@ -211,9 +215,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
211
  * Fixed: Some design issues on one specific users #5134
212
  * Fixed: Debug Warnings - Use of undefined constant AUTH_KEY and SECURE_AUTH_KEY #5035
213
 
214
- = 1.0.77.23 (16th September 2021) =
215
- * Improvements: Added Top Mail Ru analytics support in amp #5130
216
- * Improvements: Added an option to move sponsorship label above the ad
217
- * Improvements: Updated the facebook instant articles to 50 when limit is not set #5131
218
-
219
  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.26
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.26 (20th October 2021) =
198
+ * Improvements: Added FV Gravatar Cache Compatibility in AMP #5149
199
+ * Fixed: Images not loading when destination structure is document root in WebP Express #5150
200
+
201
  = 1.0.77.25 (1st October 2021) =
202
  * Improvements: Added Plausible analytics compatible in AMP #5142
203
  * Fixed: The amp-minute-media-player tag is getting stripped from the content #5146
215
  * Fixed: Some design issues on one specific users #5134
216
  * Fixed: Debug Warnings - Use of undefined constant AUTH_KEY and SECURE_AUTH_KEY #5035
217
 
 
 
 
 
 
218
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
templates/features.php CHANGED
@@ -5459,6 +5459,13 @@ if( ! function_exists('ampforwp_get_comments_gravatar') ){
5459
  if(isset($redux_builder_amp['ampforwp-display-avatar']) && $redux_builder_amp['ampforwp-display-avatar']==0){
5460
  return '';
5461
  }
 
 
 
 
 
 
 
5462
  $gravatar_exists = '';
5463
  $gravatar_exists = ampforwp_gravatar_checker($comment->comment_author_email);
5464
  if ( null !== ampforwp_get_wp_user_avatar($comment, 'comment') ) {
@@ -9538,7 +9545,7 @@ function ampforwp_webp_express_compatibility($content){
9538
  }else{
9539
  $img_url_webp = preg_replace('/http(.*?)\/wp-content(.*?)/', 'http$1/wp-content/webp-express/webp-images$2', $img_url);
9540
  if($config['destination-structure'] == 'doc-root'){
9541
- $img_url_webp = preg_replace('/http(.*?)\/wp-content(.*?)/', 'http$1/wp-content/webp-express/webp-images/doc-root/wordpress/wp-content$2', $img_url);
9542
  }
9543
  }
9544
  if(!preg_match('/\.webp/', $img_url)){
5459
  if(isset($redux_builder_amp['ampforwp-display-avatar']) && $redux_builder_amp['ampforwp-display-avatar']==0){
5460
  return '';
5461
  }
5462
+ if (class_exists('FV_Gravatar_Cache')) {
5463
+ $avatar_url = get_avatar_url($comment);
5464
+ $upload_dir = wp_upload_dir();
5465
+ $upload_dir = $upload_dir['baseurl'] . '/fv-gravatar-cache/';
5466
+ $avatar_url = preg_replace('/(.*?)avatar\/(.*?)\?s=(.*?)&(.*?)g/', ''.$upload_dir.'$2x$3.png', $avatar_url);
5467
+ return $avatar_url;
5468
+ }
5469
  $gravatar_exists = '';
5470
  $gravatar_exists = ampforwp_gravatar_checker($comment->comment_author_email);
5471
  if ( null !== ampforwp_get_wp_user_avatar($comment, 'comment') ) {
9545
  }else{
9546
  $img_url_webp = preg_replace('/http(.*?)\/wp-content(.*?)/', 'http$1/wp-content/webp-express/webp-images$2', $img_url);
9547
  if($config['destination-structure'] == 'doc-root'){
9548
+ $img_url_webp = preg_replace('/http(.*?)\/wp-content(.*?)/', 'http$1/wp-content/webp-express/webp-images/doc-root/wp-content$2', $img_url);
9549
  }
9550
  }
9551
  if(!preg_match('/\.webp/', $img_url)){