diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 58d762df80..b71a83761c 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -3469,12 +3469,17 @@ function get_allowed_mime_types( $user = null ) { * @param string $action The nonce action. */ function wp_nonce_ays( $action ) { + // Default title and response code. + $title = __( 'Something went wrong.' ); + $response_code = 403; + if ( 'log-out' === $action ) { - $html = sprintf( + $title = sprintf( /* translators: %s: Site title. */ __( 'You are attempting to log out of %s' ), get_bloginfo( 'name' ) ); + $html = $title; $html .= '
'; $redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : ''; $html .= sprintf( @@ -3494,7 +3499,7 @@ function wp_nonce_ays( $action ) { } } - wp_die( $html, __( 'Something went wrong.' ), 403 ); + wp_die( $html, $title, $response_code ); } /**