wp/wp-includes/sitemaps/providers/class-wp-sitemaps-users.php
changeset 19 3d72ae0968f4
parent 16 a86126ab1dd4
child 21 48c4eec2b7e6
equal deleted inserted replaced
18:be944660c56a 19:3d72ae0968f4
    32 	 *
    32 	 *
    33 	 * @param int    $page_num       Page of results.
    33 	 * @param int    $page_num       Page of results.
    34 	 * @param string $object_subtype Optional. Not applicable for Users but
    34 	 * @param string $object_subtype Optional. Not applicable for Users but
    35 	 *                               required for compatibility with the parent
    35 	 *                               required for compatibility with the parent
    36 	 *                               provider class. Default empty.
    36 	 *                               provider class. Default empty.
    37 	 * @return array Array of URLs for a sitemap.
    37 	 * @return array[] Array of URL information for a sitemap.
    38 	 */
    38 	 */
    39 	public function get_url_list( $page_num, $object_subtype = '' ) {
    39 	public function get_url_list( $page_num, $object_subtype = '' ) {
    40 		/**
    40 		/**
    41 		 * Filters the users URL list before it is generated.
    41 		 * Filters the users URL list before it is generated.
    42 		 *
    42 		 *
    43 		 * Passing a non-null value will effectively short-circuit the generation,
    43 		 * Returning a non-null value will effectively short-circuit the generation,
    44 		 * returning that value instead.
    44 		 * returning that value instead.
    45 		 *
    45 		 *
    46 		 * @since 5.5.0
    46 		 * @since 5.5.0
    47 		 *
    47 		 *
    48 		 * @param array  $url_list The URL list. Default null.
    48 		 * @param array[]|null $url_list The URL list. Default null.
    49 		 * @param int    $page_num Page of results.
    49 		 * @param int        $page_num Page of results.
    50 		 */
    50 		 */
    51 		$url_list = apply_filters(
    51 		$url_list = apply_filters(
    52 			'wp_sitemaps_users_pre_url_list',
    52 			'wp_sitemaps_users_pre_url_list',
    53 			null,
    53 			null,
    54 			$page_num
    54 			$page_num
    97 	 *                               provider class. Default empty.
    97 	 *                               provider class. Default empty.
    98 	 * @return int Total page count.
    98 	 * @return int Total page count.
    99 	 */
    99 	 */
   100 	public function get_max_num_pages( $object_subtype = '' ) {
   100 	public function get_max_num_pages( $object_subtype = '' ) {
   101 		/**
   101 		/**
   102 		 * Filters the max number of pages before it is generated.
   102 		 * Filters the max number of pages for a user sitemap before it is generated.
   103 		 *
   103 		 *
   104 		 * Passing a non-null value will effectively short-circuit the generation,
   104 		 * Returning a non-null value will effectively short-circuit the generation,
   105 		 * returning that value instead.
   105 		 * returning that value instead.
   106 		 *
   106 		 *
   107 		 * @since 5.5.0
   107 		 * @since 5.5.0
   108 		 *
   108 		 *
   109 		 * @param int $max_num_pages The maximum number of pages. Default null.
   109 		 * @param int|null $max_num_pages The maximum number of pages. Default null.
   110 		 */
   110 		 */
   111 		$max_num_pages = apply_filters( 'wp_sitemaps_users_pre_max_num_pages', null );
   111 		$max_num_pages = apply_filters( 'wp_sitemaps_users_pre_max_num_pages', null );
   112 
   112 
   113 		if ( null !== $max_num_pages ) {
   113 		if ( null !== $max_num_pages ) {
   114 			return $max_num_pages;
   114 			return $max_num_pages;