From b4bc03c7442ba538a456362ab9c68ae751cbf5da Mon Sep 17 00:00:00 2001 From: Robert Anderson Date: Thu, 4 Nov 2021 15:21:30 +1100 Subject: [PATCH] Changes from lib/navigation.php --- src/wp-includes/post.php | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 0f75bf537e246..f3553f71320b0 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -365,6 +365,51 @@ function create_initial_post_types() { ) ); + register_post_type( + 'wp_navigation', + array( + 'labels' => array( + 'name' => __( 'Navigation Menus', 'gutenberg' ), + 'singular_name' => __( 'Navigation Menu', 'gutenberg' ), + 'menu_name' => _x( 'Navigation Menus', 'Admin Menu text', 'gutenberg' ), + 'add_new' => _x( 'Add New', 'Navigation Menu', 'gutenberg' ), + 'add_new_item' => __( 'Add New Navigation Menu', 'gutenberg' ), + 'new_item' => __( 'New Navigation Menu', 'gutenberg' ), + 'edit_item' => __( 'Edit Navigation Menu', 'gutenberg' ), + 'view_item' => __( 'View Navigation Menu', 'gutenberg' ), + 'all_items' => __( 'All Navigation Menus', 'gutenberg' ), + 'search_items' => __( 'Search Navigation Menus', 'gutenberg' ), + 'parent_item_colon' => __( 'Parent Navigation Menu:', 'gutenberg' ), + 'not_found' => __( 'No Navigation Menu found.', 'gutenberg' ), + 'not_found_in_trash' => __( 'No Navigation Menu found in Trash.', 'gutenberg' ), + 'archives' => __( 'Navigation Menu archives', 'gutenberg' ), + 'insert_into_item' => __( 'Insert into Navigation Menu', 'gutenberg' ), + 'uploaded_to_this_item' => __( 'Uploaded to this Navigation Menu', 'gutenberg' ), + // Some of these are a bit weird, what are they for? + 'filter_items_list' => __( 'Filter Navigation Menu list', 'gutenberg' ), + 'items_list_navigation' => __( 'Navigation Menus list navigation', 'gutenberg' ), + 'items_list' => __( 'Navigation Menus list', 'gutenberg' ), + ), + 'description' => __( 'Navigation menus.', 'gutenberg' ), + 'public' => false, + '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ + 'has_archive' => false, + 'show_ui' => false, + 'show_in_menu' => 'themes.php', + 'show_in_admin_bar' => false, + 'show_in_rest' => true, + 'rewrite' => false, + 'map_meta_cap' => true, + 'rest_base' => 'navigation', + 'rest_controller_class' => 'WP_REST_Posts_Controller', + 'supports' => array( + 'title', + 'editor', + 'revisions', + ), + ) + ); + register_post_status( 'publish', array(