public function load($oAdminWidget) { // Prepare the settings array for the widget // the $this->addSettingFields() takes multiple parameters, each an array to be added // promo $promo_text = 'Basic Widget Pack provides five additional informative and helpful widgets.'; $promo_url = 'http://zatzlabs.com/project/seamless-donations-basic-widget-pack/'; $promo_desc = seamless_donations_get_feature_promo($promo_text, $promo_url); $this->addSettingFields(array('field_id' => 'month_total_title', 'type' => 'text', 'title' => __('Title', 'seamless-donations'), 'default' => __('Donations This Month', 'seamless-donations')), array('field_id' => 'month_total_name', 'type' => 'text', 'title' => __('Month Total Name', 'seamless-donations'), 'default' => __('Month Total', 'seamless-donations')), array('field_id' => 'month_total_separator', 'type' => 'text', 'title' => __('Separator Between Name and Total', 'seamless-donations'), 'default' => __(' - ', 'seamless-donations'))); if (!function_exists('seamless_donations_bwp_is_compatible')) { $this->oForm->aFields['_default']['month_total_separator']['description'] = __($promo_desc, 'seamless-donations'); } }
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.'; // promo $feature_desc = 'Thank You Enhanced provides landing page redirect and short codes.'; $feature_url = 'http://zatzlabs.com/project/seamless-donations-thank-you-enhanced/'; $section_desc .= seamless_donations_get_feature_promo($feature_desc, $feature_url); $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_forms_section_levels($_setup_object) { $section_desc = 'Select one or more suggested giving levels for your donors to choose from.'; // promo $feature_desc = 'Giving Level Manager customizes donation levels, assigns labels for each level.'; $feature_url = 'http://zatzlabs.com/project/seamless-donations-giving-level-manager/'; $section_desc .= seamless_donations_get_feature_promo($feature_desc, $feature_url); $giving_levels_section = array('section_id' => 'seamless_donations_admin_forms_section_levels', 'page_slug' => 'seamless_donations_admin_forms', 'title' => __('Giving Levels', 'seamless-donations'), 'description' => __($section_desc, 'seamless-donations')); $giving_levels_section = apply_filters('seamless_donations_admin_forms_section_levels', $giving_levels_section); $giving_levels = dgx_donate_get_giving_levels(); $giving_level_labels = array(); for ($i = 0; $i < count($giving_levels); ++$i) { $value = $giving_levels[$i]; $giving_level_labels[$value] = $value; } $giving_level_defaults = array(); for ($i = 0; $i < count($giving_levels); ++$i) { $value = $giving_levels[$i]; $giving_level_defaults[$value] = dgx_donate_is_giving_level_enabled($value); } $giving_levels_options = array(array('field_id' => 'giving_levels', 'title' => __('Display Levels', 'seamless-donations'), 'type' => 'checkbox', 'label' => $giving_level_labels, 'default' => $giving_level_defaults, 'after_label' => '<br />'), array('field_id' => 'submit', 'type' => 'submit', 'label' => __('Save Giving Levels', 'seamless-donations'))); $giving_levels_options = apply_filters('seamless_donations_admin_forms_section_levels_options', $giving_levels_options); seamless_donations_process_add_settings_fields_with_options($giving_levels_options, $_setup_object, $giving_levels_section); }