Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 

126 rader
4.6 KiB

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