diff options
Diffstat (limited to 'plugins/jetpack/modules/sitemaps/sitemaps.php')
-rw-r--r-- | plugins/jetpack/modules/sitemaps/sitemaps.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/plugins/jetpack/modules/sitemaps/sitemaps.php b/plugins/jetpack/modules/sitemaps/sitemaps.php index 3620957c..2c433a1d 100644 --- a/plugins/jetpack/modules/sitemaps/sitemaps.php +++ b/plugins/jetpack/modules/sitemaps/sitemaps.php @@ -108,6 +108,12 @@ class Jetpack_Sitemap_Manager { 10 ); + // In case we need to purge all sitemaps, we do this. + add_action( + 'jetpack_sitemaps_purge_data', + array( $this, 'callback_action_purge_data' ) + ); + /* * Module parameters are stored as options in the database. * This allows us to avoid having to process all of init @@ -434,6 +440,17 @@ class Jetpack_Sitemap_Manager { } /** + * Callback for resetting stored sitemap data. + * + * @access public + * @since 5.3.0 + */ + public function callback_action_purge_data() { + $this->callback_action_flush_news_sitemap_cache(); + $this->librarian->delete_all_stored_sitemap_data(); + } + + /** * Callback to set the sitemap location. * * @access public |