WP HOOKS
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

ParametrTypOpis
$resultmixedValue for the user's option.
$optionstringName of the option being retrieved.
$user\WP_UserWP_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
}

Popularne w tej kategorii