WP HOOKS
filtrod 3.7.0

wp_count_posts

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

Opis — z kodu źródłowego

Filters the post counts by status for the current post type.

Parametry

ParametrTypOpis
$counts\stdClassAn object containing the current post_type's post counts by status.
$typestringPost type.
$permstringThe permission to determine if the posts are 'readable' by the current user.

Wywołanie

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

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

Popularne w tej kategorii