From 711ce1967eb6d81dbc2819e4555deb48b39a70c3 Mon Sep 17 00:00:00 2001 From: Nick Daugherty Date: Thu, 13 Nov 2014 17:44:08 -0700 Subject: [PATCH] Check DOING_AUTOSAVE before flushing transients MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit So that we don’t flush transients more often than necessary. Fixes #646 --- inc/template-tags.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inc/template-tags.php b/inc/template-tags.php index ae9c5905..41151baa 100644 --- a/inc/template-tags.php +++ b/inc/template-tags.php @@ -250,6 +250,9 @@ function _s_categorized_blog() { * Flush out the transients used in _s_categorized_blog. */ function _s_category_transient_flusher() { + if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { + return; + } // Like, beat it. Dig? delete_transient( '_s_categories' ); }