filtrdynamicznyod 3.0.0
pre_set_transient_{$transient}
Args 3Plik wp-includes/option.php
Opis — z kodu źródłowego
Filters a specific transient before its value is set.
The dynamic portion of the hook name, $transient, refers to the transient name.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$value | mixed | New value of transient. |
$expiration | int | Time until expiration in seconds. |
$transient | string | Transient name. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_set_transient_{$transient}', '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( 'pre_set_transient_{$transient}', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii