PluginProbe
Page Builder: Pagelayer – Drag and Drop website builder / 2.2.1
Page Builder: Pagelayer – Drag and Drop website builder v2.2.1
2.2.1 2.2.0 2.1.9 2.1.8 2.1.7 2.1.6 2.1.5 2.1.4 2.1.3 trunk 0.9.0 0.9.1 0.9.2 0.9.3 0.9.4 0.9.5 0.9.6 0.9.7 0.9.8 0.9.9 1.0.0 1.0.2 1.0.3 1.0.4 1.0.5 All 129 releases
← All changes | init.php +5 -10 2.1.82.2.1 View file →
@@ -4,9 +4,9 @@
4 4 if (!defined('ABSPATH')) exit;
5 5
6 6 define('PAGELAYER_BASE', plugin_basename(PAGELAYER_FILE));
7 7 define('PAGELAYER_PREMIUM_BASE', 'pagelayer-pro/pagelayer-pro.php');
8 -define('PAGELAYER_VERSION', '2.1.8');
8 +define('PAGELAYER_VERSION', '2.2.1');
9 9 define('PAGELAYER_DIR', dirname(PAGELAYER_FILE));
10 10 define('PAGELAYER_SLUG', 'pagelayer');
11 11 define('PAGELAYER_URL', plugins_url('', PAGELAYER_FILE));
12 12 define('PAGELAYER_CSS', PAGELAYER_URL.'/css');
@@ -25,8 +25,9 @@
25 25 define('PAGELAYER_FONT_POST_TYPE', 'pagelayer-fonts');
26 26
27 27 include_once(PAGELAYER_DIR.'/main/functions.php');
28 28 include_once(PAGELAYER_DIR.'/main/class.php');
29 +include_once(PAGELAYER_DIR.'/main/ai-controller.php');
29 30
30 31 function pagelayer_died(){
31 32 print_r(error_get_last());
32 33 }
@@ -541,18 +542,12 @@
541 542 $blocks = parse_blocks( wp_unslash($content) );
542 543 $output = '';
543 544
544 545 foreach ( $blocks as $block ) {
545 - $block_name = $block['blockName'];
546 546
547 - // Is pagelayer block
548 - if ( is_string( $block_name ) && 0 === strpos( $block_name, 'pagelayer/' ) ) {
549 - $_block = pagelayer_sanitize_blocks_save_pre($block);
550 - $output .= serialize_block($_block);
551 - continue;
552 - }
553 -
554 - $output .= serialize_block($block);
547 + // Sanitize Pagelayer blocks at any depth, they can be nested inside
548 + // any other block
549 + $output .= serialize_block( pagelayer_sanitize_block_tree( $block ) );
555 550 }
556 551
557 552 return wp_slash($output);
558 553 }