From ecbe6226fa818350186f36af3bbcab08e7428def Mon Sep 17 00:00:00 2001 From: "Drew Jaynes (DrewAPicture)" Date: Tue, 15 Apr 2014 04:41:37 +0000 Subject: [PATCH] Inline documentation for three remaining hooks in wp-includes/general-template.php. Documents the `login_form_top`, `login_form_middle`, and `login_form_bottom` and filters. That's 184/184 hook docs files complete. Boom! Props kpdesign, DrewAPicture. Fixes #27719. git-svn-id: https://develop.svn.wordpress.org/trunk@28131 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/general-template.php | 43 ++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 3 deletions(-) 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 . ' - ' . apply_filters( 'login_form_middle', '', $args ) . ' + ' . $login_form_middle . ' ' . ( $args['remember'] ? '' : '' ) . ' - ' . apply_filters( 'login_form_bottom', '', $args ) . ' + ' . $login_form_bottom . '
'; if ( $args['echo'] )