From 09ec8121165ea6194d12b3c50459fc6f6e1cbb29 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 7 Feb 2023 13:46:17 +0000 Subject: [PATCH] Users: Pass the authentication scheme to the `send_auth_cookies` filter. This brings more consistency with the `set_auth_cookie` and `set_logged_in_cookie` hooks. Follow-up to [55164], [55253]. See #56971. Built from https://develop.svn.wordpress.org/trunk@55259 git-svn-id: http://core.svn.wordpress.org/trunk@54792 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable.php | 5 +++-- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index acbc8ac393..53a8f23242 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -1070,7 +1070,7 @@ if ( ! function_exists( 'wp_set_auth_cookie' ) ) : * Allows preventing auth cookies from actually being sent to the client. * * @since 4.7.4 - * @since 6.2.0 The `$expire`, `$expiration`, `$user_id`, and `$token` parameters were added. + * @since 6.2.0 The `$expire`, `$expiration`, `$user_id`, `$scheme`, and `$token` parameters were added. * * @param bool $send Whether to send auth cookies to the client. Default true. * @param int $expire The time the login grace period expires as a UNIX timestamp. @@ -1078,9 +1078,10 @@ if ( ! function_exists( 'wp_set_auth_cookie' ) ) : * @param int $expiration The time when the logged-in authentication cookie expires as a UNIX timestamp. * Default is 14 days from now. Zero when clearing cookies. * @param int $user_id User ID. Zero when clearing cookies. + * @param string $scheme Authentication scheme. Values include 'auth' or 'secure_auth'. * @param string $token User's session token to use for this cookie. Empty string when clearing cookies. */ - if ( ! apply_filters( 'send_auth_cookies', true, $expire, $expiration, $user_id, $token ) ) { + if ( ! apply_filters( 'send_auth_cookies', true, $expire, $expiration, $user_id, $scheme, $token ) ) { return; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 5aeb52b434..495631ad5a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.2-alpha-55258'; +$wp_version = '6.2-alpha-55259'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.