Make WordPress Core


Ignore:
Timestamp:
04/14/2010 10:06:03 PM (14 years ago)
Author:
nacin
Message:

Deprecate set_current_user() in favor of wp_set_current_user().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/pluggable-deprecated.php

    r13255 r14090  
    1515 * Deprecated functions come here to die.
    1616 */
     17
     18if ( !function_exists('set_current_user') ) :
     19/**
     20 * Changes the current user by ID or name.
     21 *
     22 * Set $id to null and specify a name if you do not know a user's ID.
     23 *
     24 * @since 2.0.1
     25 * @see wp_set_current_user() An alias of wp_set_current_user()
     26 * @deprecated 3.0.0
     27 * @deprecated Use wp_set_current_user()
     28 *
     29 * @param int|null $id User ID.
     30 * @param string $name Optional. The user's username
     31 * @return object returns wp_set_current_user()
     32 */
     33function set_current_user($id, $name = '') {
     34    _deprecated_function( __FUNCTION__, '3.0', 'wp_set_current_user()' );
     35    return wp_set_current_user($id, $name);
     36}
     37endif;
    1738
    1839if ( !function_exists('wp_setcookie') ) :
Note: See TracChangeset for help on using the changeset viewer.