author | ymh <ymh.work@gmail.com> |
Wed, 16 Oct 2019 11:23:38 +0200 | |
changeset 14 | 00ac8f60d73f |
parent 9 | 177826044cd9 |
child 16 | a86126ab1dd4 |
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 |
|
9 | 21 |
<h1> |
22 |
<?php |
|
23 |
/* translators: %s: The current WordPress version number */ |
|
24 |
printf( __( 'Welcome to WordPress %s' ), $display_version ); |
|
25 |
?> |
|
26 |
</h1> |
|
0 | 27 |
|
9 | 28 |
<p class="about-text"> |
29 |
<?php |
|
30 |
printf( |
|
31 |
/* translators: %s: The current WordPress version number */ |
|
32 |
__( 'Congratulations on updating to WordPress %s! This update makes it easier than ever to fix your site if something goes wrong.' ), |
|
33 |
$display_version |
|
34 |
); |
|
35 |
?> |
|
36 |
</p> |
|
0 | 37 |
|
9 | 38 |
<div class="wp-badge"> |
39 |
<?php |
|
40 |
/* translators: %s: The current WordPress version number */ |
|
41 |
printf( __( 'Version %s' ), $display_version ); |
|
42 |
?> |
|
43 |
</div> |
|
44 |
||
45 |
<nav class="nav-tab-wrapper wp-clearfix" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>"> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
46 |
<a href="about.php" class="nav-tab"><?php _e( 'What’s New' ); ?></a> |
9 | 47 |
<a href="credits.php" class="nav-tab nav-tab-active" aria-current="page"><?php _e( 'Credits' ); ?></a> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
48 |
<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
|
49 |
<a href="freedoms.php?privacy-notice" class="nav-tab"><?php _e( 'Privacy' ); ?></a> |
9 | 50 |
</nav> |
0 | 51 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
52 |
<div class="about-wrap-content"> |
0 | 53 |
<?php |
54 |
||
55 |
$credits = wp_credits(); |
|
56 |
||
57 |
if ( ! $credits ) { |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
58 |
echo '<p class="about-description">'; |
9 | 59 |
printf( |
60 |
/* translators: 1: https://wordpress.org/about/, 2: https://make.wordpress.org/ */ |
|
61 |
__( '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 | 62 |
'https://wordpress.org/about/', |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
63 |
__( 'https://make.wordpress.org/' ) |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
64 |
); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
65 |
echo '</p>'; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
66 |
echo '</div>'; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
67 |
echo '</div>'; |
0 | 68 |
include( ABSPATH . 'wp-admin/admin-footer.php' ); |
69 |
exit; |
|
70 |
} |
|
71 |
||
72 |
echo '<p class="about-description">' . __( 'WordPress is created by a worldwide team of passionate individuals.' ) . "</p>\n"; |
|
73 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
74 |
echo '<p>' . sprintf( |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
75 |
/* translators: %s: https://make.wordpress.org/ */ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
76 |
__( '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
|
77 |
__( 'https://make.wordpress.org/' ) |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
78 |
) . '</p>'; |
0 | 79 |
|
80 |
foreach ( $credits['groups'] as $group_slug => $group_data ) { |
|
81 |
if ( $group_data['name'] ) { |
|
82 |
if ( 'Translators' == $group_data['name'] ) { |
|
83 |
// Considered a special slug in the API response. (Also, will never be returned for en_US.) |
|
84 |
$title = _x( 'Translators', 'Translate this to be the equivalent of English Translators in your language for the credits page Translators section' ); |
|
85 |
} elseif ( isset( $group_data['placeholders'] ) ) { |
|
9 | 86 |
// phpcs:ignore WordPress.WP.I18n.LowLevelTranslationFunction,WordPress.WP.I18n.NonSingularStringLiteralText |
0 | 87 |
$title = vsprintf( translate( $group_data['name'] ), $group_data['placeholders'] ); |
88 |
} else { |
|
9 | 89 |
// phpcs:ignore WordPress.WP.I18n.LowLevelTranslationFunction,WordPress.WP.I18n.NonSingularStringLiteralText |
0 | 90 |
$title = translate( $group_data['name'] ); |
91 |
} |
|
92 |
||
9 | 93 |
echo '<h2 class="wp-people-group">' . esc_html( $title ) . "</h2>\n"; |
0 | 94 |
} |
95 |
||
9 | 96 |
if ( ! empty( $group_data['shuffle'] ) ) { |
0 | 97 |
shuffle( $group_data['data'] ); // We were going to sort by ability to pronounce "hierarchical," but that wouldn't be fair to Matt. |
9 | 98 |
} |
0 | 99 |
|
100 |
switch ( $group_data['type'] ) { |
|
9 | 101 |
case 'list': |
0 | 102 |
array_walk( $group_data['data'], '_wp_credits_add_profile_link', $credits['data']['profiles'] ); |
103 |
echo '<p class="wp-credits-list">' . wp_sprintf( '%l.', $group_data['data'] ) . "</p>\n\n"; |
|
104 |
break; |
|
9 | 105 |
case 'libraries': |
0 | 106 |
array_walk( $group_data['data'], '_wp_credits_build_object_link' ); |
107 |
echo '<p class="wp-credits-list">' . wp_sprintf( '%l.', $group_data['data'] ) . "</p>\n\n"; |
|
108 |
break; |
|
109 |
default: |
|
110 |
$compact = 'compact' == $group_data['type']; |
|
111 |
$classes = 'wp-people-group ' . ( $compact ? 'compact' : '' ); |
|
112 |
echo '<ul class="' . $classes . '" id="wp-people-group-' . $group_slug . '">' . "\n"; |
|
113 |
foreach ( $group_data['data'] as $person_data ) { |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
114 |
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
|
115 |
echo '<a href="' . esc_url( sprintf( $credits['data']['profiles'], $person_data[2] ) ) . '" class="web">'; |
9 | 116 |
$size = 'compact' == $group_data['type'] ? 30 : 60; |
117 |
$data = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array( 'size' => $size ) ); |
|
118 |
$size *= 2; |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
119 |
$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
|
120 |
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
|
121 |
echo esc_html( $person_data[0] ) . "</a>\n\t"; |
9 | 122 |
if ( ! $compact ) { |
123 |
// phpcs:ignore WordPress.WP.I18n.LowLevelTranslationFunction,WordPress.WP.I18n.NonSingularStringLiteralText |
|
0 | 124 |
echo '<span class="title">' . translate( $person_data[3] ) . "</span>\n"; |
9 | 125 |
} |
0 | 126 |
echo "</li>\n"; |
127 |
} |
|
128 |
echo "</ul>\n"; |
|
9 | 129 |
break; |
0 | 130 |
} |
131 |
} |
|
132 |
||
133 |
?> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
134 |
</div> |
0 | 135 |
</div> |
136 |
<?php |
|
137 |
||
138 |
include( ABSPATH . 'wp-admin/admin-footer.php' ); |
|
139 |
||
140 |
return; |
|
141 |
||
142 |
// These are strings returned by the API that we want to be translatable |
|
143 |
__( 'Project Leaders' ); |
|
9 | 144 |
/* translators: %s: The current WordPress version number */ |
0 | 145 |
__( 'Core Contributors to WordPress %s' ); |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
146 |
__( 'Noteworthy Contributors' ); |
0 | 147 |
__( 'Cofounder, Project Lead' ); |
148 |
__( 'Lead Developer' ); |
|
5 | 149 |
__( 'Release Lead' ); |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
150 |
__( 'Release Design Lead' ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
151 |
__( 'Release Deputy' ); |
0 | 152 |
__( 'Core Developer' ); |
153 |
__( 'External Libraries' ); |