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.

git-svn-id: https://develop.svn.wordpress.org/trunk@36311 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Pascal Birchler
2016-01-15 10:15:21 +00:00
parent 053733f8c0
commit c7ae3fb3ee
3 changed files with 28 additions and 28 deletions

View File

@@ -127,7 +127,6 @@ class Tests_Pluggable extends WP_UnitTestCase {
// wp-includes/pluggable.php:
'wp_set_current_user' => array( 'id', 'name' => '' ),
'wp_get_current_user' => array(),
'get_currentuserinfo' => array(),
'get_userdata' => array( 'user_id' ),
'get_user_by' => array( 'field', 'value' ),
'cache_users' => array( 'user_ids' ),