WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#16588 closed defect (bug) (fixed)

is_admin_bar_showing can return true when it isn't

Reported by: westi Owned by:
Milestone: 3.1.1 Priority: low
Severity: minor Version: 3.1
Component: General Keywords: has-patch
Focuses: Cc:

Description

is_admin_bar_showing returns true on wp-login.php if you are logged in but it will never be shown.

It shouldn't

Attachments (1)

16588.diff (808 bytes) - added by nacin 4 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 follow-up: @nacin4 years ago

That you can go to wp-login.php when logged in, seems to be the real bug here: #14949.

comment:2 in reply to: ↑ 1 @westi4 years ago

Replying to nacin:

That you can go to wp-login.php when logged in, seems to be the real bug here: #14949.

Not 100% sure on that but I can see the argument.

Even if we don't allow access to the page when logged in this bug still exists if the admin bar is shown to logged out users.

@nacin4 years ago

comment:3 @nacin4 years ago

  • Keywords has-patch added; needs-patch removed

Agreed. Patch attached makes sure that wp-login.php avoids the is_admin() check.

If on the other hand you did want the admin bar on the login page, you could still use the show_admin_bar filter. You'd need to attach the admin bar to the specific hooks yourself anyway.

comment:4 @nacin4 years ago

  • Milestone changed from Awaiting Review to 3.1.1

comment:5 @ryan4 years ago

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

(In [17508]) Don't show admin bar on login screen. Props nacin. fixes #16588 for trunk

comment:6 @ryan4 years ago

(In [17509]) Don't show admin bar on login screen. Props nacin. fixes #16588 for 3.1

Note: See TracTickets for help on using tickets.