[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)





/wp-includes/sitemaps/providers/ -> class-wp-sitemaps-posts.php (summary)

Sitemaps: WP_Sitemaps_Posts class Builds the sitemaps for the 'post' object type.

File Size: 217 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_Sitemaps_Posts:: (5 methods):

Class: WP_Sitemaps_Posts  - X-Ref

Posts XML sitemap provider.

__construct()   X-Ref
WP_Sitemaps_Posts constructor.

get_object_subtypes()   X-Ref
Returns the public post types, which excludes nav_items and similar types.
Attachments are also excluded. This includes custom post types with public = true.

return: WP_Post_Type[] Array of registered post type objects keyed by their name.

get_url_list( $page_num, $post_type = '' )   X-Ref
Gets a URL list for a post type sitemap.

param: int    $page_num  Page of results.
param: string $post_type Optional. Post type name. Default empty.
return: array Array of URLs for a sitemap.

get_max_num_pages( $post_type = '' )   X-Ref
Gets the max number of pages available for the object type.

param: string $post_type Optional. Post type name. Default empty.
return: int Total number of pages.

get_posts_query_args( $post_type )   X-Ref
Returns the query args for retrieving posts to list in the sitemap.

param: string $post_type Post type name.
return: array Array of WP_Query arguments.

Generated : Sun Mar 7 08:20:02 2021 Cross-referenced by PHPXref