filtrod 4.8.0
rest_oembed_ttl
Opis — z kodu źródłowego
Filters the oEmbed TTL value (time to live).
Similar to the {@see 'oembed_ttl'} filter, but for the REST API oEmbed proxy endpoint.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$time | int | Time to live (in seconds). |
$url | string | The attempted embed URL. |
$args | array | An array of embed request arguments. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'rest_oembed_ttl', '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( 'rest_oembed_ttl', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii