Skip to content

Commit

Permalink
Changes from lib/navigation.php
Browse files Browse the repository at this point in the history
  • Loading branch information
noisysocks committed Nov 4, 2021
1 parent 762973d commit b4bc03c
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions src/wp-includes/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit b4bc03c

Please sign in to comment.