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 |
---|---|
1325 | * @since 2.0.1 |
1326 | * @uses apply_filters() Calls 'validate_username' hook on $valid check and $username as parameters |
1327 | * |
1328 | * @param string $username Username. |
1329 | * @return bool Whether username given is valid |
1330 | */ |
1331 | function validate_username( $username ) { |
1332 | $sanitized = sanitize_user( $username, true ); |
1333 | $valid = ( $sanitized == $username ); |
1334 | return apply_filters( 'validate_username', $valid, $username ); |
1335 | } |
1336 |
|
1337 | /** |
1338 | * Insert an user into the database. |
1339 | * |
1340 | * Can update a current user or insert a new user based on whether the user's ID |
1341 | * is present. |
1342 | * |
1343 | * Can be used to update the user's info (see below), set the user's role, and |