Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#19766 closed defect (bug) (wontfix)

Admin bar should be able to be turned off in admin area

Reported by: ericlewis's profile ericlewis Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.3.1
Component: UI Keywords:
Focuses: Cc:

Description

In reference to http://core.trac.wordpress.org/ticket/18197, Nacin added a patch that enforces the admin bar on when in the admin area. This invalidates part of the utility of show_admin_bar(), which can be used to change whether the admin bar will be shown via modifying the global $show_admin_bar. Plugin authors may find themselves in a situation that they wanted to do away with the admin bar, even in the admin area, as BuddyPress did until this changeset.

This logic is held within is_admin_bar_showing() (admin-bar.php:710). Currently if is_admin() returns true is_admin_bar_showing returns true. I'm suggesting adding an AND condition to validate against the global $show_admin_bar as well, which is what this global is intended to be used for.

Although I found this bug while working with BuddyPress, I feel that the utility may be applicable in other situations, and keeping WP more flexible than less flexible is a good idea.

Attachments (1)

19766.diff (791 bytes) - added by ericlewis 13 years ago.

Download all attachments as: .zip

Change History (4)

@ericlewis
13 years ago

#1 @jane
13 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

It's no longer the admin bar in user terms, it's a persistent part of the navigation called the toolbar and cannot be removed from the dashboard without breaking things.

#2 @SergeyBiryukov
13 years ago

Related/duplicate: #19685

#3 @ericlewis
13 years ago

Ah okay, thanks for the responses all, please excuse the redundancy.

Note: See TracTickets for help on using tickets.