- Timestamp:
- 10/20/2020 06:24:33 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwentyone/inc/template-functions.php
r49216 r49247 271 271 */ 272 272 function 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 ); 275 275 return $calendar_output; 276 276 } … … 382 382 383 383 // Return the specified styles. 384 return twenty_twenty_one_generate_css( 384 return twenty_twenty_one_generate_css( // @phpstan-ignore-line. 385 385 implode( ',', $elements[ $type ] ), 386 386 'font-family', … … 399 399 * @param string $block_name The full block type name, or a partial match. 400 400 * Example: `core/image`, `core-embed/*`. 401 * @param string|null $content The content we needto search in. Use null for get_the_content().402 * @param int $instances How many instances of the block w e 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. 403 403 * 404 404 * @return bool Returns true if a block was located & printed, otherwise false. … … 423 423 } 424 424 425 // Check if this the block we're looking for.425 // Check if this the block matches the $block_name. 426 426 $is_matching_block = false; 427 427 428 // If the block ends with *, we should justtry to match the first portion.428 // If the block ends with *, try to match the first portion. 429 429 if ( '*' === $block_name[-1] ) { 430 430 $is_matching_block = 0 === strpos( $block['blockName'], rtrim( $block_name, '*' ) ); … … 440 440 $blocks_content .= render_block( $block ); 441 441 442 // Break the loop if we've reached the $instances count.442 // Break the loop if the $instances count was reached. 443 443 if ( $instances_count >= $instances ) { 444 444 break;
Note: See TracChangeset
for help on using the changeset viewer.