WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#16540 closed enhancement (fixed)

Unnecessary use of global in admin-bar.php

Reported by: andriijas Owned by:
Milestone: 3.2 Priority: normal
Severity: trivial Version: 3.1
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

In admin-bar.php line 78 function wp_admin_bar_my_account_menu takes $wp_admin_bar as argument (as seen in line 60) and should use that in favor of global.

That goes for the other wp_admin_bar_* functions that adds menus to the admin bar in the same file as well.

Attachments (2)

16540.diff (2.3 KB) - added by solarissmoke 7 years ago.
16540.2.diff (2.3 KB) - added by solarissmoke 7 years ago.

Download all attachments as: .zip

Change History (8)

@solarissmoke
7 years ago

#1 @solarissmoke
7 years ago

  • Keywords has-patch added

#2 @dd32
7 years ago

  • Keywords 3.2-early added
  • Milestone changed from Awaiting Review to Future Release

#3 @ocean90
7 years ago

  • Component changed from General to Administration

#4 @scribu
7 years ago

  • Keywords needs-refresh added; 3.2-early removed
  • Milestone changed from Future Release to 3.2

Since we're on PHP5, we don't need to pass by reference anymore.

@solarissmoke
7 years ago

#5 @solarissmoke
7 years ago

  • Keywords needs-refresh removed

Patch refreshed

#6 @ryan
6 years ago

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

(In [17658]) Used passed admin bar object instead of global. Props solarissmoke. fixes #16540

Note: See TracTickets for help on using tickets.