wpmu_validate_user_signup хук-фильтрWP 3.0.0

Filters the validated user registration details.

This does not allow you to override the username or email of the user during registration. The values are solely used for validation and error handling.

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

add_filter( 'wpmu_validate_user_signup', 'wp_kama_wpmu_validate_user_signup_filter' );

/**
 * Function for `wpmu_validate_user_signup` filter-hook.
 * 
 * @param array $result The array of user name, email, and the error messages.
 *
 * @return array
 */
function wp_kama_wpmu_validate_user_signup_filter( $result ){

	// filter...
	return $result;
}
$result(массив)

The array of user name, email, and the error messages.

  • user_name(строка)
    Sanitized and unique username.

  • orig_username(строка)
    Original username.

  • user_email(строка)
    User email address.

  • errors(WP_Error)
    WP_Error object containing any errors found.

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

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

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

wpmu_validate_user_signup()
wpmu_validate_user_signup
wp-includes/ms-functions.php 584
return apply_filters( 'wpmu_validate_user_signup', $result );

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

wp-includes/ms-default-filters.php 24
add_filter( 'wpmu_validate_user_signup', 'signup_nonce_check' );