function seamless_donations_admin_logs_section_data($_setup_object) { $log_section = array('section_id' => 'seamless_donations_admin_logs_section_data', 'page_slug' => 'seamless_donations_admin_logs', 'title' => __('Log Data', 'seamless-donations')); $log_section = apply_filters('seamless_donations_admin_logs_section_data', $log_section); $debug_log_content = get_option('dgx_donate_log'); $log_data = ''; if (empty($debug_log_content)) { $log_data = esc_html__('The log is empty.', 'seamless-donations'); } else { foreach ($debug_log_content as $debug_log_entry) { if ($log_data != "") { $log_data .= "\n"; } $log_data .= esc_html($debug_log_entry); } } $debug_mode = get_option('dgx_donate_debug_mode'); if ($debug_mode == 1) { // we're in debug, so we'll return lots of log info $display_options = array(__('Seamless Donations Log Data', 'seamless-donations') => $log_data, 'Admin Page Framework' => '', 'Browser' => ''); } else { $display_options = array(__('Seamless Donations Log Data', 'seamless-donations') => $log_data, 'Admin Page Framework' => '', 'WordPress' => '', 'PHP' => '', 'Server' => '', 'PHP Error Log' => '', 'MySQL' => '', 'MySQL Error Log' => '', 'Browser' => ''); } $log_object = array(array('field_id' => 'submit', 'type' => 'submit', 'label' => __('Delete Log', 'seamless-donations')), array('field_id' => 'system_information', 'type' => 'system', 'title' => __('System Information', 'seamless-donations'), 'data' => $display_options, 'attributes' => array('name' => ''))); $log_object = apply_filters('seamless_donations_admin_logs_section_data_options', $log_object); seamless_donations_process_add_settings_fields_with_options($log_object, $_setup_object, $log_section); }
function seamless_donations_admin_donations_section_help($_setup_object) { $help_section = array('section_id' => 'seamless_donations_admin_donations_section_help', 'page_slug' => 'seamless_donations_admin_donations', 'title' => __('Where Did Donations Go?', 'seamless-donations')); $help_section = apply_filters('seamless_donations_admin_donations_section_help', $help_section); $help_object = array(array('field_id' => 'random_html', 'type' => 'random_html', 'before_field' => '<img src="' . plugins_url('images/new-donations-location.jpg', dirname(__FILE__)) . '">', 'title' => __('To a menu on the Dashboard', 'seamless-donations'), 'description' => __('Donations is now a custom post type available from the main dashboard.', 'seamless-donations')), array('field_id' => 'submit', 'type' => 'submit', 'label' => __('Permanently Hide This Tab', 'seamless-donations'))); $help_object = apply_filters('seamless_donations_admin_donations_section_help_options', $help_object); seamless_donations_process_add_settings_fields_with_options($help_object, $_setup_object, $help_section); }
function seamless_donations_admin_addons_section_data($_setup_object) { $addons_section = array('section_id' => 'seamless_donations_admin_addons_section_data', 'page_slug' => 'seamless_donations_admin_addons'); $addons_section = apply_filters('seamless_donations_admin_addons_section_data', $addons_section); $html_folder = dirname(dirname(__FILE__)) . '/html/'; $html_file = $html_folder . 'admin-addons.html'; $html_readme = file_get_contents($html_file); $addons_object = array(array('field_id' => 'admin_information', 'type' => 'welcome_html', 'before_field' => $html_readme)); $addons_object = apply_filters('seamless_donations_admin_addons_section_data_options', $addons_object); seamless_donations_process_add_settings_fields_with_options($addons_object, $_setup_object, $addons_section); }
function seamless_donations_admin_licenses_section_registration($_setup_object) { $section_desc = 'If you have purchased any premium extensions, you will be able to enter '; $section_desc .= 'their license keys here. Your active license key is required to run the extension '; $section_desc .= 'and will also enable you to get automatic updates for the duration of your license.'; $licenses_registration_section = array('section_id' => 'seamless_donations_admin_licenses_section_registration', 'page_slug' => 'seamless_donations_admin_licenses', 'title' => __('License Activation', 'seamless-donations'), 'description' => __($section_desc, 'seamless-donations')); $licenses_registration_section = apply_filters('seamless_donations_admin_licenses_section_registration', $licenses_registration_section); $licenses_registration_options = array(array('field_id' => 'licenses_no_licenses', 'title' => __('Licenses', 'seamless-donations'), 'type' => 'licenses_html', 'before_field' => __('Nothing has been installed or activated that requires a license.', 'seamless-donations'))); $licenses_registration_options = apply_filters('seamless_donations_admin_licenses_section_registration_options', $licenses_registration_options); seamless_donations_process_add_settings_fields_with_options($licenses_registration_options, $_setup_object, $licenses_registration_section); }
function seamless_donations_admin_thanks_section_note($_setup_object) { $section_desc = 'On this page you can configure a special thank you message which will appear to your '; $section_desc .= 'donors after they complete their donations. This is separate from the thank you email '; $section_desc .= 'that gets emailed to your donors.'; $thanks_note_section = array('section_id' => 'seamless_donations_admin_thanks_section_note', 'page_slug' => 'seamless_donations_admin_thanks', 'title' => __('Thank You Page', 'seamless-donations'), 'description' => __($section_desc, 'seamless-donations')); $thanks_note_section = apply_filters('seamless_donations_admin_thanks_section_note', $thanks_note_section); $thanks_note_options = array(array('field_id' => 'dgx_donate_thanks_text', 'type' => 'textarea', 'title' => __('Thank You Page Text', 'seamless-donations'), 'description' => __('The text to display to a donor after a donation is completed.', 'seamless-donations'), 'default' => 'Thank you for donating! A thank you email with the details of ' . 'your donation will be sent to the email address you provided.'), array('field_id' => 'submit', 'type' => 'submit', 'label' => __('Save Changes', 'seamless-donations'))); $thanks_note_options = apply_filters('seamless_donations_admin_thanks_section_note_options', $thanks_note_options); seamless_donations_process_add_settings_fields_with_options($thanks_note_options, $_setup_object, $thanks_note_section); }
function seamless_donations_admin_settings_section_debug($_setup_object) { $section_desc = 'Enables certain Seamless Donations debugging features. Reduces security. '; $section_desc .= 'Displays annoying (but effective) warning message until turned off.'; $debug_section = array('section_id' => 'seamless_donations_admin_settings_section_debug', 'page_slug' => 'seamless_donations_admin_settings', 'title' => __('Debug Options', 'seamless-donations'), 'description' => __($section_desc, 'seamless-donations')); $debug_section = apply_filters('seamless_donations_admin_settings_section_debug', $debug_section); $xref_name_desc = "<span style='color:red'>This runs once when you click Save Debug Mode. You probably "; $xref_name_desc .= "shouldn't run this unless requested to by the developer. This feature is still under development.</span>"; // build the log settings values - this is an array because there will probably be more settings $obscurify = get_option('dgx_donate_log_obscure_name'); $log_settings_values = array($obscurify); $debug_options = array(array('field_id' => 'dgx_donate_debug_mode', 'title' => __('Debug Mode', 'seamless-donations'), 'type' => 'checkbox', 'label' => __('Enable debug mode', 'seamless-donations'), 'default' => false, 'after_label' => '<br />'), array('field_id' => 'dgx_donate_log_settings', 'title' => __('Log Settings', 'seamless-donations'), 'type' => 'checkbox', 'label' => array(__('Obscurify donor names in log', 'seamless-donations')), 'default' => array(false), 'value' => $log_settings_values, 'after_label' => '<br />'), array('field_id' => 'dgx_donate_rebuild_xref_by_name', 'title' => __('Rebuild Indexes', 'seamless-donations'), 'type' => 'checkbox', 'label' => __('Rebuild Donations, Donors, and Funds cross-reference indexes (name priority)') . seamless_donations_display_label(), 'default' => false, 'description' => $xref_name_desc), array('field_id' => 'submit', 'type' => 'submit', 'label' => __('Save Debug Mode', 'seamless-donations'))); $debug_options = apply_filters('seamless_donations_admin_settings_section_debug_options', $debug_options); seamless_donations_process_add_settings_fields_with_options($debug_options, $_setup_object, $debug_section); }
function seamless_donations_admin_settings_section_debug($_setup_object) { $section_desc = 'Enables certain Seamless Donations debugging features. Reduces security. '; $section_desc .= 'Displays annoying (but effective) warning message until turned off.'; $debug_section = array('section_id' => 'seamless_donations_admin_settings_section_debug', 'page_slug' => 'seamless_donations_admin_settings', 'title' => __('Debug Mode', 'seamless-donations'), 'description' => __($section_desc, 'seamless-donations')); $debug_section = apply_filters('seamless_donations_admin_settings_section_debug', $debug_section); $debug_options = array(array('field_id' => 'dgx_donate_debug_mode', 'title' => __('Debug Mode', 'seamless-donations'), 'type' => 'checkbox', 'label' => __('Enable debug mode', 'seamless-donations'), 'default' => false, 'after_label' => '<br />'), array('field_id' => 'submit', 'type' => 'submit', 'label' => __('Save Debug Mode', 'seamless-donations'))); $debug_options = apply_filters('seamless_donations_admin_settings_section_debug_options', $debug_options); seamless_donations_process_add_settings_fields_with_options($debug_options, $_setup_object, $debug_section); }
function seamless_donations_admin_forms_section_tweaks($_setup_object) { $section_desc = 'Options that can tweak your form. Starting with one, undoubtedly more to come.'; $tweaks_section = array('section_id' => 'seamless_donations_admin_forms_section_tweaks', 'page_slug' => 'seamless_donations_admin_forms', 'title' => __('Form Tweaks', 'seamless-donations'), 'description' => __($section_desc, 'seamless-donations')); $tweaks_section = apply_filters('seamless_donations_admin_forms_section_tweaks', $tweaks_section); $tweaks_options = array(array('field_id' => 'dgx_donate_labels_for_input', 'title' => __('Label Tag', 'seamless-donations'), 'type' => 'checkbox', 'label' => __('Add label tag to input form (may improve form layout for some themes)', 'seamless-donations'), 'default' => false, 'after_label' => '<br />'), array('field_id' => 'submit', 'type' => 'submit', 'label' => __('Save Tweaks', 'seamless-donations'))); $tweaks_options = apply_filters('seamless_donations_admin_forms_section_tweaks_options', $tweaks_options); seamless_donations_process_add_settings_fields_with_options($tweaks_options, $_setup_object, $tweaks_section); }
function seamless_donations_admin_templates_section_template($_setup_object) { // Email template settings $section_desc = 'The template on this page is used to generate thank you emails for '; $section_desc .= 'each donation.dgx-donate You can include placeholders '; $section_desc .= 'such as [firstname] [lastname] [fund] and/or [amount]. These placeholders will '; $section_desc .= 'automatically be filled in with the donor and donation details. '; $email_template_section = array('section_id' => 'seamless_donations_admin_templates_section_template', 'page_slug' => 'seamless_donations_admin_templates', 'title' => __('Email Template', 'seamless-donations'), 'description' => __($section_desc, 'seamless-donations')); $email_template_section = apply_filters('seamless_donations_admin_templates_section_template', $email_template_section); // array for setting up settings element for this section // be sure to use the name of the option (i.e., get_option) for the field_id $email_options = array(array('field_id' => 'dgx_donate_email_name', 'type' => 'text', 'title' => __('From / Reply-To Name', 'seamless-donations'), 'description' => __('The name the thank you email should appear to come from (e.g. your organization name or your name).', 'seamless-donations'), 'default' => __('', 'seamless-donations'), 'attributes' => array('size' => 80)), array('field_id' => 'dgx_donate_email_reply', 'type' => 'text', 'title' => __('From / Reply-To Email Address', 'seamless-donations'), 'description' => __('The email address the thank you email should appear to come from.', 'seamless-donations'), 'default' => __('', 'seamless-donations'), 'attributes' => array('size' => 80)), array('field_id' => 'dgx_donate_email_subj', 'type' => 'text', 'title' => __('Subject', 'seamless-donations'), 'description' => __('The subject of the email (e.g. Thank You for Your Donation).', 'seamless-donations'), 'default' => __('Thank you for your donation', 'seamless-donations'), 'attributes' => array('size' => 80)), array('field_id' => 'dgx_donate_email_body', 'type' => 'textarea', 'title' => __('Body', 'seamless-donations'), 'description' => __('The body of the email message to all donors.', 'seamless-donations'), 'default' => __('Dear [firstname] [lastname],' . PHP_EOL . PHP_EOL . 'Thank you for your generous donation of [amount]. ' . 'Please note that no goods or services were received in exchange for this donation.', 'seamless-donations'), 'attributes' => array('cols' => 80)), array('field_id' => 'dgx_donate_email_recur', 'type' => 'textarea', 'title' => __('Recurring Donations', 'seamless-donations'), 'description' => __('This message will be included when the donor elects to make their donation recurring.', 'seamless-donations'), 'default' => __('Thank you for electing to have your donation automatically repeated each month.', 'seamless-donations'), 'attributes' => array('cols' => 80)), array('field_id' => 'dgx_donate_email_desig', 'type' => 'textarea', 'title' => __('Designated Fund', 'seamless-donations'), 'description' => __('This message will be included when the donor designates their donation to a specific fund.', 'seamless-donations'), 'default' => __('Your donation has been designated to the [fund] fund.', 'seamless-donations'), 'attributes' => array('cols' => 80)), array('field_id' => 'dgx_donate_email_anon', 'type' => 'textarea', 'title' => __('Anonymous Donations', 'seamless-donations'), 'description' => __('This message will be included when the donor requests their donation get kept anonymous.', 'seamless-donations'), 'default' => __('You have requested that your donation be kept anonymous. ' . 'Your name will not be revealed to the public.', 'seamless-donations'), 'attributes' => array('cols' => 80)), array('field_id' => 'dgx_donate_email_list', 'type' => 'textarea', 'title' => __('Mailing List Join', 'seamless-donations'), 'description' => __('This message will be included when the donor elects to join the mailing list.', 'seamless-donations'), 'default' => __('Thank you for joining our mailing list. We will send you updates from time-to-time. ' . 'If at any time you would like to stop receiving emails, please ' . 'send us an email to be removed from the mailing list.', 'seamless-donations'), 'attributes' => array('cols' => 80)), array('field_id' => 'dgx_donate_email_empl', 'type' => 'textarea', 'title' => __('Employer Match', 'seamless-donations'), 'description' => __('This message will be included when the donor selects the employer match.', 'seamless-donations'), 'default' => __('You have specified that your employer matches some or all of your donation.', 'seamless-donations'), 'attributes' => array('cols' => 80)), array('field_id' => 'dgx_donate_email_trib', 'type' => 'textarea', 'title' => __('Tribute Gift', 'seamless-donations'), 'description' => __('This message will be included when the donor elects to make their donation a tribute gift.', 'seamless-donations'), 'default' => __('You have asked to make this donation in honor of or memory of someone else. ' . 'We will notify the honoree within the next 5-10 business days.', 'seamless-donations'), 'attributes' => array('cols' => 80)), array('field_id' => 'dgx_donate_email_close', 'type' => 'textarea', 'title' => __('Closing', 'seamless-donations'), 'description' => __('The closing text of the email message to all donors.', 'seamless-donations'), 'default' => __('Thanks again for your support!', 'seamless-donations'), 'attributes' => array('cols' => 80)), array('field_id' => 'dgx_donate_email_sig', 'type' => 'textarea', 'title' => __('Signature', 'seamless-donations'), 'description' => __('The signature at the end of the email message to all donors.', 'seamless-donations'), 'default' => __('Director of Donor Relations', 'seamless-donations'), 'attributes' => array('cols' => 80)), array('field_id' => 'submit', 'type' => 'submit', 'label' => __('Save Changes', 'seamless-donations'))); $email_options = apply_filters('seamless_donations_admin_templates_section_template_options', $email_options); seamless_donations_process_add_settings_fields_with_options($email_options, $_setup_object, $email_template_section); }