wp_sitemaps_post_types WordPress Filter Hook

The wp_sitemaps_post_types hook is used to register post types for inclusion in a WordPress sitemap. This hook is called by the wp_sitemaps_init function.

apply_filters( 'wp_sitemaps_post_types', WP_Post_Type[] $post_types ) #

Filters the list of post object sub types available within the sitemap.


Parameters

$post_types

(WP_Post_Type[])Array of registered post type objects keyed by their name.


Top ↑

Source

File: wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.