/** * Method to invalidate the sitemap * * @param integer $post_id */ public function invalidate_sitemap($post_id) { // If this is just a revision, don't invalidate the sitemap cache yet. if (wp_is_post_revision($post_id)) { return; } wpseo_invalidate_sitemap_cache('news'); }
/** * Invalidate the XML sitemap cache for a post type when publishing or updating a post * * @param int $post_id */ function wpseo_invalidate_sitemap_cache_on_save_post($post_id) { // If this is just a revision, don't invalidate the sitemap cache yet. if (wp_is_post_revision($post_id)) { return; } wpseo_invalidate_sitemap_cache(get_post_type($post_id)); }
/** * Method to invalidate the sitemap * * @param integer $post_id */ public function invalidate_sitemap($post_id) { // If this is just a revision, don't invalidate the sitemap cache yet. if (wp_is_post_revision($post_id)) { return; } wpseo_invalidate_sitemap_cache($this->video_sitemap_basename()); }
/** * Clears the transient cache when a given option is updated, if that option has been registered before * * @param string $option The option that's being updated. */ public static function clear_transient_cache($option) { if (isset(self::$cache_clear[$option])) { if ('' !== self::$cache_clear[$option]) { wpseo_invalidate_sitemap_cache(self::$cache_clear[$option]); } else { self::clear_sitemap_cache(); } } }
/** * Method to invalidate the sitemap * * @param integer $post_id */ public function invalidate_sitemap($post_id) { // If this is just a revision, don't invalidate the sitemap cache yet. if (wp_is_post_revision($post_id)) { return; } if (get_post_type($post_id) === 'wpseo_locations') { wpseo_invalidate_sitemap_cache('kml'); } }