Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Navigation Area endpoints and utility functions #1944

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions src/wp-admin/site-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,8 @@ static function( $classes ) {
'/wp/v2/global-styles/' . $active_global_styles_id . '?context=edit',
'/wp/v2/global-styles/' . $active_global_styles_id,
'/wp/v2/themes/' . $active_theme . '/global-styles',
'/wp/v2/block-navigation-areas?context=edit',
);

$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 ) );
}
}

block_editor_rest_api_preload( $preload_paths, $block_editor_context );

wp_add_inline_script(
Expand Down
1 change: 0 additions & 1 deletion src/wp-includes/blocks/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
require ABSPATH . WPINC . '/blocks/latest-posts.php';
require ABSPATH . WPINC . '/blocks/legacy-widget.php';
require ABSPATH . WPINC . '/blocks/loginout.php';
require ABSPATH . WPINC . '/blocks/navigation-area.php';
require ABSPATH . WPINC . '/blocks/navigation-link.php';
require ABSPATH . WPINC . '/blocks/navigation-submenu.php';
require ABSPATH . WPINC . '/blocks/navigation.php';
Expand Down
22 changes: 0 additions & 22 deletions src/wp-includes/blocks/navigation-area.php

This file was deleted.

27 changes: 0 additions & 27 deletions src/wp-includes/blocks/navigation-area/block.json

This file was deleted.

4 changes: 0 additions & 4 deletions src/wp-includes/default-filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -681,8 +681,4 @@
add_action( 'wp_footer', 'the_block_template_skip_link' );
add_action( 'setup_theme', 'wp_enable_block_templates' );

// Navigation areas.
add_action( 'setup_theme', '_wp_register_default_navigation_areas' );
add_action( 'switch_theme', '_wp_migrate_menu_to_navigation_post', 99, 3 );

unset( $filter, $action );
262 changes: 0 additions & 262 deletions src/wp-includes/navigation-areas.php

This file was deleted.

4 changes: 0 additions & 4 deletions src/wp-includes/rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,6 @@ function create_initial_rest_routes() {
// Menu Locations.
$controller = new WP_REST_Menu_Locations_Controller();
$controller->register_routes();

// Block Navigation Areas
$controller = new WP_REST_Block_Navigation_Areas_Controller();
$controller->register_routes();
}

/**
Expand Down
Loading