class-wp-sitemaps-empty-test-provider.php 998 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * Class WP_Sitemaps_Empty_Test_Provider.
  4. *
  5. * Provides test data for additional registered providers.
  6. */
  7. class WP_Sitemaps_Empty_Test_Provider extends WP_Sitemaps_Provider {
  8. /**
  9. * WP_Sitemaps_Empty_Test_Provider constructor.
  10. *
  11. * @param string $object_type Optional. Object type name to use. Default 'test'.
  12. */
  13. public function __construct( $object_type = 'test' ) {
  14. $this->object_type = $object_type;
  15. }
  16. /**
  17. * Gets a URL list for a sitemap.
  18. *
  19. * @param int $page_num Page of results.
  20. * @param string $object_subtype Optional. Object subtype name. Default empty.
  21. * @return array List of URLs for a sitemap.
  22. */
  23. public function get_url_list( $page_num, $object_subtype = '' ) {
  24. return array();
  25. }
  26. /**
  27. * Query for determining the number of pages.
  28. *
  29. * @param string $object_subtype Optional. Object subtype. Default empty.
  30. * @return int Total number of pages.
  31. */
  32. public function get_max_num_pages( $object_subtype = '' ) {
  33. return 0;
  34. }
  35. }