<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[52272] trunk: Editor: Remove Navigation Areas</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/52272">52272</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/52272","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>spacedmonkey</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2021-11-29 22:04:48 +0000 (Mon, 29 Nov 2021)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Editor: Remove Navigation Areas

Navigation area were merged as part of full site editing and the new navigation block. This functionality is experimental and not currently used in WordPress core, so should be removed.

Props noisysocks, spacedmonkey, get_dave, zieladam.
Fixes <a href="https://core.trac.wordpress.org/ticket/54506">#54506</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadminsiteeditorphp">trunk/src/wp-admin/site-editor.php</a></li>
<li><a href="#trunksrcwpincludesblocksindexphp">trunk/src/wp-includes/blocks/index.php</a></li>
<li><a href="#trunksrcwpincludesblocksnavigationphp">trunk/src/wp-includes/blocks/navigation.php</a></li>
<li><a href="#trunksrcwpincludesdefaultfiltersphp">trunk/src/wp-includes/default-filters.php</a></li>
<li><a href="#trunksrcwpincludesrestapiphp">trunk/src/wp-includes/rest-api.php</a></li>
<li><a href="#trunksrcwpsettingsphp">trunk/src/wp-settings.php</a></li>
<li><a href="#trunktestsphpunitincludesfunctionsphp">trunk/tests/phpunit/includes/functions.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestschemasetupphp">trunk/tests/phpunit/tests/rest-api/rest-schema-setup.php</a></li>
<li><a href="#trunktestsqunitfixtureswpapigeneratedjs">trunk/tests/qunit/fixtures/wp-api-generated.js</a></li>
<li><a href="#trunktoolswebpackblocksjs">trunk/tools/webpack/blocks.js</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li>trunk/src/wp-includes/blocks/navigation-area/</li>
<li><a href="#trunksrcwpincludesblocksnavigationareaphp">trunk/src/wp-includes/blocks/navigation-area.php</a></li>
<li><a href="#trunksrcwpincludesnavigationareasphp">trunk/src/wp-includes/navigation-areas.php</a></li>
<li><a href="#trunksrcwpincludesrestapiendpointsclasswprestblocknavigationareascontrollerphp">trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-block-navigation-areas-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapiwpRestBlockNavigationAreasControllerphp">trunk/tests/phpunit/tests/rest-api/wpRestBlockNavigationAreasController.php</a></li>
</ul>

