diff --git a/assets/processor.js b/assets/processor.js index 3abfb53..0b3fa24 100644 --- a/assets/processor.js +++ b/assets/processor.js @@ -88,7 +88,9 @@ $(document).on('click', '#batch-process-restart', function(e){ e.preventDefault(); - restart_batch(); + if(confirm(DgBatchRunner.text.confirm_restart)) { + restart_batch(); + } }); diff --git a/includes/class-batch-processor-admin.php b/includes/class-batch-processor-admin.php index 1c81791..2fb0ff4 100644 --- a/includes/class-batch-processor-admin.php +++ b/includes/class-batch-processor-admin.php @@ -76,6 +76,7 @@ public function enqueue_scripts() { 'text' => array( 'processing' => __( 'Processing...', 'wp-batch-processing' ), 'start' => __( 'Start', 'wp-batch-processing' ), + 'confirm_restart' => __('Are you sure you want to restart? This action can not be reverted.', 'wp-batch-processing') ) ) ); }