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

Retrieves the XSL URL that should be used in the current environment

When home_url and site_url are not the same, the home_url should be used. This is because the XSL needs to be served from the same domain, protocol and port as the XML file that is loading it.

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

add_filter( 'wpseo_sitemap_public_url', 'wp_kama_wpseo_sitemap_public_url_filter' );

/**
 * Function for `wpseo_sitemap_public_url` filter-hook.
 * 
 * @param  $home_url 
 *
 * @return 
 */
function wp_kama_wpseo_sitemap_public_url_filter( $home_url ){

	// filter...
	return $home_url;
}
$home_url
-

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

WPSEO_Sitemaps_Renderer::get_xsl_url()
wpseo_sitemap_public_url
yoast/inc/sitemaps/class-sitemaps-renderer.php 342
return apply_filters( 'wpseo_sitemap_public_url', home_url( 'main-sitemap.xsl' ) );

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

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