diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index f2b7076321..f4d6f37d66 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -426,9 +426,46 @@ function wp_login_form( $args = array() ) { */ $args = wp_parse_args( $args, apply_filters( 'login_form_defaults', $defaults ) ); + /** + * Filter content to display at the top of the login form. + * + * The filter evaluates just following the opening form tag element. + * + * @since 3.0.0 + * + * @param string $content Content to display. Default empty. + * @param array $args Array of login form arguments. + */ + $login_form_top = apply_filters( 'login_form_top', '', $args ); + + /** + * Filter content to display in the middle of the login form. + * + * The filter evaluates just following the location where the 'login-password' + * field is displayed. + * + * @since 3.0.0 + * + * @param string $content Content to display. Default empty. + * @param array $args Array of login form arguments. + */ + $login_form_middle = apply_filters( 'login_form_middle', '', $args ); + + /** + * Filter content to display at the bottom of the login form. + * + * The filter evaluates just preceding the closing form tag element. + * + * @since 3.0.0 + * + * @param string $content Content to display. Default empty. + * @param array $args Array of login form arguments. + */ + $login_form_bottom = apply_filters( 'login_form_bottom', '', $args ); + $form = '
- ' . apply_filters( 'login_form_top', '', $args ) . ' + ' . $login_form_top . '

@@ -437,13 +474,13 @@ function wp_login_form( $args = array() ) {

- ' . apply_filters( 'login_form_middle', '', $args ) . ' + ' . $login_form_middle . ' ' . ( $args['remember'] ? '

' : '' ) . '

- ' . apply_filters( 'login_form_bottom', '', $args ) . ' + ' . $login_form_bottom . '
'; if ( $args['echo'] )