Opened 13 years ago
Closed 13 years ago
#19215 closed defect (bug) (invalid)
'init' action hook loading in wp-login.php page before logging into wordpress
Reported by: | kcssm | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | major | Version: | 3.3 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
add_action( 'init', 'my_function' ); loads before logging into the wordpress in the log-in page itself. So what this does is, loads all the enqueued scripts defined in the fucntion on the login page itself, which should have loaded only after the wordpress has finished loading.
Change History (12)
#3
@
13 years ago
- Keywords reporter-feedback removed
add_action( 'init', 'my_fucntion' ); Any scripts enqueued in my_function loads in the wp-login.php page before logging into the wordpress.
#4
@
13 years ago
You're confusing some terms here by the sound of it. You don't mean Enqueued scripts, you mean hooked functions.
#6
@
13 years ago
'init' action hook used to load only after the wordpress has finished log-in. But now it loads before log-in in the wp-login.php page itself.
#7
@
13 years ago
'init' action hook used to load only after the wordpress has finished log-in.
What version of WordPress did you see that in?
#8
@
13 years ago
http://codex.wordpress.org/Plugin_API/Action_Reference/init here it says so.
#9
@
13 years ago
http://codex.wordpress.org/Plugin_API/Action_Reference/init here it says so.
Loading != Login
AFAIK, The Login process has always happened after WordPress has been setup, therefor, after the init action is fired.
#10
@
13 years ago
It was working fine untill I updated to wordpress 3.3, so i thought may be this was a bug or something. So I guess, it was my bad, sorry about this, but I am still wondering why it was working in previous versions perfectly fine.
anyways thanks to all of you.
#11
@
13 years ago
First thing wp-login.php
does is load other WordPress files:
http://core.trac.wordpress.org/browser/trunk/wp-login.php#L11
This is when init
is fired:
http://core.trac.wordpress.org/browser/trunk/wp-settings.php#L304
This behaviour doesn't seem to have changed since 1.5:
http://core.trac.wordpress.org/browser/tags/1.5/wp-login.php#L2
Not sure I understand the problem. Are you looking for
admin_enqueue_scripts
, perhaps?