Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#16588 closed defect (bug) (fixed)

is_admin_bar_showing can return true when it isn't

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

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 2 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 follow-up: ↓ 2   nacin2 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   westi2 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.

nacin2 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.

  • Milestone changed from Awaiting Review to 3.1.1

comment:5   ryan2 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   ryan2 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.