Login and Registration: Introduce a `login_link_separator` filter to allow the separator between links in the footer of the
login screen to be filtered. Props henry.wright Fixes #40802 Built from https://develop.svn.wordpress.org/trunk@41291 git-svn-id: http://core.svn.wordpress.org/trunk@41131 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c7a79b0e6a
commit
2cde37040d
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.9-alpha-41290';
|
||||
$wp_version = '4.9-alpha-41291';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
24
wp-login.php
24
wp-login.php
|
@ -430,6 +430,15 @@ do_action( "login_form_{$action}" );
|
|||
$http_post = ('POST' == $_SERVER['REQUEST_METHOD']);
|
||||
$interim_login = isset($_REQUEST['interim-login']);
|
||||
|
||||
/**
|
||||
* Filters the separator used between login form navigation links.
|
||||
*
|
||||
* @since 4.9.0
|
||||
*
|
||||
* @param string $login_link_separator The separator used between login form navigation links.
|
||||
*/
|
||||
$login_link_separator = apply_filters( 'login_link_separator', ' | ' );
|
||||
|
||||
switch ($action) {
|
||||
|
||||
case 'postpass' :
|
||||
|
@ -555,8 +564,10 @@ case 'retrievepassword' :
|
|||
if ( get_option( 'users_can_register' ) ) :
|
||||
$registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
|
||||
|
||||
echo esc_html( $login_link_separator );
|
||||
|
||||
/** This filter is documented in wp-includes/general-template.php */
|
||||
echo ' | ' . apply_filters( 'register', $registration_url );
|
||||
echo apply_filters( 'register', $registration_url );
|
||||
endif;
|
||||
?>
|
||||
</p>
|
||||
|
@ -668,8 +679,10 @@ case 'rp' :
|
|||
if ( get_option( 'users_can_register' ) ) :
|
||||
$registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
|
||||
|
||||
echo esc_html( $login_link_separator );
|
||||
|
||||
/** This filter is documented in wp-includes/general-template.php */
|
||||
echo ' | ' . apply_filters( 'register', $registration_url );
|
||||
echo apply_filters( 'register', $registration_url );
|
||||
endif;
|
||||
?>
|
||||
</p>
|
||||
|
@ -744,7 +757,8 @@ case 'register' :
|
|||
</form>
|
||||
|
||||
<p id="nav">
|
||||
<a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a> |
|
||||
<a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a>
|
||||
<?php echo esc_html( $login_link_separator ); ?>
|
||||
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php _e( 'Lost your password?' ); ?></a>
|
||||
</p>
|
||||
|
||||
|
@ -936,7 +950,9 @@ default:
|
|||
$registration_url = sprintf( '<a 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 ) . ' | ';
|
||||
echo apply_filters( 'register', $registration_url );
|
||||
|
||||
echo esc_html( $login_link_separator );
|
||||
endif;
|
||||
?>
|
||||
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php _e( 'Lost your password?' ); ?></a>
|
||||
|
|
Loading…
Reference in New Issue