Page Builder: PageLayer – Drag and Drop website builder - Version 1.4.2

Version Description

(Jan 04, 2021) = * [Bug-Fix] In some cases if the element's inner content contains HTML comments, the element was not rendering properly. This is fixed.

Download this release

Release Info

Developer pagelayer
Plugin Icon 128x128 Page Builder: PageLayer – Drag and Drop website builder
Version 1.4.2
Comparing to
See all releases

Code changes from version 1.4.1 to 1.4.2

init.php CHANGED
@@ -5,7 +5,7 @@ if (!defined('ABSPATH')) exit;
5
 
6
  define('PAGELAYER_BASE', plugin_basename(PAGELAYER_FILE));
7
  define('PAGELAYER_PRO_BASE', 'pagelayer-pro/pagelayer-pro.php');
8
- define('PAGELAYER_VERSION', '1.4.1');
9
  define('PAGELAYER_DIR', dirname(PAGELAYER_FILE));
10
  define('PAGELAYER_SLUG', 'pagelayer');
11
  define('PAGELAYER_URL', plugins_url('', PAGELAYER_FILE));
@@ -27,6 +27,7 @@ include_once(PAGELAYER_DIR.'/main/class.php');
27
  function pagelayer_died(){
28
  print_r(error_get_last());
29
  }
 
30
 
31
  // Ok so we are now ready to go
32
  register_activation_hook(PAGELAYER_FILE, 'pagelayer_activation');
5
 
6
  define('PAGELAYER_BASE', plugin_basename(PAGELAYER_FILE));
7
  define('PAGELAYER_PRO_BASE', 'pagelayer-pro/pagelayer-pro.php');
8
+ define('PAGELAYER_VERSION', '1.4.2');
9
  define('PAGELAYER_DIR', dirname(PAGELAYER_FILE));
10
  define('PAGELAYER_SLUG', 'pagelayer');
11
  define('PAGELAYER_URL', plugins_url('', PAGELAYER_FILE));
27
  function pagelayer_died(){
28
  print_r(error_get_last());
29
  }
30
+ //register_shutdown_function('pagelayer_died');
31
 
32
  // Ok so we are now ready to go
33
  register_activation_hook(PAGELAYER_FILE, 'pagelayer_activation');
