filtrod 5.9.0
insert_custom_user_meta
Opis — z kodu źródłowego
Filters a user's custom meta values and keys immediately after the user is created or updated and before any user meta is inserted or updated.
For non-custom meta fields, see the {@see 'insert_user_meta'} filter.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$custom_meta | array | Array of custom user meta values keyed by meta key. |
$user | \WP_User | User object. |
$update | bool | Whether the user is being updated rather than created. |
$userdata | array | The raw array of data passed to wp_insert_user(). |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'insert_custom_user_meta', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'insert_custom_user_meta', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}Popularne w tej kategorii