Twenty Fourteen: remove more widget cache code, props obenland. See #26210.
Built from https://develop.svn.wordpress.org/trunk@26580 git-svn-id: http://core.svn.wordpress.org/trunk@26470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d8f11f3465
commit
8858b43027
|
@ -58,10 +58,6 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
|
|||
'link' => __( 'Links', 'twentyfourteen' ),
|
||||
'gallery' => __( 'Galleries', 'twentyfourteen' ),
|
||||
);
|
||||
|
||||
add_action( 'save_post', array( $this, 'flush_widget_cache' ) );
|
||||
add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) );
|
||||
add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -221,22 +217,9 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
|
|||
$instance['format'] = $new_instance['format'];
|
||||
}
|
||||
|
||||
$this->flush_widget_cache();
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete the transient.
|
||||
*
|
||||
* @since Twenty Fourteen 1.0
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function flush_widget_cache() {
|
||||
delete_transient( $this->id );
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the form for this widget on the Widgets page of the Admin area.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue