Make WordPress Core

Opened 7 years ago

Closed 5 years ago

Last modified 5 years ago

#42364 closed task (blessed) (fixed)

Customize: Remove deprecated nav menu classes

Reported by: westonruter's profile westonruter Owned by: desrosj's profile desrosj
Milestone: 5.4 Priority: low
Severity: normal Version: 4.9
Component: Customize Keywords: early has-patch commit has-dev-note
Focuses: Cc:

Description

The following classes are deprecated in 4.9 and can be removed in 5.0:

  • wp.customize.Menus.NewMenuControl (in JS)
  • WP_Customize_New_Menu_Section (in PHP)
  • WP_Customize_New_Menu_Control (in PHP)

These classes are not used by plugins and they are not used in core. For more, see #42357.

Attachments (3)

42364.diff (8.5 KB) - added by Matthias Reuter 6 years ago.
I've created a diff with the patch to remove the classes mentioned.
42364-refreshed.patch (8.5 KB) - added by jrf 5 years ago.
Renewed patch.
42364.2.diff (8.1 KB) - added by desrosj 5 years ago.

Download all attachments as: .zip

Change History (15)

#1 @westonruter
7 years ago

In 42034:

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.

@Matthias Reuter
6 years ago

I've created a diff with the patch to remove the classes mentioned.

#2 @Matthias Reuter
6 years ago

  • Keywords has-patch added; needs-patch removed

#3 @pento
6 years ago

  • Milestone changed from 5.0 to 5.1

This ticket was mentioned in Slack in #core-customize by dlh. View the logs.


6 years ago

#5 @desrosj
6 years ago

@Matthias Reuter are you able to refresh the patch? It is not applying to trunk currently.

#6 @desrosj
6 years ago

Sorry, incorrect tag above. @matthias-reuter.

#7 @pento
6 years ago

  • Keywords needs-refresh added
  • Milestone changed from 5.1 to 5.2

#8 @jorbin
5 years ago

  • Milestone changed from 5.2 to Future Release

As 5.2 is now in beta and this was something that needed early attention, I'm removing it from the milestone.

@jrf
5 years ago

Renewed patch.

#9 @jrf
5 years ago

  • Keywords needs-refresh removed
  • Milestone changed from Future Release to 5.4

I have create a new patch for the removal of the wp.customize.Menus.NewMenuControl (in JS) and the formal deprecation of the PHP WP_Customize_New_Menu_Section and WP_Customize_New_Menu_Control classes.

As those PHP classes have now been in Core for much longer than originally intended, I'm hesitant about removing them outright and have opted for aggressive deprecation instead.

@desrosj
5 years ago

#10 @desrosj
5 years ago

  • Keywords commit needs-dev-note added

Thanks @jrf! I tend to agree with you on not straight up removing the classes. If someone is able to do a scan of the plugin directory and there are no plugins using these classes, I think we could reconsider.

42364.2.diff just adds the @deprecated tag to the function docblocks in addition to the _deprecated_file() and _deprecated_function() calls.

These changes should also get a brief dev note, just in case any plugins or themes are using them.

Since this is marked early, I'm going to commit this so it can have some soak time.

#11 @desrosj
5 years ago

  • Owner set to desrosj
  • Resolution set to fixed
  • Status changed from new to closed

In 46637:

Customize: Formally deprecate unused Customizer classes.

The WP_Customize_New_Menu_Control and WP_Customize_New_Menu_Section PHP classes and wp.customize.Menus.NewMenuControl JS class were deprecated in 4.9 through [42034] with the intention of removing them in 5.0. Since more time has passed than originally intended, this change leaves WP_Customize_New_Menu_Control and WP_Customize_New_Menu_Section to prevent any potential backwards compatibility issues, and formally deprecates them. The wp.customize.Menus.NewMenuControl JS class is removed.

Props weston.ruter, matthias-reuter, jrf.
Fixes #42364.

Note: See TracTickets for help on using tickets.