js/pagelayer-editor.js CHANGED
@@ -2621,7 +2621,8 @@ function pagelayer_el_get_data(jEle){
2621
  // Add the data back again
2622
  function pagelayer_el_dump_data(jEle){
2623
  var node = pagelayer_el_get_data_node(jEle);
2624
- var d = JSON.stringify(pagelayer.el[pagelayer_id(jEle)]);
 
2625
  if(node){
2626
  node.nodeValue = d;
2627
  }else{
2621
  // Add the data back again
2622
  function pagelayer_el_dump_data(jEle){
2623
  var node = pagelayer_el_get_data_node(jEle);
2624
+ var d = pagelayer_serializeAttributes(pagelayer_el_data_ref(jEle));
2625
+
2626
  if(node){
2627
  node.nodeValue = d;
2628
  }else{
js/properties.js CHANGED
@@ -18,7 +18,7 @@ function pagelayer_data(jEle, clean){
18
 
19
  // Get the data
20
  ret.tag = pagelayer_tag(jEle);
21
- ret.id = pagelayer_id(jEle);;
22
  ret.$ = jEle;
23
 
24
  var ref_data = pagelayer_el_data_ref(jEle);
18
 
19
  // Get the data
20
  ret.tag = pagelayer_tag(jEle);
21
+ ret.id = pagelayer_id(jEle);
22
  ret.$ = jEle;
23
 
24
  var ref_data = pagelayer_el_data_ref(jEle);
main/shortcode_functions.php CHANGED
@@ -421,7 +421,7 @@ function pagelayer_render_shortcode($atts, $content = '', $tag = '', $inner_bloc
421
  }
422
 
423
  $div = '<div pagelayer-id="'.$el['id'].'">
424
- <!-- '.json_encode(['attr' => $el['oAtts'], 'tmp' => $el['tmp']]).' -->
425
  <style pagelayer-style-id="'.$el['id'].'"></style>';
426
 
427
  $is_group = !empty($pagelayer->shortcodes[$tag]['params']['elements']) ? true : false;
@@ -640,6 +640,18 @@ function pagelayer_render_shortcode($atts, $content = '', $tag = '', $inner_bloc
640
 
641
  }
642
 
 
 
 
 
 
 
 
 
 
 
 
 
643
  // Change pagelayer id in html
644
  function pagelayer_change_id($content){
645
 
421
  }
422
 
423
  $div = '<div pagelayer-id="'.$el['id'].'">
424
+ <!-- '.pagelayer_serialize_attributes(['attr' => $el['oAtts'], 'tmp' => $el['tmp']]).' -->
425
  <style pagelayer-style-id="'.$el['id'].'"></style>';
426
 
427
  $is_group = !empty($pagelayer->shortcodes[$tag]['params']['elements']) ? true : false;
640
 
641
  }
642
 
643
+ // Pagelayer serialize attributes
644
+ function pagelayer_serialize_attributes( $block_attributes ) {
645
+ $encoded_attributes = json_encode( $block_attributes );
646
+ $encoded_attributes = preg_replace( '/--/', '\\u002d\\u002d', $encoded_attributes );
647
+ $encoded_attributes = preg_replace( '/</', '\\u003c', $encoded_attributes );
648
+ $encoded_attributes = preg_replace( '/>/', '\\u003e', $encoded_attributes );
649
+ // Regex: /\\"/
650
+ $encoded_attributes = preg_replace( '/\\\\"/', '\\u0022', $encoded_attributes );
651
+
652
+ return $encoded_attributes;
653
+ }
654
+
655
  // Change pagelayer id in html
656
  function pagelayer_change_id($content){
657
 
main/template.php CHANGED
@@ -949,6 +949,12 @@ function pagelayer_template_include($template){
949
  // then we need to make sure to blank the other
950
  if(!empty($pagelayer->template_header) || !empty($pagelayer->template_footer)){
951
  $pagelayer_enqueue_frontend = true;
 
 
 
 
 
 
952
  add_action('get_header', 'pagelayer_get_header');
953
  add_action('get_footer', 'pagelayer_get_footer');
954
  }
949
  // then we need to make sure to blank the other
950
  if(!empty($pagelayer->template_header) || !empty($pagelayer->template_footer)){
951
  $pagelayer_enqueue_frontend = true;
952
+
953
+ // Disable AIOSEO for pagelayer post types
954
+ if(!empty($GLOBALS['post']) && $GLOBALS['post']->post_type == $pagelayer->builder['name']){
955
+ add_filter( 'aioseo_disable', '__return_true' );
956
+ }
957
+
958
  add_action('get_header', 'pagelayer_get_header');
959
  add_action('get_footer', 'pagelayer_get_footer');
960
  }
pagelayer.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: PageLayer
4
  Plugin URI: http://wordpress.org/plugins/pagelayer/
5
  Description: PageLayer is a WordPress page builder plugin. Its very easy to use and very light on the browser.
6
- Version: 1.4.1
7
  Author: Pagelayer Team
8
  Author URI: https://pagelayer.com/
9
  License: LGPL v2.1
3
  Plugin Name: PageLayer
4
  Plugin URI: http://wordpress.org/plugins/pagelayer/
5
  Description: PageLayer is a WordPress page builder plugin. Its very easy to use and very light on the browser.
6
+ Version: 1.4.2
7
  Author: Pagelayer Team
8
  Author URI: https://pagelayer.com/
9
  License: LGPL v2.1
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: page builder, editor, landing page, drag-and-drop, pagelayer, form-builder
4
  Requires at least: 4.7
5
  Tested up to: 5.6
6
  Requires PHP: 5.5
7
- Stable tag: 1.4.1
8
  License: LGPL v2.1
9
  License URI: http://www.gnu.org/licenses/lgpl-2.1.html
10
 
@@ -109,6 +109,9 @@ Do you have questions related to PageLayer ? Use the following links :
109
 
110
  == Changelog ==
111
 
 
 
 
112
  = 1.4.1 (Jan 02, 2021) =
113
  * [Bug-Fix] In some cases if the element attributes were empty, the element was not rendering properly after the last version. This is fixed.
114
 
4
  Requires at least: 4.7
5
  Tested up to: 5.6
6
  Requires PHP: 5.5
7
+ Stable tag: 1.4.2
8
  License: LGPL v2.1
9
  License URI: http://www.gnu.org/licenses/lgpl-2.1.html
10
 
109
 
110
  == Changelog ==
111
 
112
+ = 1.4.2 (Jan 04, 2021) =
113
+ * [Bug-Fix] In some cases if the element's inner content contains HTML comments, the element was not rendering properly. This is fixed.
114
+
115
  = 1.4.1 (Jan 02, 2021) =
116
  * [Bug-Fix] In some cases if the element attributes were empty, the element was not rendering properly after the last version. This is fixed.
117