Opened 5 years ago
Last modified 5 weeks ago
#48831 new enhancement
WP Admin Bar doesn't display on wp-login.php page
Reported by: | henry.wright | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Toolbar | Keywords: | has-patch changes-requested 2nd-opinion close |
Focuses: | Cc: |
Description (last modified by )
I like to display the WP Admin Bar on all pages even if a user isn't authenticated because we get the WordPress logo and menu and a search button. To always show the WP Admin Bar we can do this:
add_filter( 'show_admin_bar', '__return_true' );
This will display it everywhere except wp-login.php. I think it _should_ display on this page if we return true in the filter
Attachments (3)
Change History (14)
#3
@
5 years ago
This is because wp-login.php uses a different set of hooks. login_header
and login_footer
are used instead of wp_head
and wp_footer
#5
@
5 years ago
Hello @henrywright,
I attached a patch, https://core.trac.wordpress.org/attachment/ticket/48831/48831.2.diff, that should address this ticket.
P.S. - I changed this ticket from bug
to enhancement
as I feel that this is more of an enhancement.
#7
@
5 years ago
I like to display the WP Admin Bar on all pages even if a user isn't authenticated because we get the WordPress logo and menu and a search button.
Just noting there's a Logged Out Admin Bar plugin used on WordPress.org for that purpose, though it doesn't display the toolbar on the login page either.
#8
@
5 years ago
@donmhico I think you are right to set this to an enhancement. It isn't really a bug
Thanks @SergeyBiryukov
#10
@
3 years ago
Latest iteration: 48831.3.diff
I moved the actions into wp-login.php so it checks whether the filter returns true (not every case of showing toolbar). The toolbar also does not fit in an interim login.
For the CSS, I prefer resetting form
element styles along with the links, and the search input min-height matches the height. The html
element includes an admin-bar
class so the full height layout can subtract the toolbar height from 100% (using the new custom property).
#11
@
2 months ago
- Keywords changes-requested 2nd-opinion close added
48831.3.diff has a coding standards error in the html
element. It also would add a navigation
landmark role, and the page should have additional landmarks and/or a skip link to go with that (#51786).
However, with no progress in 3 years, I am more inclined to close the ticket. In addition to the Logged Out Admin Bar plugin, BuddyPress has a similar option in its plugin and that does not show the toolbar on the login page either. Maybe this concept would fit better as part of the proposed admin redesign.
I can't edit the ticket description but I should have said: