mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 07:40:07 +00:00
Deprecate set_current_user() in favor of wp_set_current_user().
git-svn-id: https://develop.svn.wordpress.org/trunk@14090 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -6,24 +6,6 @@
|
||||
* @package WordPress
|
||||
*/
|
||||
|
||||
if ( !function_exists('set_current_user') ) :
|
||||
/**
|
||||
* Changes the current user by ID or name.
|
||||
*
|
||||
* Set $id to null and specify a name if you do not know a user's ID.
|
||||
*
|
||||
* @since 2.0.1
|
||||
* @see wp_set_current_user() An alias of wp_set_current_user()
|
||||
*
|
||||
* @param int|null $id User ID.
|
||||
* @param string $name Optional. The user's username
|
||||
* @return object returns wp_set_current_user()
|
||||
*/
|
||||
function set_current_user($id, $name = '') {
|
||||
return wp_set_current_user($id, $name);
|
||||
}
|
||||
endif;
|
||||
|
||||
if ( !function_exists('wp_set_current_user') ) :
|
||||
/**
|
||||
* Changes the current user by ID or name.
|
||||
|
||||
Reference in New Issue
Block a user