wp_sitemaps_users_pre_max_num_pages
Filters the max number of pages for a user sitemap before it is generated.
Returning a non-null value will effectively short-circuit the generation, returning that value instead.
Использование
add_filter( 'wp_sitemaps_users_pre_max_num_pages', 'wp_kama_sitemaps_users_pre_max_num_pages_filter' ); /** * Function for `wp_sitemaps_users_pre_max_num_pages` filter-hook. * * @param int|null $max_num_pages The maximum number of pages. * * @return int|null */ function wp_kama_sitemaps_users_pre_max_num_pages_filter( $max_num_pages ){ // filter... return $max_num_pages; }
- $max_num_pages(int|null)
- The maximum number of pages.
По умолчанию: null
Список изменений
С версии 5.5.0 | Введена. |
Где вызывается хук
wp_sitemaps_users_pre_max_num_pages
wp-includes/sitemaps/providers/class-wp-sitemaps-users.php 111
$max_num_pages = apply_filters( 'wp_sitemaps_users_pre_max_num_pages', null );