Changeset 47808 for trunk/src/wp-includes/user.php
- Timestamp:
- 05/16/2020 06:40:52 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/user.php
r47634 r47808 911 911 $result = array(); 912 912 913 if ( 'time' == $strategy ) {913 if ( 'time' === $strategy ) { 914 914 if ( is_multisite() && get_current_blog_id() != $site_id ) { 915 915 switch_to_blog( $site_id ); … … 1252 1252 } 1253 1253 1254 if ( 'raw' == $context ) {1254 if ( 'raw' === $context ) { 1255 1255 return $value; 1256 1256 } … … 1262 1262 $prefixed = false !== strpos( $field, 'user_' ); 1263 1263 1264 if ( 'edit' == $context ) {1264 if ( 'edit' === $context ) { 1265 1265 if ( $prefixed ) { 1266 1266 … … 1283 1283 } 1284 1284 1285 if ( 'description' == $field ) {1285 if ( 'description' === $field ) { 1286 1286 $value = esc_html( $value ); // textarea_escaped? 1287 1287 } else { 1288 1288 $value = esc_attr( $value ); 1289 1289 } 1290 } elseif ( 'db' == $context ) {1290 } elseif ( 'db' === $context ) { 1291 1291 if ( $prefixed ) { 1292 1292 /** This filter is documented in wp-includes/post.php */ … … 1330 1330 } 1331 1331 1332 if ( 'user_url' == $field ) {1332 if ( 'user_url' === $field ) { 1333 1333 $value = esc_url( $value ); 1334 1334 } 1335 1335 1336 if ( 'attribute' == $context ) {1336 if ( 'attribute' === $context ) { 1337 1337 $value = esc_attr( $value ); 1338 } elseif ( 'js' == $context ) {1338 } elseif ( 'js' === $context ) { 1339 1339 $value = esc_js( $value ); 1340 1340 } … … 2507 2507 2508 2508 // Check the username. 2509 if ( '' == $sanitized_user_login ) {2509 if ( '' === $sanitized_user_login ) { 2510 2510 $errors->add( 'empty_username', __( '<strong>Error</strong>: Please enter a username.' ) ); 2511 2511 } elseif ( ! validate_username( $user_login ) ) { … … 2524 2524 2525 2525 // Check the email address. 2526 if ( '' == $user_email ) {2526 if ( '' === $user_email ) { 2527 2527 $errors->add( 'empty_email', __( '<strong>Error</strong>: Please type your email address.' ) ); 2528 2528 } elseif ( ! is_email( $user_email ) ) {
Note: See TracChangeset
for help on using the changeset viewer.