From 51933413f64c2b8e06489981e2e6029b990226d5 Mon Sep 17 00:00:00 2001 From: Alex S <17275120+AlexGStapleton@users.noreply.github.com> Date: Mon, 10 Jan 2022 02:24:21 +1000 Subject: [PATCH 1/4] Sidebar Emulator: Account for potential notice when setting widget id --- inc/sidebars-emulator.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/sidebars-emulator.php b/inc/sidebars-emulator.php index 75e196805..734212d81 100644 --- a/inc/sidebars-emulator.php +++ b/inc/sidebars-emulator.php @@ -50,7 +50,9 @@ function __call( $name, $args ) { if ( $instance_class == $widget_class && ! empty( $sidebar_id ) ) { //The option value uses only the widget id number as keys preg_match( '/-([0-9]+$)/', $sidebar_id, $num_match ); - $args[0][ $num_match[1] ] = $widget_instance; + if ( ! empty( $num_match ) && count( $num_match ) > 1 ) { + $args[0][ $num_match[1] ] = $widget_instance; + } } } } From 1d4c0de4b5b83f529f440c2f7c0a6afda295b659 Mon Sep 17 00:00:00 2001 From: Alex S <17275120+AlexGStapleton@users.noreply.github.com> Date: Tue, 11 Jan 2022 02:16:57 +1100 Subject: [PATCH 2/4] Code Structure change based on feedback The additional check is redundant, and while there's really no major difference performance-wise it makes sense to make the change. --- inc/sidebars-emulator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/sidebars-emulator.php b/inc/sidebars-emulator.php index 734212d81..cc5eb9552 100644 --- a/inc/sidebars-emulator.php +++ b/inc/sidebars-emulator.php @@ -50,7 +50,7 @@ function __call( $name, $args ) { if ( $instance_class == $widget_class && ! empty( $sidebar_id ) ) { //The option value uses only the widget id number as keys preg_match( '/-([0-9]+$)/', $sidebar_id, $num_match ); - if ( ! empty( $num_match ) && count( $num_match ) > 1 ) { + if ( ! empty( $num_match ) ) { $args[0][ $num_match[1] ] = $widget_instance; } } From d18aa07176982102e3bd4e51aeae040f15b2382f Mon Sep 17 00:00:00 2001 From: Andrew Misplon Date: Tue, 25 Jan 2022 21:34:14 +0200 Subject: [PATCH 3/4] Updated Tested up to tag --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 3846bb689..bad01768d 100644 --- a/readme.txt +++ b/readme.txt @@ -1,7 +1,7 @@ === Page Builder by SiteOrigin === Tags: page builder, responsive, parallax, widgets, blocks, gallery, layout, grid, cms, builder, widget Requires at least: 4.7 -Tested up to: 5.8 +Tested up to: 5.9 Requires PHP: 5.6.20 Stable tag: trunk Build time: unbuilt From 982918213ca97428ca60eba07eb19e4525d5501c Mon Sep 17 00:00:00 2001 From: Andrew Misplon Date: Wed, 26 Jan 2022 22:39:26 +0200 Subject: [PATCH 4/4] Updated changelog --- readme.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/readme.txt b/readme.txt index bad01768d..7f613d42c 100644 --- a/readme.txt +++ b/readme.txt @@ -107,6 +107,10 @@ SiteOrigin Premium includes access to our professional email support service, pe == Changelog == += 2.16.1 - 26 January 2022 = +* Sidebar Emulator: Accounted for a potential notice when setting widget ID. +* Updated the `Tested up to tag` to `5.9`. + = 2.16.0 - 04 January 2022 = * Added a new global `Mobile Widget Bottom Margin` setting. * Added a new global `Mobile Cell Bottom Margin` setting.