Make WordPress Core


Ignore:
Timestamp:
11/12/2021 03:53:18 AM (3 years ago)
Author:
noisysocks
Message:

Editor: Add Navigation Area infrastructure

Copies Navigation Area infrastrucutre from lib/navigation.php in Gutenberg. This
allows a Navigation block to be associated with a particular area which persists
when switching theme.

Props antonvlasenko, mamaduka, spacedmonkey.
See #54337.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r52128 r52145  
    481481                'name'                  => __( 'Navigation Menus' ),
    482482                'singular_name'         => __( 'Navigation Menu' ),
    483                 'menu_name'             => _x( 'Navigation Menus', 'Admin Menu text' ),
    484483                'add_new'               => _x( 'Add New', 'Navigation Menu' ),
    485484                'add_new_item'          => __( 'Add New Navigation Menu' ),
     
    487486                'edit_item'             => __( 'Edit Navigation Menu' ),
    488487                'view_item'             => __( 'View Navigation Menu' ),
    489                 'all_items'             => __( 'All Navigation Menus' ),
     488                'all_items'             => __( 'Navigation Menus' ),
    490489                'search_items'          => __( 'Search Navigation Menus' ),
    491490                'parent_item_colon'     => __( 'Parent Navigation Menu:' ),
     
    495494                'insert_into_item'      => __( 'Insert into Navigation Menu' ),
    496495                'uploaded_to_this_item' => __( 'Uploaded to this Navigation Menu' ),
    497                 // Some of these are a bit weird, what are they for?
    498496                'filter_items_list'     => __( 'Filter Navigation Menu list' ),
    499497                'items_list_navigation' => __( 'Navigation Menus list navigation' ),
    500498                'items_list'            => __( 'Navigation Menus list' ),
    501499            ),
     500            'description'           => __( 'Navigation menus that can be inserted into your site.' ),
    502501            'public'                => false,
    503502            '_builtin'              => true, /* internal use only. don't use this when registering your own post type. */
    504503            'has_archive'           => false,
    505             'show_ui'               => false,
     504            'show_ui'               => wp_is_block_template_theme(),
    506505            'show_in_menu'          => 'themes.php',
    507506            'show_in_admin_bar'     => false,
Note: See TracChangeset for help on using the changeset viewer.