Skip to content

Commit c9e4633

Browse files
committed
Only load authentication after init
We don't have access to the query vars until after WP loads the query parsing, and works out where we are. This happens between plugins_loaded and init.
1 parent 55a0b55 commit c9e4633

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

oauth-server.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function json_oauth_load() {
5959
add_filter( 'determine_current_user', array( $wp_json_authentication_oauth1, 'authenticate' ) );
6060
add_filter( 'json_authentication_errors', array( $wp_json_authentication_oauth1, 'get_authentication_errors' ) );
6161
}
62-
add_action( 'plugins_loaded', 'json_oauth_load' );
62+
add_action( 'init', 'json_oauth_load' );
6363

6464
/**
6565
* Load the JSON API

0 commit comments

Comments
 (0)