Opened 14 years ago
Closed 14 years ago
#10938 closed defect (bug) (fixed)
AtomPub redefines pluggable wp_set_current_user()
Reported by: | mdawaffe | Owned by: | westi |
---|---|---|---|
Milestone: | 2.9 | Priority: | normal |
Severity: | normal | Version: | 2.8.4 |
Component: | AtomPub | Keywords: | dev-feedback |
Focuses: | Cc: |
Description
wp-app.php redefines the pluggable wp_set_current_user().
This means that plugins which redefine wp_set_current_user() don't work during a APP call.
Also the redefined function is identical to the core function except that it calls neither setup_userdata() nor do_action( 'set_current_user' ).
setup_userdata() defines some globals that plugins might rely on. And defining globals is basically all it does, so it's not very expensive.
The do_action( 'set_current_user' ) is important for plugins that need to sync user data, change caps, etc.
I have no insight into why wp-app.php needs to redefine the function.
Change History (4)
#1
follow-up:
↓ 3
@
14 years ago
- Owner changed from josephscott to westi
- Status changed from new to accepted
#2
@
14 years ago
I think these can go as well:
/** Post Template API */ require_once(ABSPATH . WPINC . '/post-template.php'); /** Feed Handling API */ require_once(ABSPATH . WPINC . '/feed.php');
As they will also already be included.
Note: See
TracTickets for help on using
tickets.
I think it can just be ripped out.
As it never gets used.
wp-app.php pulls in wp-load.php at the top and by the time the function_exist check is reached the function is already defined.