Make WordPress Core

Changeset 58209


Ignore:
Timestamp:
05/27/2024 02:09:09 PM (5 months ago)
Author:
audrasjb
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-login.php

    r58093 r58209  
    3535 *
    3636 * @param string   $title    Optional. WordPress login Page title to display in the `<title>` element.
    37  *                           Default 'Log In'.
     37 *                           Default null, which displays 'Log In'.
    3838 * @param string   $message  Optional. Message to display in header. Default empty.
    3939 * @param WP_Error $wp_error Optional. The error to pass. Default is a WP_Error instance.
    4040 */
    41 function login_header( $title = 'Log In', $message = '', $wp_error = null ) {
     41function login_header( $title = null, $message = '', $wp_error = null ) {
    4242    global $error, $interim_login, $action;
     43
     44    if ( null === $title ) {
     45        $title = __( 'Log In' );
     46    }
    4347
    4448    // Don't index any of these forms.
Note: See TracChangeset for help on using the changeset viewer.