public static function action_halt()
{
// Can only halt generation if sitemap creation is already in process
if (get_option('msm_stop_processing') === true) {
Metro_Sitemap::show_action_message(__('Cannot stop sitemap generation: sitemap generation is already being halted.', 'metro-sitemaps'), 'warning');
} else {
if (get_option('msm_sitemap_create_in_progress') === true) {
update_option('msm_stop_processing', true);
Metro_Sitemap::show_action_message(__('Stopping Sitemap generation', 'metro-sitemaps'));
} else {
Metro_Sitemap::show_action_message(__('Cannot stop sitemap generation: sitemap generation not in progress', 'metro-sitemaps'), 'warning');
}
}
}