wpseo_sitemap_post_type_first_links
Filters the first post type links.
Использование
add_filter( 'wpseo_sitemap_post_type_first_links', 'wp_kama_wpseo_sitemap_post_type_first_links_filter', 10, 2 ); /** * Function for `wpseo_sitemap_post_type_first_links` filter-hook. * * @param array $links The first post type links. * @param string $post_type The post type this archive is for. * * @return array */ function wp_kama_wpseo_sitemap_post_type_first_links_filter( $links, $post_type ){ // filter... return $links; }
- $links(массив)
- The first post type links.
- $post_type(строка)
- The post type this archive is for.
Где вызывается хук
wpseo_sitemap_post_type_first_links
yoast/inc/sitemaps/class-post-type-sitemap-provider.php 429
return apply_filters( 'wpseo_sitemap_post_type_first_links', $links, $post_type );