Login and Registration: Ensure login header title is translatable.

This changeset ensures the login header default title string is translatable in `login_header()`.

Props juliobox, swissspidy, audrasjb.
Fixes #60668.



Built from https://develop.svn.wordpress.org/trunk@58209


git-svn-id: http://core.svn.wordpress.org/trunk@57672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb 2024-05-27 14:11:12 +00:00
parent 9df0603c96
commit fb4fcb4388
2 changed files with 7 additions and 3 deletions

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.6-alpha-58208';
$wp_version = '6.6-alpha-58209';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -34,13 +34,17 @@ if ( force_ssl_admin() && ! is_ssl() ) {
* @global string $action The action that brought the visitor to the login page.
*
* @param string $title Optional. WordPress login Page title to display in the `<title>` element.
* Default 'Log In'.
* Default null, which displays 'Log In'.
* @param string $message Optional. Message to display in header. Default empty.
* @param WP_Error $wp_error Optional. The error to pass. Default is a WP_Error instance.
*/
function login_header( $title = 'Log In', $message = '', $wp_error = null ) {
function login_header( $title = null, $message = '', $wp_error = null ) {
global $error, $interim_login, $action;
if ( null === $title ) {
$title = __( 'Log In' );
}
// Don't index any of these forms.
add_filter( 'wp_robots', 'wp_robots_sensitive_page' );
add_action( 'login_head', 'wp_strict_cross_origin_referrer' );