pre_user_login хук-фильтрWP 2.0.3

Filters a username after it has been sanitized.

This filter is called before the user is created or updated.

Использование

add_filter( 'pre_user_login', 'wp_kama_pre_user_login_filter' );

/**
 * Function for `pre_user_login` filter-hook.
 * 
 * @param string $sanitized_user_login Username after it has been sanitized.
 *
 * @return string
 */
function wp_kama_pre_user_login_filter( $sanitized_user_login ){

	// filter...
	return $sanitized_user_login;
}
$sanitized_user_login(строка)
Username after it has been sanitized.

Список изменений

С версии 2.0.3 Введена.

Где вызывается хук

wp_insert_user()
pre_user_login
wp-includes/user.php 2089
$pre_user_login = apply_filters( 'pre_user_login', $sanitized_user_login );
wp-admin/user-new.php 216
$new_user_login = apply_filters( 'pre_user_login', sanitize_user( wp_unslash( $_REQUEST['user_login'] ), true ) );

Где используется хук в WordPress

Использование не найдено.