From 9a058dd9450b477cddd8cf608e4f699c21b740d3 Mon Sep 17 00:00:00 2001
Date: Thu, 22 Jun 2017 02:04:37 +0200
Subject: [PATCH] Add missing `_deprecated_function()` calls for four
deprecated pluggable functions.
> Deprecated warnings are also thrown if one of these functions is being defined by a plugin.
---
src/wp-includes/pluggable-deprecated.php | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/wp-includes/pluggable-deprecated.php b/src/wp-includes/pluggable-deprecated.php
index 03eeae4..92ea0c8 100644
|
a
|
b
|
function set_current_user($id, $name = '') { |
| 33 | 33 | _deprecated_function( __FUNCTION__, '3.0.0', 'wp_set_current_user()' ); |
| 34 | 34 | return wp_set_current_user($id, $name); |
| 35 | 35 | } |
| | 36 | else : |
| | 37 | _deprecated_function( 'set_current_user', '3.0.0', 'wp_set_current_user()' ); |
| 36 | 38 | endif; |
| 37 | 39 | |
| 38 | 40 | if ( !function_exists('get_currentuserinfo') ) : |
| … |
… |
function get_currentuserinfo() { |
| 50 | 52 | |
| 51 | 53 | return _wp_get_current_user(); |
| 52 | 54 | } |
| | 55 | else : |
| | 56 | _deprecated_function( 'get_currentuserinfo', '4.5.0', 'wp_get_current_user()' ); |
| 53 | 57 | endif; |
| 54 | 58 | |
| 55 | 59 | if ( !function_exists('get_userdatabylogin') ) : |
| … |
… |
function get_userdatabylogin($user_login) { |
| 67 | 71 | _deprecated_function( __FUNCTION__, '3.3.0', "get_user_by('login')" ); |
| 68 | 72 | return get_user_by('login', $user_login); |
| 69 | 73 | } |
| | 74 | else : |
| | 75 | _deprecated_function( 'get_userdatabylogin', '3.3.0', "get_user_by('login')" ); |
| 70 | 76 | endif; |
| 71 | 77 | |
| 72 | 78 | if ( !function_exists('get_user_by_email') ) : |
| … |
… |
function get_user_by_email($email) { |
| 84 | 90 | _deprecated_function( __FUNCTION__, '3.3.0', "get_user_by('email')" ); |
| 85 | 91 | return get_user_by('email', $email); |
| 86 | 92 | } |
| | 93 | else : |
| | 94 | _deprecated_function( 'get_user_by_email', '3.3.0', "get_user_by('email')" ); |
| 87 | 95 | endif; |
| 88 | 96 | |
| 89 | 97 | if ( !function_exists('wp_setcookie') ) : |