AMP for WP – Accelerated Mobile Pages - Version 1.0.41

Version Description

(14th April 2020) = * Improvement: Video docking issue #4352

Download this release

Release Info

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

Code changes from version 1.0.40 to 1.0.41

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.40
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.40 (14th April 2020) =
198
  * Improvement: Added Filter to change post title tag #4339
199
  * Improvement: Added Rankmath's open external links option feature #4356
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.41
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.41 (14th April 2020) =
198
+ * Improvement: Video docking issue #4352
199
+
200
  = 1.0.40 (14th April 2020) =
201
  * Improvement: Added Filter to change post title tag #4339
202
  * Improvement: Added Rankmath's open external links option feature #4356
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.40
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.40');
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.41
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.41');
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.40 (14th April 2020) =
4
  * Improvement: Added Filter to change post title tag #4339
5
  * Improvement: Added Rankmath's open external links option feature #4356
1
  == Changelog ==
2
 
3
+ = 1.0.41 (14th April 2020) =
4
+ * Improvement: Video docking issue #4352
5
+
6
  = 1.0.40 (14th April 2020) =
7
  * Improvement: Added Filter to change post title tag #4339
8
  * Improvement: Added Rankmath's open external links option feature #4356
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.40
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.40 (14th April 2020) =
195
  * Improvement: Added Filter to change post title tag #4339
196
  * Improvement: Added Rankmath's open external links option feature #4356
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.41
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.41 (14th April 2020) =
195
+ * Improvement: Video docking issue #4352
196
+
197
  = 1.0.40 (14th April 2020) =
198
  * Improvement: Added Filter to change post title tag #4339
199
  * Improvement: Added Rankmath's open external links option feature #4356
templates/features.php CHANGED
@@ -7987,14 +7987,14 @@ function ampforwp_include_required_scripts($content){
7987
  }
7988
  }
7989
  //OTHER COMPONENT CHECK
7990
- $other_comp_arr = array('amp-mustache'=>'amp-mustache','form'=>'amp-form','amp-access'=>'amp-access','amp-fx'=>'amp-fx-collection','dock'=>'amp-video-docking');
7991
  foreach ($other_comp_arr as $key => $value) {
7992
  $ocomp = $value;
7993
  $celem = 'element';
7994
  if($ocomp=='amp-mustache'){
7995
  $celem = 'template';
7996
  }
7997
- if(preg_match('/(type|template|id)="('.$ocomp.')"/', $content) || preg_match("/<\/$key>/", $content) || preg_match("/amp-fx/", $content) || preg_match('/<(amp-(video|brightcove|dailymotion|delight-player|ima-video|video-iframe|youtube)).*?dock(.*?)><\/amp-.*?>/s', $content)){
7998
  if(!preg_match('/<script(\s|\sasync\s)custom-'.esc_attr($celem).'="'.esc_attr($ocomp).'"(.*?)>(.*?)<\/script>/s', $content)){
7999
  $o_comp_url = 'https://cdn.ampproject.org/v0/'.esc_attr($ocomp).'-'.esc_attr($script_ver).'.js';
8000
  $script_tag = '<head><script custom-'.esc_attr($celem).'="'.esc_attr($ocomp).'" src="'.esc_url($o_comp_url).'" async></script>';
7987
  }
7988
  }
7989
  //OTHER COMPONENT CHECK
7990
+ $other_comp_arr = array('amp-mustache'=>'amp-mustache','form'=>'amp-form','amp-access'=>'amp-access','amp-fx'=>'amp-fx-collection');
7991
  foreach ($other_comp_arr as $key => $value) {
7992
  $ocomp = $value;
7993
  $celem = 'element';
7994
  if($ocomp=='amp-mustache'){
7995
  $celem = 'template';
7996
  }
7997
+ if(preg_match('/(type|template|id)="('.$ocomp.')"/', $content) || preg_match("/<\/$key>/", $content) || preg_match("/amp-fx/", $content)){
7998
  if(!preg_match('/<script(\s|\sasync\s)custom-'.esc_attr($celem).'="'.esc_attr($ocomp).'"(.*?)>(.*?)<\/script>/s', $content)){
7999
  $o_comp_url = 'https://cdn.ampproject.org/v0/'.esc_attr($ocomp).'-'.esc_attr($script_ver).'.js';
8000
  $script_tag = '<head><script custom-'.esc_attr($celem).'="'.esc_attr($ocomp).'" src="'.esc_url($o_comp_url).'" async></script>';