Skip to content

Commit

Permalink
Remove navigationArea context. (#36981)
Browse files Browse the repository at this point in the history
  • Loading branch information
spacedmonkey authored and noisysocks committed Nov 30, 2021
1 parent 8b91ad1 commit 89dac2a
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions packages/block-library/src/navigation/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,14 +284,6 @@ function render_block_core_navigation( $attributes, $content, $block ) {
$inner_blocks = new WP_Block_List( $parsed_blocks, $attributes );
}

if ( ! empty( $block->context['navigationArea'] ) ) {
$area = $block->context['navigationArea'];
$mapping = get_option( 'wp_navigation_areas', array() );
if ( ! empty( $mapping[ $area ] ) ) {
$attributes['ref'] = $mapping[ $area ];
}
}

// Ensure that blocks saved with the legacy ref attribute name (navigationMenuId) continue to render.
if ( array_key_exists( 'navigationMenuId', $attributes ) ) {
$attributes['ref'] = $attributes['navigationMenuId'];
Expand Down

0 comments on commit 89dac2a

Please sign in to comment.