From 778ee031797888593b180c6565a5d7c1b646522d Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Tue, 23 Feb 2016 01:21:38 +0000 Subject: [PATCH] Customize: Ensure `dynamic_sidebar()` finishes with removing the sidebar ID from the `current_dynamic_sidebar_id_stack`. This ensures that widgets appearing after a nested sidebar will continue to be selective refreshable. See #27355. git-svn-id: https://develop.svn.wordpress.org/trunk@36623 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-customize-widgets.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wp-includes/class-wp-customize-widgets.php b/src/wp-includes/class-wp-customize-widgets.php index ca171b2e57..f65e7bfe48 100644 --- a/src/wp-includes/class-wp-customize-widgets.php +++ b/src/wp-includes/class-wp-customize-widgets.php @@ -1694,6 +1694,7 @@ final class WP_Customize_Widgets { * @param int|string $index Index, name, or ID of the dynamic sidebar. */ public function end_dynamic_sidebar( $index ) { + array_shift( $this->current_dynamic_sidebar_id_stack ); if ( ! $this->manager->selective_refresh->is_render_partials_request() ) { printf( "\n\n", esc_html( $index ), intval( $this->sidebar_instance_count[ $index ] ) ); }