Commit e3f9220a authored by KR Moorhouse's avatar KR Moorhouse Committed by Kenny Hall

Delete All Data Changes (#3588)

* Added missing options to our nuke_settings method. Updated max submission deletes per iteration to 500 up from 250.

* Updated label text.
parent 28c100ce
......@@ -14,7 +14,7 @@ class NF_AJAX_Controllers_DeleteAllData extends NF_Abstracts_Controller
global $wpdb;
$total_subs_deleted = 0;
$post_result = 0;
$max_cnt = 250;
$max_cnt = 500;
$form_id = $_POST[ 'form' ];
// SQL for getting 250 subs at a time
$sub_sql = "SELECT id FROM `" . $wpdb->prefix . "posts` AS p
......
......@@ -159,7 +159,7 @@ final class NF_Admin_Menus_Settings extends NF_Abstracts_Submenu
wp_localize_script( 'ninja_forms_admin_menu_settings', 'nf_settings', array(
'ajax_url' => admin_url( 'admin-ajax.php' ),
'forms' => $form_options,
'nf_nuke_title' => __( 'Remove ALL Ninja Forms data upon uninstall?', 'ninja-forms' ),
'nf_nuke_title' => __( 'Remove ALL Ninja Forms data and uninstall?', 'ninja-forms' ),
'nonce' => wp_create_nonce( "ninja_forms_settings_nonce" ),
'i18n' => array(
'rollbackConfirm' => __( 'Are you sure you want to rollback?', 'ninja-forms' )
......
......@@ -86,10 +86,19 @@ class NF_Database_Migrations
global $wpdb;
/* Delete known options */
delete_option( 'nf_admin_notice' );
delete_option( 'ninja_forms_settings' );
delete_option( 'ninja_forms_load_deprecated' );
delete_option( 'nf_form_tel_data' );
delete_option( 'nf_form_tel_sent' );
delete_option( 'nf_tel_collate' );
delete_option( 'ninja_forms_allow_tracking' );
delete_option( 'ninja_forms_db_version' );
delete_option( 'ninja_forms_do_not_allow_tracking' );
delete_option( 'ninja_forms_load_deprecated' );
delete_option( 'ninja_forms_mailchimp_interests' );
delete_option( 'ninja_forms_oauth_client_secret' );
delete_option( 'ninja_forms_optin_reported' );
delete_option( 'ninja_forms_settings' );
delete_option( 'ninja_forms_transactional_email_enabled' );
delete_option( 'ninja_forms_version' );
/* Delete possible options */
$wpdb->query( "DELETE FROM `{$wpdb->options}` WHERE `option_name` LIKE 'wp_nf_%'" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment