Make WordPress Core

Ticket #38079: 38079.2.patch

File 38079.2.patch, 1.4 KB (added by dingo_bastard, 6 years ago)

Added action hooks inside login_header function

  • wp-login.php

     
    174174        if ( !empty( $message ) )
    175175                echo $message . "\n";
    176176
    177         // In case a plugin uses $error rather than the $wp_errors object
     177        /**
     178         * Fires after the login logo.
     179         *
     180         * @since 4.7
     181         */
     182        do_action( 'after_login_logo' );
     183
     184        // In case a plugin uses $error rather than the $wp_errors object.
    178185        if ( !empty( $error ) ) {
    179186                $wp_error->add('error', $error);
    180187                unset($error);
     
    201208                         * @param string $errors Login error message.
    202209                         */
    203210                        echo '<div id="login_error">' . apply_filters( 'login_errors', $errors ) . "</div>\n";
     211
     212                        /**
     213                         * Fires after the login error message.
     214                         *
     215                         * @since 4.7
     216                         */
     217                        do_action( 'after_login_error' );
    204218                }
    205219                if ( ! empty( $messages ) ) {
    206220                        /**
     
    211225                         * @param string $messages Login messages.
    212226                         */
    213227                        echo '<p class="message">' . apply_filters( 'login_messages', $messages ) . "</p>\n";
     228
     229                        /**
     230                         * Fires after the login message.
     231                         *
     232                         * @since 4.7
     233                         */
     234                        do_action( 'after_login_message' );
    214235                }
    215236        }
    216237} // End of login_header()
     
    358379
    359380        /**
    360381         * Filters the message body of the password reset mail.
    361          * 
     382         *
    362383         * If the filtered message is empty, the password reset email will not be sent.
    363384         *
    364385         * @since 2.8.0