Make WordPress Core

Changeset 43644


Ignore:
Timestamp:
09/14/2018 01:47:01 PM (7 years ago)
Author:
johnbillion
Message:

Docs: Improve docblocks within wp-login.php.

Props birgire

See #42505

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-login.php

    r43595 r43644  
    1212require( dirname( __FILE__ ) . '/wp-load.php' );
    1313
    14 // Redirect to https login if forced to use SSL
     14// Redirect to HTTPS login if forced to use SSL.
    1515if ( force_ssl_admin() && ! is_ssl() ) {
    1616    if ( 0 === strpos( $_SERVER['REQUEST_URI'], 'http' ) ) {
     
    2525/**
    2626 * Output the login page header.
     27 *
     28 * @since 2.1.0
    2729 *
    2830 * @param string   $title    Optional. WordPress login Page title to display in the `<title>` element.
     
    9092     * Remove all stored post data on logging out.
    9193     * This could be added by add_action('login_head'...) like wp_shake_js(),
    92      * but maybe better if it's not removable by plugins
     94     * but maybe better if it's not removable by plugins.
    9395     */
    9496    if ( 'loggedout' == $wp_error->get_error_code() ) {
     
    203205    }
    204206
    205     // In case a plugin uses $error rather than the $wp_errors object
     207    // In case a plugin uses $error rather than the $wp_errors object.
    206208    if ( ! empty( $error ) ) {
    207209        $wp_error->add( 'error', $error );
     
    248250 * Outputs the footer for the login page.
    249251 *
    250  * @param string $input_id Which input to auto-focus
     252 * @since 3.1.0
     253 *
     254 * @param string $input_id Which input to auto-focus.
    251255 */
    252256function login_footer( $input_id = '' ) {
     
    289293
    290294/**
     295 * Outputs the Javascript to handle the form shaking.
     296 *
    291297 * @since 3.0.0
    292298 */
     
    304310
    305311/**
     312 * Outputs the viewport meta tag.
     313 *
    306314 * @since 3.7.0
    307315 */
     
    314322/**
    315323 * Handles sending password retrieval email to user.
     324 *
     325 * @since 2.5.0
    316326 *
    317327 * @return bool|WP_Error True: when finish. WP_Error on error
     
    418428
    419429//
    420 // Main
     430// Main.
    421431//
    422432
     
    428438}
    429439
    430 // validate action so as to default to the login screen
     440// Validate action so as to default to the login screen.
    431441if ( ! in_array( $action, array( 'postpass', 'logout', 'lostpassword', 'retrievepassword', 'resetpass', 'rp', 'register', 'login', 'confirmaction' ), true ) && false === has_filter( 'login_form_' . $action ) ) {
    432442    $action = 'login';
     
    891901         * redirects or exits first.
    892902         *
     903         * @since 4.9.6
     904         *
    893905         * @param int $request_id Request ID.
    894906         */
     
    909921        }
    910922
    911         // If the user wants ssl but the session is not ssl, force a secure cookie.
     923        // If the user wants SSL but the session is not SSL, force a secure cookie.
    912924        if ( ! empty( $_POST['log'] ) && ! force_ssl_admin() ) {
    913925            $user_name = sanitize_user( $_POST['log'] );
     
    928940        if ( isset( $_REQUEST['redirect_to'] ) ) {
    929941            $redirect_to = $_REQUEST['redirect_to'];
    930             // Redirect to https if user wants ssl
     942            // Redirect to HTTPS if user wants SSL.
    931943            if ( $secure_cookie && false !== strpos( $redirect_to, 'wp-admin' ) ) {
    932944                $redirect_to = preg_replace( '|^http://|', 'https://', $redirect_to );
     
    10231035            }
    10241036        } else {
    1025             // Some parts of this script use the main login form to display a message
     1037            // Some parts of this script use the main login form to display a message.
    10261038            if ( isset( $_GET['loggedout'] ) && true == $_GET['loggedout'] ) {
    10271039                $errors->add( 'loggedout', __( 'You are now logged out.' ), 'message' );
     
    11731185
    11741186        break;
    1175 } // end action switch
     1187} // End action switch.
Note: See TracChangeset for help on using the changeset viewer.