wpseo_invalidate_sitemap_cache_terms

Invalidate XML sitemap cache for taxonomy / term actions.

Description

wpseo_invalidate_sitemap_cache_terms( (int) $unused, (string) $type ); 

Parameters (2)

0. $unused (int)
Unused term ID value.
1. $type (string)
Taxonomy to invalidate.

Usage

  1. if ( !function_exists( 'wpseo_invalidate_sitemap_cache_terms' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'yoast-seo/inc/wpseo-functions-deprecated.php'; 
  3.  
  4. // Unused term ID value. 
  5. $unused = -1; 
  6.  
  7. // Taxonomy to invalidate. 
  8. $type = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = wpseo_invalidate_sitemap_cache_terms($unused, $type); 
  12.  

Defined (1)

The function is defined in the following location(s).

/inc/wpseo-functions-deprecated.php  
  1. function wpseo_invalidate_sitemap_cache_terms( $unused, $type ) { 
  2. _deprecated_function( __FUNCTION__, 'WPSEO 3.2.0', 'WPSEO_Sitemaps_Cache::invalidate()' ); 
  3.  
  4. WPSEO_Sitemaps_Cache::invalidate( $type );