[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

title

Body

[close]

/wp-admin/ -> credits.php (source)

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


Generated: Tue Oct 22 08:20:01 2019 Cross-referenced by PHPXref 0.7