WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/18/2017 02:50:34 PM (2 years ago)
Author:
obenland
Message:

Customize: Allow menu creation in locations pane

Adds a link to the menu creation workflow from the locations selector in the nav menu control.

Props bpayton, westonruter, Travel_girl, melchoyce, celloexpressions.
Fixes #36279.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/customize/class-wp-customize-nav-menu-location-control.php

    r41162 r41899  
    5151     *
    5252     * @since 4.3.0
     53     * @since 4.9.0 Added a button to create menus.
    5354     */
    5455    public function render_content() {
     
    7475            </select>
    7576        </label>
     77        <button type="button" class="button-link create-menu<?php if ( $this->value() ) { echo ' hidden'; } ?>" data-location-id="<?php echo esc_attr( $this->location_id ); ?>" aria-label="<?php esc_attr_e( 'Create a menu for this location' ); ?>"><?php _e( '+ Create New Menu' ); ?></button>
    7678        <button type="button" class="button-link edit-menu<?php if ( ! $this->value() ) { echo ' hidden'; } ?>" aria-label="<?php esc_attr_e( 'Edit selected menu' ); ?>"><?php _e( 'Edit Menu' ); ?></button>
    7779        <?php
Note: See TracChangeset for help on using the changeset viewer.