Filter hook 'wp_sitemaps_users_query_args'

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

View Source

wp_sitemaps_users_query_args

Filter Hook
Description
Filters the query arguments for authors with public posts. Allows modification of the authors query arguments before querying.

Hook Information

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

Hook Parameters

Type Name Description
array $args Array of WP_User_Query arguments.

Usage Examples

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

function my_custom_filter($args) {
    // Your custom filtering logic here
    return $args;
}

Source Code Context

wp-includes/sitemaps/providers/class-wp-sitemaps-users.php:154 - How this hook is used in WordPress core
<?php
 149  		 *
 150  		 * @since 5.5.0
 151  		 *
 152  		 * @param array $args Array of WP_User_Query arguments.
 153  		 */
 154  		$args = apply_filters(
 155  			'wp_sitemaps_users_query_args',
 156  			array(
 157  				'has_published_posts' => array_keys( $public_post_types ),
 158  				'number'              => wp_sitemaps_get_max_urls( $this->object_type ),
 159  			)

PHP Documentation

<?php
/**
		 * Filters the query arguments for authors with public posts.
		 *
		 * Allows modification of the authors query arguments before querying.
		 *
		 * @see WP_User_Query for a full list of arguments
		 *
		 * @since 5.5.0
		 *
		 * @param array $args Array of WP_User_Query arguments.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/sitemaps/providers/class-wp-sitemaps-users.php
Related Hooks

Related hooks will be displayed here in future updates.