Filter hook 'wp_sitemaps_users_pre_url_list'

in WP Core File wp-includes/sitemaps/providers/class-wp-sitemaps-users.php at line 51

View Source

wp_sitemaps_users_pre_url_list

Filter Hook
Description
Filters the users URL list before it is generated. Returning a non-null value will effectively short-circuit the generation, returning that value instead.

Hook Information

File Location wp-includes/sitemaps/providers/class-wp-sitemaps-users.php View on GitHub
Hook Type Filter
Line Number 51

Hook Parameters

Type Name Description
array[]|null $url_list The URL list. Default null.
int $page_num Page of results.

Usage Examples

Basic Usage
<?php
// Hook into wp_sitemaps_users_pre_url_list
add_filter('wp_sitemaps_users_pre_url_list', 'my_custom_filter', 10, 2);

function my_custom_filter($url_list, $page_num) {
    // Your custom filtering logic here
    return $url_list;
}

Source Code Context

wp-includes/sitemaps/providers/class-wp-sitemaps-users.php:51 - How this hook is used in WordPress core
<?php
  46  		 * @since 5.5.0
  47  		 *
  48  		 * @param array[]|null $url_list The URL list. Default null.
  49  		 * @param int        $page_num Page of results.
  50  		 */
  51  		$url_list = apply_filters(
  52  			'wp_sitemaps_users_pre_url_list',
  53  			null,
  54  			$page_num
  55  		);
  56  

PHP Documentation

<?php
/**
		 * Filters the users URL list before it is generated.
		 *
		 * Returning a non-null value will effectively short-circuit the generation,
		 * returning that value instead.
		 *
		 * @since 5.5.0
		 *
		 * @param array[]|null $url_list The URL list. Default null.
		 * @param int        $page_num Page of results.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-includes/sitemaps/providers/class-wp-sitemaps-users.php
Related Hooks

Related hooks will be displayed here in future updates.