diff --git a/wp-admin/credits.php b/wp-admin/credits.php index e1784a46f..9e5d983e5 100644 --- a/wp-admin/credits.php +++ b/wp-admin/credits.php @@ -24,16 +24,22 @@ add_contextual_help($current_screen, add_action( 'admin_head', '_wp_credits_add_css' ); function _wp_credits_add_css() { ?> ' . esc_html( $display_name ) . ''; +function _wp_credits_add_profile_link( &$display_name, $username, $profiles ) { + $display_name = '' . esc_html( $display_name ) . ''; +} + +function _wp_credits_build_object_link( &$data ) { + $data = '' . $data[0] . ''; } include( './admin-header.php' ); @@ -73,9 +83,9 @@ include( './admin-header.php' ); ' . sprintf( __( 'WordPress is created by a worldwide team of passionate individuals. Get involved in WordPress.' ), 'http://wordpress.org/about/', /* translators: Url to the codex documentation on contributing to WordPress used on the credits page */ @@ -88,33 +98,49 @@ echo '

' . __( 'WordPress is created by a worldwide team of passionate individ $gravatar = is_ssl() ? 'https://secure.gravatar.com/avatar/' : 'http://0.gravatar.com/avatar/'; -foreach ( (array) $results['people'] as $group_slug => $members ) { - echo '

' . translate( $results['groups'][ $group_slug ] ) . "

\n"; - echo '\n"; -} +foreach ( $credits['groups'] as $group_slug => $group_data ) { + if ( $group_data['name'] ) { + if ( 'Translators' == $group_data['name'] ) { + // Considered a special slug in the API response. (Also, will never be returned for en_US.) + $title = _x( 'Translators', 'Translate this to be the equivalent of English Translators in your language for the credits page Translators section' ); + } elseif ( isset( $group_data['placeholders'] ) ) { + $title = vsprintf( translate( $group_data['name'] ), $group_data['placeholders'] ); + } else { + $title = $group_data['name']; + } -foreach ( (array) $results['lists'] as $group_slug => $members ) { - if ( $group_slug === 'translators' ) { - // Considered a special slug in the API response. (Also, will never be returned for en_US.) - $title = _x( 'Translators', 'Translate this to be the equivalent of English Translators in your language for the credits page Translators section' ); - } else { - $title = translate( $results['groups'][ $group_slug ] ); - if ( isset( $results['data']['placeholders'][ $group_slug ] ) ) - $title = vsprintf( $title, $results['data']['placeholders'][ $group_slug ] ); + echo '

' . $title . "

\n"; } - echo '

' . $title . "

\n\n"; - array_walk( $members, '_wp_credits_add_profile_link', $results['data']['profile_prefix'] ); - shuffle( $members ); - echo '

' . wp_sprintf( '%l.', $members ) . "

\n\n"; + if ( ! empty( $group_data['shuffle'] ) ) + shuffle( $group_data['data'] ); // We were going to sort by ability to pronounce "hierarchical," but that wouldn't be fair to Matt. + + switch ( $group_data['type'] ) { + case 'list' : + array_walk( $group_data['data'], '_wp_credits_add_profile_link', $credits['data']['profiles'] ); + echo '

' . wp_sprintf( '%l.', $group_data['data'] ) . "

\n\n"; + break; + case 'libraries' : + array_walk( $group_data['data'], '_wp_credits_build_object_link' ); + echo '

' . wp_sprintf( '%l.', $group_data['data'] ) . "

\n\n"; + break; + default: + $compact = 'compact' == $group_data['type']; + $classes = 'wp-people-group ' . ( $compact ? 'compact' : '' ); + echo '\n"; + break; + } } ?> @@ -137,10 +163,12 @@ __( 'Core Contributors to WordPress %s' ); __( 'Cofounder, Project Lead' ); __( 'Lead Developer' ); __( 'User Experience Lead' ); -__( 'Developer, Core Committer' ); +__( 'Core Committer' ); +__( 'Guest Committer' ); __( 'Developer' ); __( 'Designer' ); __( 'XML-RPC Developer' ); __( 'Internationalization' ); +__( 'External Libraries' ); ?>