@@ 209-211 (lines=3) @@ | ||
206 | } |
|
207 | ||
208 | $editable_roles = array_keys( get_editable_roles() ); |
|
209 | if ( ! in_array( $user['role'], $editable_roles ) ) { |
|
210 | return new WP_Error( 'invalid_input', sprintf( __( '%s is not a valid role.', 'jetpack' ), $editable_roles ), 400 ); |
|
211 | } |
|
212 | } |
|
213 | ||
214 | $result = wp_update_user( $user ); |
@@ 1345-1357 (lines=13) @@ | ||
1342 | 'src.wordpress-develop.test', // VVV pattern. |
|
1343 | 'build.wordpress-develop.test', // VVV pattern. |
|
1344 | ); |
|
1345 | if ( in_array( $domain, $forbidden_domains, true ) ) { |
|
1346 | return new \WP_Error( |
|
1347 | 'fail_domain_forbidden', |
|
1348 | sprintf( |
|
1349 | /* translators: %1$s is a domain name. */ |
|
1350 | __( |
|
1351 | 'Domain `%1$s` just failed is_usable_domain check as it is in the forbidden array.', |
|
1352 | 'jetpack' |
|
1353 | ), |
|
1354 | $domain |
|
1355 | ) |
|
1356 | ); |
|
1357 | } |
|
1358 | ||
1359 | // No .test or .local domains. |
|
1360 | if ( preg_match( '#\.(test|local)$#i', $domain ) ) { |