Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#16540 closed enhancement (fixed)

Unnecessary use of global in admin-bar.php

Reported by: andriijas's profile 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 14 years ago.
16540.2.diff (2.3 KB) - added by solarissmoke 14 years ago.

Download all attachments as: .zip

Change History (8)

@solarissmoke
14 years ago

#1 @solarissmoke
14 years ago

  • Keywords has-patch added

#2 @dd32
14 years ago

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

#3 @ocean90
14 years ago

  • Component changed from General to Administration

#4 @scribu
14 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.

#5 @solarissmoke
14 years ago

  • Keywords needs-refresh removed

Patch refreshed

#6 @ryan
14 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.