Make WordPress Core


Ignore:
Timestamp:
11/11/2019 08:46:56 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Help/About: Update the 5.3 About page.

  • Remove the SVG from the upper right corner.
  • Make sure admin notices that should be hidden stay hidden.
  • Address a11y issues with contrast.
  • Fix an issue with the active nav tab hover.
  • Prevent names on the credits from breaking out of the box.
  • Update two strings with a more accurate information.
  • Remove extra padding on the Credits tab.

Previously [46556], [46572], [46616].

Reviewed by SergeyBiryukov.
Props ryelle, afercia, audrasjb, francina, mapk, desrosj, YordanSoares, melchoyce, azaozz, johnbillion, davidbaumwald, luminuu, bwmarkle, la-geek, SergeyBiryukov.
Merges [46705] and [46709] to the 5.3 branch.
Fixes #47708.

Location:
branches/5.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.3

  • branches/5.3/src/wp-admin/credits.php

    r46617 r46710  
    2929        </div>
    3030
    31         <div class="about__header-badge">
    32             <img src="https://wordpress.org/images/core/5.4/code-is-poetry-rc.svg" alt="<?php _e( 'Code is Poetry' ); ?>" />
    33         </div>
     31        <div class="about__header-badge"></div>
    3432
    3533        <div class="about__header-text">
     
    8886    exit;
    8987}
     88?>
    9089
    91 $previous_type = '';
     90    <hr />
    9291
    93 foreach ( $credits['groups'] as $group_slug => $group_data ) :
    94     ?>
    95     <?php
    96     if ( $previous_type !== $group_data['type'] ) {
    97         echo '<hr />';
    98     }
    99     ?>
    10092    <div class="about__section">
    101         <div class="column <?php echo 'titles' === $group_data['type'] ? 'has-subtle-background-color' : ''; ?>">
    102 
    103     <?php
    104     if ( $group_data['name'] ) {
    105         if ( 'Translators' == $group_data['name'] ) {
    106             // Considered a special slug in the API response. (Also, will never be returned for en_US.)
    107             $title = _x( 'Translators', 'Translate this to be the equivalent of English Translators in your language for the credits page Translators section' );
    108         } elseif ( isset( $group_data['placeholders'] ) ) {
    109             // phpcs:ignore WordPress.WP.I18n.LowLevelTranslationFunction,WordPress.WP.I18n.NonSingularStringLiteralText
    110             $title = vsprintf( translate( $group_data['name'] ), $group_data['placeholders'] );
    111         } else {
    112             // phpcs:ignore WordPress.WP.I18n.LowLevelTranslationFunction,WordPress.WP.I18n.NonSingularStringLiteralText
    113             $title = translate( $group_data['name'] );
    114         }
    115 
    116         echo '<h2 class="wp-people-group-title">' . esc_html( $title ) . "</h2>\n";
    117     }
    118 
    119     if ( ! empty( $group_data['shuffle'] ) ) {
    120         shuffle( $group_data['data'] ); // We were going to sort by ability to pronounce "hierarchical," but that wouldn't be fair to Matt.
    121     }
    122 
    123     switch ( $group_data['type'] ) {
    124         case 'list':
    125             array_walk( $group_data['data'], '_wp_credits_add_profile_link', $credits['data']['profiles'] );
    126             echo '<p class="wp-credits-list">' . wp_sprintf( '%l.', $group_data['data'] ) . "</p>\n\n";
    127             break;
    128         case 'libraries':
    129             array_walk( $group_data['data'], '_wp_credits_build_object_link' );
    130             echo '<p class="wp-credits-list">' . wp_sprintf( '%l.', $group_data['data'] ) . "</p>\n\n";
    131             break;
    132         default:
    133             $compact = 'compact' == $group_data['type'];
    134             $classes = 'wp-people-group ' . ( $compact ? 'compact' : '' );
    135             echo '<ul class="' . $classes . '" id="wp-people-group-' . $group_slug . '">' . "\n";
    136             foreach ( $group_data['data'] as $person_data ) {
    137                 echo '<li class="wp-person" id="wp-person-' . esc_attr( $person_data[2] ) . '">' . "\n\t";
    138                 echo '<a href="' . esc_url( sprintf( $credits['data']['profiles'], $person_data[2] ) ) . '" class="web">';
    139                 $size   = 'compact' == $group_data['type'] ? 40 : 80;
    140                 $data   = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array( 'size' => $size ) );
    141                 $size  *= 2;
    142                 $data2x = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array( 'size' => $size ) );
    143                 echo '<img src="' . esc_url( $data['url'] ) . '" srcset="' . esc_url( $data2x['url'] ) . ' 2x" class="gravatar" alt="" />' . "\n";
    144                 echo esc_html( $person_data[0] ) . "</a>\n\t";
    145                 if ( ! $compact ) {
    146                     // phpcs:ignore WordPress.WP.I18n.LowLevelTranslationFunction,WordPress.WP.I18n.NonSingularStringLiteralText
    147                     echo '<span class="title">' . translate( $person_data[3] ) . "</span>\n";
    148                 }
    149                 echo "</li>\n";
    150             }
    151             echo "</ul>\n";
    152             break;
    153     }
    154     $previous_type = $group_data['type'];
    155     ?>
    156 
     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' ); ?>
    15797        </div>
    15898    </div>
    159 <?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>
    160129</div>
    161130<?php
Note: See TracChangeset for help on using the changeset viewer.