Restore block PHP to canonical version in @wordpress/block-library
r52272 erroneously modified `src/wp-includes/blocks/navigation.php`. This file is copied from `@wordpress/block-library` and so must be updated via npm. This commit restores the file by running `grunt build --dev`. Follows [52272]. See #54506. Built from https://develop.svn.wordpress.org/trunk@52273 git-svn-id: http://core.svn.wordpress.org/trunk@51865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ebf7eb50dc
commit
57aee3ba4d
|
@ -183,6 +183,14 @@ 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['navigationMenuId'] = $mapping[ $area ];
|
||||
}
|
||||
}
|
||||
|
||||
// Load inner blocks from the navigation post.
|
||||
if ( array_key_exists( 'navigationMenuId', $attributes ) ) {
|
||||
$navigation_post = get_post( $attributes['navigationMenuId'] );
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.9-alpha-52272';
|
||||
$wp_version = '5.9-alpha-52273';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue