Changeset 52402 for trunk/src/wp-includes/blocks/navigation.php
- Timestamp:
- 12/21/2021 07:00:16 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/navigation.php
r52324 r52402 453 453 } 454 454 455 $layout_justification = array( 456 'left' => 'items-justified-left', 457 'right' => 'items-justified-right', 458 'center' => 'items-justified-center', 459 'space-between' => 'items-justified-space-between', 460 ); 461 455 462 // Restore legacy classnames for submenu positioning. 456 463 $layout_class = ''; 457 464 if ( isset( $attributes['layout']['justifyContent'] ) ) { 458 if ( 'right' === $attributes['layout']['justifyContent'] ) { 459 $layout_class .= 'items-justified-right'; 460 } elseif ( 'space-between' === $attributes['layout']['justifyContent'] ) { 461 $layout_class .= 'items-justified-space-between'; 462 } 465 $layout_class .= $layout_justification[ $attributes['layout']['justifyContent'] ]; 466 } 467 if ( isset( $attributes['layout']['orientation'] ) && 'vertical' === $attributes['layout']['orientation'] ) { 468 $layout_class .= ' is-vertical'; 469 } 470 471 if ( isset( $attributes['layout']['flexWrap'] ) && 'nowrap' === $attributes['layout']['flexWrap'] ) { 472 $layout_class .= ' no-wrap'; 463 473 } 464 474 … … 529 539 530 540 $responsive_container_markup = sprintf( 531 '<button aria- expanded="false" aria-haspopup="true" aria-label="%3$s" class="%6$s" data-micromodal-trigger="modal-%1$s"><svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-hidden="true" focusable="false"><rect x="4" y="7.5" width="16" height="1.5" /><rect x="4" y="15" width="16" height="1.5" /></svg></button>541 '<button aria-haspopup="true" aria-label="%3$s" class="%6$s" data-micromodal-trigger="modal-%1$s"><svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-hidden="true" focusable="false"><rect x="4" y="7.5" width="16" height="1.5" /><rect x="4" y="15" width="16" height="1.5" /></svg></button> 532 542 <div class="%5$s" style="%7$s" id="modal-%1$s"> 533 543 <div class="wp-block-navigation__responsive-close" tabindex="-1" data-micromodal-close> 534 <div class="wp-block-navigation__responsive-dialog" role="dialog" aria-modal="true" aria-labelledby="modal-%1$s-title">544 <div class="wp-block-navigation__responsive-dialog" aria-label="%8$s"> 535 545 <button aria-label="%4$s" data-micromodal-close class="wp-block-navigation__responsive-container-close"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" role="img" aria-hidden="true" focusable="false"><path d="M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"></path></svg></button> 536 546 <div class="wp-block-navigation__responsive-container-content" id="modal-%1$s-content"> … … 546 556 implode( ' ', $responsive_container_classes ), 547 557 implode( ' ', $open_button_classes ), 548 $colors['overlay_inline_styles'] 558 $colors['overlay_inline_styles'], 559 __( 'Menu' ) 549 560 ); 550 561
Note: See TracChangeset
for help on using the changeset viewer.