Make WordPress Core

Opened 6 years ago

Last modified 13 months ago

#19647 reviewing enhancement

Use add_node() instead of add_menu() in core

Reported by: linuxologos Owned by: chriscct7
Milestone: Future Release Priority: low
Severity: normal Version: 3.3
Component: Toolbar Keywords: has-patch needs-testing
Focuses: Cc:

Description (last modified by chriscct7)

'It's clear through class-wp-admin-bar.php and Nacin has stated this too:

The API previously emphasized add_menu(), but this can be confusing, so add_node() is now being promoted a bit more.

Another step towards this would be that the core used add_node() instead of add_menu() when building menu items in admin-bar.php.

Proposed patch replaces all references to the add_menu() method with the add_node() one. (Also some code structure modifications for wp_admin_bar_appearance_menu().)

Attachments (4)

19647.patch (11.6 KB) - added by linuxologos 6 years ago.
19647.2.patch (12.3 KB) - added by paulschreiber 2 years ago.
add_node() changes only; no formatting changes
19647.diff (14.8 KB) - added by morganestes 2 years ago.
Adds a deprecated notice to add_menu() and directs use of add_node()
19647.2.diff (13.0 KB) - added by akibjorklund 18 months ago.
Refreshed patch

Download all attachments as: .zip

Change History (11)

6 years ago

#1 @nacin
5 years ago

  • Owner set to ryan
  • Status changed from new to assigned

Ryan, you game?

#2 @ryan
4 years ago

  • Owner ryan deleted

#3 @chriscct7
2 years ago

  • Description modified (diff)
  • Keywords needs-refresh added; 2nd-opinion removed
  • Severity changed from minor to normal

#4 @johnbillion
2 years ago

  • Keywords needs-patch added; needs-refresh has-patch removed
  • Priority changed from normal to low

Needs a patch minus the unnecessary formatting changes.

2 years ago

add_node() changes only; no formatting changes

#5 @paulschreiber
2 years ago

  • Keywords has-patch added; needs-patch removed

#6 @chriscct7
2 years ago

  • Owner set to chriscct7
  • Status changed from assigned to reviewing

2 years ago

Adds a deprecated notice to add_menu() and directs use of add_node()

18 months ago

Refreshed patch

#7 @swissspidy
13 months ago

  • Keywords needs-testing added
  • Milestone changed from Awaiting Review to Future Release
Note: See TracTickets for help on using tickets.