WordPress.org

Make WordPress Core

Ticket #40462: 40462.patch

File 40462.patch, 2.7 KB (added by ramiy, 3 years ago)
  • wp-includes/general-template.php

     
    391391 *     @type string $id_password    ID attribute value for the password field. Default 'user_pass'.
    392392 *     @type string $id_remember    ID attribute value for the remember field. Default 'rememberme'.
    393393 *     @type string $id_submit      ID attribute value for the submit button. Default 'wp-submit'.
     394 *     @type string placeholder_username Placeholder attribute value for the username field. Default empty.
     395 *     @type string placeholder_password Placeholder attribute value for the password field. Default empty.
    394396 *     @type bool   $remember       Whether to display the "rememberme" checkbox in the form.
    395397 *     @type string $value_username Default value for the username field. Default empty.
    396398 *     @type bool   $value_remember Whether the "Remember Me" checkbox should be checked by default.
     
    413415                'id_password' => 'user_pass',
    414416                'id_remember' => 'rememberme',
    415417                'id_submit' => 'wp-submit',
     418                'placeholder_username' => '',
     419                'placeholder_password' => '',
    416420                'remember' => true,
    417421                'value_username' => '',
    418422                // Set 'value_remember' to true to default the "Remember me" checkbox to checked.
     
    472476                        ' . $login_form_top . '
    473477                        <p class="login-username">
    474478                                <label for="' . esc_attr( $args['id_username'] ) . '">' . esc_html( $args['label_username'] ) . '</label>
    475                                 <input type="text" name="log" id="' . esc_attr( $args['id_username'] ) . '" class="input" value="' . esc_attr( $args['value_username'] ) . '" size="20" />
     479                                <input type="text" name="log" id="' . esc_attr( $args['id_username'] ) . '" class="input" placeholder="' . esc_attr( $args['placeholder_username'] ) . '" value="' . esc_attr( $args['value_username'] ) . '" size="20" />
    476480                        </p>
    477481                        <p class="login-password">
    478482                                <label for="' . esc_attr( $args['id_password'] ) . '">' . esc_html( $args['label_password'] ) . '</label>
    479                                 <input type="password" name="pwd" id="' . esc_attr( $args['id_password'] ) . '" class="input" value="" size="20" />
     483                                <input type="password" name="pwd" id="' . esc_attr( $args['id_password'] ) . '" class="input" placeholder="' . esc_attr( $args['placeholder_password'] ) . '" value="" size="20" />
    480484                        </p>
    481485                        ' . $login_form_middle . '
    482486                        ' . ( $args['remember'] ? '<p class="login-remember"><label><input name="rememberme" type="checkbox" id="' . esc_attr( $args['id_remember'] ) . '" value="forever"' . ( $args['value_remember'] ? ' checked="checked"' : '' ) . ' /> ' . esc_html( $args['label_remember'] ) . '</label></p>' : '' ) . '