Make WordPress Core


Ignore:
Timestamp:
10/20/2020 06:24:33 PM (5 years ago)
Author:
desrosj
Message:

Twenty Twenty: Import the latest changes from GitHub

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

Props poena, melchoyce, luminuu, aristath, jffng, ryelle, kishanjasani, rolfsiebers, sresok, desrosj.
See #51526.

File:
1 edited

Legend:

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

    r49216 r49247  
    271271 */
    272272function twenty_twenty_one_change_calendar_nav_arrows( $calendar_output ) {
    273     $calendar_output = str_replace( '« ', twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ), $calendar_output );
    274     $calendar_output = str_replace( ' »', twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' ), $calendar_output );
     273    $calendar_output = str_replace( '« ', is_rtl() ? twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' ) : twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ), $calendar_output );
     274    $calendar_output = str_replace( ' »', is_rtl() ? twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ) : twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' ), $calendar_output );
    275275    return $calendar_output;
    276276}
     
    382382
    383383    // Return the specified styles.
    384     return twenty_twenty_one_generate_css(
     384    return twenty_twenty_one_generate_css( // @phpstan-ignore-line.
    385385        implode( ',', $elements[ $type ] ),
    386386        'font-family',
     
    399399 * @param string      $block_name The full block type name, or a partial match.
    400400 *                                Example: `core/image`, `core-embed/*`.
    401  * @param string|null $content    The content we need to search in. Use null for get_the_content().
    402  * @param int         $instances  How many instances of the block we want to print. Defaults to 1.
     401 * @param string|null $content    The content to search in. Use null for get_the_content().
     402 * @param int         $instances  How many instances of the block will be printed (max). Defaults to 1.
    403403 *
    404404 * @return bool Returns true if a block was located & printed, otherwise false.
     
    423423        }
    424424
    425         // Check if this the block we're looking for.
     425        // Check if this the block matches the $block_name.
    426426        $is_matching_block = false;
    427427
    428         // If the block ends with *, we should just try to match the first portion.
     428        // If the block ends with *, try to match the first portion.
    429429        if ( '*' === $block_name[-1] ) {
    430430            $is_matching_block = 0 === strpos( $block['blockName'], rtrim( $block_name, '*' ) );
     
    440440            $blocks_content .= render_block( $block );
    441441
    442             // Break the loop if we've reached the $instances count.
     442            // Break the loop if the $instances count was reached.
    443443            if ( $instances_count >= $instances ) {
    444444                break;
Note: See TracChangeset for help on using the changeset viewer.