Skip to content

Commit

Permalink
Resolves #962
Browse files Browse the repository at this point in the history
  • Loading branch information
mathetos committed Aug 29, 2016
1 parent 3bd6b62 commit 3c3ab63
Showing 1 changed file with 131 additions and 43 deletions.
174 changes: 131 additions & 43 deletions includes/admin/class-give-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,13 @@ public function give_settings( $active_tab ) {
'name' => esc_html__( 'Test Mode', 'give' ),
'desc' => esc_html__( 'While in test mode no live donations are processed. To fully use test mode, you must have a sandbox (test) account for the payment gateway you are testing.', 'give' ),
'id' => 'test_mode',
'type' => 'checkbox'
),
'type' => 'radio_inline',
'options' => array(
'on' => esc_html__( 'On', 'give' ),
'' => esc_html__( 'Off', 'give' ),
),
'default' => 'on'
),
array(
'name' => esc_html__( 'Enabled Gateways', 'give' ),
'desc' => esc_html__( 'Enable your payment gateway. Can be ordered by dragging.', 'give' ),
Expand Down Expand Up @@ -369,10 +374,15 @@ public function give_settings( $active_tab ) {
'default' => 'donation',
),
array(
'name' => esc_html__( 'Disable PayPal IPN Verification', 'give' ),
'desc' => esc_html__( 'If donations are not getting marked as complete, then check this box. This forces the site to use a slightly less secure method of verifying donations.', 'give' ),
'name' => esc_html__( 'PayPal IPN Verification', 'give' ),
'desc' => esc_html__( 'If donations are not getting marked as complete, then disable this feature. This forces the site to use a slightly less secure method of verifying donations.', 'give' ),
'id' => 'disable_paypal_verification',
'type' => 'checkbox'
'type' => 'radio_inline',
'options' => array(
'on' => esc_html__( 'Enable', 'give' ),
'' => esc_html__( 'Disable', 'give' ),
),
'default' => 'on'
),
array(
'name' => esc_html__( 'Offline Donations', 'give' ),
Expand All @@ -384,7 +394,12 @@ public function give_settings( $active_tab ) {
'name' => esc_html__( 'Collect Billing Details', 'give' ),
'desc' => esc_html__( 'Enable to request billing details for offline donations. Will appear above offline donation instructions. Can be enabled/disabled per form.', 'give' ),
'id' => 'give_offline_donation_enable_billing_fields',
'type' => 'checkbox'
'type' => 'radio_inline',
'options' => array(
'on' => esc_html__( 'Yes', 'give' ),
'' => esc_html__( 'No', 'give' )
),
'default' => '',
),
array(
'name' => esc_html__( 'Offline Donation Instructions', 'give' ),
Expand Down Expand Up @@ -429,24 +444,39 @@ public function give_settings( $active_tab ) {
'type' => 'give_title'
),
array(
'name' => esc_html__( 'Disable CSS', 'give' ),
'desc' => esc_html__( 'Enable this option if you would like to disable all of Give\'s included CSS stylesheets.', 'give' ),
'name' => esc_html__( 'Default Give Styles', 'give' ),
'desc' => esc_html__( 'Enable/Disable Give\'s default CSS stylesheets.', 'give' ),
'id' => 'disable_css',
'type' => 'checkbox'
'type' => 'radio_inline',
'options' => array(
'on' => esc_html__( 'Enable', 'give' ),
'' => esc_html__( 'Disable', 'give' )
),
'default' => 'on',
),
array(
'name' => esc_html__( 'Enable Floating Labels', 'give' ),
/* translators: %s: https://givewp.com/documentation/core/give-forms/creating-give-forms/#floating-labels */
'desc' => sprintf( wp_kses( __( 'Enable <a href="%s" target="_blank">floating labels</a> in Give\'s donation forms. Note that if the "Disable CSS" option is enabled, you will need to style the floating labels yourself.', 'give' ), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), esc_url( 'https://givewp.com/documentation/core/give-forms/creating-give-forms/#floating-labels' ) ),
'id' => 'enable_floatlabels',
'type' => 'checkbox'
'type' => 'radio_inline',
'options' => array(
'on' => esc_html__( 'Enable', 'give' ),
'' => esc_html__( 'Disable', 'give' )
),
'default' => '',
),
array(
'name' => esc_html__( 'Disable Welcome Screen', 'give' ),
'name' => esc_html__( 'Welcome Screen', 'give' ),
/* translators: %s: about page URL */
'desc' => sprintf( wp_kses( __( 'Enable this option if you would like to disable the <a href="%s" target="_blank">Give Welcome screen</a> every time Give is activated and/or updated.', 'give' ), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), esc_url( admin_url( 'index.php?page=give-about' ) ) ),
'id' => 'disable_welcome',
'type' => 'checkbox'
'type' => 'radio_inline',
'options' => array(
'on' => esc_html__( 'Enable', 'give' ),
'' => esc_html__( 'Disable', 'give' )
),
'default' => 'on',
),
array(
'name' => esc_html__( 'Post Types', 'give' ),
Expand All @@ -455,22 +485,37 @@ public function give_settings( $active_tab ) {
'type' => 'give_title'
),
array(
'name' => esc_html__( 'Disable Form Single Views', 'give' ),
'desc' => esc_html__( 'By default, all forms have single views enabled which create a specific URL on your website for that form. This option disables the singular and archive views from being publicly viewable. Note: you will need to embed forms using a shortcode or widget if enabled.', 'give' ),
'name' => esc_html__( 'Single and Archive Views', 'give' ),
'desc' => esc_html__( 'By default, all forms have single views with a specific URL to view on your website. When disabled, forms can then only be embedded via the shortcode.', 'give' ),
'id' => 'disable_forms_singular',
'type' => 'checkbox'
'type' => 'radio_inline',
'options' => array(
'on' => esc_html__( 'Enable', 'give' ),
'' => esc_html__( 'Disable', 'give' )
),
'default' => 'on',
),
array(
'name' => esc_html__( 'Disable Form Archives', 'give' ),
'desc' => esc_html__( 'Archives pages list all the forms you have created. This option will disable only the form\'s archive page(s). The single form\'s view will remain in place. Note: you will need to refresh your permalinks after this option has been enabled.', 'give' ),
'name' => esc_html__( 'Form Archives', 'give' ),
'desc' => esc_html__( 'Archive pages list all the forms you have created. This option only affects the form archive pages. Single form views will remain in place. Note: you will need to refresh your permalinks after this option has been enabled.', 'give' ),
'id' => 'disable_forms_archives',
'type' => 'checkbox'
'type' => 'radio_inline',
'options' => array(
'on' => esc_html__( 'Enable', 'give' ),
'' => esc_html__( 'Disable', 'give' )
),
'default' => 'on',
),
array(
'name' => esc_html__( 'Disable Form Excerpts', 'give' ),
'desc' => esc_html__( 'The excerpt is an optional summary or description of a donation form; in short, a summary as to why the user should give.', 'give' ),
'name' => esc_html__( 'Form Excerpts', 'give' ),
'desc' => esc_html__( 'The excerpt is an optional summary or description of a donation form.', 'give' ),
'id' => 'disable_forms_excerpt',
'type' => 'checkbox'
'type' => 'radio_inline',
'options' => array(
'on' => esc_html__( 'Enable', 'give' ),
'' => esc_html__( 'Disable', 'give' )
),
'default' => 'on',
),

array(
Expand All @@ -482,16 +527,26 @@ public function give_settings( $active_tab ) {
'options' => give_get_featured_image_sizes()
),
array(
'name' => esc_html__( 'Disable Form Featured Image', 'give' ),
'desc' => esc_html__( 'If you do not wish to use the featured image functionality you can disable it using this option and it will not be displayed for single donation forms.', 'give' ),
'name' => esc_html__( 'Form Featured Image', 'give' ),
'desc' => esc_html__( 'Control whether your single forms will output a featured image.', 'give' ),
'id' => 'disable_form_featured_img',
'type' => 'checkbox'
'type' => 'radio_inline',
'options' => array(
'on' => esc_html__( 'Enable', 'give' ),
'' => esc_html__( 'Disable', 'give' )
),
'default' => 'on',
),
array(
'name' => esc_html__( 'Disable Single Form Sidebar', 'give' ),
'desc' => esc_html__( 'The sidebar allows you to add additional widget to the Give single form view. If you don\'t plan on using the sidebar you may disable it with this option.', 'give' ),
'name' => esc_html__( 'Single Form Sidebar', 'give' ),
'desc' => esc_html__( 'This global option affects all forms and whether they output the Give Sidebar or not.', 'give' ),
'id' => 'disable_form_sidebar',
'type' => 'checkbox'
'type' => 'radio_inline',
'options' => array(
'on' => esc_html__( 'Enable', 'give' ),
'' => esc_html__( 'Disable', 'give' )
),
'default' => 'on',
),
array(
'name' => esc_html__( 'Taxonomies', 'give' ),
Expand All @@ -500,16 +555,26 @@ public function give_settings( $active_tab ) {
'type' => 'give_title'
),
array(
'name' => esc_html__( 'Enable Form Categories', 'give' ),
'desc' => esc_html__( 'Enables the "Category" taxonomy for all Give forms.', 'give' ),
'name' => esc_html__( 'Form Categories', 'give' ),
'desc' => esc_html__( 'Enable/Disable whether your Give forms support Categories.', 'give' ),
'id' => 'enable_categories',
'type' => 'checkbox'
'type' => 'radio_inline',
'options' => array(
'on' => esc_html__( 'Enable', 'give' ),
'' => esc_html__( 'Disable', 'give' )
),
'default' => '',
),
array(
'name' => esc_html__( 'Enable Form Tags', 'give' ),
'desc' => esc_html__( 'Enables the "Tag" taxonomy for all Give forms.', 'give' ),
'name' => esc_html__( 'Form Tags', 'give' ),
'desc' => esc_html__( 'Enable/Disable whether your Give forms support Tags.', 'give' ),
'id' => 'enable_tags',
'type' => 'checkbox'
'type' => 'radio_inline',
'options' => array(
'on' => esc_html__( 'Enable', 'give' ),
'' => esc_html__( 'Disable', 'give' )
),
'default' => '',
),
)
)
Expand Down Expand Up @@ -613,9 +678,14 @@ public function give_settings( $active_tab ) {
),
array(
'id' => 'disable_admin_notices',
'name' => esc_html__( 'Disable Admin Notifications', 'give' ),
'desc' => esc_html__( 'Check this box if you do not want to receive emails when new donations are made.', 'give' ),
'type' => 'checkbox'
'name' => esc_html__( 'Send Admin Notification Emails?', 'give' ),
'desc' => esc_html__( 'Control whether Admin notification emails are sent or not.', 'give' ),
'type' => 'radio_inline',
'options' => array(
'on' => esc_html__( 'Yes', 'give' ),
'' => esc_html__( 'No', 'give' )
),
'default' => '',
)
)
)
Expand Down Expand Up @@ -664,7 +734,12 @@ public function give_settings( $active_tab ) {
'name' => esc_html__( 'Email Access', 'give' ),
'desc' => esc_html__( 'Would you like your donors to be able to access their donation history using only email? Donors whose sessions have expired and do not have an account may still access their donation history via a temporary email access link.', 'give' ),
'id' => 'email_access',
'type' => 'checkbox',
'type' => 'radio_inline',
'options' => array(
'on' => esc_html__( 'Enable', 'give' ),
'' => esc_html__( 'Disable', 'give' )
),
'default' => '',
),
array(
'id' => 'recaptcha_key',
Expand All @@ -691,7 +766,12 @@ public function give_settings( $active_tab ) {
'name' => esc_html__( 'Remove All Data on Uninstall?', 'give' ),
'desc' => esc_html__( 'When the plugin is deleted, completely remove all Give data.', 'give' ),
'id' => 'uninstall_on_delete',
'type' => 'checkbox'
'type' => 'radio_inline',
'options' => array(
'on' => esc_html__( 'Yes', 'give' ),
'' => esc_html__( 'No', 'give' )
),
'default' => '',
),
array(
'name' => esc_html__( 'Filter Control', 'give' ),
Expand All @@ -700,12 +780,15 @@ public function give_settings( $active_tab ) {
'type' => 'give_title'
),
array(
/* translators: %s: the_content */
'name' => sprintf( __( 'Disable %s filter', 'give' ), '<code>the_content</code>' ),
/* translators: 1: https://codex.wordpress.org/Plugin_API/Filter_Reference/the_content 2: the_content */
'name' => esc_html__( 'Single form content filter', 'give' ),
'desc' => sprintf( __( 'If you are seeing extra social buttons, related posts, or other unwanted elements appearing within your forms then you can disable WordPress\' content filter. <a href="%1$s" target="_blank">Learn more</a> about %2$s filter.', 'give' ), esc_url( 'https://codex.wordpress.org/Plugin_API/Filter_Reference/the_content' ), '<code>the_content</code>' ),
'id' => 'disable_the_content_filter',
'type' => 'checkbox'
'type' => 'radio_inline',
'options' => array(
'on' => esc_html__( 'Enable', 'give' ),
'' => esc_html__( 'Disable', 'give' )
),
'default' => 'on',
),
array(
'name' => esc_html__( 'Script Loading', 'give' ),
Expand All @@ -717,7 +800,12 @@ public function give_settings( $active_tab ) {
'name' => esc_html__( 'Load Scripts in Footer?', 'give' ),
'desc' => esc_html__( 'Check this box if you would like Give to load all frontend JavaScript files in the footer.', 'give' ),
'id' => 'scripts_footer',
'type' => 'checkbox'
'type' => 'radio_inline',
'options' => array(
'on' => esc_html__( 'Yes', 'give' ),
'' => esc_html__( 'No', 'give' )
),
'default' => '',
)
)
)
Expand Down

0 comments on commit 3c3ab63

Please sign in to comment.