AMP for WP – Accelerated Mobile Pages - Version 1.0.77.32

Version Description

Download this release

Release Info

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

Code changes from version 1.0.77.31 to 1.0.77.32

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.31
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -197,6 +197,9 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
197
 
198
  == Changelog ==
199
 
 
 
 
200
  1.0.77.31 (7th December 2021) =
201
  * Fixed: Uncaught ValueError - DOMDocument::loadHTML() Error #5174
202
  * Fixed: PHP Notice: Undefined index: rgba #5175
@@ -210,9 +213,4 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
210
  * Fixed: Webp images not appearing in preload with WEBP express plugin #5165
211
  * Fixed: pagination 404 issue with infinite scroll #5167
212
 
213
- 1.0.77.29 (28TH October 2021) =
214
- Improvements: Search results opens directly in Google search in AMP #5161
215
- Fixed: Undefined variable - pathExploded debug notice #5160
216
- Fixed: ID has been getting removed from the amp-img tag #5163
217
-
218
  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.32
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.32 (11th December 2021) =
201
+ * Fixed: Code improvements in AMP pagebuilder #5179
202
+
203
  1.0.77.31 (7th December 2021) =
204
  * Fixed: Uncaught ValueError - DOMDocument::loadHTML() Error #5174
205
  * Fixed: PHP Notice: Undefined index: rgba #5175
213
  * Fixed: Webp images not appearing in preload with WEBP express plugin #5165
214
  * Fixed: pagination 404 issue with infinite scroll #5167
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.31
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.31');
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.32
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.32');
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.77.31 (7th December 2021) =
4
  * Fixed: Uncaught ValueError - DOMDocument::loadHTML() Error #5174
5
  * Fixed: PHP Notice: Undefined index: rgba #5175
1
  == Changelog ==
2
 
3
+ 1.0.77.32 (11th December 2021) =
4
+ * Fixed: Code improvements in AMP pagebuilder #5179
5
+
6
  1.0.77.31 (7th December 2021) =
7
  * Fixed: Uncaught ValueError - DOMDocument::loadHTML() Error #5174
8
  * Fixed: PHP Notice: Undefined index: rgba #5175
pagebuilder/inc/amppb_save_data.php CHANGED
@@ -41,6 +41,21 @@ function amppb_save_post( $post_id, $post ){
41
 
42
  /* Get new submitted data and sanitize it. */
43
  $submitted_data = isset( $request['amp-page-builder'] ) && ampforwp_isjson($request['amp-page-builder']) ? $request['amp-page-builder'] : null;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  $submitted_data = wp_slash($submitted_data);
45
 
46
  /* New data submitted, No previous data, create it */
41
 
42
  /* Get new submitted data and sanitize it. */
43
  $submitted_data = isset( $request['amp-page-builder'] ) && ampforwp_isjson($request['amp-page-builder']) ? $request['amp-page-builder'] : null;
44
+
45
+
46
+ $submitted_data = json_decode($submitted_data,true);
47
+ //Script
48
+ preg_match_all("/<script(?:(?!src).)*>(.*?)<\/script>/",$submitted_data['settingdata']['scripts_data'], $outremove, PREG_SET_ORDER);
49
+ if($outremove && count($outremove)>0){
50
+ foreach($outremove as $unwanted){
51
+ $submitted_data['settingdata']['scripts_data'] = str_replace($unwanted[0], '', $submitted_data['settingdata']['scripts_data']);
52
+ }
53
+ }
54
+
55
+ //Style
56
+ $submitted_data['settingdata']['style_data']=strip_tags($submitted_data['settingdata']['style_data']);
57
+ $submitted_data = json_encode($submitted_data);
58
+
59
  $submitted_data = wp_slash($submitted_data);
60
 
61
  /* New data submitted, No previous data, create it */
pagebuilder/inc/viewShowFrontData.php CHANGED
@@ -53,6 +53,12 @@ function ampforwp_pagebuilder_header_html_output(){
53
  if($previousData!="" && $ampforwp_pagebuilder_enable=='yes'){
54
  $previousData = json_decode($previousData,true);
55
  if(isset($previousData['settingdata']['scripts_data']) && $previousData['settingdata']['scripts_data']!=""){
 
 
 
 
 
 
56
  echo $previousData['settingdata']['scripts_data']; // nothing to escaped
57
  }
58
  }
53
  if($previousData!="" && $ampforwp_pagebuilder_enable=='yes'){
54
  $previousData = json_decode($previousData,true);
55
  if(isset($previousData['settingdata']['scripts_data']) && $previousData['settingdata']['scripts_data']!=""){
56
+ preg_match_all("/<script(?:(?!src).)*>(.*?)<\/script>/",$previousData['settingdata']['scripts_data'], $outremove, PREG_SET_ORDER);
57
+ if($outremove && count($outremove)>0){
58
+ foreach($outremove as $unwanted){
59
+ $previousData['settingdata']['scripts_data'] = str_replace($unwanted[0], '', $previousData['settingdata']['scripts_data']);
60
+ }
61
+ }
62
  echo $previousData['settingdata']['scripts_data']; // nothing to escaped
63
  }
64
  }
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.31
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -194,6 +194,9 @@ You can contact us from [here](https://ampforwp.com/contact/)
194
 
195
  == Changelog ==
196
 
 
 
 
197
  1.0.77.31 (7th December 2021) =
198
  * Fixed: Uncaught ValueError - DOMDocument::loadHTML() Error #5174
199
  * Fixed: PHP Notice: Undefined index: rgba #5175
@@ -207,9 +210,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
207
  * Fixed: Webp images not appearing in preload with WEBP express plugin #5165
208
  * Fixed: pagination 404 issue with infinite scroll #5167
209
 
210
- 1.0.77.29 (28TH October 2021) =
211
- Improvements: Search results opens directly in Google search in AMP #5161
212
- Fixed: Undefined variable - pathExploded debug notice #5160
213
- Fixed: ID has been getting removed from the amp-img tag #5163
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.32
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.32 (11th December 2021) =
198
+ * Fixed: Code improvements in AMP pagebuilder #5179
199
+
200
  1.0.77.31 (7th December 2021) =
201
  * Fixed: Uncaught ValueError - DOMDocument::loadHTML() Error #5174
202
  * Fixed: PHP Notice: Undefined index: rgba #5175
210
  * Fixed: Webp images not appearing in preload with WEBP express plugin #5165
211
  * Fixed: pagination 404 issue with infinite scroll #5167
212
 
 
 
 
 
 
213
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)