WP HOOKS
filtrod 4.4.0

pre_get_lastpostmodified

Args 3Plik wp-includes/post.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Pre-filter the return value of get_lastpostmodified() before the query is run.

Parametry

ParametrTypOpis
$lastpostmodifiedstring | falseThe most recent time that a post was modified, in 'Y-m-d H:i:s' format, or false. Returning anything other than false will short-circuit the function.
$timezonestringLocation to use for getting the post modified date. See get_lastpostdate() for accepted <code>$timezone</code> values.
$post_typestringThe post type to check.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_get_lastpostmodified', 'twoja_funkcja', 10, 3 );

function twoja_funkcja($param_1, $param_2, $param_3) {
	// Twój kod
}

Popularne w tej kategorii