From f28ecbabc409fce7642eca862346f4d9cb931d5f Mon Sep 17 00:00:00 2001 From: nacin Date: Fri, 25 May 2012 18:52:13 +0000 Subject: [PATCH] Skip cached credits if version number doesn't match. props duck_. fixes #20270. git-svn-id: http://core.svn.wordpress.org/trunk@20909 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/credits.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-admin/credits.php b/wp-admin/credits.php index 786ab462f..d6e1801de 100644 --- a/wp-admin/credits.php +++ b/wp-admin/credits.php @@ -17,7 +17,9 @@ function wp_credits() { $results = get_site_transient( 'wordpress_credits_' . $locale ); - if ( ! is_array( $results ) ) { + if ( ! is_array( $results ) + || ( isset( $results['data']['version'] ) && strpos( $wp_version, $results['data']['version'] ) !== 0 ) + ) { $response = wp_remote_get( "http://api.wordpress.org/core/credits/1.0/?version=$wp_version&locale=$locale" ); if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) )