3 * Credits administration panel.
6 * @subpackage Administration
9 /** WordPress Administration Bootstrap */
10 require_once( './admin.php' );
12 $title = __( 'Credits' );
14 function wp_credits() {
16 $locale = get_locale();
18 $results = get_site_transient( 'wordpress_credits_' . $locale );
20 if ( ! is_array( $results )
21 || ( isset( $results['data']['version'] ) && strpos( $wp_version, $results['data']['version'] ) !== 0 )
23 $response = wp_remote_get( "http://api.wordpress.org/core/credits/1.0/?version=$wp_version&locale=$locale" );
25 if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) )
28 $results = maybe_unserialize( wp_remote_retrieve_body( $response ) );
30 if ( ! is_array( $results ) )
33 set_site_transient( 'wordpress_credits_' . $locale, $results, 86400 ); // One day
39 function _wp_credits_add_profile_link( &$display_name, $username, $profiles ) {
40 $display_name = '<a href="' . esc_url( sprintf( $profiles, $username ) ) . '">' . esc_html( $display_name ) . '</a>';
43 function _wp_credits_build_object_link( &$data ) {
44 $data = '<a href="' . esc_url( $data[1] ) . '">' . $data[0] . '</a>';
47 list( $display_version ) = explode( '-', $wp_version );
49 include( ABSPATH . 'wp-admin/admin-header.php' );
51 <div class="wrap about-wrap">
53 <h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
55 <div class="about-text"><?php printf( __( 'Thank you for updating to the latest version! WordPress %s is already making your website better, faster, and more attractive, just like you!' ), $display_version ); ?></div>
57 <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
59 <h2 class="nav-tab-wrapper">
60 <a href="about.php" class="nav-tab">
61 <?php _e( 'What’s New' ); ?>
62 </a><a href="credits.php" class="nav-tab nav-tab-active">
63 <?php _e( 'Credits' ); ?>
64 </a><a href="freedoms.php" class="nav-tab">
65 <?php _e( 'Freedoms' ); ?>
71 $credits = wp_credits();
74 echo '<p class="about-description">' . 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>.' ),
75 'http://wordpress.org/about/',
76 /* translators: Url to the codex documentation on contributing to WordPress used on the credits page */
77 __( 'http://codex.wordpress.org/Contributing_to_WordPress' ) ) . '</p>';
78 include( ABSPATH . 'wp-admin/admin-footer.php' );
82 echo '<p class="about-description">' . __( 'WordPress is created by a worldwide team of passionate individuals.' ) . "</p>\n";
84 $gravatar = is_ssl() ? 'https://secure.gravatar.com/avatar/' : 'http://0.gravatar.com/avatar/';
86 foreach ( $credits['groups'] as $group_slug => $group_data ) {
87 if ( $group_data['name'] ) {
88 if ( 'Translators' == $group_data['name'] ) {
89 // Considered a special slug in the API response. (Also, will never be returned for en_US.)
90 $title = _x( 'Translators', 'Translate this to be the equivalent of English Translators in your language for the credits page Translators section' );
91 } elseif ( isset( $group_data['placeholders'] ) ) {
92 $title = vsprintf( translate( $group_data['name'] ), $group_data['placeholders'] );
94 $title = translate( $group_data['name'] );
97 echo '<h4 class="wp-people-group">' . $title . "</h4>\n";
100 if ( ! empty( $group_data['shuffle'] ) )
101 shuffle( $group_data['data'] ); // We were going to sort by ability to pronounce "hierarchical," but that wouldn't be fair to Matt.
103 switch ( $group_data['type'] ) {
105 array_walk( $group_data['data'], '_wp_credits_add_profile_link', $credits['data']['profiles'] );
106 echo '<p class="wp-credits-list">' . wp_sprintf( '%l.', $group_data['data'] ) . "</p>\n\n";
109 array_walk( $group_data['data'], '_wp_credits_build_object_link' );
110 echo '<p class="wp-credits-list">' . wp_sprintf( '%l.', $group_data['data'] ) . "</p>\n\n";
113 $compact = 'compact' == $group_data['type'];
114 $classes = 'wp-people-group ' . ( $compact ? 'compact' : '' );
115 echo '<ul class="' . $classes . '" id="wp-people-group-' . $group_slug . '">' . "\n";
116 foreach ( $group_data['data'] as $person_data ) {
117 echo '<li class="wp-person" id="wp-person-' . $person_data[2] . '">' . "\n\t";
118 echo '<a href="' . sprintf( $credits['data']['profiles'], $person_data[2] ) . '">';
119 $size = 'compact' == $group_data['type'] ? '30' : '60';
120 echo '<img src="' . $gravatar . $person_data[1] . '?s=' . $size . '" class="gravatar" alt="' . esc_attr( $person_data[0] ) . '" /></a>' . "\n\t";
121 echo '<a class="web" href="' . sprintf( $credits['data']['profiles'], $person_data[2] ) . '">' . $person_data[0] . "</a>\n\t";
123 echo '<span class="title">' . translate( $person_data[3] ) . "</span>\n";
132 <p class="clear"><?php printf( __( 'Want to see your name in lights on this page? <a href="%s">Get involved in WordPress</a>.' ),
133 /* translators: Url to the codex documentation on contributing to WordPress used on the credits page */
134 __( 'http://codex.wordpress.org/Contributing_to_WordPress' ) ); ?></p>
139 include( ABSPATH . 'wp-admin/admin-footer.php' );
143 // These are strings returned by the API that we want to be translatable
144 __( 'Project Leaders' );
145 __( 'Extended Core Team' );
146 __( 'Core Developers' );
147 __( 'Recent Rockstars' );
148 __( 'Core Contributors to WordPress %s' );
149 __( 'Contributing Developers' );
150 __( 'Cofounder, Project Lead' );
151 __( 'Lead Developer' );
152 __( 'User Experience Lead' );
153 __( 'Core Developer' );
154 __( 'Core Committer' );
155 __( 'Guest Committer' );
159 __( 'Internationalization' );
160 __( 'External Libraries' );