AMP for WP – Accelerated Mobile Pages - Version 1.0.8

Version Description

(2nd January 2020) = * Fixed: Need to add Rankmath's "Nofollow External Links" feature. #3970 (updated the code)

Download this release

Release Info

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

Code changes from version 1.0.7 to 1.0.8

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.3.2
7
- Stable tag: 1.0.7
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.7 (2nd January 2020) =
195
  * Improvement: Need to add Rankmath's "Nofollow External Links" feature. #3970
196
  * Improvement: Need to add floating button in extension list #3972
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.3.2
7
+ Stable tag: 1.0.8
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.8 (2nd January 2020) =
195
+ * Fixed: Need to add Rankmath's "Nofollow External Links" feature. #3970 (updated the code)
196
+
197
  = 1.0.7 (2nd January 2020) =
198
  * Improvement: Need to add Rankmath's "Nofollow External Links" feature. #3970
199
  * Improvement: Need to add floating button in extension list #3972
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.7
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.7');
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.8
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.8');
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.7 (2nd January 2020) =
4
  * Improvement: Need to add Rankmath's "Nofollow External Links" feature. #3970
5
  * Improvement: Need to add floating button in extension list #3972
1
  == Changelog ==
2
 
3
+ = 1.0.8 (2nd January 2020) =
4
+ * Fixed: Need to add Rankmath's "Nofollow External Links" feature. #3970 (updated the code)
5
+
6
  = 1.0.7 (2nd January 2020) =
7
  * Improvement: Need to add Rankmath's "Nofollow External Links" feature. #3970
8
  * Improvement: Need to add floating button in extension list #3972
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.3.2
7
- Stable tag: 1.0.7
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.7 (2nd January 2020) =
195
  * Improvement: Need to add Rankmath's "Nofollow External Links" feature. #3970
196
  * Improvement: Need to add floating button in extension list #3972
@@ -216,12 +219,5 @@ You can contact us from [here](https://ampforwp.com/contact/)
216
  * Fixed: Google Tag manager not firing properly #3826
217
  * Fixed: Undefined variable block_css #4021
218
 
219
- = 1.0.5 (30th December 2019) =
220
- * Fixed: Menu arrow icon not showing properly in mobile version #3995
221
- * Fixed: Google Tag manager not firing properly #3826
222
-
223
- = 1.0.4 (26th December 2019) =
224
- * Fixed: When Optimize CSS (beta) option is enabled AMP page is getting blank #3994
225
-
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.3.2
7
+ Stable tag: 1.0.8
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.8 (2nd January 2020) =
195
+ * Fixed: Need to add Rankmath's "Nofollow External Links" feature. #3970 (updated the code)
196
+
197
  = 1.0.7 (2nd January 2020) =
198
  * Improvement: Need to add Rankmath's "Nofollow External Links" feature. #3970
199
  * Improvement: Need to add floating button in extension list #3972
219
  * Fixed: Google Tag manager not firing properly #3826
220
  * Fixed: Undefined variable block_css #4021
221
 
 
 
 
 
 
 
 
222
 
223
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
templates/features.php CHANGED
@@ -7551,9 +7551,9 @@ function ampforwp_rank_math_nofollow_to_external_link($content){
7551
  $url = $matches[1][$i];
7552
  $is_external = ampforwp_isexternal($url);
7553
  if($is_external){
7554
- $rep_url = $matches[0][$i];
7555
  $url = str_replace("/", "\/", $url);
7556
- $content = preg_replace('/(<a href="'.esc_url($url).'.*")/', '$1 rel="nofollow"', $content);
7557
  }
7558
  }
7559
  }
7551
  $url = $matches[1][$i];
7552
  $is_external = ampforwp_isexternal($url);
7553
  if($is_external){
7554
+ $url = esc_url($url);
7555
  $url = str_replace("/", "\/", $url);
7556
+ $content = preg_replace('/(<a href="'.$url.'.*")/', '$1 rel="nofollow"', $content);
7557
  }
7558
  }
7559
  }