Show display names from wp.org profiles on the credits page. see #17384.

git-svn-id: https://develop.svn.wordpress.org/trunk@17910 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2011-05-13 01:46:08 +00:00
parent 1a6371ea94
commit adb6231174
1 changed files with 5 additions and 5 deletions

View File

@ -27,7 +27,7 @@ function wp_credits() {
global $wp_version; global $wp_version;
$locale = get_locale(); $locale = get_locale();
$people = get_site_transient( 'wordpress_credits' ); $results = get_site_transient( 'wordpress_credits' );
if ( false === $people ) { if ( false === $people ) {
$response = wp_remote_get( "http://api.wordpress.org/core/credits/1.0/?version=$wp_version&locale=$locale" ); $response = wp_remote_get( "http://api.wordpress.org/core/credits/1.0/?version=$wp_version&locale=$locale" );
@ -40,14 +40,14 @@ function wp_credits() {
if ( ! $results ) if ( ! $results )
return false; return false;
set_site_transient( 'wordpress_credits', $people, 604800 ); // One week. set_site_transient( 'wordpress_credits', $results, 604800 ); // One week.
} }
return $results; return $results;
} }
function _wp_credits_add_profile_link( &$user, $key, $prefix ) { function _wp_credits_add_profile_link( &$display_name, $username, $prefix ) {
$user = '<a href="' . esc_url( $prefix . $user ) . '">' . esc_html( $user ) . '</a>'; $display_name = '<a href="' . esc_url( $prefix . $username ) . '">' . esc_html( $display_name ) . '</a>';
} }
include( './admin-header.php' ); include( './admin-header.php' );
@ -60,7 +60,7 @@ include( './admin-header.php' );
$results = wp_credits(); $results = wp_credits();
if ( false === $results ) { if ( ! $results ) {
echo '<p>' . sprintf( __( 'WordPress is created by a <a href="%1$s">worldwide team</a> of passionate individuals. <a href="%2$s">Get involved in WordPress</a>.' ), echo '<p>' . sprintf( __( 'WordPress is created by a <a href="%1$s">worldwide team</a> of passionate individuals. <a href="%2$s">Get involved in WordPress</a>.' ),
'http://wordpress.org/about/', 'http://wordpress.org/about/',
'http://codex.wordpress.org/Contributing_to_WordPress' ) . '</p>'; 'http://codex.wordpress.org/Contributing_to_WordPress' ) . '</p>';