Make WordPress Core


Ignore:
Timestamp:
11/12/2020 06:34:44 PM (5 years ago)
Author:
desrosj
Message:

Twenty Twenty-One: Merge the latest changes changes from GitHub for Beta 4.

In addition to syncing the latest changes, this change also merges the theme’s .scss files and other related build tool configurations required to compile the theme’s CSS.

This will allow development of the theme to continue on Trac after 5.6 is released and the GitHub repository is archived.

For a full list of changes since [], see https://github.com/WordPress/twentytwentyone/compare/e7d5991...aa284fd.

Props poena, luminuu kjellr, aristath, justinahinon.
See #51526.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwentyone/inc/template-tags.php

    r49320 r49574  
    7575
    7676            if ( is_sticky() ) {
    77                 echo '<p>' . esc_html__( 'Featured post', 'twentytwentyone' ) . '</p>';
     77                echo '<p>' . esc_html_x( 'Featured post', 'Label for sticky posts', 'twentytwentyone' ) . '</p>';
    7878            }
    7979
     
    218218     */
    219219    function twenty_twenty_one_the_posts_navigation() {
     220        $post_type      = get_post_type_object( get_post_type() );
     221        $post_type_name = '';
     222        if (
     223            is_object( $post_type ) &&
     224            property_exists( $post_type, 'labels' ) &&
     225            is_object( $post_type->labels ) &&
     226            property_exists( $post_type->labels, 'name' )
     227        ) {
     228            $post_type_name = $post_type->labels->name;
     229        }
     230
    220231        the_posts_pagination(
    221232            array(
     
    226237                    '%s <span class="nav-prev-text">%s</span>',
    227238                    is_rtl() ? twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' ) : twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ),
    228                     esc_html__( 'Newer posts', 'twentytwentyone' )
     239                    sprintf(
     240                        /* translators: %s: The post-type name. */
     241                        esc_html__( 'Newer %s', 'twentytwentyone' ),
     242                        '<span class="nav-short">' . esc_html( $post_type_name ) . '</span>'
     243                    )
    229244                ),
    230245                'next_text'          => sprintf(
    231246                    '<span class="nav-next-text">%s</span> %s',
    232                     esc_html__( 'Older posts', 'twentytwentyone' ),
     247                    sprintf(
     248                        /* translators: %s: The post-type name. */
     249                        esc_html__( 'Older %s', 'twentytwentyone' ),
     250                        '<span class="nav-short">' . esc_html( $post_type_name ) . '</span>'
     251                    ),
    233252                    is_rtl() ? twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ) : twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' )
    234253                ),
Note: See TracChangeset for help on using the changeset viewer.