Skip to content

Commit

Permalink
New donor's address options are found under Display Options > Global …
Browse files Browse the repository at this point in the history
…Forms Options #370

Also rearranged other options so they make more sense under the advanced tab
  • Loading branch information
Devin Walker committed Aug 24, 2016
1 parent ba5b9d7 commit c4b5c8a
Showing 1 changed file with 45 additions and 32 deletions.
77 changes: 45 additions & 32 deletions includes/admin/class-give-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -423,31 +423,36 @@ public function give_settings( $active_tab ) {
'show_on' => array( 'key' => 'options-page', 'value' => array( $this->key, ), ),
'fields' => apply_filters( 'give_settings_display', array(
array(
'name' => esc_html__( 'Display Settings', 'give' ),
'name' => esc_html__( 'Global Form Options', 'give' ),
'desc' => '',
'id' => 'give_title_display_settings_1',
'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' ),
'id' => 'disable_css',
'type' => 'checkbox'
),
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 this option if you would like to enable <a href="%s" target="_blank">floating labels</a> in Give\'s donation forms. <br />Be aware that if you have the "Disable CSS" option 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' ) ),
'desc' => sprintf( wp_kses( __( 'Enable this option if you would like to enable <a href="%s" target="_blank">floating labels</a> for Give\'s donation forms. <br />Be aware that if you have the "Disable CSS" option 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'
),
array(
'name' => esc_html__( 'Disable Welcome Screen', 'give' ),
/* translators: %s: about page URL */
'desc' => sprintf( wp_kses( __( 'Enable this option if you would like to disable the Give Welcome screen every time Give is activated and/or updated. You can always access the <a href="%s">Welcome Screen</a> if you want in the future.', 'give' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( admin_url( 'index.php?page=give-about' ) ) ),
'id' => 'disable_welcome',
'type' => 'checkbox'
'name' => esc_html__( 'Donor Address', 'give' ),
'desc' => esc_html__( 'If enabled this will output address fields within your donation forms.', 'give' ),
'id' => 'donor_address',
'type' => 'checkbox',
),
array(
'name' => esc_html__( 'Address Required', 'give' ),
'desc' => esc_html__( 'Require that the donor completes the address fields in order to donate.', 'give' ),
'id' => 'donor_address_required',
'type' => 'checkbox',
),

array(
'name' => esc_html__( 'Post Types', 'give' ),
'desc' => '',
Expand Down Expand Up @@ -675,24 +680,44 @@ public function give_settings( $active_tab ) {
'default' => '',
'type' => 'text'
),

array(
'name' => esc_html__( 'Data Control', 'give' ),
'name' => esc_html__( 'Script and Styles', 'give' ),
'desc' => '',
'id' => 'give_title_data_control_2',
'id' => 'give_title_script_control',
'type' => 'give_title'
),
array(
'name' => esc_html__( 'Remove All Data on Uninstall?', 'give' ),
'desc' => esc_html__( 'Check this box if you would like Give to completely remove all of its data when the plugin is deleted.', 'give' ),
'id' => 'uninstall_on_delete',
'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' ),
'id' => 'disable_css',
'type' => 'checkbox'
),
array(
'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'
),
array(
'name' => esc_html__( 'Filter Control', 'give' ),
'name' => esc_html__( 'Miscellaneous', 'give' ),
'desc' => '',
'id' => 'give_title_filter_control',
'id' => 'give_title_advanced_misc',
'type' => 'give_title'
),
array(
'name' => esc_html__( 'Remove All Data on Uninstall', 'give' ),
'desc' => esc_html__( 'Check this box if you would like Give to completely remove all of its data when the plugin is deleted.', 'give' ),
'id' => 'uninstall_on_delete',
'type' => 'checkbox'
),
array(
'name' => esc_html__( 'Disable Welcome Screen', 'give' ),
/* translators: %s: about page URL */
'desc' => sprintf( wp_kses( __( 'Enable this option if you would like to disable the Give Welcome screen every time Give is activated and/or updated. You can always access the <a href="%s">Welcome Screen</a> if you want in the future.', 'give' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( admin_url( 'index.php?page=give-about' ) ) ),
'id' => 'disable_welcome',
'type' => 'checkbox'
),
array(
/* translators: %s: the_content */
'name' => sprintf( __( 'Disable %s filter', 'give' ), '<code>the_content</code>' ),
Expand All @@ -701,18 +726,6 @@ public function give_settings( $active_tab ) {
'id' => 'disable_the_content_filter',
'type' => 'checkbox'
),
array(
'name' => esc_html__( 'Script Loading', 'give' ),
'desc' => '',
'id' => 'give_title_script_control',
'type' => 'give_title'
),
array(
'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'
)
)
)
),
Expand Down

0 comments on commit c4b5c8a

Please sign in to comment.