Make WordPress Core

Changeset 37590


Ignore:
Timestamp:
05/29/2016 04:05:46 PM (8 years ago)
Author:
karmatosed
Message:

Twenty Elevent Ephemera widget fix for caching in Customizer preview.
Fixes #36429. Props anneschmidt, westonruter.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyeleven/inc/widgets.php

    r37040 r37590  
    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;
     
    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
Note: See TracChangeset for help on using the changeset viewer.