Make WordPress Core

Opened 3 years ago

Closed 3 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:


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

Download all attachments as: .zip

Change History (8)

solarissmoke3 years ago

comment:1 solarissmoke3 years ago

  • Keywords has-patch added

comment:2 dd323 years ago

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

comment:3 ocean903 years ago

  • Component changed from General to Administration

comment:4 scribu3 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.

solarissmoke3 years ago

comment:5 solarissmoke3 years ago

  • Keywords needs-refresh removed

Patch refreshed

comment:6 ryan3 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.