WP HOOKS
filtrreferencjaod 1.5.0

the_posts

Args 1Plik wp-includes/class-wp-query.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the array of retrieved posts after they've been fetched and internally processed.

Parametry

ParametrTypOpis
$posts\WP_Post[]Array of post objects.
$query\WP_QueryThe WP_Query instance (passed by reference).

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( 'the_posts', 'twoja_funkcja' );

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

Popularne w tej kategorii