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.

Built from https://develop.svn.wordpress.org/trunk@36623


git-svn-id: http://core.svn.wordpress.org/trunk@36590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2016-02-23 01:22:26 +00:00
parent aa9ef96a52
commit 49c7012a7e
2 changed files with 2 additions and 1 deletions

View File

@ -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<!--dynamic_sidebar_after:%s:%d-->\n", esc_html( $index ), intval( $this->sidebar_instance_count[ $index ] ) );
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.5-alpha-36622';
$wp_version = '4.5-alpha-36623';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.