WP HOOKS
filtrod 5.5.0

wp_sitemaps_posts_pre_max_num_pages

Args 2Plik wp-includes/sitemaps/providers/class-wp-sitemaps-posts.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the max number of pages before it is generated.

Passing a non-null value will short-circuit the generation, returning that value instead.

Parametry

ParametrTypOpis
$max_num_pagesint | nullThe maximum number of pages. Default null.
$post_typestringPost type name.

Wywołanie

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

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

Popularne w tej kategorii