pre_user_(field) filter-hookWP 2.9.0

Filters the value of a user field in the 'db' context.

The dynamic portion of the hook name, $field, refers to the prefixed user field being filtered, such as 'user_login', 'user_email', 'first_name', etc.

Usage

add_filter( 'pre_user_(field)', 'wp_kama_pre_user_field_filter' );

/**
 * Function for `pre_user_(field)` filter-hook.
 * 
 * @param mixed $value Value of the prefixed user field.
 *
 * @return mixed
 */
function wp_kama_pre_user_field_filter( $value ){

	// filter...
	return $value;
}
$value(mixed)
Value of the prefixed user field.

Changelog

Since 2.9.0 Introduced.

Where the hook is called

sanitize_user_field()
pre_user_(field)
wp-includes/user.php 1815
$value = apply_filters( "pre_user_{$field}", $value );

Where the hook is used in WordPress

Usage not found.