Ticket #51860: class-wp-sitemaps-posts.php.diff
File class-wp-sitemaps-posts.php.diff, 991 bytes (added by , 4 years ago) |
---|
-
wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php
114 114 * @param array $sitemap_entry Sitemap entry for the home page. 115 115 */ 116 116 $sitemap_entry = apply_filters( 'wp_sitemaps_posts_show_on_front_entry', $sitemap_entry ); 117 $url_list[] = $sitemap_entry; 117 118 if ( ! empty( $sitemap_entry ) { 119 120 $url_list[] = $sitemap_entry; 121 } 118 122 } 119 123 120 124 foreach ( $query->posts as $post ) { … … 132 136 * @param string $post_type Name of the post_type. 133 137 */ 134 138 $sitemap_entry = apply_filters( 'wp_sitemaps_posts_entry', $sitemap_entry, $post, $post_type ); 135 $url_list[] = $sitemap_entry; 139 140 if ( ! empty( $sitemap_entry ) { 141 142 $url_list[] = $sitemap_entry; 143 } 136 144 } 137 145 138 146 return $url_list;