WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WP_Sitemaps_Users::get_url_list() public WP 5.5.0

Gets a URL list for a user sitemap.

Это метод класса: WP_Sitemaps_Users{}

Возвращает

Массив. Array of URLs for a sitemap.

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

$WP_Sitemaps_Users = new WP_Sitemaps_Users();
$WP_Sitemaps_Users->get_url_list( $page_num, $object_subtype );
$page_num(число) (обязательный)
Page of results.
$object_subtype(строка)
Not applicable for Users but required for compatibility with the parent provider class.
По умолчанию: ''

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

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

Код WP Sitemaps Users::get url list: wp-includes/sitemaps/providers/class-wp-sitemaps-users.php WP 5.5.1

<?php
public function get_url_list( $page_num, $object_subtype = '' ) {
	/**
	 * Filters the users URL list before it is generated.
	 *
	 * Passing a non-null value will effectively short-circuit the generation,
	 * returning that value instead.
	 *
	 * @since 5.5.0
	 *
	 * @param array  $url_list The URL list. Default null.
	 * @param int    $page_num Page of results.
	 */
	$url_list = apply_filters(
		'wp_sitemaps_users_pre_url_list',
		null,
		$page_num
	);

	if ( null !== $url_list ) {
		return $url_list;
	}

	$args          = $this->get_users_query_args();
	$args['paged'] = $page_num;

	$query    = new WP_User_Query( $args );
	$users    = $query->get_results();
	$url_list = array();

	foreach ( $users as $user ) {
		$sitemap_entry = array(
			'loc' => get_author_posts_url( $user->ID ),
		);

		/**
		 * Filters the sitemap entry for an individual user.
		 *
		 * @since 5.5.0
		 *
		 * @param array   $sitemap_entry Sitemap entry for the user.
		 * @param WP_User $user          User object.
		 */
		$sitemap_entry = apply_filters( 'wp_sitemaps_users_entry', $sitemap_entry, $user );
		$url_list[]    = $sitemap_entry;
	}

	return $url_list;
}