diff --git a/wp-admin/credits.php b/wp-admin/credits.php index c1f2a5068c..834cafc7e5 100644 --- a/wp-admin/credits.php +++ b/wp-admin/credits.php @@ -27,9 +27,9 @@ function wp_credits() { global $wp_version; $locale = get_locale(); - $results = get_site_transient( 'wordpress_credits' ); + $results = get_site_transient( 'wordpress_credits_' . $locale ); - if ( !is_array( $results ) || !isset( $results['people'] ) ) { + if ( ! is_array( $results ) || ! isset( $results['people'] ) || ! isset( $results['lists'] ) ) { $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 ) ) @@ -37,10 +37,10 @@ function wp_credits() { $results = unserialize( wp_remote_retrieve_body( $response ) ); - if ( !is_array( $results ) ) + if ( ! is_array( $results ) ) return false; - set_site_transient( 'wordpress_credits', $results, 604800 ); // One week. + set_site_transient( 'wordpress_credits_' . $locale, $results, 86400 ); // @todo Set to one week. } return $results; @@ -60,7 +60,7 @@ include( './admin-header.php' ); $results = wp_credits(); -if ( !isset( $results['people'] ) ) { +if ( ! $results ) { echo '
' . sprintf( __( 'WordPress is created by a worldwide team of passionate individuals. Get involved in WordPress.' ), 'http://wordpress.org/about/', _x( 'http://codex.wordpress.org/Contributing_to_WordPress', 'Url to the codex documentation on contributing to WordPress used on the credits page' ) ) . '
'; @@ -85,11 +85,14 @@ foreach ( (array) $results['people'] as $group_slug => $members ) { echo "\n"; } -if ( isset( $results['props'] ) ) { - echo '