From 89089ed3a20da022d6eafd7fc8608a582f6253b7 Mon Sep 17 00:00:00 2001 From: Michael Torbert Date: Thu, 30 Jun 2016 11:30:59 -0400 Subject: [PATCH] update static sitemap when upgrading AIOSEOP to new version #360 --- inc/aioseop_updates_class.php | 3 ++- modules/aioseop_sitemap.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/aioseop_updates_class.php b/inc/aioseop_updates_class.php index f91ae2aee..4f9eec27a 100644 --- a/inc/aioseop_updates_class.php +++ b/inc/aioseop_updates_class.php @@ -47,8 +47,9 @@ function version_updates() { if ( version_compare( $last_active_version, AIOSEOP_VERSION, '<' ) ) { // Upgrades based on previous version + do_action('before_doing_aioseop_updates'); $this->do_version_updates( $last_active_version ); - + do_action('after_doing_aioseop_updates'); // If we're running Pro, let the Pro updater set the version. if ( ! AIOSEOPPRO ) { diff --git a/modules/aioseop_sitemap.php b/modules/aioseop_sitemap.php index 5b54a90ad..806194e4c 100644 --- a/modules/aioseop_sitemap.php +++ b/modules/aioseop_sitemap.php @@ -310,6 +310,7 @@ function __construct() { $this->add_help_text_links(); + add_action( 'after_doing_aioseop_updates', array( $this, 'do_sitemaps') ); // Update static sitemap when AIOSEOP is upgrade to new version. add_action( 'init', array( $this, 'load_sitemap_options' ) ); add_action( $this->prefix . 'settings_update', array( $this, 'do_sitemaps' ) ); add_filter( $this->prefix . 'display_settings', array( $this, 'update_post_data' ) );