static function do_ctf_action() { // See if a ctf_action has been invoked // Is there a ctf_action pending? if (isset($_POST['ctf_action'])) { // A ctf_action has been invoked by this plugin--process it // Backup Settings and Preview Form are handled in a different place // Admins only if (function_exists('current_user_can') && !current_user_can('manage_options')) { wp_die(__('You do not have permissions for managing this option', 'si-contact-form')); } switch ($_POST['ctf_action']) { case esc_attr__('Copy Settings', 'si-contact-form'): self::copy_settings(); break; case esc_attr__('Reset Styles on all forms', 'si-contact-form'): self::reset_all_styles(); break; case esc_attr__('Restore Settings', 'si-contact-form'): self::restore_settings(); break; case esc_attr__('Send Test', 'si-contact-form'): self::send_test_email(); break; case esc_attr__('Add Field', 'si-contact-form'): FSCF_Options::add_field(); break; case esc_attr__('Add Form', 'si-contact-form'): FSCF_Options::add_form(); break; case esc_attr__('Reset Form', 'si-contact-form'): FSCF_Options::reset_form(); break; case esc_attr__('Delete Form', 'si-contact-form'): FSCF_Options::delete_form(); break; case esc_attr__('Import forms from 3.xx version', 'si-contact-form'): FSCF_Util::import_forced('force'); break; default: } // end switch } }