WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/15/2016 10:15:21 AM (5 years ago)
Author:
swissspidy
Message:

Users: Deprecate the get_currentuserinfo() pluggable function.

It encourages an ugly pattern like global $userdata; get_currentuserinfo(); in plugins/themes. wp_get_current_user() should be used instead, e.g. $current_user = wp_get_current_user();.

Props scribu for initial patch.
Fixes #19615.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/pluggable.php

    r35148 r36311  
    128128            'wp_set_current_user'             => array( 'id', 'name' => '' ),
    129129            'wp_get_current_user'             => array(),
    130             'get_currentuserinfo'             => array(),
    131130            'get_userdata'                    => array( 'user_id' ),
    132131            'get_user_by'                     => array( 'field', 'value' ),
Note: See TracChangeset for help on using the changeset viewer.