Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/07/2023 12:18:55 AM (2 years ago)
Author:
espellcaste
Message:

PHPDoc: adding improvements to the @global tag definition.

The @global tag is used to inform PHPDoc of a global variable or its usage. The tag was updated where necessary and invalid examples were removed.

Closes https://github.com/buddypress/buddypress/pull/53
Fixes #8786

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-component.php

    r13124 r13395  
    580580     * @see WP_Admin_Bar::add_menu() for a description of the syntax
    581581     *      required by each item in the $wp_admin_nav parameter array.
    582      * @global object $wp_admin_bar
     582     *
     583     * @global WP_Admin_Bar $wp_admin_bar WordPress object implementing a Toolbar API.
    583584     *
    584585     * @param array $wp_admin_nav An array of nav item arguments. Each item in this parameter
     
    588589     */
    589590    public function setup_admin_bar( $wp_admin_nav = array() ) {
     591        global $wp_admin_bar;
    590592
    591593        // Bail if this is an ajax request.
     
    638640            $this->admin_menu = $wp_admin_nav;
    639641
    640             // Define the WordPress global.
    641             global $wp_admin_bar;
    642 
    643642            // Add each admin menu.
    644643            foreach( $this->admin_menu as $admin_menu ) {
Note: See TracChangeset for help on using the changeset viewer.