Esempio n. 1
0
/**
 * Save the options from the WP Email Capture Options Page.
 * 
 * @return void
 */
function wp_email_capture_options_process()
{
    // whitelist options
    register_setting('wp-email-capture-group', 'wp_email_capture_signup');
    register_setting('wp-email-capture-group', 'wp_email_capture_redirection');
    register_setting('wp-email-capture-group', 'wp_email_capture_from');
    register_setting('wp-email-capture-group', 'wp_email_capture_subject');
    register_setting('wp-email-capture-group', 'wp_email_capture_body');
    register_setting('wp-email-capture-group', 'wp_email_capture_link');
    register_setting('wp-email-capture-group', 'wp_email_capture_from_name');
    register_setting('wp-email-capture-group', 'wp_email_capture_name_required');
    register_setting('wp-email-capture-group', 'wp_email_capture_name_delimeter');
    if (isset($_REQUEST['wp_email_capture_export'])) {
        wp_email_capture_export();
    }
    if (isset($_REQUEST['wp_email_capture_deleteid'])) {
        $wpemaildeleteid = esc_attr($_POST['wp_email_capture_deleteid']);
        wp_email_capture_deleteid($wpemaildeleteid);
    }
    if (isset($_REQUEST['wp_email_capture_truncate'])) {
        wp_email_capture_truncate();
    }
    if (isset($_REQUEST['wp_email_capture_delete'])) {
        wp_email_capture_delete();
    }
    /**
     * Action to hook into to register any other options.
     */
    do_action('wp_email_capture_added_option_process');
}
Esempio n. 2
0
function wp_email_capture_options_process()
{
    // whitelist options
    register_setting('wp-email-capture-group', 'wp_email_capture_signup');
    register_setting('wp-email-capture-group', 'wp_email_capture_redirection');
    register_setting('wp-email-capture-group', 'wp_email_capture_from');
    register_setting('wp-email-capture-group', 'wp_email_capture_subject');
    register_setting('wp-email-capture-group', 'wp_email_capture_body');
    register_setting('wp-email-capture-group', 'wp_email_capture_link');
    register_setting('wp-email-capture-group', 'wp_email_capture_from_name');
    register_setting('wp-email-capture-group', 'wp_email_capture_name_required');
    register_setting('wp-email-capture-group', 'wp_email_capture_name_delimeter');
    if (isset($_REQUEST['wp_email_capture_export'])) {
        wp_email_capture_export();
    }
    if (isset($_REQUEST['wp_email_capture_deleteid'])) {
        $wpemaildeleteid = $_POST['wp_email_capture_deleteid'];
        wp_email_capture_deleteid($wpemaildeleteid);
    }
    if (isset($_REQUEST['wp_email_capture_truncate'])) {
        wp_email_capture_truncate();
    }
    if (isset($_REQUEST['wp_email_capture_delete'])) {
        wp_email_capture_delete();
    }
}