Make WordPress Core

Ticket #50607: providers.patch

File providers.patch, 1.2 KB (added by Cybr, 6 years ago)
  • wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php

     
    3737                $post_types = get_post_types( array( 'public' => true ), 'objects' );
    3838                unset( $post_types['attachment'] );
    3939
     40                $post_types = array_filter( $post_types, 'is_post_type_viewable' );
     41
    4042                /**
    4143                 * Filters the list of post object sub types available within the sitemap.
    4244                 *
  • wp-includes/sitemaps/providers/class-wp-sitemaps-taxonomies.php

     
    3535        public function get_object_subtypes() {
    3636                $taxonomies = get_taxonomies( array( 'public' => true ), 'objects' );
    3737
     38                $taxonomies = array_filter( $taxonomies, 'is_taxonomy_viewable' );
     39
    3840                /**
    3941                 * Filter the list of taxonomy object subtypes available within the sitemap.
    4042                 *