Skip to content

Commit

Permalink
Merge pull request #75 from tollmanz/add-option
Browse files Browse the repository at this point in the history
Do not autoload create in progress option.
  • Loading branch information
mjangda committed Nov 5, 2015
2 parents 6db5ec4 + 7fd18e2 commit 9fde6ba
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion includes/msm-sitemap-builder-cron.php
Expand Up @@ -69,7 +69,12 @@ public static function sitemap_create_status( $status ) {
public static function action_generate() {
$sitemap_create_in_progress = get_option( 'msm_sitemap_create_in_progress' );
self::generate_full_sitemap();
update_option( 'msm_sitemap_create_in_progress', true );

if ( false !== get_option( 'msm_sitemap_create_in_progress', false ) ) {
update_option( 'msm_sitemap_create_in_progress', true );
} else {
add_option( 'msm_sitemap_create_in_progress', true, '', 'no' );
}

if ( empty( $sitemap_create_in_progress ) ) {
Metro_Sitemap::show_action_message( __( 'Starting sitemap generation...', 'metro-sitemaps' ) );
Expand Down

0 comments on commit 9fde6ba

Please sign in to comment.