forked from mirror/_s
Check DOING_AUTOSAVE before flushing transients
So that we don’t flush transients more often than necessary. Fixes #646
This commit is contained in:
parent
bb867c0fcb
commit
711ce1967e
|
@ -250,6 +250,9 @@ function _s_categorized_blog() {
|
||||||
* Flush out the transients used in _s_categorized_blog.
|
* Flush out the transients used in _s_categorized_blog.
|
||||||
*/
|
*/
|
||||||
function _s_category_transient_flusher() {
|
function _s_category_transient_flusher() {
|
||||||
|
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Like, beat it. Dig?
|
// Like, beat it. Dig?
|
||||||
delete_transient( '_s_categories' );
|
delete_transient( '_s_categories' );
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue