当前位置: 首页>>代码示例>>PHP>>正文


PHP WPSEO_Utils::clear_sitemap_cache方法代码示例

本文整理汇总了PHP中WPSEO_Utils::clear_sitemap_cache方法的典型用法代码示例。如果您正苦于以下问题:PHP WPSEO_Utils::clear_sitemap_cache方法的具体用法?PHP WPSEO_Utils::clear_sitemap_cache怎么用?PHP WPSEO_Utils::clear_sitemap_cache使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WPSEO_Utils的用法示例。


在下文中一共展示了WPSEO_Utils::clear_sitemap_cache方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: wpseo_invalidate_sitemap_cache

/**
 * This invalidates our XML Sitemaps cache.
 *
 * @param string $type
 */
function wpseo_invalidate_sitemap_cache($type)
{
    // Always delete the main index sitemaps cache, as that's always invalidated by any other change
    delete_transient('wpseo_sitemap_cache_1');
    delete_transient('wpseo_sitemap_cache_' . $type);
    WPSEO_Utils::clear_sitemap_cache(array($type));
}
开发者ID:presteege,项目名称:presteege.fr,代码行数:12,代码来源:wpseo-functions.php

示例2: finish_up

 /**
  * Runs the needed cleanup after an update, setting the DB version to latest version, flushing caches etc.
  */
 private function finish_up()
 {
     $this->options = get_option('wpseo');
     // re-get to make sure we have the latest version
     $this->options['seen_about'] = false;
     // make sure user is redirected to the about screen
     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_Utils::clear_sitemap_cache();
     // Flush the sitemap cache
     WPSEO_Options::ensure_options_exist();
     // Make sure all our options always exist - issue #1245
 }
开发者ID:goodbayscott,项目名称:wwr-temp,代码行数:18,代码来源:class-upgrade.php

示例3: finish_up

 /**
  * 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_Utils::clear_sitemap_cache();
     // Flush the sitemap cache.
     WPSEO_Options::ensure_options_exist();
     // Make sure all our options always exist - issue #1245.
 }
开发者ID:Didox,项目名称:beminfinito,代码行数:16,代码来源:class-upgrade.php

示例4: clear_author_sitemap_cache

 /**
  * Clear author sitemap cache when settings are changed
  *
  * @since 3.1
  *
  * @param int    $meta_id The ID of the meta option changed.
  * @param int    $object_id The ID of the user.
  * @param string $meta_key The key of the meta field changed.
  */
 public function clear_author_sitemap_cache($meta_id, $object_id, $meta_key)
 {
     if ('_yoast_wpseo_profile_updated' === $meta_key) {
         WPSEO_Utils::clear_sitemap_cache(array('author'));
     }
 }
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:15,代码来源:class-admin-user-profile.php


注:本文中的WPSEO_Utils::clear_sitemap_cache方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。