[wp-trac] [WordPress Trac] #61738: admin_bar_menu node my-account returns null

WordPress Trac noreply at wordpress.org
Tue Sep 3 19:56:31 UTC 2024


#61738: admin_bar_menu node my-account returns null
---------------------------------------------+-----------------------------
 Reporter:  michaelwp85                      |       Owner:  hellofromTonya
     Type:  defect (bug)                     |      Status:  closed
 Priority:  normal                           |   Milestone:  6.6.2
Component:  Toolbar                          |     Version:  6.6.1
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  needs-dev-note has-patch commit  |     Focuses:  docs
---------------------------------------------+-----------------------------
Changes (by hellofromTonya):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"58978" 58978]:
 {{{
 #!CommitTicketReference repository="" revision="58978"
 Docs: Add changing existing items recommendations to 'admin_bar_menu'
 action.

 Improves the `'admin_bar_menu'` docblock by adding recommendations for
 customizing / changing existing items.

 It also improves the `wp_admin_bar_render()` function's docblock by
 removing the "most optimal point" sentence.

 The [58748] changeset moved the user menu to a higher priority level (of
 `9991`) to achieve:

 >so nodes added with higher priorities will still be shown visually before
 the user and recovery menu items, as they were prior to [58215].

 When hooking into `'admin_bar_menu'` with a priority level less than 9991
 and attempting to get the `'my-account'` node, `null` is returned. While
 the preferred approach is to hook into `'wp_before_admin_bar_render'`, the
 documentation of the `'admin_bar_menu'` action was previously misleading.

 Follow-up to [58748], [58759].

 Props michaelwp85, narenin, sabernhardt, joedolson, costdev, jorbin,
 hellofromTonya, mukesh27, pbiron.
 Fixes #61738.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61738#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list