diff --git a/changelog.txt b/changelog.txt index c61f8ace..8675ecf6 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,48 @@ == Changelog == += 2.29.19 – 21 July June 2024 = +* Further improvements for attribute name handling. +* Layout Directory: Resolved an issue with fetching page two. + += 2.29.18 – 29 June 2024 = +* Improved attribute name handling. +* Layout Block: Improved preview updating. +* Widget Groups: Resolved a potential `TypeError`. +* Vantage Compatibility: Resolved a potential `TypeError`. + += 2.29.17 – 15 June 2024 = +* Layout Builder: Default the modal icon to "Cog". +* Layouts Block: Added an additional check for clearing potential block errors. +* Row Overlays: Resolved a potential Column/Widget video content overlap. +* Row Cell Preview: Adjusted the percentage symbol placement. +* Updated escaping functions to use translatable versions where needed. +* Updated SiteOrigin Installer. +* Number Style Field: Added min/max support. + += 2.29.16 – 13 May 2024 = +* Adjusted Add Widget modal sidebar link order and display. +* Restored WP Events Manager compatibility. +* Resolved fallback shortcode decoding issue. +* Added Layout Directory caching for better performance. +* Increased required PHP version to `7.0.0`. +* Developer: Improved `panelsOptions` translation handling. + += 2.29.15 – 27 April 2024 = +* Layout Block: Further improvements to preview functionality and performance. +* Admin Area: Update to ensure Classic Editor notice is translatable. + += 2.29.14 – 26 April 2024 = +* Layout Block: Restored preview functionality. + += 2.29.13 – 21 April 2024 = +* Rank Math SEO Compatibility: Resolved dependency error. + += 2.29.12 – 19 April 2024 = +* Layout Block: Improved preview. +* Layout Block: Fix repeated rendering when switching to editor. +* Layout Block: Restored data integration for SEO content analysis. +* Post Content Widget: Added "Content" option. + = 2.29.11 – 31 March 2024 = * Post Content Widget: Fixed post featured image output. * Post Content Widget: Remove unused content and improved title output. diff --git a/compat/js/siteorigin-panels-layout-block.js b/compat/js/siteorigin-panels-layout-block.js index 40a376cd..32ba0633 100644 --- a/compat/js/siteorigin-panels-layout-block.js +++ b/compat/js/siteorigin-panels-layout-block.js @@ -247,10 +247,8 @@ function (_wp$element$Component) { if (!this.isStillMounted) { return; - } // If we don't have panelsData yet, fetch it from PB directly. - + } - var panelsData = props.panelsData === null ? this.builderView.getData() : props.panelsData; this.setState({ previewInitialized: false }); @@ -258,7 +256,7 @@ function (_wp$element$Component) { url: window.soPanelsBlockEditorAdmin.previewUrl, data: { action: 'so_panels_layout_block_preview', - panelsData: JSON.stringify(panelsData) + panelsData: JSON.stringify(this.builderView.getData()) } }).then(function (preview) { if (!_this4.isStillMounted) { @@ -392,7 +390,11 @@ wp.blocks.registerBlockType('siteorigin-panels/layout-block', { panelsAttributes.contentPreview = content.preview; } - setAttributes(panelsAttributes); + setAttributes({ + contentPreview: panelsAttributes.contentPreview, + panelsData: panelsAttributes.panelsData, + previewInitialized: false + }); if (!isNewWPBlockEditor) { wp.data.dispatch('core/editor').unlockPostSaving(); diff --git a/compat/js/siteorigin-panels-layout-block.jsx b/compat/js/siteorigin-panels-layout-block.jsx index f63584bd..b4d56dd8 100644 --- a/compat/js/siteorigin-panels-layout-block.jsx +++ b/compat/js/siteorigin-panels-layout-block.jsx @@ -189,9 +189,6 @@ class SiteOriginPanelsLayoutBlock extends wp.element.Component { return; } - // If we don't have panelsData yet, fetch it from PB directly. - var panelsData = props.panelsData === null ? this.builderView.getData() : props.panelsData; - this.setState( { previewInitialized: false, } ); @@ -200,7 +197,7 @@ class SiteOriginPanelsLayoutBlock extends wp.element.Component { url: window.soPanelsBlockEditorAdmin.previewUrl, data: { action: 'so_panels_layout_block_preview', - panelsData: JSON.stringify( panelsData ), + panelsData: JSON.stringify( this.builderView.getData() ), } } ) .then( ( preview ) => { @@ -354,7 +351,11 @@ wp.blocks.registerBlockType( 'siteorigin-panels/layout-block', { panelsAttributes.contentPreview = content.preview; } - setAttributes( panelsAttributes ); + setAttributes( { + contentPreview: panelsAttributes.contentPreview, + panelsData: panelsAttributes.panelsData, + previewInitialized: false, + } ); if ( ! isNewWPBlockEditor ) { wp.data.dispatch( 'core/editor' ).unlockPostSaving(); diff --git a/compat/vantage.php b/compat/vantage.php index b8c4eeb1..1593db90 100644 --- a/compat/vantage.php +++ b/compat/vantage.php @@ -1,5 +1,9 @@ $widgetData ) { if ( isset( $widgetData['groups'] ) && + is_array( $widgetData['groups'] ) && in_array( 'recommended', $widgetData['groups'] ) ) { $recommendedWidgets[ $widgetName ] = $widgetData; diff --git a/inc/renderer.php b/inc/renderer.php index d0bfa127..600e4289 100644 --- a/inc/renderer.php +++ b/inc/renderer.php @@ -676,9 +676,9 @@ private function start_style_wrapper( $name, $style = array(), $for = false ) { } if ( is_array( $value ) ) { - $style_wrapper .= $name . '="' . esc_attr( implode( ' ', array_unique( $value ) ) ) . '" '; + $style_wrapper .= $this->sanitize_attribute_key( $name ) . '="' . esc_attr( implode( ' ', array_unique( $value ) ) ) . '" '; } else { - $style_wrapper .= $name . '="' . esc_attr( $value ) . '" '; + $style_wrapper .= $this->sanitize_attribute_key( $name ) . '="' . esc_attr( $value ) . '" '; } } $style_wrapper .= '>'; @@ -810,7 +810,7 @@ public function the_widget( $widget_info, $instance, $grid_index, $cell_index, $ $before_widget = '