Make WordPress Core


Ignore:
Timestamp:
11/11/2019 08:43:48 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Help/About: Update the 5.3 About page.

  • Remove extra padding on the Credits tab.

Previously [46556], [46572], [46616], [46705].
Props ryelle.
See #47708.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/credits.php

    r46705 r46709  
    8686        exit;
    8787}
     88?>
    8889
    89 $previous_type = '';
     90        <hr />
    9091
    91 foreach ( $credits['groups'] as $group_slug => $group_data ) :
    92         ?>
    93         <?php
    94         if ( $previous_type !== $group_data['type'] ) {
    95                 echo '<hr />';
    96         }
    97         ?>
    9892        <div class="about__section">
    99                 <div class="column <?php echo 'titles' === $group_data['type'] ? 'has-subtle-background-color' : ''; ?>">
    100 
    101         <?php
    102         if ( $group_data['name'] ) {
    103                 if ( 'Translators' == $group_data['name'] ) {
    104                         // Considered a special slug in the API response. (Also, will never be returned for en_US.)
    105                         $title = _x( 'Translators', 'Translate this to be the equivalent of English Translators in your language for the credits page Translators section' );
    106                 } elseif ( isset( $group_data['placeholders'] ) ) {
    107                         // phpcs:ignore WordPress.WP.I18n.LowLevelTranslationFunction,WordPress.WP.I18n.NonSingularStringLiteralText
    108                         $title = vsprintf( translate( $group_data['name'] ), $group_data['placeholders'] );
    109                 } else {
    110                         // phpcs:ignore WordPress.WP.I18n.LowLevelTranslationFunction,WordPress.WP.I18n.NonSingularStringLiteralText
    111                         $title = translate( $group_data['name'] );
    112                 }
    113 
    114                 echo '<h2 class="wp-people-group-title">' . esc_html( $title ) . "</h2>\n";
    115         }
    116 
    117         if ( ! empty( $group_data['shuffle'] ) ) {
    118                 shuffle( $group_data['data'] ); // We were going to sort by ability to pronounce "hierarchical," but that wouldn't be fair to Matt.
    119         }
    120 
    121         switch ( $group_data['type'] ) {
    122                 case 'list':
    123                         array_walk( $group_data['data'], '_wp_credits_add_profile_link', $credits['data']['profiles'] );
    124                         echo '<p class="wp-credits-list">' . wp_sprintf( '%l.', $group_data['data'] ) . "</p>\n\n";
    125                         break;
    126                 case 'libraries':
    127                         array_walk( $group_data['data'], '_wp_credits_build_object_link' );
    128                         echo '<p class="wp-credits-list">' . wp_sprintf( '%l.', $group_data['data'] ) . "</p>\n\n";
    129                         break;
    130                 default:
    131                         $compact = 'compact' == $group_data['type'];
    132                         $classes = 'wp-people-group ' . ( $compact ? 'compact' : '' );
    133                         echo '<ul class="' . $classes . '" id="wp-people-group-' . $group_slug . '">' . "\n";
    134                         foreach ( $group_data['data'] as $person_data ) {
    135                                 echo '<li class="wp-person" id="wp-person-' . esc_attr( $person_data[2] ) . '">' . "\n\t";
    136                                 echo '<a href="' . esc_url( sprintf( $credits['data']['profiles'], $person_data[2] ) ) . '" class="web">';
    137                                 $size   = 'compact' == $group_data['type'] ? 40 : 80;
    138                                 $data   = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array( 'size' => $size ) );
    139                                 $size  *= 2;
    140                                 $data2x = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array( 'size' => $size ) );
    141                                 echo '<img src="' . esc_url( $data['url'] ) . '" srcset="' . esc_url( $data2x['url'] ) . ' 2x" class="gravatar" alt="" />' . "\n";
    142                                 echo esc_html( $person_data[0] ) . "</a>\n\t";
    143                                 if ( ! $compact ) {
    144                                         // phpcs:ignore WordPress.WP.I18n.LowLevelTranslationFunction,WordPress.WP.I18n.NonSingularStringLiteralText
    145                                         echo '<span class="title">' . translate( $person_data[3] ) . "</span>\n";
    146                                 }
    147                                 echo "</li>\n";
    148                         }
    149                         echo "</ul>\n";
    150                         break;
    151         }
    152         $previous_type = $group_data['type'];
    153         ?>
    154 
     93                <div class="column has-subtle-background-color">
     94                        <?php wp_credits_section_title( $credits['groups']['core-developers'] ); ?>
     95                        <?php wp_credits_section_list( $credits, 'core-developers' ); ?>
     96                        <?php wp_credits_section_list( $credits, 'contributing-developers' ); ?>
    15597                </div>
    15698        </div>
    157 <?php endforeach; ?>
     99
     100        <hr />
     101
     102        <div class="about__section">
     103                <div class="column">
     104                        <?php wp_credits_section_title( $credits['groups']['props'] ); ?>
     105                        <?php wp_credits_section_list( $credits, 'props' ); ?>
     106                </div>
     107        </div>
     108
     109        <hr />
     110
     111        <?php if ( isset( $credits['groups']['translators'] ) || isset( $credits['groups']['validators'] ) ) : ?>
     112        <div class="about__section">
     113                <div class="column">
     114                        <?php wp_credits_section_title( $credits['groups']['validators'] ); ?>
     115                        <?php wp_credits_section_list( $credits, 'validators' ); ?>
     116                        <?php wp_credits_section_list( $credits, 'translators' ); ?>
     117                </div>
     118        </div>
     119
     120        <hr />
     121        <?php endif; ?>
     122
     123        <div class="about__section">
     124                <div class="column">
     125                        <?php wp_credits_section_title( $credits['groups']['libraries'] ); ?>
     126                        <?php wp_credits_section_list( $credits, 'libraries' ); ?>
     127                </div>
     128        </div>
    158129</div>
    159130<?php
Note: See TracChangeset for help on using the changeset viewer.