3 * Credits administration panel.
6 * @subpackage Administration
9 /** WordPress Administration Bootstrap */
10 require_once( './admin.php' );
12 $title = __( 'Credits' );
13 $parent_file = 'index.php';
15 add_contextual_help($current_screen,
16 '<p>' . __('Each name or handle is a link to that person’s profile in the WordPress.org community directory.') . '</p>' .
17 '<p>' . __('You can register your own profile at <a href="http://wordpress.org/support/register.php" target="_blank">this link</a> to start contributing.') . '</p>' .
18 '<p>' . __('WordPress always needs more people to report bugs, patch bugs, test betas, work on UI design, translate strings, write documentation, and add questions/answers/suggestions to the Support Forums. Join in!') . '</p>' .
19 '<p><strong>' . __('For more information:') . '</strong></p>' .
20 '<p>' . __('<a href="http://codex.wordpress.org/Contributing_to_WordPress" target="_blank">Documentation on Contributing to WordPress</a>') . '</p>' .
21 '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
24 add_action( 'admin_head', '_wp_credits_add_css' );
25 function _wp_credits_add_css() { ?>
26 <style type="text/css">
27 div.wrap { max-width: 750px }
28 h3.wp-people-group, p.wp-credits-list { clear: both; }
29 ul.compact { margin-bottom: 0 }
31 <?php if ( is_rtl() ) { ?>
32 ul.wp-people-group { margin-bottom: 30px; float: right; clear: both; }
33 li.wp-person { float: right; height: 70px; width: 220px; margin-left: 10px; }
34 li.wp-person img.gravatar { float: right; margin-left: 10px; margin-bottom: 10px; }
36 li.wp-person { float: left; margin-right: 10px; }
37 li.wp-person img.gravatar { float: left; margin-right: 10px; margin-bottom: 10px; }
39 li.wp-person img.gravatar { width: 60px; height: 60px; }
40 ul.compact li.wp-person img.gravatar { width: 30px; height: 30px; }
41 li.wp-person { height: 70px; width: 220px; }
42 ul.compact li.wp-person { height: 40px; width: auto; white-space: nowrap }
43 li.wp-person a.web { font-size: 16px; text-decoration: none; }
47 function wp_credits() {
49 $locale = get_locale();
51 $results = get_site_transient( 'wordpress_credits_' . $locale );
53 if ( ! is_array( $results ) ) {
54 $response = wp_remote_get( "http://api.wordpress.org/core/credits/1.0/?version=$wp_version&locale=$locale" );
56 if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) )
59 $results = maybe_unserialize( wp_remote_retrieve_body( $response ) );
61 if ( ! is_array( $results ) )
64 set_site_transient( 'wordpress_credits_' . $locale, $results, 86400 ); // One day
70 function _wp_credits_add_profile_link( &$display_name, $username, $profiles ) {
71 $display_name = '<a href="' . esc_url( sprintf( $profiles, $username ) ) . '">' . esc_html( $display_name ) . '</a>';
74 function _wp_credits_build_object_link( &$data ) {
75 $data = '<a href="' . esc_url( $data[1] ) . '">' . $data[0] . '</a>';
78 include( './admin-header.php' );
81 <?php screen_icon(); ?>
82 <h2><?php _e( 'WordPress Credits' ); ?></h2>
86 $credits = wp_credits();
89 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>.' ),
90 'http://wordpress.org/about/',
91 /* translators: Url to the codex documentation on contributing to WordPress used on the credits page */
92 __( 'http://codex.wordpress.org/Contributing_to_WordPress' ) ) . '</p>';
93 include( './admin-footer.php' );
97 echo '<p>' . __( 'WordPress is created by a worldwide team of passionate individuals. We couldn’t possibly list them all, but here some of the most influential people currently involved with the project:' ) . "</p>\n";
99 $gravatar = is_ssl() ? 'https://secure.gravatar.com/avatar/' : 'http://0.gravatar.com/avatar/';
101 foreach ( $credits['groups'] as $group_slug => $group_data ) {
102 if ( $group_data['name'] ) {
103 if ( 'Translators' == $group_data['name'] ) {
104 // Considered a special slug in the API response. (Also, will never be returned for en_US.)
105 $title = _x( 'Translators', 'Translate this to be the equivalent of English Translators in your language for the credits page Translators section' );
106 } elseif ( isset( $group_data['placeholders'] ) ) {
107 $title = vsprintf( translate( $group_data['name'] ), $group_data['placeholders'] );
109 $title = translate( $group_data['name'] );
112 echo '<h3 class="wp-people-group">' . $title . "</h3>\n";
115 if ( ! empty( $group_data['shuffle'] ) )
116 shuffle( $group_data['data'] ); // We were going to sort by ability to pronounce "hierarchical," but that wouldn't be fair to Matt.
118 switch ( $group_data['type'] ) {
120 array_walk( $group_data['data'], '_wp_credits_add_profile_link', $credits['data']['profiles'] );
121 echo '<p class="wp-credits-list">' . wp_sprintf( '%l.', $group_data['data'] ) . "</p>\n\n";
124 array_walk( $group_data['data'], '_wp_credits_build_object_link' );
125 echo '<p class="wp-credits-list">' . wp_sprintf( '%l.', $group_data['data'] ) . "</p>\n\n";
128 $compact = 'compact' == $group_data['type'];
129 $classes = 'wp-people-group ' . ( $compact ? 'compact' : '' );
130 echo '<ul class="' . $classes . '" id="wp-people-group-' . $group_slug . '">' . "\n";
131 foreach ( $group_data['data'] as $person_data ) {
132 echo '<li class="wp-person" id="wp-person-' . $person_data[2] . '">' . "\n\t";
133 echo '<a href="' . sprintf( $credits['data']['profiles'], $person_data[2] ) . '">';
134 $size = 'compact' == $group_data['type'] ? '30' : '60';
135 echo '<img src="' . $gravatar . $person_data[1] . '?s=' . $size . '" class="gravatar" alt="' . esc_attr( $person_data[0] ) . '" /></a>' . "\n\t";
136 echo '<a class="web" href="' . sprintf( $credits['data']['profiles'], $person_data[2] ) . '">' . $person_data[0] . "</a>\n\t";
138 echo '<br /><span class="title">' . translate( $person_data[3] ) . "</span>\n";
147 <p class="clear"><?php printf( __( 'Want to see your name in lights on this page? <a href="%s">Get involved in WordPress</a>.' ),
148 /* translators: Url to the codex documentation on contributing to WordPress used on the credits page */
149 __( 'http://codex.wordpress.org/Contributing_to_WordPress' ) ); ?></p>
154 include( './admin-footer.php' );
158 // These are strings returned by the API that we want to be translatable
159 __( 'Project Leaders' );
160 __( 'Extended Core Team' );
161 __( 'Recent Rockstars' );
162 __( 'Core Contributors to WordPress %s' );
163 __( 'Cofounder, Project Lead' );
164 __( 'Lead Developer' );
165 __( 'User Experience Lead' );
166 __( 'Core Committer' );
167 __( 'Guest Committer' );
171 __( 'Internationalization' );
172 __( 'External Libraries' );
174 __( 'Blue Color Scheme' );