Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/07/2019 07:00:08 PM (5 years ago)
Author:
imath
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-notifications/bp-notifications-adminbar.php

    r10417 r12495  
    3434
    3535    // Add the top-level Notifications button.
    36     $wp_admin_bar->add_menu( array(
     36    $wp_admin_bar->add_node( array(
    3737        'parent'    => 'top-secondary',
    3838        'id'        => 'bp-notifications',
     
    4343    if ( ! empty( $notifications ) ) {
    4444        foreach ( (array) $notifications as $notification ) {
    45             $wp_admin_bar->add_menu( array(
     45            $wp_admin_bar->add_node( array(
    4646                'parent' => 'bp-notifications',
    4747                'id'     => 'notification-' . $notification->id,
     
    5151        }
    5252    } else {
    53         $wp_admin_bar->add_menu( array(
     53        $wp_admin_bar->add_node( array(
    5454            'parent' => 'bp-notifications',
    5555            'id'     => 'no-notifications',
Note: See TracChangeset for help on using the changeset viewer.