Twenty Fourteen: remove more widget cache code, props obenland. See #26210.
git-svn-id: https://develop.svn.wordpress.org/trunk@26580 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a5e547d2fb
commit
3d96a0cb9a
@ -58,10 +58,6 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
|
|||||||
'link' => __( 'Links', 'twentyfourteen' ),
|
'link' => __( 'Links', 'twentyfourteen' ),
|
||||||
'gallery' => __( 'Galleries', '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'];
|
$instance['format'] = $new_instance['format'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->flush_widget_cache();
|
|
||||||
|
|
||||||
return $instance;
|
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.
|
* Display the form for this widget on the Widgets page of the Admin area.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user