Make WordPress Core

Opened 16 years ago

Closed 15 years ago

#16540 closed enhancement (fixed)

Unnecessary use of global in admin-bar.php

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

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 16 years ago.
16540.2.diff​ (2.3 KB ) - added by solarissmoke 16 years ago.

Download all attachments as: .zip

Change History (8)

@solarissmoke
16 years ago

#1 @solarissmoke
16 years ago

  • Keywords has-patch added

#2 @dd32
16 years ago

  • Keywords 3.2-early added
  • Milestone Awaiting Review → Future Release

#3 @ocean90
16 years ago

  • Component General → Administration

#4 @scribu
16 years ago

  • Keywords needs-refresh added; 3.2-early removed
  • Milestone Future Release → 3.2

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

#5 @solarissmoke
16 years ago

  • Keywords needs-refresh removed

Patch refreshed

#6 @ryan
15 years ago

  • Resolution → fixed
  • Status new → closed

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

Note: See TracTickets for help on using tickets.