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:
parent
7a9ed544e8
commit
c0302df02f
|
@ -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,9 +132,12 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
$cache[ $args['widget_id'] ] = ob_get_flush();
|
$cache[ $args['widget_id'] ] = ob_get_flush();
|
||||||
|
if ( ! is_customize_preview() ) {
|
||||||
wp_cache_set( 'widget_twentyeleven_ephemera', $cache, 'widget' );
|
wp_cache_set( 'widget_twentyeleven_ephemera', $cache, 'widget' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update widget settings.
|
* Update widget settings.
|
||||||
*
|
*
|
||||||
|
|
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue