WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
455 | if ( ! is_array( $illegal_names ) ) { |
456 | $illegal_names = array( 'www', 'web', 'root', 'admin', 'main', 'invite', 'administrator' ); |
457 | add_site_option( 'illegal_names', $illegal_names ); |
458 | } |
459 | if ( in_array( $user_name, $illegal_names ) ) { |
460 | $errors->add( 'user_name', __( 'Sorry, that username is not allowed.' ) ); |
461 | } |
462 |
|
463 | /** This filter is documented in wp-includes/user.php */ |
464 | $illegal_logins = (array) apply_filters( 'illegal_user_logins', array() ); |
465 |
|
466 | if ( in_array( strtolower( $user_name ), array_map( 'strtolower', $illegal_logins ) ) ) { |
467 | $errors->add( 'user_name', __( 'Sorry, that username is not allowed.' ) ); |
468 | } |
469 |
|
470 | if ( ! is_email( $user_email ) ) { |
471 | $errors->add( 'user_email', __( 'Please enter a valid email address.' ) ); |
472 | } elseif ( is_email_address_unsafe( $user_email ) ) { |
473 | $errors->add( 'user_email', __( 'You cannot use that email address to signup. We are having problems with them blocking some of our email. Please use another email provider.' ) ); |