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
This commit is contained in:
parent
8d65f7dc7c
commit
20e5b27731
|
@ -31,6 +31,10 @@ function wp_version_check( $extra_stats = array() ) {
|
||||||
$current = get_site_transient( 'update_core' );
|
$current = get_site_transient( 'update_core' );
|
||||||
$translations = wp_get_installed_translations( '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) ) {
|
if ( ! is_object($current) ) {
|
||||||
$current = new stdClass;
|
$current = new stdClass;
|
||||||
$current->updates = array();
|
$current->updates = array();
|
||||||
|
|
Loading…
Reference in New Issue