filtrdynamicznyod 2.5.0
get_user_option_{$option}
Args 3Plik wp-includes/user.php
Opis — z kodu źródłowego
Filters a specific user option value.
The dynamic portion of the hook name, $option, refers to the user option name.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$result | mixed | Value for the user's option. |
$option | string | Name of the option being retrieved. |
$user | \WP_User | WP_User object of the user whose option is being retrieved. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'get_user_option_{$option}', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'get_user_option_{$option}', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii