/**
 * Retrieve the array of plugin settings
 *
 * @since 1.8
 * @return array
*/
function edd_get_registered_settings()
{
    /**
     * 'Whitelisted' EDD settings, filters are provided for each settings
     * section to allow extensions and other plugins to add their own settings
     */
    $edd_settings = array('general' => apply_filters('edd_settings_general', array('purchase_page' => array('id' => 'purchase_page', 'name' => __('Checkout Page', 'easy-digital-downloads'), 'desc' => __('This is the checkout page where buyers will complete their purchases. The [download_checkout] short code must be on this page.', 'easy-digital-downloads'), 'type' => 'select', 'options' => edd_get_pages(), 'chosen' => true, 'placeholder' => __('Select a page', 'easy-digital-downloads')), 'success_page' => array('id' => 'success_page', 'name' => __('Success Page', 'easy-digital-downloads'), 'desc' => __('This is the page buyers are sent to after completing their purchases. The [edd_receipt] short code should be on this page.', 'easy-digital-downloads'), 'type' => 'select', 'options' => edd_get_pages(), 'chosen' => true, 'placeholder' => __('Select a page', 'easy-digital-downloads')), 'failure_page' => array('id' => 'failure_page', 'name' => __('Failed Transaction Page', 'easy-digital-downloads'), 'desc' => __('This is the page buyers are sent to if their transaction is cancelled or fails', 'easy-digital-downloads'), 'type' => 'select', 'options' => edd_get_pages(), 'chosen' => true, 'placeholder' => __('Select a page', 'easy-digital-downloads')), 'purchase_history_page' => array('id' => 'purchase_history_page', 'name' => __('Purchase History Page', 'easy-digital-downloads'), 'desc' => __('This page shows a complete purchase history for the current user, including download links', 'easy-digital-downloads'), 'type' => 'select', 'options' => edd_get_pages(), 'chosen' => true, 'placeholder' => __('Select a page', 'easy-digital-downloads')), 'base_country' => array('id' => 'base_country', 'name' => __('Base Country', 'easy-digital-downloads'), 'desc' => __('Where does your store operate from?', 'easy-digital-downloads'), 'type' => 'select', 'options' => edd_get_country_list(), 'chosen' => true, 'placeholder' => __('Select a country', 'easy-digital-downloads')), 'base_state' => array('id' => 'base_state', 'name' => __('Base State / Province', 'easy-digital-downloads'), 'desc' => __('What state / province does your store operate from?', 'easy-digital-downloads'), 'type' => 'shop_states', 'chosen' => true, 'placeholder' => __('Select a state', 'easy-digital-downloads')), 'currency_settings' => array('id' => 'currency_settings', 'name' => '<strong>' . __('Currency Settings', 'easy-digital-downloads') . '</strong>', 'desc' => __('Configure the currency options', 'easy-digital-downloads'), 'type' => 'header'), 'currency' => array('id' => 'currency', 'name' => __('Currency', 'easy-digital-downloads'), 'desc' => __('Choose your currency. Note that some payment gateways have currency restrictions.', 'easy-digital-downloads'), 'type' => 'select', 'options' => edd_get_currencies(), 'chosen' => true), 'currency_position' => array('id' => 'currency_position', 'name' => __('Currency Position', 'easy-digital-downloads'), 'desc' => __('Choose the location of the currency sign.', 'easy-digital-downloads'), 'type' => 'select', 'options' => array('before' => __('Before - $10', 'easy-digital-downloads'), 'after' => __('After - 10$', 'easy-digital-downloads'))), 'thousands_separator' => array('id' => 'thousands_separator', 'name' => __('Thousands Separator', 'easy-digital-downloads'), 'desc' => __('The symbol (usually , or .) to separate thousands', 'easy-digital-downloads'), 'type' => 'text', 'size' => 'small', 'std' => ','), 'decimal_separator' => array('id' => 'decimal_separator', 'name' => __('Decimal Separator', 'easy-digital-downloads'), 'desc' => __('The symbol (usually , or .) to separate decimal points', 'easy-digital-downloads'), 'type' => 'text', 'size' => 'small', 'std' => '.'), 'api_settings' => array('id' => 'api_settings', 'name' => '<strong>' . __('API Settings', 'easy-digital-downloads') . '</strong>', 'desc' => '', 'type' => 'header'), 'api_allow_user_keys' => array('id' => 'api_allow_user_keys', 'name' => __('Allow User Keys', 'easy-digital-downloads'), 'desc' => __('Check this box to allow all users to generate API keys. Users with the \'manage_shop_settings\' capability are always allowed to generate keys.', 'easy-digital-downloads'), 'type' => 'checkbox'), 'tracking_settings' => array('id' => 'tracking_settings', 'name' => '<strong>' . __('Tracking Settings', 'easy-digital-downloads') . '</strong>', 'desc' => '', 'type' => 'header'), 'allow_tracking' => array('id' => 'allow_tracking', 'name' => __('Allow Usage Tracking?', 'easy-digital-downloads'), 'desc' => sprintf(__('Allow Easy Digital Downloads to anonymously track how this plugin is used and help us make the plugin better. Opt-in to tracking and our newsletter and immediately be emailed a 20&#37; discount to the EDD shop, valid towards the <a href="%s" target="_blank">purchase of extensions</a>. No sensitive data is tracked.', 'easy-digital-downloads'), 'https://easydigitaldownloads.com/extensions?utm_source=' . substr(md5(get_bloginfo('name')), 0, 10) . '&utm_medium=admin&utm_term=settings&utm_campaign=EDDUsageTracking'), 'type' => 'checkbox'), 'uninstall_on_delete' => array('id' => 'uninstall_on_delete', 'name' => __('Remove Data on Uninstall?', 'easy-digital-downloads'), 'desc' => __('Check this box if you would like EDD to completely remove all of its data when the plugin is deleted.', 'easy-digital-downloads'), 'type' => 'checkbox'))), 'gateways' => apply_filters('edd_settings_gateways', array('test_mode' => array('id' => 'test_mode', 'name' => __('Test Mode', 'easy-digital-downloads'), 'desc' => __('While in test mode no live transactions are processed. To fully use test mode, you must have a sandbox (test) account for the payment gateway you are testing.', 'easy-digital-downloads'), 'type' => 'checkbox'), 'gateways' => array('id' => 'gateways', 'name' => __('Payment Gateways', 'easy-digital-downloads'), 'desc' => __('Choose the payment gateways you want to enable.', 'easy-digital-downloads'), 'type' => 'gateways', 'options' => edd_get_payment_gateways()), 'default_gateway' => array('id' => 'default_gateway', 'name' => __('Default Gateway', 'easy-digital-downloads'), 'desc' => __('This gateway will be loaded automatically with the checkout page.', 'easy-digital-downloads'), 'type' => 'gateway_select', 'options' => edd_get_payment_gateways()), 'accepted_cards' => array('id' => 'accepted_cards', 'name' => __('Accepted Payment Method Icons', 'easy-digital-downloads'), 'desc' => __('Display icons for the selected payment methods', 'easy-digital-downloads') . '<br/>' . __('You will also need to configure your gateway settings if you are accepting credit cards', 'easy-digital-downloads'), 'type' => 'payment_icons', 'options' => apply_filters('edd_accepted_payment_icons', array('mastercard' => 'Mastercard', 'visa' => 'Visa', 'americanexpress' => 'American Express', 'discover' => 'Discover', 'paypal' => 'PayPal'))), 'paypal' => array('id' => 'paypal', 'name' => '<strong>' . __('PayPal Settings', 'easy-digital-downloads') . '</strong>', 'desc' => __('Configure the PayPal settings', 'easy-digital-downloads'), 'type' => 'header'), 'paypal_email' => array('id' => 'paypal_email', 'name' => __('PayPal Email', 'easy-digital-downloads'), 'desc' => __('Enter your PayPal account\'s email', 'easy-digital-downloads'), 'type' => 'text', 'size' => 'regular'), 'paypal_page_style' => array('id' => 'paypal_page_style', 'name' => __('PayPal Page Style', 'easy-digital-downloads'), 'desc' => __('Enter the name of the page style to use, or leave blank for default', 'easy-digital-downloads'), 'type' => 'text', 'size' => 'regular'), 'disable_paypal_verification' => array('id' => 'disable_paypal_verification', 'name' => __('Disable PayPal IPN Verification', 'easy-digital-downloads'), 'desc' => __('If payments are not getting marked as complete, then check this box. This forces the site to use a slightly less secure method of verifying purchases.', 'easy-digital-downloads'), 'type' => 'checkbox'))), 'emails' => apply_filters('edd_settings_emails', array('email_template' => array('id' => 'email_template', 'name' => __('Email Template', 'easy-digital-downloads'), 'desc' => __('Choose a template. Click "Save Changes" then "Preview Purchase Receipt" to see the new template.', 'easy-digital-downloads'), 'type' => 'select', 'options' => edd_get_email_templates()), 'email_logo' => array('id' => 'email_logo', 'name' => __('Logo', 'easy-digital-downloads'), 'desc' => __('Upload or choose a logo to be displayed at the top of the purchase receipt emails. Displayed on HTML emails only.', 'easy-digital-downloads'), 'type' => 'upload'), 'email_settings' => array('id' => 'email_settings', 'name' => '', 'desc' => '', 'type' => 'hook'), 'from_name' => array('id' => 'from_name', 'name' => __('From Name', 'easy-digital-downloads'), 'desc' => __('The name purchase receipts are said to come from. This should probably be your site or shop name.', 'easy-digital-downloads'), 'type' => 'text', 'std' => get_bloginfo('name')), 'from_email' => array('id' => 'from_email', 'name' => __('From Email', 'easy-digital-downloads'), 'desc' => __('Email to send purchase receipts from. This will act as the "from" and "reply-to" address.', 'easy-digital-downloads'), 'type' => 'text', 'std' => get_bloginfo('admin_email')), 'purchase_subject' => array('id' => 'purchase_subject', 'name' => __('Purchase Email Subject', 'easy-digital-downloads'), 'desc' => __('Enter the subject line for the purchase receipt email', 'easy-digital-downloads'), 'type' => 'text', 'std' => __('Purchase Receipt', 'easy-digital-downloads')), 'purchase_heading' => array('id' => 'purchase_heading', 'name' => __('Purchase Email Heading', 'easy-digital-downloads'), 'desc' => __('Enter the heading for the purchase receipt email', 'easy-digital-downloads'), 'type' => 'text', 'std' => __('Purchase Receipt', 'easy-digital-downloads')), 'purchase_receipt' => array('id' => 'purchase_receipt', 'name' => __('Purchase Receipt', 'easy-digital-downloads'), 'desc' => __('Enter the text that is sent as purchase receipt email to users after completion of a successful purchase. HTML is accepted. Available template tags:', 'easy-digital-downloads') . '<br/>' . edd_get_emails_tags_list(), 'type' => 'rich_editor', 'std' => __("Dear", "easy-digital-downloads") . " {name},\n\n" . __("Thank you for your purchase. Please click on the link(s) below to download your files.", "easy-digital-downloads") . "\n\n{download_list}\n\n{sitename}"), 'sale_notification_header' => array('id' => 'sale_notification_header', 'name' => '<strong>' . __('New Sale Notifications', 'easy-digital-downloads') . '</strong>', 'desc' => __('Configure new sale notification emails', 'easy-digital-downloads'), 'type' => 'header'), 'sale_notification_subject' => array('id' => 'sale_notification_subject', 'name' => __('Sale Notification Subject', 'easy-digital-downloads'), 'desc' => __('Enter the subject line for the sale notification email', 'easy-digital-downloads'), 'type' => 'text', 'std' => 'New download purchase - Order #{payment_id}'), 'sale_notification' => array('id' => 'sale_notification', 'name' => __('Sale Notification', 'easy-digital-downloads'), 'desc' => __('Enter the text that is sent as sale notification email after completion of a purchase. HTML is accepted. Available template tags:', 'easy-digital-downloads') . '<br/>' . edd_get_emails_tags_list(), 'type' => 'rich_editor', 'std' => edd_get_default_sale_notification_email()), 'admin_notice_emails' => array('id' => 'admin_notice_emails', 'name' => __('Sale Notification Emails', 'easy-digital-downloads'), 'desc' => __('Enter the email address(es) that should receive a notification anytime a sale is made, one per line', 'easy-digital-downloads'), 'type' => 'textarea', 'std' => get_bloginfo('admin_email')), 'disable_admin_notices' => array('id' => 'disable_admin_notices', 'name' => __('Disable Admin Notifications', 'easy-digital-downloads'), 'desc' => __('Check this box if you do not want to receive emails when new sales are made.', 'easy-digital-downloads'), 'type' => 'checkbox'))), 'styles' => apply_filters('edd_settings_styles', array('disable_styles' => array('id' => 'disable_styles', 'name' => __('Disable Styles', 'easy-digital-downloads'), 'desc' => __('Check this to disable all included styling of buttons, checkout fields, and all other elements.', 'easy-digital-downloads'), 'type' => 'checkbox'), 'button_header' => array('id' => 'button_header', 'name' => '<strong>' . __('Buttons', 'easy-digital-downloads') . '</strong>', 'desc' => __('Options for add to cart and purchase buttons', 'easy-digital-downloads'), 'type' => 'header'), 'button_style' => array('id' => 'button_style', 'name' => __('Default Button Style', 'easy-digital-downloads'), 'desc' => __('Choose the style you want to use for the buttons.', 'easy-digital-downloads'), 'type' => 'select', 'options' => edd_get_button_styles()), 'checkout_color' => array('id' => 'checkout_color', 'name' => __('Default Button Color', 'easy-digital-downloads'), 'desc' => __('Choose the color you want to use for the buttons.', 'easy-digital-downloads'), 'type' => 'color_select', 'options' => edd_get_button_colors()))), 'taxes' => apply_filters('edd_settings_taxes', array('enable_taxes' => array('id' => 'enable_taxes', 'name' => __('Enable Taxes', 'easy-digital-downloads'), 'desc' => __('Check this to enable taxes on purchases.', 'easy-digital-downloads'), 'type' => 'checkbox'), 'tax_rates' => array('id' => 'tax_rates', 'name' => '<strong>' . __('Tax Rates', 'easy-digital-downloads') . '</strong>', 'desc' => __('Enter tax rates for specific regions.', 'easy-digital-downloads'), 'type' => 'tax_rates'), 'tax_rate' => array('id' => 'tax_rate', 'name' => __('Fallback Tax Rate', 'easy-digital-downloads'), 'desc' => __('Enter a percentage, such as 6.5. Customers not in a specific rate will be charged this rate.', 'easy-digital-downloads'), 'type' => 'text', 'size' => 'small'), 'prices_include_tax' => array('id' => 'prices_include_tax', 'name' => __('Prices entered with tax', 'easy-digital-downloads'), 'desc' => __('This option affects how you enter prices.', 'easy-digital-downloads'), 'type' => 'radio', 'std' => 'no', 'options' => array('yes' => __('Yes, I will enter prices inclusive of tax', 'easy-digital-downloads'), 'no' => __('No, I will enter prices exclusive of tax', 'easy-digital-downloads'))), 'display_tax_rate' => array('id' => 'display_tax_rate', 'name' => __('Display Tax Rate on Prices', 'easy-digital-downloads'), 'desc' => __('Some countries require a notice when product prices include tax.', 'easy-digital-downloads'), 'type' => 'checkbox'), 'checkout_include_tax' => array('id' => 'checkout_include_tax', 'name' => __('Display during checkout', 'easy-digital-downloads'), 'desc' => __('Should prices on the checkout page be shown with or without tax?', 'easy-digital-downloads'), 'type' => 'select', 'std' => 'no', 'options' => array('yes' => __('Including tax', 'easy-digital-downloads'), 'no' => __('Excluding tax', 'easy-digital-downloads'))))), 'extensions' => apply_filters('edd_settings_extensions', array()), 'licenses' => apply_filters('edd_settings_licenses', array()), 'misc' => apply_filters('edd_settings_misc', array('enable_ajax_cart' => array('id' => 'enable_ajax_cart', 'name' => __('Enable Ajax', 'easy-digital-downloads'), 'desc' => __('Check this to enable AJAX for the shopping cart.', 'easy-digital-downloads'), 'type' => 'checkbox', 'std' => '1'), 'redirect_on_add' => array('id' => 'redirect_on_add', 'name' => __('Redirect to Checkout', 'easy-digital-downloads'), 'desc' => __('Immediately redirect to checkout after adding an item to the cart?', 'easy-digital-downloads'), 'type' => 'checkbox'), 'enforce_ssl' => array('id' => 'enforce_ssl', 'name' => __('Enforce SSL on Checkout', 'easy-digital-downloads'), 'desc' => __('Check this to force users to be redirected to the secure checkout page. You must have an SSL certificate installed to use this option.', 'easy-digital-downloads'), 'type' => 'checkbox'), 'logged_in_only' => array('id' => 'logged_in_only', 'name' => __('Disable Guest Checkout', 'easy-digital-downloads'), 'desc' => __('Require that users be logged-in to purchase files.', 'easy-digital-downloads'), 'type' => 'checkbox'), 'show_register_form' => array('id' => 'show_register_form', 'name' => __('Show Register / Login Form?', 'easy-digital-downloads'), 'desc' => __('Display the registration and login forms on the checkout page for non-logged-in users.', 'easy-digital-downloads'), 'type' => 'select', 'std' => 'none', 'options' => array('both' => __('Registration and Login Forms', 'easy-digital-downloads'), 'registration' => __('Registration Form Only', 'easy-digital-downloads'), 'login' => __('Login Form Only', 'easy-digital-downloads'), 'none' => __('None', 'easy-digital-downloads'))), 'item_quantities' => array('id' => 'item_quantities', 'name' => __('Item Quantities', 'easy-digital-downloads'), 'desc' => __('Allow item quantities to be changed.', 'easy-digital-downloads'), 'type' => 'checkbox'), 'allow_multiple_discounts' => array('id' => 'allow_multiple_discounts', 'name' => __('Multiple Discounts', 'easy-digital-downloads'), 'desc' => __('Allow customers to use multiple discounts on the same purchase?', 'easy-digital-downloads'), 'type' => 'checkbox'), 'enable_cart_saving' => array('id' => 'enable_cart_saving', 'name' => __('Enable Cart Saving', 'easy-digital-downloads'), 'desc' => __('Check this to enable cart saving on the checkout.', 'easy-digital-downloads'), 'type' => 'checkbox'), 'field_downloads' => array('id' => 'field_downloads', 'name' => '<strong>' . __('File Downloads', 'easy-digital-downloads') . '</strong>', 'desc' => '', 'type' => 'header'), 'download_method' => array('id' => 'download_method', 'name' => __('Download Method', 'easy-digital-downloads'), 'desc' => sprintf(__('Select the file download method. Note, not all methods work on all servers.', 'easy-digital-downloads'), edd_get_label_singular()), 'type' => 'select', 'options' => array('direct' => __('Forced', 'easy-digital-downloads'), 'redirect' => __('Redirect', 'easy-digital-downloads'))), 'symlink_file_downloads' => array('id' => 'symlink_file_downloads', 'name' => __('Symlink File Downloads?', 'easy-digital-downloads'), 'desc' => __('Check this if you are delivering really large files or having problems with file downloads completing.', 'easy-digital-downloads'), 'type' => 'checkbox'), 'file_download_limit' => array('id' => 'file_download_limit', 'name' => __('File Download Limit', 'easy-digital-downloads'), 'desc' => sprintf(__('The maximum number of times files can be downloaded for purchases. Can be overwritten for each %s.', 'easy-digital-downloads'), edd_get_label_singular()), 'type' => 'number', 'size' => 'small'), 'download_link_expiration' => array('id' => 'download_link_expiration', 'name' => __('Download Link Expiration', 'easy-digital-downloads'), 'desc' => __('How long should download links be valid for? Default is 24 hours from the time they are generated. Enter a time in hours.', 'easy-digital-downloads'), 'type' => 'number', 'size' => 'small', 'std' => '24', 'min' => '0'), 'disable_redownload' => array('id' => 'disable_redownload', 'name' => __('Disable Redownload?', 'easy-digital-downloads'), 'desc' => __('Check this if you do not want to allow users to redownload items from their purchase history.', 'easy-digital-downloads'), 'type' => 'checkbox'), 'accounting_settings' => array('id' => 'accounting_settings', 'name' => '<strong>' . __('Accounting Settings', 'easy-digital-downloads') . '</strong>', 'desc' => '', 'type' => 'header'), 'enable_skus' => array('id' => 'enable_skus', 'name' => __('Enable SKU Entry', 'easy-digital-downloads'), 'desc' => __('Check this box to allow entry of product SKUs. SKUs will be shown on purchase receipt and exported purchase histories.', 'easy-digital-downloads'), 'type' => 'checkbox'), 'enable_sequential' => array('id' => 'enable_sequential', 'name' => __('Sequential Order Numbers', 'easy-digital-downloads'), 'desc' => __('Check this box to enable sequential order numbers.', 'easy-digital-downloads'), 'type' => 'checkbox'), 'sequential_start' => array('id' => 'sequential_start', 'name' => __('Sequential Starting Number', 'easy-digital-downloads'), 'desc' => __('The number that sequential order numbers should start at.', 'easy-digital-downloads'), 'type' => 'number', 'size' => 'small', 'std' => '1'), 'sequential_prefix' => array('id' => 'sequential_prefix', 'name' => __('Sequential Number Prefix', 'easy-digital-downloads'), 'desc' => __('A prefix to prepend to all sequential order numbers.', 'easy-digital-downloads'), 'type' => 'text'), 'sequential_postfix' => array('id' => 'sequential_postfix', 'name' => __('Sequential Number Postfix', 'easy-digital-downloads'), 'desc' => __('A postfix to append to all sequential order numbers.', 'easy-digital-downloads'), 'type' => 'text'), 'terms' => array('id' => 'terms', 'name' => '<strong>' . __('Terms of Agreement', 'easy-digital-downloads') . '</strong>', 'desc' => '', 'type' => 'header'), 'show_agree_to_terms' => array('id' => 'show_agree_to_terms', 'name' => __('Agree to Terms', 'easy-digital-downloads'), 'desc' => __('Check this to show an agree to terms on the checkout that users must agree to before purchasing.', 'easy-digital-downloads'), 'type' => 'checkbox'), 'agree_label' => array('id' => 'agree_label', 'name' => __('Agree to Terms Label', 'easy-digital-downloads'), 'desc' => __('Label shown next to the agree to terms check box.', 'easy-digital-downloads'), 'type' => 'text', 'size' => 'regular'), 'agree_text' => array('id' => 'agree_text', 'name' => __('Agreement Text', 'easy-digital-downloads'), 'desc' => __('If Agree to Terms is checked, enter the agreement terms here.', 'easy-digital-downloads'), 'type' => 'rich_editor'), 'checkout_label' => array('id' => 'checkout_label', 'name' => __('Complete Purchase Text', 'easy-digital-downloads'), 'desc' => __('The button label for completing a purchase.', 'easy-digital-downloads'), 'type' => 'text', 'std' => __('Purchase', 'easy-digital-downloads')), 'add_to_cart_text' => array('id' => 'add_to_cart_text', 'name' => __('Add to Cart Text', 'easy-digital-downloads'), 'desc' => __('Text shown on the Add to Cart Buttons.', 'easy-digital-downloads'), 'type' => 'text', 'std' => __('Add to Cart', 'easy-digital-downloads')), 'buy_now_text' => array('id' => 'buy_now_text', 'name' => __('Buy Now Text', 'easy-digital-downloads'), 'desc' => __('Text shown on the Buy Now Buttons.', 'easy-digital-downloads'), 'type' => 'text', 'std' => __('Buy Now', 'easy-digital-downloads')))));
    return apply_filters('edd_registered_settings', $edd_settings);
}
/**
 * Retrieve the array of plugin settings
 *
 * @since 1.8
 * @return array
*/
function edd_get_registered_settings()
{
    /**
     * 'Whitelisted' EDD settings, filters are provided for each settings
     * section to allow extensions and other plugins to add their own settings
     */
    $edd_settings = array('general' => apply_filters('edd_settings_general', array('main' => array('page_settings' => array('id' => 'page_settings', 'name' => '<h3>' . __('Page Settings', 'easy-digital-downloads') . '</h3>', 'desc' => '', 'type' => 'header', 'tooltip_title' => __('Page Settings', 'easy-digital-downloads'), 'tooltip_desc' => __('Easy Digital Downloads uses the pages below for handling the display of checkout, purchase confirmation, purchase history, and purchase failures. If pages are deleted or removed in some way, they can be recreated manually from the Pages menu. When re-creating the pages, enter the shortcode shown in the page content area.', 'easy-digital-downloads')), 'purchase_page' => array('id' => 'purchase_page', 'name' => __('Checkout Page', 'easy-digital-downloads'), 'desc' => __('This is the checkout page where buyers will complete their purchases. The [download_checkout] shortcode must be on this page.', 'easy-digital-downloads'), 'type' => 'select', 'options' => edd_get_pages(), 'chosen' => true, 'placeholder' => __('Select a page', 'easy-digital-downloads')), 'success_page' => array('id' => 'success_page', 'name' => __('Success Page', 'easy-digital-downloads'), 'desc' => __('This is the page buyers are sent to after completing their purchases. The [edd_receipt] shortcode should be on this page.', 'easy-digital-downloads'), 'type' => 'select', 'options' => edd_get_pages(), 'chosen' => true, 'placeholder' => __('Select a page', 'easy-digital-downloads')), 'failure_page' => array('id' => 'failure_page', 'name' => __('Failed Transaction Page', 'easy-digital-downloads'), 'desc' => __('This is the page buyers are sent to if their transaction is cancelled or fails.', 'easy-digital-downloads'), 'type' => 'select', 'options' => edd_get_pages(), 'chosen' => true, 'placeholder' => __('Select a page', 'easy-digital-downloads')), 'purchase_history_page' => array('id' => 'purchase_history_page', 'name' => __('Purchase History Page', 'easy-digital-downloads'), 'desc' => __('This page shows a complete purchase history for the current user, including download links. The [purchase_history] shortcode should be on this page.', 'easy-digital-downloads'), 'type' => 'select', 'options' => edd_get_pages(), 'chosen' => true, 'placeholder' => __('Select a page', 'easy-digital-downloads')), 'login_redirect_page' => array('id' => 'login_redirect_page', 'name' => __('Login Redirect Page', 'easy-digital-downloads'), 'desc' => sprintf(__('This is the page where buyers will be redirected by default once they log in. The [edd_login redirect="%s"] shortcode with the redirect attribute can override this setting.', 'easy-digital-downloads'), trailingslashit(home_url())), 'type' => 'select', 'options' => edd_get_pages(), 'chosen' => true, 'placeholder' => __('Select a page', 'easy-digital-downloads')), 'locale_settings' => array('id' => 'locale_settings', 'name' => '<h3>' . __('Store Location', 'easy-digital-downloads') . '</h3>', 'desc' => '', 'type' => 'header', 'tooltip_title' => __('Store Location Settings', 'easy-digital-downloads'), 'tooltip_desc' => __('Easy Digital Downloads will use the following Country and State to pre-fill fields at checkout. This will also pre-calculate any taxes defined if the location below has taxes enabled.', 'easy-digital-downloads')), 'base_country' => array('id' => 'base_country', 'name' => __('Base Country', 'easy-digital-downloads'), 'desc' => __('Where does your store operate from?', 'easy-digital-downloads'), 'type' => 'select', 'options' => edd_get_country_list(), 'chosen' => true, 'placeholder' => __('Select a country', 'easy-digital-downloads')), 'base_state' => array('id' => 'base_state', 'name' => __('Base State / Province', 'easy-digital-downloads'), 'desc' => __('What state / province does your store operate from?', 'easy-digital-downloads'), 'type' => 'shop_states', 'chosen' => true, 'placeholder' => __('Select a state', 'easy-digital-downloads')), 'tracking_settings' => array('id' => 'tracking_settings', 'name' => '<h3>' . __('Tracking Settings', 'easy-digital-downloads') . '</h3>', 'desc' => '', 'type' => 'header'), 'allow_tracking' => array('id' => 'allow_tracking', 'name' => __('Allow Usage Tracking?', 'easy-digital-downloads'), 'desc' => sprintf(__('Allow Easy Digital Downloads to anonymously track how this plugin is used and help us make the plugin better. Opt-in to tracking and our newsletter and immediately be emailed a 20&#37; discount to the EDD shop, valid towards the <a href="%s" target="_blank">purchase of extensions</a>. No sensitive data is tracked.', 'easy-digital-downloads'), 'https://easydigitaldownloads.com/downloads/?utm_source=' . substr(md5(get_bloginfo('name')), 0, 10) . '&utm_medium=admin&utm_term=settings&utm_campaign=EDDUsageTracking'), 'type' => 'checkbox')), 'currency' => array('currency_settings' => array('id' => 'currency_settings', 'name' => '<h3>' . __('Currency Settings', 'easy-digital-downloads') . '</h3>', 'desc' => '', 'type' => 'header'), 'currency' => array('id' => 'currency', 'name' => __('Currency', 'easy-digital-downloads'), 'desc' => __('Choose your currency. Note that some payment gateways have currency restrictions.', 'easy-digital-downloads'), 'type' => 'select', 'options' => edd_get_currencies(), 'chosen' => true), 'currency_position' => array('id' => 'currency_position', 'name' => __('Currency Position', 'easy-digital-downloads'), 'desc' => __('Choose the location of the currency sign.', 'easy-digital-downloads'), 'type' => 'select', 'options' => array('before' => __('Before - $10', 'easy-digital-downloads'), 'after' => __('After - 10$', 'easy-digital-downloads'))), 'thousands_separator' => array('id' => 'thousands_separator', 'name' => __('Thousands Separator', 'easy-digital-downloads'), 'desc' => __('The symbol (usually , or .) to separate thousands', 'easy-digital-downloads'), 'type' => 'text', 'size' => 'small', 'std' => ','), 'decimal_separator' => array('id' => 'decimal_separator', 'name' => __('Decimal Separator', 'easy-digital-downloads'), 'desc' => __('The symbol (usually , or .) to separate decimal points', 'easy-digital-downloads'), 'type' => 'text', 'size' => 'small', 'std' => '.')), 'api' => array('api_settings' => array('id' => 'api_settings', 'name' => '<h3>' . __('API Settings', 'easy-digital-downloads') . '</h3>', 'desc' => '', 'type' => 'header', 'tooltip_title' => __('API Settings', 'easy-digital-downloads'), 'tooltip_desc' => __('The Easy Digital Downloads REST API provides access to store data through our API endpoints. Enable this setting if you would like all user accounts to be able to generate their own API keys.', 'easy-digital-downloads')), 'api_allow_user_keys' => array('id' => 'api_allow_user_keys', 'name' => __('Allow User Keys', 'easy-digital-downloads'), 'desc' => __('Check this box to allow all users to generate API keys. Users with the \'manage_shop_settings\' capability are always allowed to generate keys.', 'easy-digital-downloads'), 'type' => 'checkbox'), 'api_help' => array('id' => 'api_help', 'desc' => sprintf(__('Visit the <a href="%s" target="_blank">REST API documentation</a> for further information.', 'easy-digital-downloads'), 'http://docs.easydigitaldownloads.com/article/1131-edd-rest-api-introduction'), 'type' => 'descriptive_text')))), 'gateways' => apply_filters('edd_settings_gateways', array('main' => array('gateway_settings' => array('id' => 'api_header', 'name' => '<h3>' . __('Gateway Settings', 'easy-digital-downloads') . '</h3>', 'desc' => '', 'type' => 'header'), 'test_mode' => array('id' => 'test_mode', 'name' => __('Test Mode', 'easy-digital-downloads'), 'desc' => __('While in test mode no live transactions are processed. To fully use test mode, you must have a sandbox (test) account for the payment gateway you are testing.', 'easy-digital-downloads'), 'type' => 'checkbox'), 'gateways' => array('id' => 'gateways', 'name' => __('Payment Gateways', 'easy-digital-downloads'), 'desc' => __('Choose the payment gateways you want to enable.', 'easy-digital-downloads'), 'type' => 'gateways', 'options' => edd_get_payment_gateways()), 'default_gateway' => array('id' => 'default_gateway', 'name' => __('Default Gateway', 'easy-digital-downloads'), 'desc' => __('This gateway will be loaded automatically with the checkout page.', 'easy-digital-downloads'), 'type' => 'gateway_select', 'options' => edd_get_payment_gateways()), 'accepted_cards' => array('id' => 'accepted_cards', 'name' => __('Accepted Payment Method Icons', 'easy-digital-downloads'), 'desc' => __('Display icons for the selected payment methods', 'easy-digital-downloads') . '<br/>' . __('You will also need to configure your gateway settings if you are accepting credit cards', 'easy-digital-downloads'), 'type' => 'payment_icons', 'options' => apply_filters('edd_accepted_payment_icons', array('mastercard' => 'Mastercard', 'visa' => 'Visa', 'americanexpress' => 'American Express', 'discover' => 'Discover', 'paypal' => 'PayPal')))))), 'emails' => apply_filters('edd_settings_emails', array('main' => array('email_settings_header' => array('id' => 'email_settings_header', 'name' => '<h3>' . __('Email Settings', 'easy-digital-downloads') . '</h3>', 'type' => 'header'), 'email_template' => array('id' => 'email_template', 'name' => __('Email Template', 'easy-digital-downloads'), 'desc' => __('Choose a template. Click "Save Changes" then "Preview Purchase Receipt" to see the new template.', 'easy-digital-downloads'), 'type' => 'select', 'options' => edd_get_email_templates()), 'email_logo' => array('id' => 'email_logo', 'name' => __('Logo', 'easy-digital-downloads'), 'desc' => __('Upload or choose a logo to be displayed at the top of the purchase receipt emails. Displayed on HTML emails only.', 'easy-digital-downloads'), 'type' => 'upload'), 'email_settings' => array('id' => 'email_settings', 'name' => '', 'desc' => '', 'type' => 'hook')), 'purchase_receipts' => array('purchase_receipt_settings' => array('id' => 'purchase_receipt_settings', 'name' => '<h3>' . __('Purchase Receipts', 'easy-digital-downloads') . '</h3>', 'type' => 'header'), 'from_name' => array('id' => 'from_name', 'name' => __('From Name', 'easy-digital-downloads'), 'desc' => __('The name purchase receipts are said to come from. This should probably be your site or shop name.', 'easy-digital-downloads'), 'type' => 'text', 'std' => get_bloginfo('name')), 'from_email' => array('id' => 'from_email', 'name' => __('From Email', 'easy-digital-downloads'), 'desc' => __('Email to send purchase receipts from. This will act as the "from" and "reply-to" address.', 'easy-digital-downloads'), 'type' => 'text', 'std' => get_bloginfo('admin_email')), 'purchase_subject' => array('id' => 'purchase_subject', 'name' => __('Purchase Email Subject', 'easy-digital-downloads'), 'desc' => __('Enter the subject line for the purchase receipt email', 'easy-digital-downloads'), 'type' => 'text', 'std' => __('Purchase Receipt', 'easy-digital-downloads')), 'purchase_heading' => array('id' => 'purchase_heading', 'name' => __('Purchase Email Heading', 'easy-digital-downloads'), 'desc' => __('Enter the heading for the purchase receipt email', 'easy-digital-downloads'), 'type' => 'text', 'std' => __('Purchase Receipt', 'easy-digital-downloads')), 'purchase_receipt' => array('id' => 'purchase_receipt', 'name' => __('Purchase Receipt', 'easy-digital-downloads'), 'desc' => __('Enter the text that is sent as purchase receipt email to users after completion of a successful purchase. HTML is accepted. Available template tags:', 'easy-digital-downloads') . '<br/>' . edd_get_emails_tags_list(), 'type' => 'rich_editor', 'std' => __("Dear", "easy-digital-downloads") . " {name},\n\n" . __("Thank you for your purchase. Please click on the link(s) below to download your files.", "easy-digital-downloads") . "\n\n{download_list}\n\n{sitename}")), 'sale_notifications' => array('sale_notification_settings' => array('id' => 'sale_notification_settings', 'name' => '<h3>' . __('Sale Notifications', 'easy-digital-downloads') . '</h3>', 'type' => 'header'), 'sale_notification_subject' => array('id' => 'sale_notification_subject', 'name' => __('Sale Notification Subject', 'easy-digital-downloads'), 'desc' => __('Enter the subject line for the sale notification email', 'easy-digital-downloads'), 'type' => 'text', 'std' => 'New download purchase - Order #{payment_id}'), 'sale_notification' => array('id' => 'sale_notification', 'name' => __('Sale Notification', 'easy-digital-downloads'), 'desc' => __('Enter the text that is sent as sale notification email after completion of a purchase. HTML is accepted. Available template tags:', 'easy-digital-downloads') . '<br/>' . edd_get_emails_tags_list(), 'type' => 'rich_editor', 'std' => edd_get_default_sale_notification_email()), 'admin_notice_emails' => array('id' => 'admin_notice_emails', 'name' => __('Sale Notification Emails', 'easy-digital-downloads'), 'desc' => __('Enter the email address(es) that should receive a notification anytime a sale is made, one per line', 'easy-digital-downloads'), 'type' => 'textarea', 'std' => get_bloginfo('admin_email')), 'disable_admin_notices' => array('id' => 'disable_admin_notices', 'name' => __('Disable Admin Notifications', 'easy-digital-downloads'), 'desc' => __('Check this box if you do not want to receive sales notification emails.', 'easy-digital-downloads'), 'type' => 'checkbox')))), 'styles' => apply_filters('edd_settings_styles', array('main' => array('style_settings' => array('id' => 'style_settings', 'name' => '<h3>' . __('Style Settings', 'easy-digital-downloads') . '</h3>', 'type' => 'header'), 'disable_styles' => array('id' => 'disable_styles', 'name' => __('Disable Styles', 'easy-digital-downloads'), 'desc' => __('Check this to disable all included styling of buttons, checkout fields, and all other elements.', 'easy-digital-downloads'), 'type' => 'checkbox', 'tooltip_title' => __('Disabling Styles', 'easy-digital-downloads'), 'tooltip_desc' => __('If your theme has a complete custom CSS file for Easy Digital Downloads, you may wish to disable our default styles. This is not recommended unless your sure your theme has a complete custom CSS.', 'easy-digital-downloads')), 'button_header' => array('id' => 'button_header', 'name' => '<strong>' . __('Buttons', 'easy-digital-downloads') . '</strong>', 'desc' => __('Options for add to cart and purchase buttons', 'easy-digital-downloads'), 'type' => 'header'), 'button_style' => array('id' => 'button_style', 'name' => __('Default Button Style', 'easy-digital-downloads'), 'desc' => __('Choose the style you want to use for the buttons.', 'easy-digital-downloads'), 'type' => 'select', 'options' => edd_get_button_styles()), 'checkout_color' => array('id' => 'checkout_color', 'name' => __('Default Button Color', 'easy-digital-downloads'), 'desc' => __('Choose the color you want to use for the buttons.', 'easy-digital-downloads'), 'type' => 'color_select', 'options' => edd_get_button_colors())))), 'taxes' => apply_filters('edd_settings_taxes', array('main' => array('tax_settings' => array('id' => 'tax_settings', 'name' => '<h3>' . __('Tax Settings', 'easy-digital-downloads') . '</h3>', 'type' => 'header'), 'tax_help' => array('id' => 'tax_help', 'name' => __('Need help?', 'easy-digital-downloads'), 'desc' => sprintf(__('Visit the <a href="%s" target="_blank">Tax setup documentation</a> for further information. If you need VAT support, there are options listed on the documentation page.', 'easy-digital-downloads'), 'http://docs.easydigitaldownloads.com/article/238-tax-settings'), 'type' => 'descriptive_text'), 'enable_taxes' => array('id' => 'enable_taxes', 'name' => __('Enable Taxes', 'easy-digital-downloads'), 'desc' => __('Check this to enable taxes on purchases.', 'easy-digital-downloads'), 'type' => 'checkbox', 'tooltip_title' => __('Enabling Taxes', 'easy-digital-downloads'), 'tooltip_desc' => __('With taxes enabled, Easy Digital Downloads will use the rules below to charge tax to customers. With taxes enabled, customers are required to input their address on checkout so that taxes can be properly calculated.', 'easy-digital-downloads')), 'tax_rates' => array('id' => 'tax_rates', 'name' => '<strong>' . __('Tax Rates', 'easy-digital-downloads') . '</strong>', 'desc' => __('Enter tax rates for specific regions.', 'easy-digital-downloads'), 'type' => 'tax_rates'), 'tax_rate' => array('id' => 'tax_rate', 'name' => __('Fallback Tax Rate', 'easy-digital-downloads'), 'desc' => __('Enter a percentage, such as 6.5. Customers not in a specific rate will be charged this rate.', 'easy-digital-downloads'), 'type' => 'text', 'size' => 'small', 'tooltip_title' => __('Fallback Tax Rate', 'easy-digital-downloads'), 'tooltip_desc' => __('If the customer\'s address fails to meet the above tax rules, you can define a `default` tax rate to be applied to all other customers.', 'easy-digital-downloads')), 'prices_include_tax' => array('id' => 'prices_include_tax', 'name' => __('Prices entered with tax', 'easy-digital-downloads'), 'desc' => __('This option affects how you enter prices.', 'easy-digital-downloads'), 'type' => 'radio', 'std' => 'no', 'options' => array('yes' => __('Yes, I will enter prices inclusive of tax', 'easy-digital-downloads'), 'no' => __('No, I will enter prices exclusive of tax', 'easy-digital-downloads')), 'tooltip_title' => __('Prices Inclusive of Tax', 'easy-digital-downloads'), 'tooltip_desc' => __('When using prices inclusive of tax, you will be entering your prices as the total amount you want a customer to pay for the download, including tax. Easy Digital Downloads will calculate the proper amount to tax the customer for the defined total price.', 'easy-digital-downloads')), 'display_tax_rate' => array('id' => 'display_tax_rate', 'name' => __('Display Tax Rate on Prices', 'easy-digital-downloads'), 'desc' => __('Some countries require a notice when product prices include tax.', 'easy-digital-downloads'), 'type' => 'checkbox'), 'checkout_include_tax' => array('id' => 'checkout_include_tax', 'name' => __('Display during checkout', 'easy-digital-downloads'), 'desc' => __('Should prices on the checkout page be shown with or without tax?', 'easy-digital-downloads'), 'type' => 'select', 'std' => 'no', 'options' => array('yes' => __('Including tax', 'easy-digital-downloads'), 'no' => __('Excluding tax', 'easy-digital-downloads')), 'tooltip_title' => __('Taxes Displayed for Products on Checkout', 'easy-digital-downloads'), 'tooltip_desc' => __('This option will determine whether the product price displays with or without tax on checkout.', 'easy-digital-downloads'))))), 'extensions' => apply_filters('edd_settings_extensions', array()), 'licenses' => apply_filters('edd_settings_licenses', array()), 'misc' => apply_filters('edd_settings_misc', array('main' => array('misc_settings' => array('id' => 'misc_settings', 'name' => '<h3>' . __('Misc Settings', 'easy-digital-downloads') . '</h3>', 'type' => 'header'), 'enable_ajax_cart' => array('id' => 'enable_ajax_cart', 'name' => __('Enable AJAX', 'easy-digital-downloads'), 'desc' => __('Check this to enable AJAX for the shopping cart.', 'easy-digital-downloads'), 'type' => 'checkbox', 'std' => '1', 'tooltip_title' => __('Enabling AJAX', 'easy-digital-downloads'), 'tooltip_desc' => __('With AJAX enabled, customers can perform cart actions like adding and removing items from their shopping cart without pages having to be reloaded. This also creates fewer steps during the checkout process.', 'easy-digital-downloads')), 'redirect_on_add' => array('id' => 'redirect_on_add', 'name' => __('Redirect to Checkout', 'easy-digital-downloads'), 'desc' => __('Immediately redirect to checkout after adding an item to the cart?', 'easy-digital-downloads'), 'type' => 'checkbox', 'tooltip_title' => __('Redirect to Checkout', 'easy-digital-downloads'), 'tooltip_desc' => __('When enabled, once an item has been added to the cart, the customer will be redirected directly to your checkout page. This is useful for stores that sell single items.', 'easy-digital-downloads')), 'item_quantities' => array('id' => 'item_quantities', 'name' => __('Item Quantities', 'easy-digital-downloads'), 'desc' => __('Allow item quantities to be changed.', 'easy-digital-downloads'), 'type' => 'checkbox'), 'uninstall_on_delete' => array('id' => 'uninstall_on_delete', 'name' => __('Remove Data on Uninstall?', 'easy-digital-downloads'), 'desc' => __('Check this box if you would like EDD to completely remove all of its data when the plugin is deleted.', 'easy-digital-downloads'), 'type' => 'checkbox')), 'checkout' => array('checkout_settings' => array('id' => 'checkout_settings', 'name' => '<h3>' . __('Checkout Settings', 'easy-digital-downloads') . '</h3>', 'type' => 'header'), 'enforce_ssl' => array('id' => 'enforce_ssl', 'name' => __('Enforce SSL on Checkout', 'easy-digital-downloads'), 'desc' => __('Check this to force users to be redirected to the secure checkout page. You must have an SSL certificate installed to use this option.', 'easy-digital-downloads'), 'type' => 'checkbox'), 'logged_in_only' => array('id' => 'logged_in_only', 'name' => __('Require Login', 'easy-digital-downloads'), 'desc' => __('Require that users be logged-in to purchase files.', 'easy-digital-downloads'), 'type' => 'checkbox', 'tooltip_title' => __('Require Login', 'easy-digital-downloads'), 'tooltip_desc' => __('You can require that customers create and login to user accounts prior to purchasing from your store by enabling this option. When unchecked, users can purchase without being logged in by using their name and email address.', 'easy-digital-downloads')), 'show_register_form' => array('id' => 'show_register_form', 'name' => __('Show Register / Login Form?', 'easy-digital-downloads'), 'desc' => __('Display the registration and login forms on the checkout page for non-logged-in users.', 'easy-digital-downloads'), 'type' => 'select', 'std' => 'none', 'options' => array('both' => __('Registration and Login Forms', 'easy-digital-downloads'), 'registration' => __('Registration Form Only', 'easy-digital-downloads'), 'login' => __('Login Form Only', 'easy-digital-downloads'), 'none' => __('None', 'easy-digital-downloads'))), 'allow_multiple_discounts' => array('id' => 'allow_multiple_discounts', 'name' => __('Multiple Discounts', 'easy-digital-downloads'), 'desc' => __('Allow customers to use multiple discounts on the same purchase?', 'easy-digital-downloads'), 'type' => 'checkbox'), 'enable_cart_saving' => array('id' => 'enable_cart_saving', 'name' => __('Enable Cart Saving', 'easy-digital-downloads'), 'desc' => __('Check this to enable cart saving on the checkout.', 'easy-digital-downloads'), 'type' => 'checkbox', 'tooltip_title' => __('Cart Saving', 'easy-digital-downloads'), 'tooltip_desc' => __('Cart saving allows shoppers to create a temporary link to their current shopping cart so they can come back to it later, or share it with someone.', 'easy-digital-downloads'))), 'button_text' => array('button_settings' => array('id' => 'button_settings', 'name' => '<h3>' . __('Button Text', 'easy-digital-downloads') . '</h3>', 'type' => 'header'), 'checkout_label' => array('id' => 'checkout_label', 'name' => __('Complete Purchase Text', 'easy-digital-downloads'), 'desc' => __('The button label for completing a purchase.', 'easy-digital-downloads'), 'type' => 'text', 'std' => __('Purchase', 'easy-digital-downloads')), 'add_to_cart_text' => array('id' => 'add_to_cart_text', 'name' => __('Add to Cart Text', 'easy-digital-downloads'), 'desc' => __('Text shown on the Add to Cart Buttons.', 'easy-digital-downloads'), 'type' => 'text', 'std' => __('Add to Cart', 'easy-digital-downloads')), 'buy_now_text' => array('id' => 'buy_now_text', 'name' => __('Buy Now Text', 'easy-digital-downloads'), 'desc' => __('Text shown on the Buy Now Buttons.', 'easy-digital-downloads'), 'type' => 'text', 'std' => __('Buy Now', 'easy-digital-downloads'))), 'file_downloads' => array('file_settings' => array('id' => 'file_settings', 'name' => '<h3>' . __('File Download Settings', 'easy-digital-downloads') . '</h3>', 'type' => 'header'), 'download_method' => array('id' => 'download_method', 'name' => __('Download Method', 'easy-digital-downloads'), 'desc' => sprintf(__('Select the file download method. Note, not all methods work on all servers.', 'easy-digital-downloads'), edd_get_label_singular()), 'type' => 'select', 'tooltip_title' => __('Download Method', 'easy-digital-downloads'), 'tooltip_desc' => __('Due to its consistency in multiple platforms and better file protection, \'forced\' is the default method. Because Easy Digital Downloads uses PHP to process the file with the \'forced\' method, larger files can cause problems with delivery, resulting in hitting the \'max execution time\' of the server. If users are getting 404 or 403 errors when trying to access their purchased files when using the \'forced\' method, changing to the \'redirect\' method can help resolve this.', 'easy-digital-downloads'), 'options' => array('direct' => __('Forced', 'easy-digital-downloads'), 'redirect' => __('Redirect', 'easy-digital-downloads'))), 'symlink_file_downloads' => array('id' => 'symlink_file_downloads', 'name' => __('Symlink File Downloads?', 'easy-digital-downloads'), 'desc' => __('Check this if you are delivering really large files or having problems with file downloads completing.', 'easy-digital-downloads'), 'type' => 'checkbox'), 'file_download_limit' => array('id' => 'file_download_limit', 'name' => __('File Download Limit', 'easy-digital-downloads'), 'desc' => sprintf(__('The maximum number of times files can be downloaded for purchases. Can be overwritten for each %s.', 'easy-digital-downloads'), edd_get_label_singular()), 'type' => 'number', 'size' => 'small', 'tooltip_title' => __('File Download Limits', 'easy-digital-downloads'), 'tooltip_desc' => sprintf(__('Set the global default for the number of times a customer can download items they purchase. Using a value of 0 is unlimited. This can be defined on a %s-specific level as well. Download limits can also be reset for an individual purchase.', 'easy-digital-downloads'), edd_get_label_singular(true))), 'download_link_expiration' => array('id' => 'download_link_expiration', 'name' => __('Download Link Expiration', 'easy-digital-downloads'), 'desc' => __('How long should download links be valid for? Default is 24 hours from the time they are generated. Enter a time in hours.', 'easy-digital-downloads'), 'tooltip_title' => __('Download Link Expiration', 'easy-digital-downloads'), 'tooltip_desc' => __('When a customer receives a link to their downloads via email, in their receipt, or in their purchase history, the link will only be valid for the timeframe (in hours) defined in this setting. Sending a new purchase receipt or visiting the account page will re-generate a valid link for the customer.', 'easy-digital-downloads'), 'type' => 'number', 'size' => 'small', 'std' => '24', 'min' => '0'), 'disable_redownload' => array('id' => 'disable_redownload', 'name' => __('Disable Redownload?', 'easy-digital-downloads'), 'desc' => __('Check this if you do not want to allow users to redownload items from their purchase history.', 'easy-digital-downloads'), 'type' => 'checkbox')), 'accounting' => array('accounting_settings' => array('id' => 'accounting_settings', 'name' => '<h3>' . __('Accounting Settings', 'easy-digital-downloads') . '</h3>', 'type' => 'header'), 'enable_skus' => array('id' => 'enable_skus', 'name' => __('Enable SKU Entry', 'easy-digital-downloads'), 'desc' => __('Check this box to allow entry of product SKUs. SKUs will be shown on purchase receipt and exported purchase histories.', 'easy-digital-downloads'), 'type' => 'checkbox'), 'enable_sequential' => array('id' => 'enable_sequential', 'name' => __('Sequential Order Numbers', 'easy-digital-downloads'), 'desc' => __('Check this box to enable sequential order numbers.', 'easy-digital-downloads'), 'type' => 'checkbox'), 'sequential_start' => array('id' => 'sequential_start', 'name' => __('Sequential Starting Number', 'easy-digital-downloads'), 'desc' => __('The number at which the sequence should begin.', 'easy-digital-downloads'), 'type' => 'number', 'size' => 'small', 'std' => '1'), 'sequential_prefix' => array('id' => 'sequential_prefix', 'name' => __('Sequential Number Prefix', 'easy-digital-downloads'), 'desc' => __('A prefix to prepend to all sequential order numbers.', 'easy-digital-downloads'), 'type' => 'text'), 'sequential_postfix' => array('id' => 'sequential_postfix', 'name' => __('Sequential Number Postfix', 'easy-digital-downloads'), 'desc' => __('A postfix to append to all sequential order numbers.', 'easy-digital-downloads'), 'type' => 'text')), 'site_terms' => array('terms_settings' => array('id' => 'terms_settings', 'name' => '<h3>' . __('Agreement Settings', 'easy-digital-downloads') . '</h3>', 'type' => 'header'), 'show_agree_to_terms' => array('id' => 'show_agree_to_terms', 'name' => __('Agree to Terms', 'easy-digital-downloads'), 'desc' => __('Check this to show an agree to terms on the checkout that users must agree to before purchasing.', 'easy-digital-downloads'), 'type' => 'checkbox'), 'agree_label' => array('id' => 'agree_label', 'name' => __('Agree to Terms Label', 'easy-digital-downloads'), 'desc' => __('Label shown next to the agree to terms check box.', 'easy-digital-downloads'), 'type' => 'text', 'size' => 'regular'), 'agree_text' => array('id' => 'agree_text', 'name' => __('Agreement Text', 'easy-digital-downloads'), 'desc' => __('If Agree to Terms is checked, enter the agreement terms here.', 'easy-digital-downloads'), 'type' => 'rich_editor')))));
    return apply_filters('edd_registered_settings', $edd_settings);
}
 /**
  * Add settings
  *
  * @access      public
  * @since       1.0.0
  * @param       array $settings The existing EDD settings array
  * @return      array The modified EDD settings array
  */
 public function settings($settings)
 {
     $eddpup_settings = array(array('id' => 'edd_pup_settings_head', 'name' => '<span id="edd_pup_settings"><strong>' . __('Product Updates Settings', 'edd-pup') . '</strong></span>', 'desc' => __('Configure the Product Updates settings', 'edd-pup'), 'type' => 'header'), array('id' => 'edd_pup_test', 'name' => __('Enable Test Mode', 'edd-pup'), 'desc' => __('When checked, EDD Product Updates will simulate emails being sent without actually sending them.', 'edd-pup'), 'type' => 'checkbox'), array('id' => 'edd_pup_auto_del', 'name' => __('Disable automatic queue removal', 'edd-pup'), 'desc' => __('When checked, emails will remain in the queue indefinitely instead of being removed after 48 hours.', 'edd-pup'), 'type' => 'checkbox'));
     if (is_plugin_active('edd-software-licensing/edd-software-licenses.php')) {
         $eddpup_settings[] = array('id' => 'edd_pup_license', 'name' => __('Easy Digital Downloads Software Licensing Integration', 'edd-pup'), 'desc' => __('If enabled, only customers with active software licenses will receive update emails', 'edd-pup'), 'type' => 'checkbox');
     }
     $eddpup_settings2 = array(array('id' => 'edd_pup_log_notes', 'name' => __('Disable customer log notes', 'edd-pup'), 'desc' => __('If checked, log notes will not be generated on a customer\'s payment history page for the corresponding actions.', 'edd-pup'), 'type' => 'multicheck', 'options' => array('sent' => __('Sent email log notes', 'edd-pup'), 'unsubscribe' => __('Unsubscribe log notes', 'edd-pup'), 'resubscribe' => __('Resubscribe log notes', 'edd-pup'))), array('id' => 'edd_pup_template', 'name' => __('Email Template', 'edd-pup'), 'desc' => __('Choose a template to be used for the product update emails.', 'edd-pup'), 'type' => 'select', 'options' => array_merge(array('inherit' => __('Same Template as Purchase Receipts', 'edd-pup')), edd_pup_get_email_templates())), array('id' => 'edd_pup_default_from_name', 'name' => __('Default Product Update From Name', 'edd'), 'desc' => __('Enter the default "From Name" for Product Update emails.', 'edd'), 'type' => 'text', 'std' => get_bloginfo('name')), array('id' => 'edd_pup_default_from_email', 'name' => __('Default Product Update From Email', 'edd'), 'desc' => __('Enter the default email address customers will receive Product Update emails from.', 'edd'), 'type' => 'text', 'std' => get_bloginfo('admin_email')), array('id' => 'edd_pup_default_subject', 'name' => __('Default Product Update Subject', 'edd'), 'desc' => __('Enter the default subject line for Product Update emails.', 'edd'), 'type' => 'text', 'std' => __('New product update available', 'edd-pup')), array('id' => 'edd_pup_default_message', 'name' => __('Default Product Update Message', 'edd'), 'desc' => __('Enter the default message for Product Update emails. HTML is accepted. Available template tags:', 'edd') . '<br>' . edd_get_emails_tags_list(), 'type' => 'rich_editor', 'std' => '<p>' . __('Hello {name},', 'edd-pup') . '</p><p>' . __('There are updates available for the following products:', 'edd-pup') . '</p><p>{updated_products}</p><p>' . __('You can download these updates from the following links:', 'edd-pup') . '</p><p>{updated_products_links}</p><p>' . __('Thank you for being a customer of {sitename}!', 'edd-pup') . '</p><p><small>' . __('To no longer receive product update emails, please click here: {unsubscribe_link}', 'edd-pup') . '</small></p>'));
     return array_merge($settings, $eddpup_settings, $eddpup_settings2);
 }
