wp_sitemaps_users_pre_url_list
Filters the users URL list before it is generated.
Returning a non-null value will effectively short-circuit the generation, returning that value instead.
Usage
add_filter( 'wp_sitemaps_users_pre_url_list', 'wp_kama_sitemaps_users_pre_url_list_filter', 10, 2 );
/**
* Function for `wp_sitemaps_users_pre_url_list` filter-hook.
*
* @param array[]|null $url_list The URL list.
* @param int $page_num Page of results.
*
* @return array[]|null
*/
function wp_kama_sitemaps_users_pre_url_list_filter( $url_list, $page_num ){
// filter...
return $url_list;
}
- $url_list(array[]|null)
- The URL list.
Default: null - $page_num(int)
- Page of results.
Changelog
| Since 5.5.0 | Introduced. |
Where the hook is called
wp_sitemaps_users_pre_url_list
wp-includes/sitemaps/providers/class-wp-sitemaps-users.php 51-55
$url_list = apply_filters( 'wp_sitemaps_users_pre_url_list', null, $page_num );