Ticket #26210: 26210.2.diff
| File 26210.2.diff, 1.0 KB (added by , 12 years ago) |
|---|
-
wp-content/themes/twentyfourteen/inc/widgets.php
58 58 'link' => __( 'Links', 'twentyfourteen' ), 59 59 'gallery' => __( 'Galleries', 'twentyfourteen' ), 60 60 ); 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' ) );65 61 } 66 62 67 63 /** … … 221 217 $instance['format'] = $new_instance['format']; 222 218 } 223 219 224 $this->flush_widget_cache();225 226 220 return $instance; 227 221 } 228 222 229 223 /** 230 * Delete the transient.231 *232 * @since Twenty Fourteen 1.0233 *234 * @return void235 */236 function flush_widget_cache() {237 delete_transient( $this->id );238 }239 240 /**241 224 * Display the form for this widget on the Widgets page of the Admin area. 242 225 * 243 226 * @since Twenty Fourteen 1.0