Twenty Elevent Ephemera widget fix for caching in Customizer preview.

Fixes #36429. Props anneschmidt, westonruter.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Tammie Lister 2016-05-29 16:06:30 +00:00
parent 7a9ed544e8
commit c0302df02f
2 changed files with 6 additions and 3 deletions

View File

@ -56,7 +56,7 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
if ( ! isset( $args['widget_id'] ) ) if ( ! isset( $args['widget_id'] ) )
$args['widget_id'] = null; $args['widget_id'] = null;
if ( isset( $cache[ $args['widget_id'] ] ) ) { if ( ! is_customize_preview() && isset( $cache[ $args['widget_id'] ] ) ) {
echo $cache[ $args['widget_id'] ]; echo $cache[ $args['widget_id'] ];
return; return;
} }
@ -132,7 +132,10 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
endif; endif;
$cache[ $args['widget_id'] ] = ob_get_flush(); $cache[ $args['widget_id'] ] = ob_get_flush();
wp_cache_set( 'widget_twentyeleven_ephemera', $cache, 'widget' ); if ( ! is_customize_preview() ) {
wp_cache_set( 'widget_twentyeleven_ephemera', $cache, 'widget' );
}
} }
/** /**

View File

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