Login and Registration: Introduce classes `wp-login.php` footer links.

This introduces classes for the "Log in", "Register" and "Lost your password?" links in the footer of `wp-login.php` forms so that they may be easily targeted for individual styling.

The new classes are:
- `.wp-login-log-in`
- `.wp-login-register`
- `.wp-login-lost-password`

Props wparslan, thomasplevy, rajinsharwar, audrasjb, joedolson, costdev.
Fixes #57590.
Built from https://develop.svn.wordpress.org/trunk@56628


git-svn-id: http://core.svn.wordpress.org/trunk@56140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
costdev 2023-09-19 22:45:19 +00:00
parent 081e87f702
commit f388dc8e38
2 changed files with 9 additions and 9 deletions

View File

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

View File

@ -861,11 +861,11 @@ switch ( $action ) {
</form>
<p id="nav">
<a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a>
<a class="wp-login-log-in" href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a>
<?php
if ( get_option( 'users_can_register' ) ) {
$registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
$registration_url = sprintf( '<a class="wp-login-register" href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
echo esc_html( $login_link_separator );
@ -1007,11 +1007,11 @@ switch ( $action ) {
</form>
<p id="nav">
<a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a>
<a class="wp-login-log-in" href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a>
<?php
if ( get_option( 'users_can_register' ) ) {
$registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
$registration_url = sprintf( '<a class="wp-login-register" href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
echo esc_html( $login_link_separator );
@ -1112,12 +1112,12 @@ switch ( $action ) {
</form>
<p id="nav">
<a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a>
<a class="wp-login-log-in" href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a>
<?php
echo esc_html( $login_link_separator );
$html_link = sprintf( '<a href="%s">%s</a>', esc_url( wp_lostpassword_url() ), __( 'Lost your password?' ) );
$html_link = sprintf( '<a class="wp-login-lost-password" href="%s">%s</a>', esc_url( wp_lostpassword_url() ), __( 'Lost your password?' ) );
/** This filter is documented in wp-login.php */
echo apply_filters( 'lost_password_html_link', $html_link );
@ -1481,7 +1481,7 @@ switch ( $action ) {
<?php
if ( get_option( 'users_can_register' ) ) {
$registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
$registration_url = sprintf( '<a class="wp-login-register" href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
/** This filter is documented in wp-includes/general-template.php */
echo apply_filters( 'register', $registration_url );
@ -1489,7 +1489,7 @@ switch ( $action ) {
echo esc_html( $login_link_separator );
}
$html_link = sprintf( '<a href="%s">%s</a>', esc_url( wp_lostpassword_url() ), __( 'Lost your password?' ) );
$html_link = sprintf( '<a class="wp-login-lost-password" href="%s">%s</a>', esc_url( wp_lostpassword_url() ), __( 'Lost your password?' ) );
/**
* Filters the link that allows the user to reset the lost password.