Make WordPress Core


Ignore:
Timestamp:
08/22/2017 02:22:24 PM (7 years ago)
Author:
johnbillion
Message:

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

File:
1 edited

Legend:

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

    r40954 r41291  
    431431$interim_login = isset($_REQUEST['interim-login']);
    432432
     433/**
     434 * Filters the separator used between login form navigation links.
     435 *
     436 * @since 4.9.0
     437 *
     438 * @param string $login_link_separator The separator used between login form navigation links.
     439 */
     440$login_link_separator = apply_filters( 'login_link_separator', ' | ' );
     441
    433442switch ($action) {
    434443
     
    556565    $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
    557566
     567    echo esc_html( $login_link_separator );
     568
    558569    /** This filter is documented in wp-includes/general-template.php */
    559     echo ' | ' . apply_filters( 'register', $registration_url );
     570    echo apply_filters( 'register', $registration_url );
    560571endif;
    561572?>
     
    669680    $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
    670681
     682    echo esc_html( $login_link_separator );
     683
    671684    /** This filter is documented in wp-includes/general-template.php */
    672     echo ' | ' . apply_filters( 'register', $registration_url );
     685    echo apply_filters( 'register', $registration_url );
    673686endif;
    674687?>
     
    745758
    746759<p id="nav">
    747 <a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a> |
     760<a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a>
     761<?php echo esc_html( $login_link_separator ); ?>
    748762<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php _e( 'Lost your password?' ); ?></a>
    749763</p>
     
    937951
    938952        /** This filter is documented in wp-includes/general-template.php */
    939         echo apply_filters( 'register', $registration_url ) . ' | ';
     953        echo apply_filters( 'register', $registration_url );
     954
     955        echo esc_html( $login_link_separator );
    940956    endif;
    941957    ?>
Note: See TracChangeset for help on using the changeset viewer.