wpseo_sitemap_index
Filter to append sitemaps to the index.
Использование
add_filter( 'wpseo_sitemap_index', 'wp_kama_wpseo_sitemap_index_filter' );
/**
* Function for `wpseo_sitemap_index` filter-hook.
*
* @param string $index String to append to sitemaps index.
*
* @return string
*/
function wp_kama_wpseo_sitemap_index_filter( $index ){
// filter...
return $index;
}
- $index(строка)
- String to append to sitemaps index.
По умолчанию: ''
Где вызывается хук
wpseo_sitemap_index
yoast/inc/sitemaps/class-sitemaps-renderer.php 81
$xml .= apply_filters( 'wpseo_sitemap_index', '' );