WP HOOKS
filtrod 4.8.0

rest_oembed_ttl

Args 3Plik wp-includes/class-wp-oembed-controller.phpDokumentacja WP ↗

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

ParametrTypOpis
$timeintTime to live (in seconds).
$urlstringThe attempted embed URL.
$argsarrayAn 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
}

Popularne w tej kategorii