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