From c0302df02f79384d22570ce86cc8c75833bb50de Mon Sep 17 00:00:00 2001 From: Tammie Lister Date: Sun, 29 May 2016 16:06:30 +0000 Subject: [PATCH] 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 --- wp-content/themes/twentyeleven/inc/widgets.php | 7 +++++-- wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/wp-content/themes/twentyeleven/inc/widgets.php b/wp-content/themes/twentyeleven/inc/widgets.php index 979b65471f..9b007f4af2 100644 --- a/wp-content/themes/twentyeleven/inc/widgets.php +++ b/wp-content/themes/twentyeleven/inc/widgets.php @@ -56,7 +56,7 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget { if ( ! isset( $args['widget_id'] ) ) $args['widget_id'] = null; - if ( isset( $cache[ $args['widget_id'] ] ) ) { + if ( ! is_customize_preview() && isset( $cache[ $args['widget_id'] ] ) ) { echo $cache[ $args['widget_id'] ]; return; } @@ -132,7 +132,10 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget { endif; $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' ); + } + } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index ba5ec9497f..e3b5ebda77 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @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.