WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/28/2017 05:47:06 AM (2 years ago)
Author:
westonruter
Message:

Customize: Deprecate nav menu classes that are no longer used, instead of removing them immediately.

  • Deprecate PHP classes WP_Customize_New_Menu_Section and WP_Customize_New_Menu_Control.
  • Deprecate JS class wp.customize.Menus.NewMenuControl.
  • Also introduce wp.customize.Menus.createNavMenu() for logic to create nav menus separately from the logic for handling UI interactions.

Amends [41768].
See #40104, #42364.
Fixes #42357.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/customize/class-wp-customize-new-menu-section.php

    r41162 r42034  
    66 * @subpackage Customize
    77 * @since 4.4.0
     8 * @deprecated 4.9.0 This file is no longer used as of the menu creation UX introduced in #40104.
    89 */
    910
     
    1112 * Customize Menu Section Class
    1213 *
    13  * Implements the new-menu-ui toggle button instead of a regular section.
    14  *
    1514 * @since 4.3.0
     15 * @deprecated 4.9.0 This class is no longer used as of the menu creation UX introduced in #40104.
    1616 *
    1717 * @see WP_Customize_Section
     
    2626     */
    2727    public $type = 'new_menu';
     28
     29    /**
     30     * Constructor.
     31     *
     32     * Any supplied $args override class property defaults.
     33     *
     34     * @since 4.9.0
     35     *
     36     * @param WP_Customize_Manager $manager Customizer bootstrap instance.
     37     * @param string               $id      An specific ID of the section.
     38     * @param array                $args    Section arguments.
     39     */
     40    public function __construct( WP_Customize_Manager $manager, $id, array $args = array() ) {
     41        _deprecated_file( basename( __FILE__ ), '4.9.0' ); // @todo Move this outside of class in 5.0, and remove its require_once() from class-wp-customize-section.php. See #42364.
     42        parent::__construct( $manager, $id, $args );
     43    }
    2844
    2945    /**
Note: See TracChangeset for help on using the changeset viewer.