wp_sitemaps_users_query_args хук-фильтрWP 5.5.0

Filters the query arguments for authors with public posts.

Allows modification of the authors query arguments before querying.

Использование

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 of WP_User_Query arguments.

Список изменений

С версии 5.5.0 Введена.

Где вызывается хук

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 ),
	)
);

Где используется хук в WordPress

Использование не найдено.