wpseo_sitemap_url
Filters the output for the sitemap URL tag.
Использование
add_filter( 'wpseo_sitemap_url', 'wp_kama_wpseo_sitemap_url_filter', 10, 2 );
/**
* Function for `wpseo_sitemap_url` filter-hook.
*
* @param string $output The output for the sitemap url tag.
* @param array $url The sitemap URL array on which the output is based.
*
* @return string
*/
function wp_kama_wpseo_sitemap_url_filter( $output, $url ){
// filter...
return $output;
}
- $output(строка)
- The output for the sitemap url tag.
- $url(массив)
- The sitemap URL array on which the output is based.
Где вызывается хук
wpseo_sitemap_url
yoast/inc/sitemaps/class-sitemaps-renderer.php 254
return apply_filters( 'wpseo_sitemap_url', $output, $url );