Coding Standards: Use Yoda conditions in some wp-admin files.

Props subrataemfluence, marcio-zebedeu, bookdude13, 1naveengiri, alishankhan.
Fixes #44365, #48455.

git-svn-id: https://develop.svn.wordpress.org/trunk@47218 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2020-02-09 16:51:22 +00:00
parent 43fb40739d
commit 40ffe0ef06
9 changed files with 38 additions and 38 deletions
+2 -2
View File
@@ -369,7 +369,7 @@ switch ( $step ) {
// TODO: Poka-yoke.
display_setup_form( __( 'Please provide a valid username.' ) );
$error = true;
} elseif ( $user_name != sanitize_user( $user_name, true ) ) {
} elseif ( sanitize_user( $user_name, true ) != $user_name ) {
display_setup_form( __( 'The username you provided has invalid characters.' ) );
$error = true;
} elseif ( $admin_password != $admin_password_check ) {
@@ -386,7 +386,7 @@ switch ( $step ) {
$error = true;
}
if ( $error === false ) {
if ( false === $error ) {
$wpdb->show_errors();
$result = wp_install( $weblog_title, $user_name, $admin_email, $public, '', wp_slash( $admin_password ), $loaded_language );
?>