Twenty Elevent Ephemera widget fix for caching in Customizer preview.
Fixes #36429. Props anneschmidt, westonruter. git-svn-id: https://develop.svn.wordpress.org/trunk@37590 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c96858b0f2
commit
5664f0d6ea
@ -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' );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user