Make WordPress Core

Changeset 26580


Ignore:
Timestamp:
12/03/2013 06:53:39 PM (13 years ago)
Author:
lancewillett
Message:

Twenty Fourteen: remove more widget cache code, props obenland. See #26210.

File:
1 edited

Legend:

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

    r26577 r26580  
    5959                        'gallery' => __( 'Galleries', 'twentyfourteen' ),
    6060                );
    61 
    62                 add_action( 'save_post',    array( $this, 'flush_widget_cache' ) );
    63                 add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) );
    64                 add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) );
    6561        }
    6662
     
    222218                }
    223219
    224                 $this->flush_widget_cache();
    225 
    226220                return $instance;
    227         }
    228 
    229         /**
    230          * Delete the transient.
    231          *
    232          * @since Twenty Fourteen 1.0
    233          *
    234          * @return void
    235          */
    236         function flush_widget_cache() {
    237                 delete_transient( $this->id );
    238221        }
    239222
Note: See TracChangeset for help on using the changeset viewer.