wpseo_disable_xml_sitemap_cache_priming
Filter to disable priming the post, term and featured-image caches for the sitemap.
Использование
add_filter( 'wpseo_disable_xml_sitemap_cache_priming', 'wp_kama_wpseo_disable_xml_sitemap_cache_priming_filter' );
/**
* Function for `wpseo_disable_xml_sitemap_cache_priming` filter-hook.
*
* @param bool $disable_cache_priming Whether to disable priming the caches.
*
* @return bool
*/
function wp_kama_wpseo_disable_xml_sitemap_cache_priming_filter( $disable_cache_priming ){
// filter...
return $disable_cache_priming;
}
- $disable_cache_priming(true|false)
- Whether to disable priming the caches.
По умолчанию: false
Список изменений
| С версии 28.3 | Введена. |
Где вызывается хук
yoast/inc/sitemaps/class-post-type-sitemap-provider.php 576
$disable_priming = apply_filters( 'wpseo_disable_xml_sitemap_cache_priming', false );