~canonical-sysadmins/wordpress/4.8.1

« back to all changes in this revision

Viewing changes to wp-includes/pluggable-deprecated.php

  • Committer: Barry Price
  • Date: 2016-08-17 04:50:12 UTC
  • mfrom: (1.1.18 upstream)
  • Revision ID: barry.price@canonical.com-20160817045012-qfui81zhqnqv2ba9
Merge WP4.6 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 * @return WP_User returns wp_set_current_user()
31
31
 */
32
32
function set_current_user($id, $name = '') {
33
 
        _deprecated_function( __FUNCTION__, '3.0', 'wp_set_current_user()' );
 
33
        _deprecated_function( __FUNCTION__, '3.0.0', 'wp_set_current_user()' );
34
34
        return wp_set_current_user($id, $name);
35
35
}
36
36
endif;
46
46
 * @return bool|WP_User False on XMLRPC Request and invalid auth cookie, WP_User instance otherwise.
47
47
 */
48
48
function get_currentuserinfo() {
49
 
        _deprecated_function( __FUNCTION__, '4.5', 'wp_get_current_user()' );
 
49
        _deprecated_function( __FUNCTION__, '4.5.0', 'wp_get_current_user()' );
50
50
 
51
51
        return _wp_get_current_user();
52
52
}
64
64
 * @return bool|object False on failure, User DB row object
65
65
 */
66
66
function get_userdatabylogin($user_login) {
67
 
        _deprecated_function( __FUNCTION__, '3.3', "get_user_by('login')" );
 
67
        _deprecated_function( __FUNCTION__, '3.3.0', "get_user_by('login')" );
68
68
        return get_user_by('login', $user_login);
69
69
}
70
70
endif;
81
81
 * @return bool|object False on failure, User DB row object
82
82
 */
83
83
function get_user_by_email($email) {
84
 
        _deprecated_function( __FUNCTION__, '3.3', "get_user_by('email')" );
 
84
        _deprecated_function( __FUNCTION__, '3.3.0', "get_user_by('email')" );
85
85
        return get_user_by('email', $email);
86
86
}
87
87
endif;
102
102
 * @param bool $remember Optional. Remember that the user is logged in
103
103
 */
104
104
function wp_setcookie($username, $password = '', $already_md5 = false, $home = '', $siteurl = '', $remember = false) {
105
 
        _deprecated_function( __FUNCTION__, '2.5', 'wp_set_auth_cookie()' );
 
105
        _deprecated_function( __FUNCTION__, '2.5.0', 'wp_set_auth_cookie()' );
106
106
        $user = get_user_by('login', $username);
107
107
        wp_set_auth_cookie($user->ID, $remember);
108
108
}
109
109
else :
110
 
        _deprecated_function( 'wp_setcookie', '2.5', 'wp_set_auth_cookie()' );
 
110
        _deprecated_function( 'wp_setcookie', '2.5.0', 'wp_set_auth_cookie()' );
111
111
endif;
112
112
 
113
113
if ( !function_exists('wp_clearcookie') ) :
119
119
 * @see wp_clear_auth_cookie()
120
120
 */
121
121
function wp_clearcookie() {
122
 
        _deprecated_function( __FUNCTION__, '2.5', 'wp_clear_auth_cookie()' );
 
122
        _deprecated_function( __FUNCTION__, '2.5.0', 'wp_clear_auth_cookie()' );
123
123
        wp_clear_auth_cookie();
124
124
}
125
125
else :
126
 
        _deprecated_function( 'wp_clearcookie', '2.5', 'wp_clear_auth_cookie()' );
 
126
        _deprecated_function( 'wp_clearcookie', '2.5.0', 'wp_clear_auth_cookie()' );
127
127
endif;
128
128
 
129
129
if ( !function_exists('wp_get_cookie_login') ):
139
139
 * @return bool Always returns false
140
140
 */
141
141
function wp_get_cookie_login() {
142
 
        _deprecated_function( __FUNCTION__, '2.5' );
 
142
        _deprecated_function( __FUNCTION__, '2.5.0' );
143
143
        return false;
144
144
}
145
145
else :
146
 
        _deprecated_function( 'wp_get_cookie_login', '2.5' );
 
146
        _deprecated_function( 'wp_get_cookie_login', '2.5.0' );
147
147
endif;
148
148
 
149
149
if ( !function_exists('wp_login') ) :
169
169
 * @return bool False on login failure, true on successful check
170
170
 */
171
171
function wp_login($username, $password, $deprecated = '') {
172
 
        _deprecated_function( __FUNCTION__, '2.5', 'wp_signon()' );
 
172
        _deprecated_function( __FUNCTION__, '2.5.0', 'wp_signon()' );
173
173
        global $error;
174
174
 
175
175
        $user = wp_authenticate($username, $password);
181
181
        return false;
182
182
}
183
183
else :
184
 
        _deprecated_function( 'wp_login', '2.5', 'wp_signon()' );
 
184
        _deprecated_function( 'wp_login', '2.5.0', 'wp_signon()' );
185
185
endif;
186
186
 
187
187
/**
198
198
if ( ! class_exists( 'wp_atom_server', false ) ) {
199
199
        class wp_atom_server {
200
200
                public function __call( $name, $arguments ) {
201
 
                        _deprecated_function( __CLASS__ . '::' . $name, '3.5', 'the Atom Publishing Protocol plugin' );
 
201
                        _deprecated_function( __CLASS__ . '::' . $name, '3.5.0', 'the Atom Publishing Protocol plugin' );
202
202
                }
203
203
 
204
204
                public static function __callStatic( $name, $arguments ) {
205
 
                        _deprecated_function( __CLASS__ . '::' . $name, '3.5', 'the Atom Publishing Protocol plugin' );
 
205
                        _deprecated_function( __CLASS__ . '::' . $name, '3.5.0', 'the Atom Publishing Protocol plugin' );
206
206
                }
207
207
        }
208
208
}