pre_user_last_name filter-hookWP 2.0.3

Filters a user's last name before the user is created or updated.

Usage

add_filter( 'pre_user_last_name', 'wp_kama_pre_user_last_name_filter' );

/**
 * Function for `pre_user_last_name` filter-hook.
 * 
 * @param string $last_name The user's last name.
 *
 * @return string
 */
function wp_kama_pre_user_last_name_filter( $last_name ){

	// filter...
	return $last_name;
}
$last_name(string)
The user's last name.

Changelog

Since 2.0.3 Introduced.

Where the hook is called

wp_insert_user()
pre_user_last_name
wp-includes/user.php 2305
$meta['last_name'] = apply_filters( 'pre_user_last_name', $last_name );

Where the hook is used in WordPress

wp-includes/default-filters.php 22
add_filter( $filter, 'sanitize_text_field' );
wp-includes/default-filters.php 23
add_filter( $filter, 'wp_filter_kses' );
wp-includes/default-filters.php 24
add_filter( $filter, '_wp_specialchars', 30 );