Skip to content

Commit 88d51a4

Browse files
author
karmatosed
committed
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
1 parent cb81c62 commit 88d51a4

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

wp-content/themes/twentyeleven/inc/widgets.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function widget( $args, $instance ) {
5656
if ( ! isset( $args['widget_id'] ) )
5757
$args['widget_id'] = null;
5858

59-
if ( isset( $cache[ $args['widget_id'] ] ) ) {
59+
if ( ! is_customize_preview() && isset( $cache[ $args['widget_id'] ] ) ) {
6060
echo $cache[ $args['widget_id'] ];
6161
return;
6262
}
@@ -132,7 +132,10 @@ function widget( $args, $instance ) {
132132
endif;
133133

134134
$cache[ $args['widget_id'] ] = ob_get_flush();
135-
wp_cache_set( 'widget_twentyeleven_ephemera', $cache, 'widget' );
135+
if ( ! is_customize_preview() ) {
136+
wp_cache_set( 'widget_twentyeleven_ephemera', $cache, 'widget' );
137+
}
138+
136139
}
137140

138141
/**

wp-includes/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* @global string $wp_version
66
*/
7-
$wp_version = '4.6-alpha-37589';
7+
$wp_version = '4.6-alpha-37590';
88

99
/**
1010
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

0 commit comments

Comments
 (0)