mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Sitemaps: Exclude post types and taxonomies that are not publicly queryable.
Props Cybr. Fixes #50607. Built from https://develop.svn.wordpress.org/trunk@48474 git-svn-id: http://core.svn.wordpress.org/trunk@48243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4ff1233e75
commit
acca036e88
@ -37,6 +37,8 @@ class WP_Sitemaps_Posts extends WP_Sitemaps_Provider {
|
||||
$post_types = get_post_types( array( 'public' => true ), 'objects' );
|
||||
unset( $post_types['attachment'] );
|
||||
|
||||
$post_types = array_filter( $post_types, 'is_post_type_viewable' );
|
||||
|
||||
/**
|
||||
* Filters the list of post object sub types available within the sitemap.
|
||||
*
|
||||
|
@ -35,6 +35,8 @@ class WP_Sitemaps_Taxonomies extends WP_Sitemaps_Provider {
|
||||
public function get_object_subtypes() {
|
||||
$taxonomies = get_taxonomies( array( 'public' => true ), 'objects' );
|
||||
|
||||
$taxonomies = array_filter( $taxonomies, 'is_taxonomy_viewable' );
|
||||
|
||||
/**
|
||||
* Filter the list of taxonomy object subtypes available within the sitemap.
|
||||
*
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.5-beta1-48473';
|
||||
$wp_version = '5.5-beta1-48474';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user