/**
 * Create list of all available email tags
 *
 * @params
 *
 * @since 0.0.1
 * @return 	arr		$list		HTML list of all available email tags
 */
function edd_nod_get_email_tags_list()
{
    $list = edd_get_emails_tags_list();
    $email_tags = edd_nod_get_email_tags();
    // Check
    if (count($email_tags) > 0) {
        // Loop
        foreach ($email_tags as $email_tag) {
            // Add email tag to list
            $list .= '{' . $email_tag['tag'] . '} - ' . $email_tag['description'] . '<br/>';
        }
    }
    return $list;
}
Example #5
0
function edd_downloads_filter_edd_settings_email($fields)
{
    if (!array_key_exists('renew_receipt', $fields)) {
        $fields['renew_subject'] = array('id' => 'renew_subject', 'name' => __('Renew Email Subject', 'edd_downloads'), 'desc' => __('Enter the subject line for the renew receipt email', 'edd_downloads'), 'type' => 'text', 'std' => __('Renew Receipt', 'edd_downloads'));
        $fields['renew_receipt'] = array('id' => 'renew_receipt', 'name' => __('Renew Receipt', 'edd_downloads'), 'desc' => __('Enter the email that is sent to users after completing a successful renew. HTML is accepted. Available template tags:', 'edd_downloads') . '<br/>' . edd_get_emails_tags_list(), 'type' => 'rich_editor', 'std' => __("Dear", "edd_downloads") . " {name},\n\n" . __("Thank you for your renewal.", "edd_downloads") . "\n\n{sitename}");
        $fields['purchase_receipt'] = array('id' => 'purchase_receipt', 'name' => __('Purchase Receipt', 'edd_downloads'), 'desc' => __('Enter the email that is sent to users after completing a successful purchase. HTML is accepted. Available template tags:', 'edd_downloads') . '<br/>' . edd_get_emails_tags_list(), 'type' => 'rich_editor', 'std' => __("Dear", "edd_downloads") . " {name},\n\n" . __("Thank you for your purchase. ", "edd_downloads") . "\n\n{sitename}");
    }
    return $fields;
}