1: <?php
2:
3: 4: 5:
6: class Quform_NonceRefresher
7: {
8: 9: 10: 11: 12: 13: 14: 15:
16: public function refreshNonces($response, $data, $screenId)
17: {
18: switch ($screenId) {
19: case 'forms_page_quformforms':
20: $response['quformSaveFormNonce'] = wp_create_nonce('quform_save_form');
21: $response['quformAddFormNonce'] = wp_create_nonce('quform_add_form');
22: $response['quformSaveFormsTableSettingsNonce'] = wp_create_nonce('quform_save_forms_table_settings');
23: break;
24: case 'forms_page_quformentries':
25: $response['quformSetEntryLabelsNonce'] = wp_create_nonce('quform_set_entry_labels');
26: $response['quformSaveEntriesTableSettingsNonce'] = wp_create_nonce('quform_save_entries_table_settings');
27: $response['quformResendNotificationsNonce'] = wp_create_nonce('quform_resend_notifications');
28: break;
29: case 'forms_page_quformsettings':
30: $response['quformSaveSettingsNonce'] = wp_create_nonce('quform_save_settings');
31: $response['quformUpdateCheckNonce'] = wp_create_nonce('quform_manual_update_check');
32: $response['quformVerifyNonce'] = wp_create_nonce('quform_verify_purchase_code');
33: $response['quformRebuildScriptCacheNonce'] = wp_create_nonce('quform_rebuild_script_cache');
34: break;
35: case 'forms_page_quformtools':
36: $response['quformExportFormNonce'] = wp_create_nonce('quform_export_form');
37: $response['quformImportFormNonce'] = wp_create_nonce('quform_import_form');
38: $response['quformMigrateSettingsNonce'] = wp_create_nonce('quform_migrate_settings');
39: $response['quformMigrateNonce'] = wp_create_nonce('quform_migrate_form');
40: $response['quformMigrateImportFormNonce'] = wp_create_nonce('quform_migrate_import_form');
41: break;
42: }
43:
44: return $response;
45: }
46: }
47: