[wp-trac] [WordPress Trac] #19647: Use add_node() instead of add_menu() in core
WordPress Trac
noreply at wordpress.org
Thu Dec 3 06:37:20 UTC 2015
#19647: Use add_node() instead of add_menu() in core
-------------------------------------+------------------------------
Reporter: linuxologos | Owner:
Type: enhancement | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: Toolbar | Version: 3.3
Severity: normal | Resolution:
Keywords: needs-refresh has-patch | Focuses:
-------------------------------------+------------------------------
Changes (by chriscct7):
* keywords: has-patch 2nd-opinion => needs-refresh has-patch
* severity: minor => normal
Old description:
> It's clear through [http://core.trac.wordpress.org/browser/tags/3.3/wp-
> includes/class-wp-admin-bar.php class-wp-admin-bar.php] and Nacin
> [http://wpdevel.wordpress.com/2011/12/07/admin-bar-api-changes-in-3-3/
> 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
> [http://core.trac.wordpress.org/browser/tags/3.3/wp-includes/admin-
> bar.php 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()}}}.)
New description:
''''It's clear through [http://core.trac.wordpress.org/browser/tags/3.3
/wp-includes/class-wp-admin-bar.php class-wp-admin-bar.php] and Nacin
[http://wpdevel.wordpress.com/2011/12/07/admin-bar-api-changes-in-3-3/ 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
[http://core.trac.wordpress.org/browser/tags/3.3/wp-includes/admin-bar.php
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()}}}.)
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/19647#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list