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.
Built from https://develop.svn.wordpress.org/trunk@46088


git-svn-id: http://core.svn.wordpress.org/trunk@45900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov
2019-09-10 19:23:55 +00:00
parent c9071ca2e6
commit dcb08f0637
15 changed files with 310 additions and 197 deletions

View File

@@ -2503,8 +2503,8 @@ function register_new_user( $user_login, $user_email ) {
} else {
/** This filter is documented in wp-includes/user.php */
$illegal_user_logins = array_map( 'strtolower', (array) apply_filters( 'illegal_user_logins', array() ) );
if ( in_array( strtolower( $sanitized_user_login ), $illegal_user_logins ) ) {
$illegal_user_logins = (array) apply_filters( 'illegal_user_logins', array() );
if ( in_array( strtolower( $sanitized_user_login ), array_map( 'strtolower', $illegal_user_logins ) ) ) {
$errors->add( 'invalid_username', __( '<strong>ERROR</strong>: Sorry, that username is not allowed.' ) );
}
}