wpseo_sitemap_post_type_archive_link хук-фильтрYoast 1.0

Filter the URL Yoast SEO uses in the XML sitemap for this post type archive.

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

add_filter( 'wpseo_sitemap_post_type_archive_link', 'wp_kama_wpseo_sitemap_post_type_archive_link_filter', 10, 2 );

/**
 * Function for `wpseo_sitemap_post_type_archive_link` filter-hook.
 * 
 * @param string $archive_url The URL of this archive
 * @param string $post_type   The post type this archive is for.
 *
 * @return string
 */
function wp_kama_wpseo_sitemap_post_type_archive_link_filter( $archive_url, $post_type ){

	// filter...
	return $archive_url;
}
$archive_url(строка)
The URL of this archive
$post_type(строка)
The post type this archive is for.

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

WPSEO_Post_Type_Sitemap_Provider::get_first_links()
wpseo_sitemap_post_type_archive_link
yoast/inc/sitemaps/class-post-type-sitemap-provider.php 398-402
$archive_url = apply_filters(
	'wpseo_sitemap_post_type_archive_link',
	$this->get_post_type_archive_link( $post_type ),
	$post_type
);

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

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