WPSEO_Author_Sitemap_Provider::get_usersprotectedYoast 1.0

Retrieve users, taking account of all necessary exclusions.

Метод класса: WPSEO_Author_Sitemap_Provider{}

Хуков нет.

Возвращает

Массив.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_users( $arguments );
$arguments(массив)
Arguments to add.
По умолчанию: []

Код WPSEO_Author_Sitemap_Provider::get_users() Yoast 27.8

protected function get_users( $arguments = [] ) {

	$defaults = [
		'meta_key'   => '_yoast_wpseo_profile_updated',
		'orderby'    => 'meta_value_num',
		'order'      => 'DESC',
		'meta_query' => [
			'relation' => 'OR',
			[
				'key'     => 'wpseo_noindex_author',
				'value'   => 'on',
				'compare' => '!=',
			],
			[
				'key'     => 'wpseo_noindex_author',
				'compare' => 'NOT EXISTS',
			],
		],
	];

	$defaults = $this->apply_author_eligibility_filter( $defaults );

	return get_users( array_merge( $defaults, $arguments ) );
}