WP HOOKS
filtrod 4.9.0

wp_pre_insert_user_data

Args 4Plik wp-includes/user.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters user data before the record is created or updated.

It only includes data in the users table, not any user metadata.

Parametry

ParametrTypOpis
$dataarray{ Values and keys for the user. @type string $user_login The user's login. Only included if $update == false @type string $user_pass The user's password. @type string $user_email The user's email. @type string $user_url The user's url. @type string $user_nicename The user's nice name. Defaults to a URL-safe version of user's login. @type string $display_name The user's display name. @type string $user_registered MySQL timestamp describing the moment when the user registered. Defaults to the current UTC timestamp. }
$updateboolWhether the user is being updated rather than created.
$user_idint | nullID of the user to be updated, or NULL if the user is being created.
$userdataarrayThe raw array of data passed to wp_insert_user().

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_pre_insert_user_data', 'twoja_funkcja', 10, 4 );

function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
	// Twój kod
}

Popularne w tej kategorii