From 20e5b27731560906d4185ffae216cc4c48ee0904 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Fri, 15 Nov 2013 02:35:10 +0000 Subject: [PATCH] Invalidate the 'update_core' Update check transient when $wp_version changes. See #25831 Built from https://develop.svn.wordpress.org/trunk@26188 git-svn-id: http://core.svn.wordpress.org/trunk@26096 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/update.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wp-includes/update.php b/wp-includes/update.php index 82a6366eba..437ffb94ee 100644 --- a/wp-includes/update.php +++ b/wp-includes/update.php @@ -31,6 +31,10 @@ function wp_version_check( $extra_stats = array() ) { $current = get_site_transient( 'update_core' ); $translations = wp_get_installed_translations( 'core' ); + // Invalidate the transient when $wp_version changes + if ( is_object( $current ) && $wp_version != $current->version_checked ) + $current = false; + if ( ! is_object($current) ) { $current = new stdClass; $current->updates = array();