Check DOING_AUTOSAVE before flushing transients

So that we don’t flush transients more often than necessary.

Fixes #646
This commit is contained in:
Nick Daugherty 2014-11-13 17:44:08 -07:00
parent bb867c0fcb
commit 711ce1967e
1 changed files with 3 additions and 0 deletions

View File

@ -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' );
} }