]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/credits.php
Wordpress 3.5
[autoinstalls/wordpress.git] / wp-admin / credits.php
index cdc84c7c6989a621a407c4c21012bd0c00441593..5249e1181b218aed2ef70683c599c362b79c25db 100644 (file)
@@ -17,7 +17,9 @@ function wp_credits() {
 
        $results = get_site_transient( 'wordpress_credits_' . $locale );
 
 
        $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 ) )
                $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;
 
                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;
        }
 
        return $results;
@@ -44,13 +46,13 @@ function _wp_credits_build_object_link( &$data ) {
 
 list( $display_version ) = explode( '-', $wp_version );
 
 
 list( $display_version ) = explode( '-', $wp_version );
 
-include( './admin-header.php' );
+include( ABSPATH . 'wp-admin/admin-header.php' );
 ?>
 <div class="wrap about-wrap">
 
 <h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
 
 ?>
 <div class="wrap about-wrap">
 
 <h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
 
-<div class="about-text"><?php printf( __( 'Thank you for updating to the latest version! Using WordPress %s will improve your looks, personality, and web publishing experience. Okay, just the last one, but still. :)' ), $display_version ); ?></div>
+<div class="about-text"><?php printf( __( 'Thank you for updating to the latest version! WordPress %s is more polished and enjoyable than ever before. We hope you like it.' ), $display_version ); ?></div>
 
 <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
 
 
 <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
 
@@ -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' ) ) . '</p>';
                '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' ) ) . '</p>';
-       include( './admin-footer.php' );
+       include( ABSPATH . 'wp-admin/admin-footer.php' );
        exit;
 }
 
        exit;
 }
 
@@ -134,7 +136,7 @@ foreach ( $credits['groups'] as $group_slug => $group_data ) {
 </div>
 <?php
 
 </div>
 <?php
 
-include( './admin-footer.php' );
+include( ABSPATH . 'wp-admin/admin-footer.php' );
 
 return;
 
 
 return;
 
@@ -157,5 +159,3 @@ __( 'XML-RPC' );
 __( 'Internationalization' );
 __( 'External Libraries' );
 __( 'Icon Design' );
 __( 'Internationalization' );
 __( 'External Libraries' );
 __( 'Icon Design' );
-
-?>