Skip to:
Content

BuddyPress.org

Opened 11 months ago

Closed 6 months ago

#8158 closed defect (bug) (fixed)

WP_Admin_Bar::add_menu() is deprecated in WP 5.4

Reported by: imath Owned by: imath
Milestone: 6.0.0 Priority: normal
Severity: normal Version:
Component: Toolbar & Notifications Keywords: has-patch
Cc:

Description

Hi!

WP_Admin_Bar::add_menu() is a wrapper of WP_Admin_Bar::add_node() since the beginning I believe. At least, WP_Admin_Bar::add_node() is available in WP 4.8.

As this is pretty annoying (see attached screenshot), let's stop using WP_Admin_Bar::add_menu() asap.

Attachments (2)

wp-admin-bar.png (245.3 KB) - added by imath 11 months ago.
8158.patch (7.5 KB) - added by imath 11 months ago.

Download all attachments as: .zip

Change History (7)

@imath
11 months ago

@imath
11 months ago

#1 @imath
11 months ago

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

In 12495:

Use WP_Admin_Bar::add_node() to create new WP Admin Bar menu items

WP_Admin_Bar::add_menu() has been deprecated in WordPress 5.4. As this WP_Admin_Bar method is a wrapper of WP_Admin_Bar::add_node() since the introduction of the WP Admin Bar into WordPress 3.3 we can safely do this move.

Fixes #8158

#2 @johnbillion
11 months ago

FYI this deprecation just got reverted in [WP46678].

#3 @imath
11 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Thanks @johnbillion for the info. I haven’t waited long enough before committing! Well unless someone is feeling strong about it I think we can leave it the way it is. Reopening the ticket for second thoughts...

#4 @johnbillion
11 months ago

Might as well leave it as-is, it's just the deprecation that was reverted. Still makes sense to use the target method.

#5 @imath
6 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

Let's leave it the way it is :)

Note: See TracTickets for help on using tickets.