Make WordPress Core

Changeset 28131


Ignore:
Timestamp:
04/15/2014 04:41:37 AM (12 years ago)
Author:
DrewAPicture
Message:

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.

File:
1 edited

Legend:

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

    r28130 r28131  
    427427        $args = wp_parse_args( $args, apply_filters( 'login_form_defaults', $defaults ) );
    428428
     429        /**
     430         * Filter content to display at the top of the login form.
     431         *
     432         * The filter evaluates just following the opening form tag element.
     433         *
     434         * @since 3.0.0
     435         *
     436         * @param string $content Content to display. Default empty.
     437         * @param array  $args    Array of login form arguments.
     438         */
     439        $login_form_top = apply_filters( 'login_form_top', '', $args );
     440
     441        /**
     442         * Filter content to display in the middle of the login form.
     443         *
     444         * The filter evaluates just following the location where the 'login-password'
     445         * field is displayed.
     446         *
     447         * @since 3.0.0
     448         *
     449         * @param string $content Content to display. Default empty.
     450         * @param array  $args    Array of login form arguments.
     451         */
     452        $login_form_middle = apply_filters( 'login_form_middle', '', $args );
     453
     454        /**
     455         * Filter content to display at the bottom of the login form.
     456         *
     457         * The filter evaluates just preceding the closing form tag element.
     458         *
     459         * @since 3.0.0
     460         *
     461         * @param string $content Content to display. Default empty.
     462         * @param array  $args    Array of login form arguments.
     463         */
     464        $login_form_bottom = apply_filters( 'login_form_bottom', '', $args );
     465
    429466        $form = '
    430467                <form name="' . $args['form_id'] . '" id="' . $args['form_id'] . '" action="' . esc_url( site_url( 'wp-login.php', 'login_post' ) ) . '" method="post">
    431                         ' . apply_filters( 'login_form_top', '', $args ) . '
     468                        ' . $login_form_top . '
    432469                        <p class="login-username">
    433470                                <label for="' . esc_attr( $args['id_username'] ) . '">' . esc_html( $args['label_username'] ) . '</label>
     
    438475                                <input type="password" name="pwd" id="' . esc_attr( $args['id_password'] ) . '" class="input" value="" size="20" />
    439476                        </p>
    440                         ' . apply_filters( 'login_form_middle', '', $args ) . '
     477                        ' . $login_form_middle . '
    441478                        ' . ( $args['remember'] ? '<p class="login-remember"><label><input name="rememberme" type="checkbox" id="' . esc_attr( $args['id_remember'] ) . '" value="forever"' . ( $args['value_remember'] ? ' checked="checked"' : '' ) . ' /> ' . esc_html( $args['label_remember'] ) . '</label></p>' : '' ) . '
    442479                        <p class="login-submit">
     
    444481                                <input type="hidden" name="redirect_to" value="' . esc_url( $args['redirect'] ) . '" />
    445482                        </p>
    446                         ' . apply_filters( 'login_form_bottom', '', $args ) . '
     483                        ' . $login_form_bottom . '
    447484                </form>';
    448485
Note: See TracChangeset for help on using the changeset viewer.