Call WP::init() just before kicking the init action so that the current user is setup as early as possible. fixes #4181
git-svn-id: https://develop.svn.wordpress.org/trunk@6586 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f5564e74c8
commit
2e6e71f068
@ -19,8 +19,6 @@ nocache_headers();
|
|||||||
|
|
||||||
update_category_cache();
|
update_category_cache();
|
||||||
|
|
||||||
wp_get_current_user();
|
|
||||||
|
|
||||||
$posts_per_page = get_option('posts_per_page');
|
$posts_per_page = get_option('posts_per_page');
|
||||||
$what_to_show = get_option('what_to_show');
|
$what_to_show = get_option('what_to_show');
|
||||||
$date_format = get_option('date_format');
|
$date_format = get_option('date_format');
|
||||||
|
@ -438,6 +438,8 @@ function shutdown_action_hook() {
|
|||||||
}
|
}
|
||||||
register_shutdown_function('shutdown_action_hook');
|
register_shutdown_function('shutdown_action_hook');
|
||||||
|
|
||||||
|
$wp->init(); // Sets up current user.
|
||||||
|
|
||||||
// Everything is loaded and initialized.
|
// Everything is loaded and initialized.
|
||||||
do_action('init');
|
do_action('init');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user