wp_sitemaps_posts_pre_url_list WordPress Filter Hook
This hook is called before the sitemap for posts is generated. It can be used to modify the list of posts that will be included in the sitemap.
apply_filters( 'wp_sitemaps_posts_pre_url_list', array[]|null $url_list , string $post_type , int $page_num ) #
Filters the posts URL list before it is generated.
Description
Returning a non-null value will effectively short-circuit the generation, returning that value instead.
Parameters
- $url_list
(array[]|null)The URL list. Default null.
- $post_type
(string)Post type name.
- $page_num
(int)Page of results.
Source
File: wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php
Changelog
Version | Description |
---|---|
5.5.0 | Introduced. |