]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-admin/credits.php
WordPress 4.4.2
[autoinstalls/wordpress.git] / wp-admin / credits.php
1 <?php
2 /**
3  * Credits administration panel.
4  *
5  * @package WordPress
6  * @subpackage Administration
7  */
8
9 /** WordPress Administration Bootstrap */
10 require_once( dirname( __FILE__ ) . '/admin.php' );
11 require_once( dirname( __FILE__ ) . '/includes/credits.php' );
12
13 $title = __( 'Credits' );
14
15 list( $display_version ) = explode( '-', $wp_version );
16
17 include( ABSPATH . 'wp-admin/admin-header.php' );
18 ?>
19 <div class="wrap about-wrap">
20
21 <h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
22
23 <div class="about-text"><?php printf( __( 'Thank you for updating! WordPress %s makes your site more connected and responsive.' ), $display_version ); ?></div>
24
25 <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
26
27 <h2 class="nav-tab-wrapper">
28         <a href="about.php" class="nav-tab"><?php _e( 'What&#8217;s New' ); ?></a>
29         <a href="credits.php" class="nav-tab nav-tab-active"><?php _e( 'Credits' ); ?></a>
30         <a href="freedoms.php" class="nav-tab"><?php _e( 'Freedoms' ); ?></a>
31 </h2>
32
33 <?php
34
35 $credits = wp_credits();
36
37 if ( ! $credits ) {
38         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>.' ),
39                 'https://wordpress.org/about/',
40                 /* translators: Url to the codex documentation on contributing to WordPress used on the credits page */
41                 __( 'https://codex.wordpress.org/Contributing_to_WordPress' ) ) . '</p>';
42         include( ABSPATH . 'wp-admin/admin-footer.php' );
43         exit;
44 }
45
46 echo '<p class="about-description">' . __( 'WordPress is created by a worldwide team of passionate individuals.' ) . "</p>\n";
47
48 foreach ( $credits['groups'] as $group_slug => $group_data ) {
49         if ( $group_data['name'] ) {
50                 if ( 'Translators' == $group_data['name'] ) {
51                         // Considered a special slug in the API response. (Also, will never be returned for en_US.)
52                         $title = _x( 'Translators', 'Translate this to be the equivalent of English Translators in your language for the credits page Translators section' );
53                 } elseif ( isset( $group_data['placeholders'] ) ) {
54                         $title = vsprintf( translate( $group_data['name'] ), $group_data['placeholders'] );
55                 } else {
56                         $title = translate( $group_data['name'] );
57                 }
58
59                 echo '<h3 class="wp-people-group">' . esc_html( $title ) . "</h3>\n";
60         }
61
62         if ( ! empty( $group_data['shuffle'] ) )
63                 shuffle( $group_data['data'] ); // We were going to sort by ability to pronounce "hierarchical," but that wouldn't be fair to Matt.
64
65         switch ( $group_data['type'] ) {
66                 case 'list' :
67                         array_walk( $group_data['data'], '_wp_credits_add_profile_link', $credits['data']['profiles'] );
68                         echo '<p class="wp-credits-list">' . wp_sprintf( '%l.', $group_data['data'] ) . "</p>\n\n";
69                         break;
70                 case 'libraries' :
71                         array_walk( $group_data['data'], '_wp_credits_build_object_link' );
72                         echo '<p class="wp-credits-list">' . wp_sprintf( '%l.', $group_data['data'] ) . "</p>\n\n";
73                         break;
74                 default:
75                         $compact = 'compact' == $group_data['type'];
76                         $classes = 'wp-people-group ' . ( $compact ? 'compact' : '' );
77                         echo '<ul class="' . $classes . '" id="wp-people-group-' . $group_slug . '">' . "\n";
78                         foreach ( $group_data['data'] as $person_data ) {
79                                 echo '<li class="wp-person" id="wp-person-' . esc_attr( $person_data[2] ) . '">' . "\n\t";
80                                 echo '<a href="' . esc_url( sprintf( $credits['data']['profiles'], $person_data[2] ) ) . '">';
81                                 $size = 'compact' == $group_data['type'] ? 30 : 60;
82                                 $data = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array( 'size' => $size ) );
83                                 $size *= 2;
84                                 $data2x = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array( 'size' => $size ) );
85                                 echo '<img src="' . esc_url( $data['url'] ) . '" srcset="' . esc_url( $data2x['url'] ) . ' 2x" class="gravatar" alt="' . esc_attr( $person_data[0] ) . '" /></a>' . "\n\t";
86                                 echo '<a class="web" href="' . esc_url( sprintf( $credits['data']['profiles'], $person_data[2] ) ) . '">' . esc_html( $person_data[0] ) . "</a>\n\t";
87                                 if ( ! $compact )
88                                         echo '<span class="title">' . translate( $person_data[3] ) . "</span>\n";
89                                 echo "</li>\n";
90                         }
91                         echo "</ul>\n";
92                 break;
93         }
94 }
95
96 ?>
97 <p class="clear"><?php printf( __( 'Want to see your name in lights on this page? <a href="%s">Get involved in WordPress</a>.' ),
98         /* translators: URL to the Make WordPress 'Get Involved' landing page used on the credits page */
99         __( 'https://make.wordpress.org/' ) ); ?></p>
100
101 </div>
102 <?php
103
104 include( ABSPATH . 'wp-admin/admin-footer.php' );
105
106 return;
107
108 // These are strings returned by the API that we want to be translatable
109 __( 'Project Leaders' );
110 __( 'Extended Core Team' );
111 __( 'Core Developers' );
112 __( 'Recent Rockstars' );
113 __( 'Core Contributors to WordPress %s' );
114 __( 'Contributing Developers' );
115 __( 'Cofounder, Project Lead' );
116 __( 'Lead Developer' );
117 __( 'Release Lead' );
118 __( 'User Experience Lead' );
119 __( 'Core Developer' );
120 __( 'Core Committer' );
121 __( 'Guest Committer' );
122 __( 'Developer' );
123 __( 'Designer' );
124 __( 'Docs Committer' );
125 __( 'XML-RPC' );
126 __( 'Internationalization' );
127 __( 'External Libraries' );
128 __( 'Icon Design' );