Skip to content

Commit 6c8b817

Browse files
committed
Merge branch 'release/1.20.29'
2 parents 1d39381 + 530fedf commit 6c8b817

2 files changed

Lines changed: 26 additions & 5 deletions

File tree

inc/panels.php

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,8 @@ function vantage_panels_row_style_fields( $fields ) {
318318

319319
if ( ! function_exists( 'vantage_panels_panels_row_style_attributes' ) ) {
320320
function vantage_panels_panels_row_style_attributes( $attr, $style ) {
321+
static $pb_css_container_breaker;
322+
321323
if ( empty( $attr['style'] ) ) {
322324
$attr['style'] = '';
323325
}
@@ -342,15 +344,31 @@ function vantage_panels_panels_row_style_attributes( $attr, $style ) {
342344
$attr['style'] .= 'background-repeat: repeat; ';
343345
}
344346

345-
if ( isset( $style['row_stretch'] ) && strpos( $style['row_stretch'], 'full' ) !== false ) {
346-
// We'll use this to prevent the jump when loading.
347-
$attr['class'][] = 'panel-row-style-full-width';
348-
}
349-
350347
if ( empty( $attr['style'] ) ) {
351348
unset( $attr['style'] );
352349
}
353350

351+
if (
352+
isset( $style['row_stretch'] ) &&
353+
strpos( $style['row_stretch'], 'full' ) !== false
354+
) {
355+
356+
if ( empty( $pb_css_container_breaker ) ) {
357+
$pb_css_container_breaker = method_exists( 'SiteOrigin_Panels', 'container_settings' ) ? SiteOrigin_Panels::container_settings() : null;
358+
}
359+
360+
// If the CSS Container Breaker is enabled, it'll prevent the jump for us.
361+
if (
362+
is_array( $pb_css_container_breaker ) &&
363+
$pb_css_container_breaker['css_override']
364+
) {
365+
return $attr;
366+
}
367+
368+
// We'll use this to prevent the jump when loading.
369+
$attr['class'][] = 'panel-row-style-full-width';
370+
}
371+
354372
return $attr;
355373
}
356374
}

readme.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ This theme makes use of the SiteOrigin Settings Framework contained in the /inc
106106

107107
== Changelog ==
108108

109+
= 1.20.29 - 30 March 2025 =
110+
* Page Builder: Accounted for CSS Container Breaker Before adding `panel-row-style-full-width`.
111+
109112
= 1.20.28 - 24 March 2025 =
110113
* Updated `Tested up to` tag.
111114
* Updated SiteOrigin Settings.

0 commit comments

Comments
 (0)