WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/09/2016 09:40:27 PM (4 years ago)
Author:
westonruter
Message:

Customize: Fix persistence of toggles for displayed nav menu item properties.

  • Eliminates need to click more than one checkbox to have preferences saved.
  • Adds debouncing to saving user-selected menu item properties.
  • Also removes discrepancies between available nav menu item properties on admin page vs Customizer.

Fixes #35273.
Props afercia, westonruter.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/customize/class-wp-customize-nav-menus-panel.php

    r36809 r36908  
    3535     */
    3636    public function render_screen_options() {
    37         // Essentially adds the screen options.
    38         add_filter( 'manage_nav-menus_columns', array( $this, 'wp_nav_menu_manage_columns' ) );
     37        // Adds the screen options.
     38        require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
     39        add_filter( 'manage_nav-menus_columns', 'wp_nav_menu_manage_columns' );
    3940
    4041        // Display screen options.
     
    4950     *
    5051     * @since 4.3.0
    51      * @access public
    52      *
    53      * @return array The advanced menu properties.
     52     * @deprecated 4.5.0 Deprecated in favor of wp_nav_menu_manage_columns().
    5453     */
    5554    public function wp_nav_menu_manage_columns() {
    56         return array(
    57             '_title'      => __( 'Show advanced menu properties' ),
    58             'cb'          => '<input type="checkbox" />',
    59             'link-target' => __( 'Link Target' ),
    60             'attr-title'  => __( 'Title Attribute' ),
    61             'css-classes' => __( 'CSS Classes' ),
    62             'xfn'         => __( 'Link Relationship (XFN)' ),
    63             'description' => __( 'Description' ),
    64         );
     55        _deprecated_function( __METHOD__, '4.5.0', 'wp_nav_menu_manage_columns' );
     56        require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
     57        return wp_nav_menu_manage_columns();
    6558    }
    6659
Note: See TracChangeset for help on using the changeset viewer.