plugin updates
This commit is contained in:
@@ -775,6 +775,19 @@ function delete_user_option( $user_id, $option_name, $is_global = false ) {
|
||||
return delete_user_meta( $user_id, $option_name );
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves user info by user ID.
|
||||
*
|
||||
* @since 6.7.0
|
||||
*
|
||||
* @param int $user_id User ID.
|
||||
*
|
||||
* @return WP_User|false WP_User object on success, false on failure.
|
||||
*/
|
||||
function get_user( $user_id ) {
|
||||
return get_user_by( 'id', $user_id );
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves list of users matching criteria.
|
||||
*
|
||||
@@ -1185,7 +1198,8 @@ function delete_user_meta( $user_id, $meta_key, $meta_value = '' ) {
|
||||
* @return mixed An array of values if `$single` is false.
|
||||
* The value of meta data field if `$single` is true.
|
||||
* False for an invalid `$user_id` (non-numeric, zero, or negative value).
|
||||
* An empty string if a valid but non-existing user ID is passed.
|
||||
* An empty array if a valid but non-existing user ID is passed and `$single` is false.
|
||||
* An empty string if a valid but non-existing user ID is passed and `$single` is true.
|
||||
*/
|
||||
function get_user_meta( $user_id, $key = '', $single = false ) {
|
||||
return get_metadata( 'user', $user_id, $key, $single );
|
||||
@@ -1549,12 +1563,10 @@ function setup_userdata( $for_user_id = 0 ) {
|
||||
/**
|
||||
* Creates dropdown HTML content of users.
|
||||
*
|
||||
* The content can either be displayed, which it is by default or retrieved by
|
||||
* setting the 'echo' argument. The 'include' and 'exclude' arguments do not
|
||||
* need to be used; all users will be displayed in that case. Only one can be
|
||||
* used, either 'include' or 'exclude', but not both.
|
||||
*
|
||||
* The available arguments are as follows:
|
||||
* The content can either be displayed, which it is by default, or retrieved by
|
||||
* setting the 'echo' argument to false. The 'include' and 'exclude' arguments
|
||||
* are optional; if they are not specified, all users will be displayed. Only one
|
||||
* can be used in a single call, either 'include' or 'exclude', but not both.
|
||||
*
|
||||
* @since 2.3.0
|
||||
* @since 4.5.0 Added the 'display_name_with_login' value for 'show'.
|
||||
@@ -2354,7 +2366,7 @@ function wp_insert_user( $userdata ) {
|
||||
$admin_color = empty( $userdata['admin_color'] ) ? 'fresh' : $userdata['admin_color'];
|
||||
$meta['admin_color'] = preg_replace( '|[^a-z0-9 _.\-@]|i', '', $admin_color );
|
||||
|
||||
$meta['use_ssl'] = empty( $userdata['use_ssl'] ) ? 0 : (bool) $userdata['use_ssl'];
|
||||
$meta['use_ssl'] = empty( $userdata['use_ssl'] ) ? '0' : '1';
|
||||
|
||||
$meta['show_admin_bar_front'] = empty( $userdata['show_admin_bar_front'] ) ? 'true' : $userdata['show_admin_bar_front'];
|
||||
|
||||
@@ -2386,7 +2398,7 @@ function wp_insert_user( $userdata ) {
|
||||
* @type string $user_pass The user's password.
|
||||
* @type string $user_email The user's email.
|
||||
* @type string $user_url The user's url.
|
||||
* @type string $user_nicename The user's nice name. Defaults to a URL-safe version of user's login
|
||||
* @type string $user_nicename The user's nice name. Defaults to a URL-safe version of user's login.
|
||||
* @type string $display_name The user's display name.
|
||||
* @type string $user_registered MySQL timestamp describing the moment when the user registered. Defaults to
|
||||
* the current UTC timestamp.
|
||||
@@ -3219,7 +3231,15 @@ function retrieve_password( $user_login = null ) {
|
||||
$message .= sprintf( __( 'Username: %s' ), $user_login ) . "\r\n\r\n";
|
||||
$message .= __( 'If this was a mistake, ignore this email and nothing will happen.' ) . "\r\n\r\n";
|
||||
$message .= __( 'To reset your password, visit the following address:' ) . "\r\n\r\n";
|
||||
$message .= network_site_url( "wp-login.php?action=rp&key=$key&login=" . rawurlencode( $user_login ), 'login' ) . '&wp_lang=' . $locale . "\r\n\r\n";
|
||||
|
||||
/*
|
||||
* Since some user login names end in a period, this could produce ambiguous URLs that
|
||||
* end in a period. To avoid the ambiguity, ensure that the login is not the last query
|
||||
* arg in the URL. If moving it to the end, a trailing period will need to be escaped.
|
||||
*
|
||||
* @see https://core.trac.wordpress.org/tickets/42957
|
||||
*/
|
||||
$message .= network_site_url( 'wp-login.php?login=' . rawurlencode( $user_login ) . "&key=$key&action=rp", 'login' ) . '&wp_lang=' . $locale . "\r\n\r\n";
|
||||
|
||||
if ( ! is_user_logged_in() ) {
|
||||
$requester_ip = $_SERVER['REMOTE_ADDR'];
|
||||
@@ -4148,7 +4168,7 @@ function _wp_privacy_send_request_confirmation_notification( $request_id ) {
|
||||
* Data relating to the account action email.
|
||||
*
|
||||
* @type WP_User_Request $request User request object.
|
||||
* @type string $user_email The email address confirming a request
|
||||
* @type string $user_email The email address confirming a request.
|
||||
* @type string $description Description of the action being performed so the user knows what the email is for.
|
||||
* @type string $manage_url The link to click manage privacy requests of this type.
|
||||
* @type string $sitename The site name sending the mail.
|
||||
@@ -4199,7 +4219,7 @@ All at ###SITENAME###
|
||||
* Data relating to the account action email.
|
||||
*
|
||||
* @type WP_User_Request $request User request object.
|
||||
* @type string $user_email The email address confirming a request
|
||||
* @type string $user_email The email address confirming a request.
|
||||
* @type string $description Description of the action being performed
|
||||
* so the user knows what the email is for.
|
||||
* @type string $manage_url The link to click manage privacy requests of this type.
|
||||
@@ -4239,7 +4259,7 @@ All at ###SITENAME###
|
||||
* Data relating to the account action email.
|
||||
*
|
||||
* @type WP_User_Request $request User request object.
|
||||
* @type string $user_email The email address confirming a request
|
||||
* @type string $user_email The email address confirming a request.
|
||||
* @type string $description Description of the action being performed so the user knows what the email is for.
|
||||
* @type string $manage_url The link to click manage privacy requests of this type.
|
||||
* @type string $sitename The site name sending the mail.
|
||||
@@ -4270,7 +4290,7 @@ All at ###SITENAME###
|
||||
* Data relating to the account action email.
|
||||
*
|
||||
* @type WP_User_Request $request User request object.
|
||||
* @type string $user_email The email address confirming a request
|
||||
* @type string $user_email The email address confirming a request.
|
||||
* @type string $description Description of the action being performed so the user knows what the email is for.
|
||||
* @type string $manage_url The link to click manage privacy requests of this type.
|
||||
* @type string $sitename The site name sending the mail.
|
||||
|
||||
Reference in New Issue
Block a user