wp_sitemaps_users_query_args filter-hookWP 5.5.0

Filters the query arguments for authors with public posts.

Allows modification of the authors query arguments before querying.

Usage

add_filter( 'wp_sitemaps_users_query_args', 'wp_kama_sitemaps_users_query_args_filter' );

/**
 * Function for `wp_sitemaps_users_query_args` filter-hook.
 * 
 * @param array $args Array of WP_User_Query arguments.
 *
 * @return array
 */
function wp_kama_sitemaps_users_query_args_filter( $args ){

	// filter...
	return $args;
}
$args(array)
Array of WP_User_Query arguments.

Changelog

Since 5.5.0 Introduced.

Where the hook is called

WP_Sitemaps_Users::get_users_query_args()
wp_sitemaps_users_query_args
wp-includes/sitemaps/providers/class-wp-sitemaps-users.php 154-160
$args = apply_filters(
	'wp_sitemaps_users_query_args',
	array(
		'has_published_posts' => array_keys( $public_post_types ),
		'number'              => wp_sitemaps_get_max_urls( $this->object_type ),
	)
);

Where the hook is used in WordPress

Usage not found.