#20989 closed defect (bug) (invalid)
wp_enqueue_style in wp-login.php shows css load string in login_footer() not in head
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 3.4 |
| Severity: | normal | Keywords: | |
| Cc: | ben@… |
Description
Hi,
If you enqueue a style, even if this style is loaded in the head of every page, on wp-login.php is loaded in login_footer().
This issue does not occur on wp_enqueue_script.
Change History (6)
comment:1
SergeyBiryukov — 11 months ago
Thanks for the answer :)
The problem for me is the opposite, I added a CSS to my plugin, the call is inside:
if ( !is_admin() ) {
}
And I can see that on wp-login.php (where I don't need the CSS) the call executes on login_footer()
comment:3
SergeyBiryukov — 11 months ago
Yes, wp-login.php is not considered a part of the admin.
You could check $_SERVER['PHP_SELF'] or the $pagenow global, like is_admin_bar_showing() does:
http://core.trac.wordpress.org/browser/tags/3.4/wp-includes/admin-bar.php#L734
global $pagenow;
if ( !is_admin() && 'wp-login.php' != $pagenow ) {
}
comment:5
SergeyBiryukov — 11 months ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.

wp_print_styles() needs to be added in this case, since it's not called automatically for login_head. Related discussion: ticket:17916:12.