]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-admin/credits.php
Wordpress 4.5.3
[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 streamlines your workflow, whether you&#8217;re writing or building your site.' ), $display_version ); ?></div>
24
25 <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
26
27 <h2 class="nav-tab-wrapper wp-clearfix">
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">';
39         /* translators: 1: https://wordpress.org/about/, 2: https://make.wordpress.org/ */
40         printf( __( 'WordPress is created by a <a href="%1$s">worldwide team</a> of passionate individuals. <a href="%2$s">Get involved in WordPress</a>.' ),
41                 'https://wordpress.org/about/',
42                 __( 'https://make.wordpress.org/' )
43         );
44         echo '</p>';
45         include( ABSPATH . 'wp-admin/admin-footer.php' );
46         exit;
47 }
48
49 echo '<p class="about-description">' . __( 'WordPress is created by a worldwide team of passionate individuals.' ) . "</p>\n";
50
51 foreach ( $credits['groups'] as $group_slug => $group_data ) {
52         if ( $group_data['name'] ) {
53                 if ( 'Translators' == $group_data['name'] ) {
54                         // Considered a special slug in the API response. (Also, will never be returned for en_US.)
55                         $title = _x( 'Translators', 'Translate this to be the equivalent of English Translators in your language for the credits page Translators section' );
56                 } elseif ( isset( $group_data['placeholders'] ) ) {
57                         $title = vsprintf( translate( $group_data['name'] ), $group_data['placeholders'] );
58                 } else {
59                         $title = translate( $group_data['name'] );
60                 }
61
62                 echo '<h3 class="wp-people-group">' . esc_html( $title ) . "</h3>\n";
63         }
64
65         if ( ! empty( $group_data['shuffle'] ) )
66                 shuffle( $group_data['data'] ); // We were going to sort by ability to pronounce "hierarchical," but that wouldn't be fair to Matt.
67
68         switch ( $group_data['type'] ) {
69                 case 'list' :
70                         array_walk( $group_data['data'], '_wp_credits_add_profile_link', $credits['data']['profiles'] );
71                         echo '<p class="wp-credits-list">' . wp_sprintf( '%l.', $group_data['data'] ) . "</p>\n\n";
72                         break;
73                 case 'libraries' :
74                         array_walk( $group_data['data'], '_wp_credits_build_object_link' );
75                         echo '<p class="wp-credits-list">' . wp_sprintf( '%l.', $group_data['data'] ) . "</p>\n\n";
76                         break;
77                 default:
78                         $compact = 'compact' == $group_data['type'];
79                         $classes = 'wp-people-group ' . ( $compact ? 'compact' : '' );
80                         echo '<ul class="' . $classes . '" id="wp-people-group-' . $group_slug . '">' . "\n";
81                         foreach ( $group_data['data'] as $person_data ) {
82                                 echo '<li class="wp-person" id="wp-person-' . esc_attr( $person_data[2] ) . '">' . "\n\t";
83                                 echo '<a href="' . esc_url( sprintf( $credits['data']['profiles'], $person_data[2] ) ) . '" class="web">';
84                                 $size = 'compact' == $group_data['type'] ? 30 : 60;
85                                 $data = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array( 'size' => $size ) );
86                                 $size *= 2;
87                                 $data2x = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array( 'size' => $size ) );
88                                 echo '<img src="' . esc_url( $data['url'] ) . '" srcset="' . esc_url( $data2x['url'] ) . ' 2x" class="gravatar" alt="" />' . "\n";
89                                 echo esc_html( $person_data[0] ) . "</a>\n\t";
90                                 if ( ! $compact )
91                                         echo '<span class="title">' . translate( $person_data[3] ) . "</span>\n";
92                                 echo "</li>\n";
93                         }
94                         echo "</ul>\n";
95                 break;
96         }
97 }
98
99 ?>
100 <p class="clear"><?php
101         /* translators: %s: https://make.wordpress.org/ */
102         printf( __( 'Want to see your name in lights on this page? <a href="%s">Get involved in WordPress</a>.' ),
103                 __( 'https://make.wordpress.org/' )
104         );
105 ?></p>
106
107 </div>
108 <?php
109
110 include( ABSPATH . 'wp-admin/admin-footer.php' );
111
112 return;
113
114 // These are strings returned by the API that we want to be translatable
115 __( 'Project Leaders' );
116 __( 'Core Contributors to WordPress %s' );
117 __( 'Contributing Developers' );
118 __( 'Cofounder, Project Lead' );
119 __( 'Lead Developer' );
120 __( 'Release Lead' );
121 __( 'Release Design Lead' );
122 __( 'Release Deputy' );
123 __( 'Core Developer' );
124 __( 'External Libraries' );