#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: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.4 |
Component: | General | Keywords: | |
Focuses: | Cc: |
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)
#2
@
13 years 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()
#3
@
13 years 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 ) { }
Note: See
TracTickets for help on using
tickets.
wp_print_styles()
needs to be added in this case, since it's not called automatically forlogin_head
. Related discussion: ticket:17916:12.