Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: validate_username

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
43  * @since 2.0.1
44  * @uses apply_filters() Calls 'validate_username' hook on $valid check and $username as parameters
45  *
46  * @param string $username Username.
47  * @return bool Whether username given is valid
48  */
49 function validate_username( $username ) {
50      $sanitized = sanitize_user( $username, true );
51      $valid = ( $sanitized == $username );
52      return apply_filters( 'validate_username', $valid, $username );
53 }
54
55 /**
56  * Insert an user into the database.
57  *
58  * Can update a current user or insert a new user based on whether the user's ID
59  * is present.
60  *
61  * Can be used to update the user's info (see below), set the user's role, and