Skip to content

Commit

Permalink
Navigation: Fix 'ariaLabel' block support (#66943)
Browse files Browse the repository at this point in the history
Co-authored-by: up1512001 <[email protected]>
Co-authored-by: fabiankaegy <[email protected]>
Co-authored-by: getdave <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: t-hamano <[email protected]>
  • Loading branch information
6 people authored Nov 14, 2024
1 parent 160482d commit a8a8747
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/block-library/src/navigation/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,10 @@ private static function get_navigation_name( $attributes ) {

$navigation_name = $attributes['ariaLabel'] ?? '';

if ( ! empty( $navigation_name ) ) {
return $navigation_name;
}

// Load the navigation post.
if ( array_key_exists( 'ref', $attributes ) ) {
$navigation_post = get_post( $attributes['ref'] );
Expand Down

0 comments on commit a8a8747

Please sign in to comment.