Make WordPress Core


Ignore:
Timestamp:
09/10/2019 07:22:07 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: Fix placement of some duplicate hook references.

Hook documentation should be on the line directly above the line containing the do_action() or apply_filters() call. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of duplicate hook references.

Includes minor code layout fixes.

See #47110.

File:
1 edited

Legend:

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

    r45932 r46088  
    25042504    } else {
    25052505        /** This filter is documented in wp-includes/user.php */
    2506         $illegal_user_logins = array_map( 'strtolower', (array) apply_filters( 'illegal_user_logins', array() ) );
    2507         if ( in_array( strtolower( $sanitized_user_login ), $illegal_user_logins ) ) {
     2506        $illegal_user_logins = (array) apply_filters( 'illegal_user_logins', array() );
     2507        if ( in_array( strtolower( $sanitized_user_login ), array_map( 'strtolower', $illegal_user_logins ) ) ) {
    25082508            $errors->add( 'invalid_username', __( '<strong>ERROR</strong>: Sorry, that username is not allowed.' ) );
    25092509        }
Note: See TracChangeset for help on using the changeset viewer.