Skip to:
Content

BuddyPress.org

Opened 5 years ago

Closed 5 years ago

#8158 closed defect (bug) (fixed)

WP_Admin_Bar::add_menu() is deprecated in WP 5.4

Reported by: imath's profile imath Owned by: imath's profile 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 5 years ago.
8158.patch (7.5 KB) - added by imath 5 years ago.

Download all attachments as: .zip

Change History (7)

@imath
5 years ago

@imath
5 years ago

#1 @imath
5 years 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
5 years ago

FYI this deprecation just got reverted in [WP46678].

#3 @imath
5 years 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
5 years 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
5 years 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.