wpseo_sitemap_page_for_post_type_archive хук-фильтрYoast 9.3

Filter the page which is dedicated to this post type archive.

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

add_filter( 'wpseo_sitemap_page_for_post_type_archive', 'wp_kama_wpseo_sitemap_page_for_post_type_archive_filter', 10, 2 );

/**
 * Function for `wpseo_sitemap_page_for_post_type_archive` filter-hook.
 * 
 * @param string $archive_page_id The post_id of the page.
 * @param string $post_type       The post type this archive is for.
 *
 * @return string
 */
function wp_kama_wpseo_sitemap_page_for_post_type_archive_filter( $archive_page_id, $post_type ){

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

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

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

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

WPSEO_Post_Type_Sitemap_Provider::is_post_type_archive_indexable()
wpseo_sitemap_page_for_post_type_archive
yoast/inc/sitemaps/class-post-type-sitemap-provider.php 488
$archive_page_id = (int) apply_filters( 'wpseo_sitemap_page_for_post_type_archive', $archive_page_id, $post_type );

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

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