WordPress.org

Make WordPress Core

#35686 closed defect (bug) (fixed)

Fix global tag for admin bar functions

Reported by: Frozzare Owned by: DrewAPicture
Milestone: 4.5 Priority: normal
Severity: normal Version: 4.3
Component: Toolbar Keywords: needs-patch
Focuses: docs Cc:

Description

Both show_admin_bar and is_admin_bar_showing has wrong global variable name for WP_Admin_Bar. It should be $show_admin_bar instead of $wp_admin_bar since the code use $show_admin_bar.

Attachments (1)

35686.patch (622 bytes) - added by Frozzare 22 months ago.

Download all attachments as: .zip

Change History (7)

@Frozzare
22 months ago

#1 @Frozzare
22 months ago

  • Keywords has-patch added

#2 @DrewAPicture
22 months ago

  • Milestone changed from Awaiting Review to 4.5
  • Type changed from enhancement to defect (bug)

Hi @Frozzare, thanks for the patch, nice catch :-)

#3 @DrewAPicture
22 months ago

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

In 36491:

Docs: Fix two notations in the DocBlocks for show_admin_bar() and is_admin_bar_showing() to reflect use of the $show_admin_bar global rather than $wp_admin_bar.

Props Frozzare.
Fixes #35686.

#4 @johnbillion
22 months ago

  • Component changed from Administration to Toolbar
  • Keywords needs-patch added; has-patch removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

$show_admin_bar is a boolean, not a WP_Admin_Bar.

#5 @johnbillion
22 months ago

  • Version changed from trunk to 4.3

#6 @DrewAPicture
21 months ago

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

In 36601:

Docs: Fix two incorrect notations of the $show_admin_bar global to specify a boolean type, not WP_Admin_Bar.

See [36491]. Fixes #35686.

Note: See TracTickets for help on using tickets.