author | ymh <ymh.work@gmail.com> |
Mon, 14 Oct 2019 17:39:30 +0200 | |
changeset 7 | cf61fcea0001 |
parent 5 | 5e2f62d02dcd |
child 9 | 177826044cd9 |
permissions | -rw-r--r-- |
0 | 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' ); |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
11 |
require_once( dirname( __FILE__ ) . '/includes/credits.php' ); |
0 | 12 |
|
13 |
$title = __( 'Credits' ); |
|
14 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
15 |
list( $display_version ) = explode( '-', get_bloginfo( 'version' ) ); |
0 | 16 |
|
17 |
include( ABSPATH . 'wp-admin/admin-header.php' ); |
|
18 |
?> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
19 |
<div class="wrap about-wrap full-width-layout"> |
0 | 20 |
|
21 |
<h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1> |
|
22 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
23 |
<p class="about-text"><?php printf( __( 'Thank you for updating to the latest version! WordPress %s will smooth your design workflow and keep you safe from coding errors.' ), $display_version ); ?></p> |
0 | 24 |
|
25 |
<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div> |
|
26 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
27 |
<h2 class="nav-tab-wrapper wp-clearfix"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
28 |
<a href="about.php" class="nav-tab"><?php _e( 'What’s New' ); ?></a> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
29 |
<a href="credits.php" class="nav-tab nav-tab-active"><?php _e( 'Credits' ); ?></a> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
30 |
<a href="freedoms.php" class="nav-tab"><?php _e( 'Freedoms' ); ?></a> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
31 |
<a href="freedoms.php?privacy-notice" class="nav-tab"><?php _e( 'Privacy' ); ?></a> |
0 | 32 |
</h2> |
33 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
34 |
<div class="about-wrap-content"> |
0 | 35 |
<?php |
36 |
||
37 |
$credits = wp_credits(); |
|
38 |
||
39 |
if ( ! $credits ) { |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
40 |
echo '<p class="about-description">'; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
41 |
/* translators: 1: https://wordpress.org/about/, 2: https://make.wordpress.org/ */ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
42 |
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>.' ), |
5 | 43 |
'https://wordpress.org/about/', |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
44 |
__( 'https://make.wordpress.org/' ) |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
45 |
); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
46 |
echo '</p>'; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
47 |
echo '</div>'; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
48 |
echo '</div>'; |
0 | 49 |
include( ABSPATH . 'wp-admin/admin-footer.php' ); |
50 |
exit; |
|
51 |
} |
|
52 |
||
53 |
echo '<p class="about-description">' . __( 'WordPress is created by a worldwide team of passionate individuals.' ) . "</p>\n"; |
|
54 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
55 |
echo '<p>' . sprintf( |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
56 |
/* translators: %s: https://make.wordpress.org/ */ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
57 |
__( 'Want to see your name in lights on this page? <a href="%s">Get involved in WordPress</a>.' ), |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
58 |
__( 'https://make.wordpress.org/' ) |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
59 |
) . '</p>'; |
0 | 60 |
|
61 |
foreach ( $credits['groups'] as $group_slug => $group_data ) { |
|
62 |
if ( $group_data['name'] ) { |
|
63 |
if ( 'Translators' == $group_data['name'] ) { |
|
64 |
// Considered a special slug in the API response. (Also, will never be returned for en_US.) |
|
65 |
$title = _x( 'Translators', 'Translate this to be the equivalent of English Translators in your language for the credits page Translators section' ); |
|
66 |
} elseif ( isset( $group_data['placeholders'] ) ) { |
|
67 |
$title = vsprintf( translate( $group_data['name'] ), $group_data['placeholders'] ); |
|
68 |
} else { |
|
69 |
$title = translate( $group_data['name'] ); |
|
70 |
} |
|
71 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
72 |
echo '<h3 class="wp-people-group">' . esc_html( $title ) . "</h3>\n"; |
0 | 73 |
} |
74 |
||
75 |
if ( ! empty( $group_data['shuffle'] ) ) |
|
76 |
shuffle( $group_data['data'] ); // We were going to sort by ability to pronounce "hierarchical," but that wouldn't be fair to Matt. |
|
77 |
||
78 |
switch ( $group_data['type'] ) { |
|
79 |
case 'list' : |
|
80 |
array_walk( $group_data['data'], '_wp_credits_add_profile_link', $credits['data']['profiles'] ); |
|
81 |
echo '<p class="wp-credits-list">' . wp_sprintf( '%l.', $group_data['data'] ) . "</p>\n\n"; |
|
82 |
break; |
|
83 |
case 'libraries' : |
|
84 |
array_walk( $group_data['data'], '_wp_credits_build_object_link' ); |
|
85 |
echo '<p class="wp-credits-list">' . wp_sprintf( '%l.', $group_data['data'] ) . "</p>\n\n"; |
|
86 |
break; |
|
87 |
default: |
|
88 |
$compact = 'compact' == $group_data['type']; |
|
89 |
$classes = 'wp-people-group ' . ( $compact ? 'compact' : '' ); |
|
90 |
echo '<ul class="' . $classes . '" id="wp-people-group-' . $group_slug . '">' . "\n"; |
|
91 |
foreach ( $group_data['data'] as $person_data ) { |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
92 |
echo '<li class="wp-person" id="wp-person-' . esc_attr( $person_data[2] ) . '">' . "\n\t"; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
93 |
echo '<a href="' . esc_url( sprintf( $credits['data']['profiles'], $person_data[2] ) ) . '" class="web">'; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
94 |
$size = 'compact' == $group_data['type'] ? 30 : 60; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
95 |
$data = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array( 'size' => $size ) ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
96 |
$size *= 2; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
97 |
$data2x = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array( 'size' => $size ) ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
98 |
echo '<img src="' . esc_url( $data['url'] ) . '" srcset="' . esc_url( $data2x['url'] ) . ' 2x" class="gravatar" alt="" />' . "\n"; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
99 |
echo esc_html( $person_data[0] ) . "</a>\n\t"; |
0 | 100 |
if ( ! $compact ) |
101 |
echo '<span class="title">' . translate( $person_data[3] ) . "</span>\n"; |
|
102 |
echo "</li>\n"; |
|
103 |
} |
|
104 |
echo "</ul>\n"; |
|
105 |
break; |
|
106 |
} |
|
107 |
} |
|
108 |
||
109 |
?> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
110 |
</div> |
0 | 111 |
</div> |
112 |
<?php |
|
113 |
||
114 |
include( ABSPATH . 'wp-admin/admin-footer.php' ); |
|
115 |
||
116 |
return; |
|
117 |
||
118 |
// These are strings returned by the API that we want to be translatable |
|
119 |
__( 'Project Leaders' ); |
|
120 |
__( 'Core Contributors to WordPress %s' ); |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
121 |
__( 'Noteworthy Contributors' ); |
0 | 122 |
__( 'Cofounder, Project Lead' ); |
123 |
__( 'Lead Developer' ); |
|
5 | 124 |
__( 'Release Lead' ); |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
125 |
__( 'Release Design Lead' ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
126 |
__( 'Release Deputy' ); |
0 | 127 |
__( 'Core Developer' ); |
128 |
__( 'External Libraries' ); |