Make WordPress Core

Ticket #26210: 26210.2.diff

File 26210.2.diff, 1.0 KB (added by obenland, 12 years ago)
  • wp-content/themes/twentyfourteen/inc/widgets.php

     
    5858                        'link'    => __( 'Links',     'twentyfourteen' ),
    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
    6763        /**
     
    221217                        $instance['format'] = $new_instance['format'];
    222218                }
    223219
    224                 $this->flush_widget_cache();
    225 
    226220                return $instance;
    227221        }
    228222
    229223        /**
    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 );
    238         }
    239 
    240         /**
    241224         * Display the form for this widget on the Widgets page of the Admin area.
    242225         *
    243226         * @since Twenty Fourteen 1.0