X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/5aa86a9053fb0fa15846bb60aac2fb8fdfff524a..6c8f14c09105d0afa4c1574215c59b5021040e76:/wp-admin/credits.php?ds=sidebyside diff --git a/wp-admin/credits.php b/wp-admin/credits.php index cdc84c7c..5249e118 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 ) ) @@ -28,7 +30,7 @@ function wp_credits() { if ( ! is_array( $results ) ) return false; - set_site_transient( 'wordpress_credits_' . $locale, $results, 86400 ); // One day + set_site_transient( 'wordpress_credits_' . $locale, $results, DAY_IN_SECONDS ); } return $results; @@ -44,13 +46,13 @@ function _wp_credits_build_object_link( &$data ) { list( $display_version ) = explode( '-', $wp_version ); -include( './admin-header.php' ); +include( ABSPATH . 'wp-admin/admin-header.php' ); ?>

-
+
@@ -73,7 +75,7 @@ if ( ! $credits ) { 'http://wordpress.org/about/', /* translators: Url to the codex documentation on contributing to WordPress used on the credits page */ __( 'http://codex.wordpress.org/Contributing_to_WordPress' ) ) . '

'; - include( './admin-footer.php' ); + include( ABSPATH . 'wp-admin/admin-footer.php' ); exit; } @@ -134,7 +136,7 @@ foreach ( $credits['groups'] as $group_slug => $group_data ) {