WordPress.org

Make WordPress Core

Ticket #41121: 0005-missing-_deprecated_function-calls-pluggable.patch

File 0005-missing-_deprecated_function-calls-pluggable.patch, 1.8 KB (added by jrf, 3 years ago)

Patch 5

  • src/wp-includes/pluggable-deprecated.php

    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 = '') { 
    3333        _deprecated_function( __FUNCTION__, '3.0.0', 'wp_set_current_user()' );
    3434        return wp_set_current_user($id, $name);
    3535}
     36else :
     37        _deprecated_function( 'set_current_user', '3.0.0', 'wp_set_current_user()' );
    3638endif;
    3739
    3840if ( !function_exists('get_currentuserinfo') ) :
    function get_currentuserinfo() { 
    5052
    5153        return _wp_get_current_user();
    5254}
     55else :
     56        _deprecated_function( 'get_currentuserinfo', '4.5.0', 'wp_get_current_user()' );
    5357endif;
    5458
    5559if ( !function_exists('get_userdatabylogin') ) :
    function get_userdatabylogin($user_login) { 
    6771        _deprecated_function( __FUNCTION__, '3.3.0', "get_user_by('login')" );
    6872        return get_user_by('login', $user_login);
    6973}
     74else :
     75        _deprecated_function( 'get_userdatabylogin', '3.3.0', "get_user_by('login')" );
    7076endif;
    7177
    7278if ( !function_exists('get_user_by_email') ) :
    function get_user_by_email($email) { 
    8490        _deprecated_function( __FUNCTION__, '3.3.0', "get_user_by('email')" );
    8591        return get_user_by('email', $email);
    8692}
     93else :
     94        _deprecated_function( 'get_user_by_email', '3.3.0', "get_user_by('email')" );
    8795endif;
    8896
    8997if ( !function_exists('wp_setcookie') ) :