WordPress.org

Make WordPress Core

Changeset 28208


Ignore:
Timestamp:
04/25/2014 06:23:31 AM (5 years ago)
Author:
DrewAPicture
Message:

Ensure the register filter hook is only documented once.

See #26869.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/general-template.php

    r28131 r28208  
    545545    }
    546546
     547    /**
     548     * Filter the HTML link to the Registration or Admin page.
     549     *
     550     * Users are sent to the admin page if logged-in, or the registration page
     551     * if enabled and logged-out.
     552     *
     553     * @since 1.5.0
     554     *
     555     * @param string $link The HTML code for the link to the Registration or Admin page.
     556     */
     557    $link = apply_filters( 'register', $link );
     558
    547559    if ( $echo ) {
    548         /**
    549          * Filter the HTML link to the Registration or Admin page.
    550          *
    551          * Users are sent to the admin page if logged-in, or the registration page
    552          * if enabled and logged-out.
    553          *
    554          * @since 1.5.0
    555          *
    556          * @param string $link The HTML code for the link to the Registration or Admin page.
    557          */
    558         echo apply_filters( 'register', $link );
     560        echo $link;
    559561    } else {
    560         /** This filter is documented in wp-includes/general-template.php */
    561         return apply_filters( 'register', $link );
     562        return $link;
    562563    }
    563564}
  • trunk/src/wp-login.php

    r28096 r28208  
    545545if ( get_option( 'users_can_register' ) ) :
    546546    $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
    547     /**
    548      * Filter the registration URL below the login form.
    549      *
    550      * @since 1.5.0
    551      *
    552      * @param string $registration_url Registration URL.
    553      */
     547
     548    /** This filter is documented in wp-includes/general-template.php */
    554549    echo ' | ' . apply_filters( 'register', $registration_url );
    555550endif;
     
    636631if ( get_option( 'users_can_register' ) ) :
    637632    $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
    638     /** This filter is documented in wp-login.php */
     633
     634    /** This filter is documented in wp-includes/general-template.php */
    639635    echo ' | ' . apply_filters( 'register', $registration_url );
    640636endif;
     
    893889    if ( get_option( 'users_can_register' ) ) :
    894890        $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
    895         /** This filter is documented in wp-login.php */
     891
     892        /** This filter is documented in wp-includes/general-template.php */
    896893        echo apply_filters( 'register', $registration_url ) . ' | ';
    897894    endif;
Note: See TracChangeset for help on using the changeset viewer.