Exemplo n.º 1
0
 /**
  * Runs the needed cleanup after an update, setting the DB version to latest version, flushing caches etc.
  */
 private function finish_up()
 {
     $this->options = WPSEO_Options::get_option('wpseo');
     // Re-get to make sure we have the latest version.
     update_option('wpseo', $this->options);
     // This also ensures the DB version is equal to WPSEO_VERSION.
     add_action('shutdown', 'flush_rewrite_rules');
     // Just flush rewrites, always, to at least make them work after an upgrade.
     WPSEO_Sitemaps_Cache::clear();
     // Flush the sitemap cache.
     WPSEO_Options::ensure_options_exist();
     // Make sure all our options always exist - issue #1245.
 }
Exemplo n.º 2
0
 /**
  * Clear entire XML sitemap cache
  *
  * @deprecated
  * @see WPSEO_Sitemaps_Cache::clear()
  *
  * @param array $types Set of sitemap types to invalidate cache for.
  */
 public static function clear_sitemap_cache($types = array())
 {
     WPSEO_Sitemaps_Cache::clear($types);
 }