<h3>Property Changed</h3>
<ul>
<li><a href="#trunk">trunk/</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<span class="cx" style="display: block; padding: 0 10px">Index: trunk
</span><span class="cx" style="display: block; padding: 0 10px">===================================================================
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">--- trunk        2021-11-29 22:02:32 UTC (rev 52271)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+++ trunk 2021-11-29 22:04:48 UTC (rev 52272)
</ins><a id="trunk"></a>
<div class="propset"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Property changes: trunk</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnignore"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: svn:ignore</h4></div>
<span class="cx" style="display: block; padding: 0 10px"> artifacts
</span><span class="cx" style="display: block; padding: 0 10px"> # Files for local environment config
</span><span class="cx" style="display: block; padding: 0 10px"> /docker-compose.override.yml
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.idea
</ins><a id="trunksrcwpadminsiteeditorphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/site-editor.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/site-editor.php        2021-11-29 22:02:32 UTC (rev 52271)
+++ trunk/src/wp-admin/site-editor.php  2021-11-29 22:04:48 UTC (rev 52272)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -99,17 +99,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                '/wp/v2/global-styles/' . $active_global_styles_id . '?context=edit',
</span><span class="cx" style="display: block; padding: 0 10px">                '/wp/v2/global-styles/' . $active_global_styles_id,
</span><span class="cx" style="display: block; padding: 0 10px">                '/wp/v2/themes/' . $active_theme . '/global-styles',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                '/wp/v2/block-navigation-areas?context=edit',
</del><span class="cx" style="display: block; padding: 0 10px">         );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        $areas        = get_option( 'wp_navigation_areas', array() );
-       $active_areas = array_intersect_key( $areas, get_navigation_areas() );
-       foreach ( $active_areas as $post_id ) {
-               if ( $post_id ) {
-                       $preload_paths[] = add_query_arg( 'context', 'edit', rest_get_route_for_post( $post_id ) );
-               }
-       }
-
</del><span class="cx" style="display: block; padding: 0 10px">         block_editor_rest_api_preload( $preload_paths, $block_editor_context );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        wp_add_inline_script(
</span></span></pre></div>
<a id="trunksrcwpincludesblocksindexphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/blocks/index.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/blocks/index.php    2021-11-29 22:02:32 UTC (rev 52271)
+++ trunk/src/wp-includes/blocks/index.php      2021-11-29 22:04:48 UTC (rev 52272)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -15,7 +15,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/blocks/latest-posts.php';
</span><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/blocks/legacy-widget.php';
</span><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/blocks/loginout.php';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-require ABSPATH . WPINC . '/blocks/navigation-area.php';
</del><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/blocks/navigation-link.php';
</span><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/blocks/navigation-submenu.php';
</span><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/blocks/navigation.php';
</span></span></pre></div>
<a id="trunksrcwpincludesblocksnavigationareaphp"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: trunk/src/wp-includes/blocks/navigation-area.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/blocks/navigation-area.php  2021-11-29 22:02:32 UTC (rev 52271)
+++ trunk/src/wp-includes/blocks/navigation-area.php    2021-11-29 22:04:48 UTC (rev 52272)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,22 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php
-/**
- * Server-side rendering of the `core/navigation-area` block.
- *
- * @deprecated 5.9.0 See https://github.com/WordPress/gutenberg/issues/36524
- * @package WordPress
- */
-
-/**
- * Registers the `core/navigation-area` block on the server.
- */
-function register_block_core_navigation_area() {
-       register_block_type_from_metadata(
-               __DIR__ . '/navigation-area',
-               array(
-                       'provides_context' => array(
-                               'navigationArea' => 'area',
-                       ),
-               )
-       );
-}
-add_action( 'init', 'register_block_core_navigation_area' );
</del></span></pre></div>
<a id="trunksrcwpincludesblocksnavigationphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/blocks/navigation.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/blocks/navigation.php       2021-11-29 22:02:32 UTC (rev 52271)
+++ trunk/src/wp-includes/blocks/navigation.php 2021-11-29 22:04:48 UTC (rev 52272)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -183,14 +183,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $inner_blocks            = new WP_Block_List( $parsed_blocks, $attributes );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        if ( ! empty( $block->context['navigationArea'] ) ) {
-               $area    = $block->context['navigationArea'];
-               $mapping = get_option( 'wp_navigation_areas', array() );
-               if ( ! empty( $mapping[ $area ] ) ) {
-                       $attributes['navigationMenuId'] = $mapping[ $area ];
-               }
-       }
-
</del><span class="cx" style="display: block; padding: 0 10px">         // Load inner blocks from the navigation post.
</span><span class="cx" style="display: block; padding: 0 10px">        if ( array_key_exists( 'navigationMenuId', $attributes ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                $navigation_post = get_post( $attributes['navigationMenuId'] );
</span></span></pre></div>
<a id="trunksrcwpincludesdefaultfiltersphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/default-filters.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/default-filters.php 2021-11-29 22:02:32 UTC (rev 52271)
+++ trunk/src/wp-includes/default-filters.php   2021-11-29 22:04:48 UTC (rev 52272)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -681,8 +681,4 @@
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'wp_footer', 'the_block_template_skip_link' );
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'setup_theme', 'wp_enable_block_templates' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-// Navigation areas.
-add_action( 'setup_theme', '_wp_register_default_navigation_areas' );
-add_action( 'switch_theme', '_wp_migrate_menu_to_navigation_post', 99, 3 );
-
</del><span class="cx" style="display: block; padding: 0 10px"> unset( $filter, $action );
</span></span></pre></div>
<a id="trunksrcwpincludesnavigationareasphp"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: trunk/src/wp-includes/navigation-areas.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/navigation-areas.php        2021-11-29 22:02:32 UTC (rev 52271)
+++ trunk/src/wp-includes/navigation-areas.php  2021-11-29 22:04:48 UTC (rev 52272)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,262 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php
-/**
- * Block navigation areas functions.
- *
- * @package WordPress
- */
-
-/**
- * Registers the navigation areas supported by the current theme. The expected
- * shape of the argument is:
- * array(
- *     'primary'   => 'Primary',
- *     'secondary' => 'Secondary',
- *     'tertiary'  => 'Tertiary',
- * )
- *
- * @since 5.9.0
- *
- * @param array $new_areas Supported navigation areas.
- */
-function register_navigation_areas( $new_areas ) {
-       global $navigation_areas;
-       $navigation_areas = $new_areas;
-}
-
-/**
- * Register the default navigation areas.
- *
- * @since 5.9.0
- * @access private
- */
-function _wp_register_default_navigation_areas() {
-       register_navigation_areas(
-               array(
-                       'primary'   => _x( 'Primary', 'navigation area' ),
-                       'secondary' => _x( 'Secondary', 'navigation area' ),
-                       'tertiary'  => _x( 'Tertiary', 'navigation area' ),
-               )
-       );
-}
-
-/**
- * Returns the available navigation areas.
- *
- * @since 5.9.0
- *
- * @return array Registered navigation areas.
- */
-function get_navigation_areas() {
-       global $navigation_areas;
-       return $navigation_areas;
-}
-
-/**
- * Migrates classic menus to a block-based navigation post on theme switch.
- * Assigns the created navigation post to the corresponding navigation area.
- *
- * @since 5.9.0
- * @access private
- *
- * @param string   $new_name  Name of the new theme.
- * @param WP_Theme $new_theme New theme.
- * @param WP_Theme $old_theme Old theme.
- */
-function _wp_migrate_menu_to_navigation_post( $new_name, WP_Theme $new_theme, WP_Theme $old_theme ) {
-       // Do nothing when switching to a theme that does not support site editor.
-       if ( ! wp_is_block_template_theme() ) {
-               return;
-       }
-
-       // get_nav_menu_locations() calls get_theme_mod() which depends on the stylesheet option.
-       // At the same time, switch_theme runs only after the stylesheet option was updated to $new_theme.
-       // To retrieve theme mods of the old theme, the getter is hooked to get_option( 'stylesheet' ) so that we
-       // get the old theme, which causes the get_nav_menu_locations to get the locations of the old theme.
-       $get_old_theme_stylesheet = static function() use ( $old_theme ) {
-               return $old_theme->get_stylesheet();
-       };
-       add_filter( 'option_stylesheet', $get_old_theme_stylesheet );
-
-       $locations    = get_nav_menu_locations();
-       $area_mapping = get_option( 'wp_navigation_areas', array() );
-
-       foreach ( $locations as $location_name => $menu_id ) {
-               // Get the menu from the location, skipping if there is no
-               // menu or there was an error.
-               $menu = wp_get_nav_menu_object( $menu_id );
-               if ( ! $menu || is_wp_error( $menu ) ) {
-                       continue;
-               }
-
-               $menu_items = _wp_get_menu_items_at_location( $location_name );
-               if ( empty( $menu_items ) ) {
-                       continue;
-               }
-
-               $post_name = 'classic_menu_' . $menu_id;
-
-               // Get or create to avoid creating too many wp_navigation posts.
-               $query          = new WP_Query;
-               $matching_posts = $query->query(
-                       array(
-                               'name'           => $post_name,
-                               'post_status'    => 'publish',
-                               'post_type'      => 'wp_navigation',
-                               'posts_per_page' => 1,
-                               'fields'         => 'ids',
-                       )
-               );
-
-               if ( ! empty( $matching_posts ) ) {
-                       $navigation_post_id = $matching_posts[0];
-               } else {
-                       $menu_items_by_parent_id = _wp_sort_menu_items_by_parent_id( $menu_items );
-                       $parsed_blocks           = _wp_parse_blocks_from_menu_items( $menu_items_by_parent_id[0], $menu_items_by_parent_id );
-                       $post_data               = array(
-                               'post_type'    => 'wp_navigation',
-                               'post_title'   => sprintf(
-                                       /* translators: %s: the name of the menu, e.g. "Main Menu". */
-                                       __( 'Classic menu: %s' ),
-                                       $menu->name
-                               ),
-                               'post_name'    => $post_name,
-                               'post_content' => serialize_blocks( $parsed_blocks ),
-                               'post_status'  => 'publish',
-                       );
-                       $navigation_post_id      = wp_insert_post( $post_data, true );
-                       // If wp_insert_post fails *at any time*, then bail out of the
-                       // entire migration attempt returning the WP_Error object.
-                       if ( is_wp_error( $navigation_post_id ) ) {
-                               return $navigation_post_id;
-                       }
-               }
-
-               $area_mapping[ $location_name ] = $navigation_post_id;
-       }
-       remove_filter( 'option_stylesheet', $get_old_theme_stylesheet );
-
-       update_option( 'wp_navigation_areas', $area_mapping );
-}
-
-/**
- * Returns the menu items for a WordPress menu location.
- *
- * @since 5.9.0
- * @access private
- *
- * @param string $location The menu location.
- * @return array Menu items for the location.
- */
-function _wp_get_menu_items_at_location( $location ) {
-       if ( empty( $location ) ) {
-               return;
-       }
-
-       // Build menu data. The following approximates the code in `wp_nav_menu()`.
-
-       // Find the location in the list of locations, returning early if the
-       // location can't be found.
-       $locations = get_nav_menu_locations();
-       if ( ! isset( $locations[ $location ] ) ) {
-               return;
-       }
-
-       // Get the menu from the location, returning early if there is no
-       // menu or there was an error.
-       $menu = wp_get_nav_menu_object( $locations[ $location ] );
-       if ( ! $menu || is_wp_error( $menu ) ) {
-               return;
-       }
-
-       $menu_items = wp_get_nav_menu_items( $menu->term_id, array( 'update_post_term_cache' => false ) );
-       _wp_menu_item_classes_by_context( $menu_items );
-
-       return $menu_items;
-}
-
-/**
- * Sorts a standard array of menu items into a nested structure keyed by the
- * id of the parent menu.
- *
- * @since 5.9.0
- * @access private
- *
- * @param array $menu_items Menu items to sort.
- * @return array An array keyed by the id of the parent menu where each element
- *               is an array of menu items that belong to that parent.
- */
-function _wp_sort_menu_items_by_parent_id( $menu_items ) {
-       $sorted_menu_items = array();
-       foreach ( $menu_items as $menu_item ) {
-               $sorted_menu_items[ $menu_item->menu_order ] = $menu_item;
-       }
-       unset( $menu_items, $menu_item );
-
-       $menu_items_by_parent_id = array();
-       foreach ( $sorted_menu_items as $menu_item ) {
-               $menu_items_by_parent_id[ $menu_item->menu_item_parent ][] = $menu_item;
-       }
-
-       return $menu_items_by_parent_id;
-}
-
-/**
- * Turns menu item data into a nested array of parsed blocks
- *
- * @since 5.9.0
- * @access private
- *
- * @param array $menu_items               An array of menu items that represent
- *                                        an individual level of a menu.
- * @param array $menu_items_by_parent_id  An array keyed by the id of the
- *                                        parent menu where each element is an
- *                                        array of menu items that belong to
- *                                        that parent.
- * @return array An array of parsed block data.
- */
-function _wp_parse_blocks_from_menu_items( $menu_items, $menu_items_by_parent_id ) {
-       if ( empty( $menu_items ) ) {
-               return array();
-       }
-
-       $blocks = array();
-
-       foreach ( $menu_items as $menu_item ) {
-               $class_name       = ! empty( $menu_item->classes ) ? implode( ' ', (array) $menu_item->classes ) : null;
-               $id               = ( null !== $menu_item->object_id && 'custom' !== $menu_item->object ) ? $menu_item->object_id : null;
-               $opens_in_new_tab = null !== $menu_item->target && '_blank' === $menu_item->target;
-               $rel              = ( null !== $menu_item->xfn && '' !== $menu_item->xfn ) ? $menu_item->xfn : null;
-               $kind             = null !== $menu_item->type ? str_replace( '_', '-', $menu_item->type ) : 'custom';
-
-               $block = array(
-                       'blockName' => isset( $menu_items_by_parent_id[ $menu_item->ID ] ) ? 'core/navigation-submenu' : 'core/navigation-link',
-                       'attrs'     => array(
-                               'className'     => $class_name,
-                               'description'   => $menu_item->description,
-                               'id'            => $id,
-                               'kind'          => $kind,
-                               'label'         => $menu_item->title,
-                               'opensInNewTab' => $opens_in_new_tab,
-                               'rel'           => $rel,
-                               'title'         => $menu_item->attr_title,
-                               'type'          => $menu_item->object,
-                               'url'           => $menu_item->url,
-                       ),
-               );
-
-               if ( isset( $menu_items_by_parent_id[ $menu_item->ID ] ) ) {
-                       $block['innerBlocks'] = _wp_parse_blocks_from_menu_items(
-                               $menu_items_by_parent_id[ $menu_item->ID ],
-                               $menu_items_by_parent_id
-                       );
-               } else {
-                       $block['innerBlocks'] = array();
-               }
-
-               $block['innerContent'] = array_map( 'serialize_block', $block['innerBlocks'] );
-
-               $blocks[] = $block;
-       }
-
-       return $blocks;
-}
</del></span></pre></div>
<a id="trunksrcwpincludesrestapiendpointsclasswprestblocknavigationareascontrollerphp"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-block-navigation-areas-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-block-navigation-areas-controller.php      2021-11-29 22:02:32 UTC (rev 52271)
+++ trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-block-navigation-areas-controller.php        2021-11-29 22:04:48 UTC (rev 52272)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,310 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php
-/**
- * REST API: WP_REST_Block_Navigation_Areas_Controller class
- *
- * @subpackage REST_API
- * @package WordPress
- */
-
-/**
- * Core class used to access block navigation areas via the REST API.
- *
- * @since 5.9.0
- *
- * @see WP_REST_Controller
- */
-class WP_REST_Block_Navigation_Areas_Controller extends WP_REST_Controller {
-
-       /**
-        * Constructor.
-        *
-        * @since 5.9.0
-        */
-       public function __construct() {
-               $this->namespace = 'wp/v2';
-               $this->rest_base = 'block-navigation-areas';
-       }
-
-       /**
-        * Registers the routes for the objects of the controller.
-        *
-        * @since 5.9.0
-        *
-        * @see register_rest_route()
-        */
-       public function register_routes() {
-               register_rest_route(
-                       $this->namespace,
-                       '/' . $this->rest_base,
-                       array(
-                               array(
-                                       'methods'             => WP_REST_Server::READABLE,
-                                       'callback'            => array( $this, 'get_items' ),
-                                       'permission_callback' => array( $this, 'get_items_permissions_check' ),
-                                       'args'                => $this->get_collection_params(),
-                               ),
-                               'schema' => array( $this, 'get_public_item_schema' ),
-                       )
-               );
-
-               register_rest_route(
-                       $this->namespace,
-                       '/' . $this->rest_base . '/(?P<area>[\w-]+)',
-                       array(
-                               'args'        => array(
-                                       'area' => array(
-                                               'description' => __( 'An alphanumeric identifier for the navigation area.' ),
-                                               'type'        => 'string',
-                                       ),
-                               ),
-                               array(
-                                       'methods'             => WP_REST_Server::READABLE,
-                                       'callback'            => array( $this, 'get_item' ),
-                                       'permission_callback' => array( $this, 'get_item_permissions_check' ),
-                                       'args'                => array(
-                                               'context' => $this->get_context_param( array( 'default' => 'view' ) ),
-                                       ),
-                               ),
-                               array(
-                                       'methods'             => WP_REST_Server::EDITABLE,
-                                       'callback'            => array( $this, 'update_item' ),
-                                       'permission_callback' => array( $this, 'update_item_permissions_check' ),
-                                       'args'                => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),
-                               ),
-                               'allow_batch' => array( 'v1' => true ),
-                               'schema'      => array( $this, 'get_public_item_schema' ),
-                       )
-               );
-       }
-
-       /**
-        * Checks whether a given request has permission to read navigation areas.
-        *
-        * @since 5.9.0
-        *
-        * @param WP_REST_Request $request Full details about the request.
-        * @return WP_Error|bool True if the request has read access, WP_Error object otherwise.
-        */
-       public function get_items_permissions_check( $request ) {
-               if ( ! current_user_can( 'edit_theme_options' ) ) {
-                       return new WP_Error(
-                               'rest_cannot_view',
-                               __( 'Sorry, you are not allowed to view navigation areas.' ),
-                               array( 'status' => rest_authorization_required_code() )
-                       );
-               }
-
-               return true;
-       }
-
-       /**
-        * Retrieves all navigation areas, depending on user context.
-        *
-        * @since 5.9.0
-        *
-        * @param WP_REST_Request $request Full details about the request.
-        * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
-        */
-       public function get_items( $request ) {
-               $data = array();
-               foreach ( get_navigation_areas() as $name => $description ) {
-                       $area   = $this->get_navigation_area_object( $name );
-                       $area   = $this->prepare_item_for_response( $area, $request );
-                       $data[] = $this->prepare_response_for_collection( $area );
-               }
-               return rest_ensure_response( $data );
-       }
-
-       /**
-        * Checks if a given request has access to read a navigation area.
-        *
-        * @since 5.9.0
-        *
-        * @param WP_REST_Request $request Full details about the request.
-        * @return WP_Error|bool True if the request has read access for the item, WP_Error object otherwise.
-        */
-       public function get_item_permissions_check( $request ) {
-               if ( ! current_user_can( 'edit_theme_options' ) ) {
-                       return new WP_Error(
-                               'rest_cannot_view',
-                               __( 'Sorry, you are not allowed to view navigation areas.' ),
-                               array( 'status' => rest_authorization_required_code() )
-                       );
-               }
-               if ( ! array_key_exists( $request['area'], get_navigation_areas() ) ) {
-                       return new WP_Error( 'rest_navigation_area_invalid', __( 'Invalid navigation area.' ), array( 'status' => 404 ) );
-               }
-
-               return true;
-       }
-
-       /**
-        * Checks if a request has access to update the specified term.
-        *
-        * @since 5.9.0
-        *
-        * @param WP_REST_Request $request Full details about the request.
-        * @return bool|WP_Error True if the request has access to update the item, false or WP_Error object otherwise.
-        */
-       public function update_item_permissions_check( $request ) {
-               return $this->get_item_permissions_check( $request );
-       }
-
-       /**
-        * Retrieves a specific navigation area.
-        *
-        * @since 5.9.0
-        *
-        * @param WP_REST_Request $request Full details about the request.
-        * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
-        */
-       public function get_item( $request ) {
-               $name = $request['area'];
-               $area = $this->get_navigation_area_object( $name );
-               $data = $this->prepare_item_for_response( $area, $request );
-
-               return rest_ensure_response( $data );
-       }
-
-       /**
-        * Updates a specific navigation area.
-        *
-        * @since 5.9.0
-        *
-        * @param WP_REST_Request $request Full details about the request.
-        * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
-        */
-       public function update_item( $request ) {
-               $name = $request['area'];
-
-               $mapping          = get_option( 'wp_navigation_areas', array() );
-               $mapping[ $name ] = $request['navigation'];
-               update_option( 'wp_navigation_areas', $mapping );
-
-               $area = $this->get_navigation_area_object( $name );
-               $data = $this->prepare_item_for_response( $area, $request );
-               return rest_ensure_response( $data );
-       }
-
-       /**
-        * Converts navigation area name to a convenient object that this endpoint can reason about.
-        *
-        * @since 5.9.0
-        *
-        * @param string $name Navigation area name.
-        * @return stdClass An object representation of the navigation area.
-        */
-       protected function get_navigation_area_object( $name ) {
-               $available_areas   = get_navigation_areas();
-               $mapping           = get_option( 'wp_navigation_areas', array() );
-               $area              = new stdClass();
-               $area->name        = $name;
-               $area->navigation  = ! empty( $mapping[ $name ] ) ? $mapping[ $name ] : null;
-               $area->description = $available_areas[ $name ];
-               return $area;
-       }
-
-       /**
-        * Prepares a navigation area object for serialization.
-        *
-        * @since 5.9.0
-        *
-        * @param stdClass        $area    Post status data.
-        * @param WP_REST_Request $request Full details about the request.
-        * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
-        */
-       public function prepare_item_for_response( $area, $request ) {
-               $areas      = get_navigation_areas();
-               $navigation = ( isset( $areas[ $area->name ] ) ) ? $area->navigation : 0;
-
-               $fields = $this->get_fields_for_response( $request );
-               $data   = array();
-
-               if ( rest_is_field_included( 'name', $fields ) ) {
-                       $data['name'] = $area->name;
-               }
-
-               if ( rest_is_field_included( 'description', $fields ) ) {
-                       $data['description'] = $area->description;
-               }
-
-               if ( rest_is_field_included( 'navigation', $fields ) ) {
-                       $data['navigation'] = (int) $navigation;
-               }
-
-               $context = ! empty( $request['context'] ) ? $request['context'] : 'view';
-               $data    = $this->add_additional_fields_to_object( $data, $request );
-               $data    = $this->filter_response_by_context( $data, $context );
-
-               $response = rest_ensure_response( $data );
-
-               /**
-                * Filters a navigation area returned from the REST API.
-                *
-                * @since 5.9.0
-                *
-                * Allows modification of the navigation area data right before it is
-                * returned.
-                *
-                * @param WP_REST_Response|WP_Error $response The response object, or WP_Error object on failure.
-                * @param object                    $area     The original status object.
-                * @param WP_REST_Request           $request  Request used to generate the response.
-                */
-               return apply_filters( 'rest_prepare_navigation_area', $response, $area, $request );
-       }
-
-       /**
-        * Retrieves the navigation area's schema, conforming to JSON Schema.
-        *
-        * @since 5.9.0
-        *
-        * @return array Item schema data.
-        */
-       public function get_item_schema() {
-               if ( $this->schema ) {
-                       return $this->schema;
-               }
-
-               $this->schema = array(
-                       '$schema'    => 'http://json-schema.org/draft-04/schema#',
-                       'title'      => 'navigation-area',
-                       'type'       => 'object',
-                       'properties' => array(
-                               'name'        => array(
-                                       'description' => __( 'The name of the navigation area.' ),
-                                       'type'        => 'string',
-                                       'context'     => array( 'embed', 'view', 'edit' ),
-                                       'readonly'    => true,
-                               ),
-                               'description' => array(
-                                       'description' => __( 'The description of the navigation area.' ),
-                                       'type'        => 'string',
-                                       'context'     => array( 'embed', 'view', 'edit' ),
-                                       'readonly'    => true,
-                               ),
-                               'navigation'  => array(
-                                       'description' => __( 'The ID of the assigned navigation.' ),
-                                       'type'        => 'integer',
-                                       'context'     => array( 'embed', 'view', 'edit' ),
-                                       'readonly'    => true,
-                               ),
-                       ),
-               );
-
-               return $this->add_additional_fields_schema( $this->schema );
-       }
-
-       /**
-        * Retrieves the query params for collections.
-        *
-        * @since 5.9.0
-        *
-        * @return array Collection parameters.
-        */
-       public function get_collection_params() {
-               return array(
-                       'context' => $this->get_context_param( array( 'default' => 'view' ) ),
-               );
-       }
-
-}
</del></span></pre></div>
<a id="trunksrcwpincludesrestapiphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/rest-api.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/rest-api.php        2021-11-29 22:02:32 UTC (rev 52271)
+++ trunk/src/wp-includes/rest-api.php  2021-11-29 22:04:48 UTC (rev 52272)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -349,10 +349,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">        // Menu Locations.
</span><span class="cx" style="display: block; padding: 0 10px">        $controller = new WP_REST_Menu_Locations_Controller();
</span><span class="cx" style="display: block; padding: 0 10px">        $controller->register_routes();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-       // Block Navigation Areas
-       $controller = new WP_REST_Block_Navigation_Areas_Controller();
-       $controller->register_routes();
</del><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunksrcwpsettingsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-settings.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-settings.php 2021-11-29 22:02:32 UTC (rev 52271)
+++ trunk/src/wp-settings.php   2021-11-29 22:04:48 UTC (rev 52272)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -246,7 +246,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/class-wp-widget-factory.php';
</span><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/nav-menu-template.php';
</span><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/nav-menu.php';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-require ABSPATH . WPINC . '/navigation-areas.php';
</del><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/admin-bar.php';
</span><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/class-wp-application-passwords.php';
</span><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/rest-api.php';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -276,7 +275,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-themes-controller.php';
</span><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-plugins-controller.php';
</span><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-block-directory-controller.php';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-block-navigation-areas-controller.php';
</del><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php';
</span><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-application-passwords-controller.php';
</span><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-site-health-controller.php';
</span></span></pre></div>
<a id="trunktestsphpunitincludesfunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/includes/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/includes/functions.php        2021-11-29 22:02:32 UTC (rev 52271)
+++ trunk/tests/phpunit/includes/functions.php  2021-11-29 22:04:48 UTC (rev 52272)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -312,7 +312,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">        remove_action( 'init', 'register_block_core_legacy_widget' );
</span><span class="cx" style="display: block; padding: 0 10px">        remove_action( 'init', 'register_block_core_loginout' );
</span><span class="cx" style="display: block; padding: 0 10px">        remove_action( 'init', 'register_block_core_navigation' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        remove_action( 'init', 'register_block_core_navigation_area' );
</del><span class="cx" style="display: block; padding: 0 10px">         remove_action( 'init', 'register_block_core_navigation_link' );
</span><span class="cx" style="display: block; padding: 0 10px">        remove_action( 'init', 'register_block_core_navigation_submenu' );
</span><span class="cx" style="display: block; padding: 0 10px">        remove_action( 'init', 'register_block_core_page_list' );
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestschemasetupphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/rest-api/rest-schema-setup.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/rest-schema-setup.php  2021-11-29 22:02:32 UTC (rev 52271)
+++ trunk/tests/phpunit/tests/rest-api/rest-schema-setup.php    2021-11-29 22:04:48 UTC (rev 52272)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -171,8 +171,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        '/wp/v2/navigation/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)',
</span><span class="cx" style="display: block; padding: 0 10px">                        '/wp/v2/navigation/(?P<parent>[\d]+)/revisions',
</span><span class="cx" style="display: block; padding: 0 10px">                        '/wp/v2/navigation/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        '/wp/v2/block-navigation-areas',
-                       '/wp/v2/block-navigation-areas/(?P<area>[\w-]+)',
</del><span class="cx" style="display: block; padding: 0 10px">                         '/wp-site-health/v1',
</span><span class="cx" style="display: block; padding: 0 10px">                        '/wp-site-health/v1/tests/background-updates',
</span><span class="cx" style="display: block; padding: 0 10px">                        '/wp-site-health/v1/tests/loopback-requests',
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapiwpRestBlockNavigationAreasControllerphp"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: trunk/tests/phpunit/tests/rest-api/wpRestBlockNavigationAreasController.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/wpRestBlockNavigationAreasController.php       2021-11-29 22:02:32 UTC (rev 52271)
+++ trunk/tests/phpunit/tests/rest-api/wpRestBlockNavigationAreasController.php 2021-11-29 22:04:48 UTC (rev 52272)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,136 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php
-/**
- * Unit tests covering WP_REST_Block_Navigation_Areas_Controller functionality.
- *
- * @package WordPress
- * @subpackage REST_API
- * @group restapi
- * @since 5.9.0
- */
-class Tests_REST_WpRestBlockNavigationAreasController extends WP_Test_REST_Controller_Testcase {
-
-       const OPTION = 'wp_navigation_areas';
-
-       /**
-        * @var int Administrator user ID
-        */
-       protected static $admin_id;
-
-       /**
-        * @var array Contains mapping
-        */
-       protected static $old_mapping;
-
-       public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) {
-               self::$admin_id = $factory->user->create(
-                       array(
-                               'role' => 'administrator',
-                       )
-               );
-
-               static::$old_mapping = get_option( static::OPTION, array() );
-       }
-
-       public static function wpTearDownAfterClass() {
-               self::delete_user( self::$admin_id );
-               update_option( static::OPTION, static::$old_mapping );
-       }
-
-       public function test_get_items() {
-               wp_set_current_user( static::$admin_id );
-               $request = new WP_REST_Request( 'GET', '/wp/v2/block-navigation-areas' );
-
-               $response = rest_get_server()->dispatch( $request );
-               $this->assertSame( 200, $response->get_status() );
-               $data = $response->get_data();
-               $this->assertIsArray( $data );
-               $navigation_areas = get_navigation_areas();
-               $expected_data    = array();
-               foreach ( $navigation_areas as $name => $navigation_area ) {
-                       $expected_data[] = array(
-                               'name'        => $name,
-                               'description' => $navigation_area,
-                               'navigation'  => 0,
-                       );
-               }
-               $this->assertSameSets( $expected_data, $data );
-       }
-
-       public function test_register_routes() {
-               wp_set_current_user( static::$admin_id );
-               $routes = rest_get_server()->get_routes();
-               $this->assertArrayHasKey( '/wp/v2/block-navigation-areas', $routes );
-               $this->assertArrayHasKey( '/wp/v2/block-navigation-areas/(?P<area>[\\w-]+)', $routes );
-       }
-
-       public function test_context_param() {
-               wp_set_current_user( static::$admin_id );
-               $request  = new WP_REST_Request( WpOrg\Requests\Requests::OPTIONS, '/wp/v2/block-navigation-areas' );
-               $response = rest_get_server()->dispatch( $request );
-               $this->assertSame( 200, $response->get_status() );
-               $data = $response->get_data();
-
-               $this->assertSame( 'view', $data['endpoints'][0]['args']['context']['default'] );
-               $this->assertSame( array( 'view', 'embed', 'edit' ), $data['endpoints'][0]['args']['context']['enum'] );
-       }
-
-       public function test_get_item() {
-               wp_set_current_user( static::$admin_id );
-               $navigation_area = array_rand( get_navigation_areas(), 1 );
-
-               $this->assertIsString( $navigation_area );
-               $this->assertNotEmpty( $navigation_area );
-
-               $route    = sprintf( '/wp/v2/block-navigation-areas/%s', urlencode( $navigation_area ) );
-               $request  = new WP_REST_Request( 'GET', $route );
-               $response = rest_get_server()->dispatch( $request );
-               $this->assertSame( 200, $response->get_status() );
-               $data = $response->get_data();
-               $this->assertIsArray( $data );
-               $this->assertArrayHasKey( 'name', $data );
-               $this->assertSame( $navigation_area, $data['name'] );
-       }
-
-       public function test_create_item() {
-               // We cannot create new navigation areas using the current block navigation areas API,
-               // so the test should be marked as passed.
-               $this->markTestSkipped();
-       }
-
-       public function test_update_item() {
-               wp_set_current_user( static::$admin_id );
-               $navigation_area = array_rand( get_navigation_areas(), 1 );
-               $route           = sprintf( '/wp/v2/block-navigation-areas/%s', urlencode( $navigation_area ) );
-               $request         = new WP_REST_Request( WpOrg\Requests\Requests::POST, $route );
-
-               $updated_navigation_area = array(
-                       'name'        => $navigation_area,
-                       'description' => 'Test Description',
-               );
-
-               $request->set_param( 'navigation', $updated_navigation_area );
-               $response = rest_get_server()->dispatch( $request );
-               $this->assertSame( 200, $response->get_status() );
-               $new_mapping = get_option( static::OPTION, array() );
-               $this->assertSame( $new_mapping[ $navigation_area ], $updated_navigation_area );
-       }
-
-       public function test_delete_item() {
-               // We cannot delete navigation areas using the current block navigation areas API,
-               // so the test should be marked as passed.
-               $this->markTestSkipped();
-       }
-
-       public function test_prepare_item() {
-               // The current block navigation areas API doesn't implement any custom prepare_item logic
-               // so there is nothing to test.
-               $this->markTestSkipped();
-       }
-
-       public function test_get_item_schema() {
-               // The current block navigation areas API doesn't implement any custom item schema
-               // so there is nothing to test.
-               $this->markTestSkipped();
-       }
-}
-
</del></span></pre></div>
<a id="trunktestsqunitfixtureswpapigeneratedjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/qunit/fixtures/wp-api-generated.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/qunit/fixtures/wp-api-generated.js    2021-11-29 22:02:32 UTC (rev 52271)
+++ trunk/tests/qunit/fixtures/wp-api-generated.js      2021-11-29 22:04:48 UTC (rev 52272)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -10612,93 +10612,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                     }
</span><span class="cx" style="display: block; padding: 0 10px">                 }
</span><span class="cx" style="display: block; padding: 0 10px">             ]
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        },
-        "/wp/v2/block-navigation-areas": {
-            "namespace": "wp/v2",
-            "methods": [
-                "GET"
-            ],
-            "endpoints": [
-                {
-                    "methods": [
-                        "GET"
-                    ],
-                    "args": {
-                        "context": {
-                            "description": "Scope under which the request is made; determines fields present in response.",
-                            "type": "string",
-                            "enum": [
-                                "view",
-                                "embed",
-                                "edit"
-                            ],
-                            "default": "view",
-                            "required": false
-                        }
-                    }
-                }
-            ],
-            "_links": {
-                "self": [
-                    {
-                        "href": "http://example.org/index.php?rest_route=/wp/v2/block-navigation-areas"
-                    }
-                ]
-            }
-        },
-        "/wp/v2/block-navigation-areas/(?P<area>[\\w-]+)": {
-            "namespace": "wp/v2",
-            "methods": [
-                "GET",
-                "POST",
-                "PUT",
-                "PATCH"
-            ],
-            "endpoints": [
-                {
-                    "methods": [
-                        "GET"
-                    ],
-                    "allow_batch": {
-                        "v1": true
-                    },
-                    "args": {
-                        "area": {
-                            "description": "An alphanumeric identifier for the navigation area.",
-                            "type": "string",
-                            "required": false
-                        },
-                        "context": {
-                            "description": "Scope under which the request is made; determines fields present in response.",
-                            "type": "string",
-                            "enum": [
-                                "view",
-                                "embed",
-                                "edit"
-                            ],
-                            "default": "view",
-                            "required": false
-                        }
-                    }
-                },
-                {
-                    "methods": [
-                        "POST",
-                        "PUT",
-                        "PATCH"
-                    ],
-                    "allow_batch": {
-                        "v1": true
-                    },
-                    "args": {
-                        "area": {
-                            "description": "An alphanumeric identifier for the navigation area.",
-                            "type": "string",
-                            "required": false
-                        }
-                    }
-                }
-            ]
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px">     },
</span><span class="cx" style="display: block; padding: 0 10px">     "site_logo": 0,
</span></span></pre></div>
<a id="trunktoolswebpackblocksjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tools/webpack/blocks.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tools/webpack/blocks.js     2021-11-29 22:02:32 UTC (rev 52271)
+++ trunk/tools/webpack/blocks.js       2021-11-29 22:04:48 UTC (rev 52272)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -32,7 +32,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                'latest-posts',
</span><span class="cx" style="display: block; padding: 0 10px">                'loginout',
</span><span class="cx" style="display: block; padding: 0 10px">                'navigation',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                'navigation-area',
</del><span class="cx" style="display: block; padding: 0 10px">                 'navigation-link',
</span><span class="cx" style="display: block; padding: 0 10px">                'navigation-submenu',
</span><span class="cx" style="display: block; padding: 0 10px">                'page-list',
</span></span></pre>
</div>
</div>

</body>
</html>