function cforms2_activate() { $role = get_role('administrator'); if (!$role->has_cap('manage_cforms')) { $role->add_cap('manage_cforms'); } if (!$role->has_cap('track_cforms')) { $role->add_cap('track_cforms'); } cforms2_setup_db(); }
die; ?> <?php } elseif ($_POST['resetsettings']) { ?> <div class="updated fade"><p><?php _e('Please deactivate and then re-activate the cforms plugin now.', 'cforms2'); ?> </p></div> <?php delete_option('cforms_settings'); global $cformsSettings; $cformsSettings = array(); cforms2_setup_db(); wp_die(); ?> <?php } else { ?> <div class="error"><p><?php _e('It appears that WP has corrupted your cforms settings, the settings array can not be read properly.', 'cforms2'); ?> </p></div> <?php } global $wpdb;