AMP for WP – Accelerated Mobile Pages - Version 1.0.52

Version Description

(27th May 2020) = * Fixed: Reverted the CDN code of WP Rocket plugin which was causing the malformed url issue #4342

Download this release

Release Info

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

Code changes from version 1.0.51 to 1.0.52

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.4
7
- Stable tag: 1.0.51
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -194,6 +194,9 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
194
 
195
  == Changelog ==
196
 
 
 
 
197
  = 1.0.51 (27th May 2020) =
198
  * Improvement: Added option to show instant article post according to updated date #4389
199
  * Improvement: Added Transposh for AMP Extension #4481
@@ -224,7 +227,4 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
224
  * Fixed: Text links are not working in mobile #4462
225
  * Fixed: PHP Notice Undefined variable thumb_alt #4460
226
 
227
- = 1.0.49 (11th May 2020) =
228
- * Fixed: Background color of the row is not working in the AMP Page Builder #4398
229
-
230
  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.4
7
+ Stable tag: 1.0.52
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.52 (27th May 2020) =
198
+ * Fixed: Reverted the CDN code of WP Rocket plugin which was causing the malformed url issue #4342
199
+
200
  = 1.0.51 (27th May 2020) =
201
  * Improvement: Added option to show instant article post according to updated date #4389
202
  * Improvement: Added Transposh for AMP Extension #4481
227
  * Fixed: Text links are not working in mobile #4462
228
  * Fixed: PHP Notice Undefined variable thumb_alt #4460
229
 
 
 
 
230
  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.51
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.51');
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.52
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.52');
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,8 @@
1
  == Changelog ==
2
 
 
 
 
3
  = 1.0.51 (27th May 2020) =
4
  * Improvement: Added option to show instant article post according to updated date #4389
5
  * Improvement: Added Transposh for AMP Extension #4481
1
  == Changelog ==
2
 
3
+ = 1.0.52 (27th May 2020) =
4
+ * Fixed: Reverted the CDN code of WP Rocket plugin which was causing the malformed url issue #4342
5
+
6
  = 1.0.51 (27th May 2020) =
7
  * Improvement: Added option to show instant article post according to updated date #4389
8
  * Improvement: Added Transposh for AMP Extension #4481
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.4
7
- Stable tag: 1.0.51
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -191,6 +191,9 @@ You can contact us from [here](https://ampforwp.com/contact/)
191
 
192
  == Changelog ==
193
 
 
 
 
194
  = 1.0.51 (27th May 2020) =
195
  * Improvement: Added option to show instant article post according to updated date #4389
196
  * Improvement: Added Transposh for AMP Extension #4481
@@ -221,7 +224,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
221
  * Fixed: Text links are not working in mobile #4462
222
  * Fixed: PHP Notice Undefined variable thumb_alt #4460
223
 
224
- = 1.0.49 (11th May 2020) =
225
- * Fixed: Background color of the row is not working in the AMP Page Builder #4398
226
-
227
  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.4
7
+ Stable tag: 1.0.52
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.52 (27th May 2020) =
195
+ * Fixed: Reverted the CDN code of WP Rocket plugin which was causing the malformed url issue #4342
196
+
197
  = 1.0.51 (27th May 2020) =
198
  * Improvement: Added option to show instant article post according to updated date #4389
199
  * Improvement: Added Transposh for AMP Extension #4481
224
  * Fixed: Text links are not working in mobile #4462
225
  * Fixed: PHP Notice Undefined variable thumb_alt #4460
226
 
 
 
 
227
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
templates/features.php CHANGED
@@ -8199,7 +8199,6 @@ if(!function_exists('ampforwp_add_fallback_element')){
8199
  $m_content = $matches[1][$i];
8200
  $m_content = ampforwp_imagify_webp_compatibility($m_content);
8201
  $m_content = ampforwp_ewww_webp_compatibility($m_content);
8202
- $m_content = ampforwp_wp_rocket_compatibility($m_content);
8203
  $m1_content = ampforwp_set_default_fallback_image($matches[1][$i]);
8204
  preg_match_all('/src="(.*?)"/', $m1_content,$fimgsrc);
8205
  preg_match_all('/width="(.*?)"/', $m1_content,$fimgwidth);
@@ -8380,19 +8379,6 @@ function ampforwp_rank_math_external_link_newtab($content){
8380
  }
8381
  return $content;
8382
  }
8383
- function ampforwp_wp_rocket_compatibility($content){
8384
- if(function_exists('rocket_activation')){
8385
- $cdn_url = get_option('wp_rocket_settings');
8386
- if($cdn_url['cdn'] == 1){
8387
- if(isset($cdn_url["cdn_cnames"][0]) && $cdn_url["cdn_cnames"][0]!=''){
8388
- $cdn_url = $cdn_url["cdn_cnames"][0];
8389
- $content = preg_replace('/src="(.*?)\/\/(.*?)wp-content(.*?)"(.*?)>/', 'src="$1//'.$cdn_url.'/wp-content$3"$4>', $content);
8390
- $content = preg_replace('/srcset="(.*?)\/\/(.*?)wp-content(.*?),(.*?)\/\/(.*?)wp-content(.*?),(.*?)\/\/(.*?)wp-content(.*?)"/', 'srcset="$1//'.$cdn_url.'/wp-content$3,$4//'.$cdn_url.'/wp-content$6,$7//'.$cdn_url.'/wp-content$9"', $content);
8391
- }
8392
- }
8393
- }
8394
- return $content;
8395
- }
8396
  /* add_action( 'wp_ajax_ampforwp_referesh_related_post', 'ampforwp_referesh_related_post' );
8397
  function ampforwp_referesh_related_post(){
8398
  if(!wp_verify_nonce($_POST['verify_nonce'],'ampforwp_refresh_related_poost') ){
8199
  $m_content = $matches[1][$i];
8200
  $m_content = ampforwp_imagify_webp_compatibility($m_content);
8201
  $m_content = ampforwp_ewww_webp_compatibility($m_content);
 
8202
  $m1_content = ampforwp_set_default_fallback_image($matches[1][$i]);
8203
  preg_match_all('/src="(.*?)"/', $m1_content,$fimgsrc);
8204
  preg_match_all('/width="(.*?)"/', $m1_content,$fimgwidth);
8379
  }
8380
  return $content;
8381
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
8382
  /* add_action( 'wp_ajax_ampforwp_referesh_related_post', 'ampforwp_referesh_related_post' );
8383
  function ampforwp_referesh_related_post(){
8384
  if(!wp_verify_nonce($_POST['verify_nonce'],'ampforwp_refresh_related_poost') ){