diff --git a/compat/layout-block.php b/compat/layout-block.php index 46439ca3..e861eb85 100644 --- a/compat/layout-block.php +++ b/compat/layout-block.php @@ -124,10 +124,19 @@ public function render_layout_block( $attributes, $content = null ) { }; $is_editing = SiteOrigin_Panels_Admin::is_block_editor(); + add_filter( 'siteorigin_panels_layout_classes', $add_custom_class_name ); - SiteOrigin_Panels_Post_Content_Filters::add_filters( true ); + + if ( $is_editing ) { + SiteOrigin_Panels_Post_Content_Filters::add_filters( true ); + } + $rendered_layout = SiteOrigin_Panels::renderer()->render( $builder_id, ! $is_editing, $panels_data ); - SiteOrigin_Panels_Post_Content_Filters::remove_filters( true ); + + if ( $is_editing ) { + SiteOrigin_Panels_Post_Content_Filters::remove_filters( true ); + } + remove_filter( 'siteorigin_panels_layout_classes', $add_custom_class_name ); if ( is_wp_error( $rendered_layout ) ) { diff --git a/readme.txt b/readme.txt index a5b20577..2c57e3a1 100644 --- a/readme.txt +++ b/readme.txt @@ -121,6 +121,9 @@ SiteOrigin offers a single premium plugin that enhances and extends Page Builder == Changelog == += 2.29.22 – 30 September 2024 = +* Layout Block: Removed content filter attributes from the front-end. + = 2.29.21 – 17 September 2024 = * Prebuilt Local Layouts: Resolved a potential error. * Prebuilt Local Layouts: Restricted layout files to JSON.