@@ -6,7 +6,7 @@ |
||
| 6 | 6 | * @version 1.0 |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly. |
|
| 9 | +if ( ! defined('ABSPATH')) exit; // Exit if accessed directly. |
|
| 10 | 10 | |
| 11 | 11 | // {email} is replaced by the content entered in Donations > Settings > Emails |
| 12 | 12 | |
@@ -6,7 +6,10 @@ |
||
| 6 | 6 | * @version 1.0 |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly. |
|
| 9 | +if ( ! defined( 'ABSPATH' ) ) { |
|
| 10 | + exit; |
|
| 11 | +} |
|
| 12 | +// Exit if accessed directly. |
|
| 10 | 13 | |
| 11 | 14 | // {email} is replaced by the content entered in Donations > Settings > Emails |
| 12 | 15 | |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | * @version 1.0 |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly. |
|
| 9 | +if ( ! defined('ABSPATH')) exit; // Exit if accessed directly. |
|
| 10 | 10 | |
| 11 | 11 | // This is the footer used if no others are available |
| 12 | 12 | |
@@ -6,7 +6,10 @@ |
||
| 6 | 6 | * @version 1.0 |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly. |
|
| 9 | +if ( ! defined( 'ABSPATH' ) ) { |
|
| 10 | + exit; |
|
| 11 | +} |
|
| 12 | +// Exit if accessed directly. |
|
| 10 | 13 | |
| 11 | 14 | // This is the footer used if no others are available |
| 12 | 15 | |
@@ -7,22 +7,22 @@ discard block |
||
| 7 | 7 | * @copyright Copyright (c) 2016, WordImpress |
| 8 | 8 | * @license https://opensource.org/licenses/gpl-license GNU Public License |
| 9 | 9 | */ |
| 10 | -$current_user = wp_get_current_user(); |
|
| 10 | +$current_user = wp_get_current_user(); |
|
| 11 | 11 | |
| 12 | -if ( is_user_logged_in() ): |
|
| 12 | +if (is_user_logged_in()): |
|
| 13 | 13 | $user_id = get_current_user_id(); |
| 14 | - $first_name = get_user_meta( $user_id, 'first_name', true ); |
|
| 15 | - $last_name = get_user_meta( $user_id, 'last_name', true ); |
|
| 14 | + $first_name = get_user_meta($user_id, 'first_name', true); |
|
| 15 | + $last_name = get_user_meta($user_id, 'last_name', true); |
|
| 16 | 16 | $display_name = $current_user->display_name; |
| 17 | - $address = give_get_donor_address( $user_id ); |
|
| 17 | + $address = give_get_donor_address($user_id); |
|
| 18 | 18 | |
| 19 | - if ( isset( $_GET['updated'] ) && $_GET['updated'] == true && ! give_get_errors() ): ?> |
|
| 19 | + if (isset($_GET['updated']) && $_GET['updated'] == true && ! give_get_errors()): ?> |
|
| 20 | 20 | <p class="give_success"> |
| 21 | - <strong><?php esc_html_e( 'Success:', 'give' ); ?></strong> <?php esc_html_e( 'Your profile has been updated.', 'give' ); ?> |
|
| 21 | + <strong><?php esc_html_e('Success:', 'give'); ?></strong> <?php esc_html_e('Your profile has been updated.', 'give'); ?> |
|
| 22 | 22 | </p> |
| 23 | 23 | <?php endif; ?> |
| 24 | 24 | |
| 25 | - <?php Give()->notices->render_frontend_notices( 0 ); ?> |
|
| 25 | + <?php Give()->notices->render_frontend_notices(0); ?> |
|
| 26 | 26 | |
| 27 | 27 | <?php |
| 28 | 28 | /** |
@@ -32,38 +32,38 @@ discard block |
||
| 32 | 32 | * |
| 33 | 33 | * @since 1.0 |
| 34 | 34 | */ |
| 35 | - do_action( 'give_profile_editor_before' ); |
|
| 35 | + do_action('give_profile_editor_before'); |
|
| 36 | 36 | ?> |
| 37 | 37 | |
| 38 | 38 | <form id="give_profile_editor_form" class="give-form" action="<?php echo give_get_current_page_url(); ?>" method="post"> |
| 39 | 39 | |
| 40 | 40 | <fieldset> |
| 41 | 41 | |
| 42 | - <legend id="give_profile_name_label"><?php esc_html_e( 'Change your Name', 'give' ); ?></legend> |
|
| 42 | + <legend id="give_profile_name_label"><?php esc_html_e('Change your Name', 'give'); ?></legend> |
|
| 43 | 43 | |
| 44 | 44 | <p id="give_profile_first_name_wrap" class="form-row form-row-first form-row-responsive"> |
| 45 | - <label for="give_first_name"><?php esc_html_e( 'First Name', 'give' ); ?></label> |
|
| 46 | - <input name="give_first_name" id="give_first_name" class="text give-input" type="text" value="<?php echo esc_attr( $first_name ); ?>"/> |
|
| 45 | + <label for="give_first_name"><?php esc_html_e('First Name', 'give'); ?></label> |
|
| 46 | + <input name="give_first_name" id="give_first_name" class="text give-input" type="text" value="<?php echo esc_attr($first_name); ?>"/> |
|
| 47 | 47 | </p> |
| 48 | 48 | |
| 49 | 49 | <p id="give_profile_last_name_wrap" class="form-row form-row-last form-row-responsive"> |
| 50 | - <label for="give_last_name"><?php esc_html_e( 'Last Name', 'give' ); ?></label> |
|
| 51 | - <input name="give_last_name" id="give_last_name" class="text give-input" type="text" value="<?php echo esc_attr( $last_name ); ?>"/> |
|
| 50 | + <label for="give_last_name"><?php esc_html_e('Last Name', 'give'); ?></label> |
|
| 51 | + <input name="give_last_name" id="give_last_name" class="text give-input" type="text" value="<?php echo esc_attr($last_name); ?>"/> |
|
| 52 | 52 | </p> |
| 53 | 53 | |
| 54 | 54 | <p id="give_profile_display_name_wrap" class="form-row form-row-first form-row-responsive"> |
| 55 | - <label for="give_display_name"><?php esc_html_e( 'Display Name', 'give' ); ?></label> |
|
| 55 | + <label for="give_display_name"><?php esc_html_e('Display Name', 'give'); ?></label> |
|
| 56 | 56 | <select name="give_display_name" id="give_display_name" class="select give-select"> |
| 57 | - <?php if ( ! empty( $current_user->first_name ) ): ?> |
|
| 58 | - <option <?php selected( $display_name, $current_user->first_name ); ?> value="<?php echo esc_attr( $current_user->first_name ); ?>"><?php echo esc_html( $current_user->first_name ); ?></option> |
|
| 57 | + <?php if ( ! empty($current_user->first_name)): ?> |
|
| 58 | + <option <?php selected($display_name, $current_user->first_name); ?> value="<?php echo esc_attr($current_user->first_name); ?>"><?php echo esc_html($current_user->first_name); ?></option> |
|
| 59 | 59 | <?php endif; ?> |
| 60 | - <option <?php selected( $display_name, $current_user->user_nicename ); ?> value="<?php echo esc_attr( $current_user->user_nicename ); ?>"><?php echo esc_html( $current_user->user_nicename ); ?></option> |
|
| 61 | - <?php if ( ! empty( $current_user->last_name ) ): ?> |
|
| 62 | - <option <?php selected( $display_name, $current_user->last_name ); ?> value="<?php echo esc_attr( $current_user->last_name ); ?>"><?php echo esc_html( $current_user->last_name ); ?></option> |
|
| 60 | + <option <?php selected($display_name, $current_user->user_nicename); ?> value="<?php echo esc_attr($current_user->user_nicename); ?>"><?php echo esc_html($current_user->user_nicename); ?></option> |
|
| 61 | + <?php if ( ! empty($current_user->last_name)): ?> |
|
| 62 | + <option <?php selected($display_name, $current_user->last_name); ?> value="<?php echo esc_attr($current_user->last_name); ?>"><?php echo esc_html($current_user->last_name); ?></option> |
|
| 63 | 63 | <?php endif; ?> |
| 64 | - <?php if ( ! empty( $current_user->first_name ) && ! empty( $current_user->last_name ) ): ?> |
|
| 65 | - <option <?php selected( $display_name, $current_user->first_name . ' ' . $current_user->last_name ); ?> value="<?php echo esc_attr( $current_user->first_name . ' ' . $current_user->last_name ); ?>"><?php echo esc_html( $current_user->first_name . ' ' . $current_user->last_name ); ?></option> |
|
| 66 | - <option <?php selected( $display_name, $current_user->last_name . ' ' . $current_user->first_name ); ?> value="<?php echo esc_attr( $current_user->last_name . ' ' . $current_user->first_name ); ?>"><?php echo esc_html( $current_user->last_name . ' ' . $current_user->first_name ); ?></option> |
|
| 64 | + <?php if ( ! empty($current_user->first_name) && ! empty($current_user->last_name)): ?> |
|
| 65 | + <option <?php selected($display_name, $current_user->first_name.' '.$current_user->last_name); ?> value="<?php echo esc_attr($current_user->first_name.' '.$current_user->last_name); ?>"><?php echo esc_html($current_user->first_name.' '.$current_user->last_name); ?></option> |
|
| 66 | + <option <?php selected($display_name, $current_user->last_name.' '.$current_user->first_name); ?> value="<?php echo esc_attr($current_user->last_name.' '.$current_user->first_name); ?>"><?php echo esc_html($current_user->last_name.' '.$current_user->first_name); ?></option> |
|
| 67 | 67 | <?php endif; ?> |
| 68 | 68 | </select> |
| 69 | 69 | <?php |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | * |
| 75 | 75 | * @since 1.0 |
| 76 | 76 | */ |
| 77 | - do_action( 'give_profile_editor_name' ); |
|
| 77 | + do_action('give_profile_editor_name'); |
|
| 78 | 78 | ?> |
| 79 | 79 | </p> |
| 80 | 80 | |
@@ -86,12 +86,12 @@ discard block |
||
| 86 | 86 | * |
| 87 | 87 | * @since 1.0 |
| 88 | 88 | */ |
| 89 | - do_action( 'give_profile_editor_after_name' ); |
|
| 89 | + do_action('give_profile_editor_after_name'); |
|
| 90 | 90 | ?> |
| 91 | 91 | |
| 92 | 92 | <p class="form-row form-row-last form-row-responsive"> |
| 93 | - <label for="give_email"><?php esc_html_e( 'Email Address', 'give' ); ?></label> |
|
| 94 | - <input name="give_email" id="give_email" class="text give-input required" type="email" value="<?php echo esc_attr( $current_user->user_email ); ?>" required aria-required="true"/> |
|
| 93 | + <label for="give_email"><?php esc_html_e('Email Address', 'give'); ?></label> |
|
| 94 | + <input name="give_email" id="give_email" class="text give-input required" type="email" value="<?php echo esc_attr($current_user->user_email); ?>" required aria-required="true"/> |
|
| 95 | 95 | <?php |
| 96 | 96 | /** |
| 97 | 97 | * Fires in the profile editor shortcode, to the email section. |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | * |
| 101 | 101 | * @since 1.0 |
| 102 | 102 | */ |
| 103 | - do_action( 'give_profile_editor_email' ); |
|
| 103 | + do_action('give_profile_editor_email'); |
|
| 104 | 104 | ?> |
| 105 | 105 | </p> |
| 106 | 106 | |
@@ -112,45 +112,45 @@ discard block |
||
| 112 | 112 | * |
| 113 | 113 | * @since 1.0 |
| 114 | 114 | */ |
| 115 | - do_action( 'give_profile_editor_after_email' ); |
|
| 115 | + do_action('give_profile_editor_after_email'); |
|
| 116 | 116 | ?> |
| 117 | 117 | |
| 118 | - <legend id="give_profile_billing_address_label"><?php esc_html_e( 'Change your Billing Address', 'give' ); ?></legend> |
|
| 118 | + <legend id="give_profile_billing_address_label"><?php esc_html_e('Change your Billing Address', 'give'); ?></legend> |
|
| 119 | 119 | |
| 120 | 120 | <div id="give_profile_billing_address_wrap"> |
| 121 | 121 | |
| 122 | 122 | <p id="give-card-address-wrap" class="form-row form-row-first form-row-responsive"> |
| 123 | - <label for="give_address_line1"><?php esc_html_e( 'Address 1', 'give' ); ?></label> |
|
| 124 | - <input name="give_address_line1" id="give_address_line1" class="text give-input" type="text" value="<?php echo esc_attr( $address['line1'] ); ?>"/> |
|
| 123 | + <label for="give_address_line1"><?php esc_html_e('Address 1', 'give'); ?></label> |
|
| 124 | + <input name="give_address_line1" id="give_address_line1" class="text give-input" type="text" value="<?php echo esc_attr($address['line1']); ?>"/> |
|
| 125 | 125 | </p> |
| 126 | 126 | |
| 127 | 127 | <p id="give-card-address-2-wrap" class="form-row form-row-last form-row-responsive"> |
| 128 | - <label for="give_address_line2"><?php esc_html_e( 'Address 2', 'give' ); ?></label> |
|
| 129 | - <input name="give_address_line2" id="give_address_line2" class="text give-input" type="text" value="<?php echo esc_attr( $address['line2'] ); ?>"/> |
|
| 128 | + <label for="give_address_line2"><?php esc_html_e('Address 2', 'give'); ?></label> |
|
| 129 | + <input name="give_address_line2" id="give_address_line2" class="text give-input" type="text" value="<?php echo esc_attr($address['line2']); ?>"/> |
|
| 130 | 130 | </p> |
| 131 | 131 | |
| 132 | 132 | <p id="give-card-city-wrap" class="form-row form-row-first form-row-responsive"> |
| 133 | - <label for="give_address_city"><?php esc_html_e( 'City', 'give' ); ?></label> |
|
| 134 | - <input name="give_address_city" id="give_address_city" class="text give-input" type="text" value="<?php echo esc_attr( $address['city'] ); ?>"/> |
|
| 133 | + <label for="give_address_city"><?php esc_html_e('City', 'give'); ?></label> |
|
| 134 | + <input name="give_address_city" id="give_address_city" class="text give-input" type="text" value="<?php echo esc_attr($address['city']); ?>"/> |
|
| 135 | 135 | </p> |
| 136 | 136 | |
| 137 | 137 | <p id="give-card-zip-wrap" class="form-row form-row-last form-row-responsive"> |
| 138 | - <label for="give_address_zip"><?php esc_html_e( 'Zip / Postal Code', 'give' ); ?></label> |
|
| 139 | - <input name="give_address_zip" id="give_address_zip" class="text give-input" type="text" value="<?php echo esc_attr( $address['zip'] ); ?>"/> |
|
| 138 | + <label for="give_address_zip"><?php esc_html_e('Zip / Postal Code', 'give'); ?></label> |
|
| 139 | + <input name="give_address_zip" id="give_address_zip" class="text give-input" type="text" value="<?php echo esc_attr($address['zip']); ?>"/> |
|
| 140 | 140 | </p> |
| 141 | 141 | |
| 142 | 142 | <p id="give-card-country-wrap" class="form-row form-row-first form-row-responsive"> |
| 143 | - <label for="give_address_country"><?php esc_html_e( 'Country', 'give' ); ?></label> |
|
| 143 | + <label for="give_address_country"><?php esc_html_e('Country', 'give'); ?></label> |
|
| 144 | 144 | <select name="give_address_country" id="give_address_country" class="select give-select"> |
| 145 | - <?php foreach ( give_get_country_list() as $key => $country ) : ?> |
|
| 146 | - <option value="<?php echo $key; ?>"<?php selected( $address['country'], $key ); ?>><?php echo esc_html( $country ); ?></option> |
|
| 145 | + <?php foreach (give_get_country_list() as $key => $country) : ?> |
|
| 146 | + <option value="<?php echo $key; ?>"<?php selected($address['country'], $key); ?>><?php echo esc_html($country); ?></option> |
|
| 147 | 147 | <?php endforeach; ?> |
| 148 | 148 | </select> |
| 149 | 149 | </p> |
| 150 | 150 | |
| 151 | 151 | <p id="give-card-state-wrap" class="form-row form-row-last form-row-responsive"> |
| 152 | - <label for="give_address_state"><?php esc_html_e( 'State / Province / County', 'give' ); ?></label> |
|
| 153 | - <input name="give_address_state" id="give_address_state" class="text give-input" type="text" value="<?php echo esc_attr( $address['state'] ); ?>"/> |
|
| 152 | + <label for="give_address_state"><?php esc_html_e('State / Province / County', 'give'); ?></label> |
|
| 153 | + <input name="give_address_state" id="give_address_state" class="text give-input" type="text" value="<?php echo esc_attr($address['state']); ?>"/> |
|
| 154 | 154 | </p> |
| 155 | 155 | |
| 156 | 156 | <?php |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | * |
| 162 | 162 | * @since 1.0 |
| 163 | 163 | */ |
| 164 | - do_action( 'give_profile_editor_address' ); |
|
| 164 | + do_action('give_profile_editor_address'); |
|
| 165 | 165 | ?> |
| 166 | 166 | |
| 167 | 167 | </div> |
@@ -174,19 +174,19 @@ discard block |
||
| 174 | 174 | * |
| 175 | 175 | * @since 1.0 |
| 176 | 176 | */ |
| 177 | - do_action( 'give_profile_editor_after_address' ); |
|
| 177 | + do_action('give_profile_editor_after_address'); |
|
| 178 | 178 | ?> |
| 179 | 179 | |
| 180 | - <legend id="give_profile_password_label"><?php esc_html_e( 'Change your Password', 'give' ); ?></legend> |
|
| 180 | + <legend id="give_profile_password_label"><?php esc_html_e('Change your Password', 'give'); ?></legend> |
|
| 181 | 181 | |
| 182 | 182 | <div id="give_profile_password_wrap" class="give-clearfix"> |
| 183 | 183 | <p id="give_profile_password_wrap_1" class="form-row form-row-first form-row-responsive"> |
| 184 | - <label for="give_new_user_pass1"><?php esc_html_e( 'New Password', 'give' ); ?></label> |
|
| 184 | + <label for="give_new_user_pass1"><?php esc_html_e('New Password', 'give'); ?></label> |
|
| 185 | 185 | <input name="give_new_user_pass1" id="give_new_user_pass1" class="password give-input" type="password"/> |
| 186 | 186 | </p> |
| 187 | 187 | |
| 188 | 188 | <p id="give_profile_password_wrap_2" class="form-row form-row-last form-row-responsive"> |
| 189 | - <label for="give_new_user_pass2"><?php esc_html_e( 'Re-enter Password', 'give' ); ?></label> |
|
| 189 | + <label for="give_new_user_pass2"><?php esc_html_e('Re-enter Password', 'give'); ?></label> |
|
| 190 | 190 | <input name="give_new_user_pass2" id="give_new_user_pass2" class="password give-input" type="password"/> |
| 191 | 191 | <?php |
| 192 | 192 | /** |
@@ -196,12 +196,12 @@ discard block |
||
| 196 | 196 | * |
| 197 | 197 | * @since 1.0 |
| 198 | 198 | */ |
| 199 | - do_action( 'give_profile_editor_password' ); |
|
| 199 | + do_action('give_profile_editor_password'); |
|
| 200 | 200 | ?> |
| 201 | 201 | </p> |
| 202 | 202 | </div> |
| 203 | 203 | |
| 204 | - <p class="give_password_change_notice"><?php esc_html_e( 'Please note after changing your password, you must log back in.', 'give' ); ?></p> |
|
| 204 | + <p class="give_password_change_notice"><?php esc_html_e('Please note after changing your password, you must log back in.', 'give'); ?></p> |
|
| 205 | 205 | |
| 206 | 206 | <?php |
| 207 | 207 | /** |
@@ -211,14 +211,14 @@ discard block |
||
| 211 | 211 | * |
| 212 | 212 | * @since 1.0 |
| 213 | 213 | */ |
| 214 | - do_action( 'give_profile_editor_after_password' ); |
|
| 214 | + do_action('give_profile_editor_after_password'); |
|
| 215 | 215 | ?> |
| 216 | 216 | |
| 217 | 217 | <p id="give_profile_submit_wrap"> |
| 218 | - <input type="hidden" name="give_profile_editor_nonce" value="<?php echo wp_create_nonce( 'give-profile-editor-nonce' ); ?>"/> |
|
| 218 | + <input type="hidden" name="give_profile_editor_nonce" value="<?php echo wp_create_nonce('give-profile-editor-nonce'); ?>"/> |
|
| 219 | 219 | <input type="hidden" name="give_action" value="edit_user_profile"/> |
| 220 | - <input type="hidden" name="give_redirect" value="<?php echo esc_url( give_get_current_page_url() ); ?>"/> |
|
| 221 | - <input name="give_profile_editor_submit" id="give_profile_editor_submit" type="submit" class="give_submit" value="<?php esc_attr_e( 'Save Changes', 'give' ); ?>"/> |
|
| 220 | + <input type="hidden" name="give_redirect" value="<?php echo esc_url(give_get_current_page_url()); ?>"/> |
|
| 221 | + <input name="give_profile_editor_submit" id="give_profile_editor_submit" type="submit" class="give_submit" value="<?php esc_attr_e('Save Changes', 'give'); ?>"/> |
|
| 222 | 222 | </p> |
| 223 | 223 | |
| 224 | 224 | </fieldset> |
@@ -233,11 +233,11 @@ discard block |
||
| 233 | 233 | * |
| 234 | 234 | * @since 1.0 |
| 235 | 235 | */ |
| 236 | - do_action( 'give_profile_editor_after' ); |
|
| 236 | + do_action('give_profile_editor_after'); |
|
| 237 | 237 | ?> |
| 238 | 238 | |
| 239 | 239 | <?php |
| 240 | 240 | else: |
| 241 | - esc_html_e( 'You need to login to edit your profile.', 'give' ); |
|
| 241 | + esc_html_e('You need to login to edit your profile.', 'give'); |
|
| 242 | 242 | echo give_login_form(); |
| 243 | 243 | endif; |
@@ -237,7 +237,9 @@ |
||
| 237 | 237 | ?> |
| 238 | 238 | |
| 239 | 239 | <?php |
| 240 | -else: |
|
| 240 | +else { |
|
| 241 | + : |
|
| 241 | 242 | esc_html_e( 'You need to login to edit your profile.', 'give' ); |
| 243 | +} |
|
| 242 | 244 | echo give_login_form(); |
| 243 | 245 | endif; |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | * |
| 22 | 22 | * @param array $args An array of form arguments. |
| 23 | 23 | * |
| 24 | - * @return string Donation form. |
|
| 24 | + * @return false|null Donation form. |
|
| 25 | 25 | */ |
| 26 | 26 | function give_get_donation_form( $args = array() ) { |
| 27 | 27 | |
@@ -1488,7 +1488,7 @@ discard block |
||
| 1488 | 1488 | * |
| 1489 | 1489 | * @param int $form_id The form ID. |
| 1490 | 1490 | * |
| 1491 | - * @return bool |
|
| 1491 | + * @return false|null |
|
| 1492 | 1492 | */ |
| 1493 | 1493 | function give_terms_agreement( $form_id ) { |
| 1494 | 1494 | $form_option = give_get_meta( $form_id, '_give_terms_option', true ); |
@@ -1666,7 +1666,7 @@ discard block |
||
| 1666 | 1666 | * @param int $form_id The form ID. |
| 1667 | 1667 | * @param array $args An array of form arguments. |
| 1668 | 1668 | * |
| 1669 | - * @return mixed |
|
| 1669 | + * @return boolean |
|
| 1670 | 1670 | */ |
| 1671 | 1671 | function give_show_goal_progress( $form_id, $args ) { |
| 1672 | 1672 | |
@@ -1686,7 +1686,7 @@ discard block |
||
| 1686 | 1686 | * |
| 1687 | 1687 | * @since 1.8 |
| 1688 | 1688 | * |
| 1689 | - * @param $form_id |
|
| 1689 | + * @param integer $form_id |
|
| 1690 | 1690 | * @param $args |
| 1691 | 1691 | * |
| 1692 | 1692 | * @return mixed|string |
@@ -1727,7 +1727,7 @@ discard block |
||
| 1727 | 1727 | * @param int $form_id The form ID. |
| 1728 | 1728 | * @param array $args An array of form arguments. |
| 1729 | 1729 | * |
| 1730 | - * @return void|bool |
|
| 1730 | + * @return false|null |
|
| 1731 | 1731 | */ |
| 1732 | 1732 | function give_form_content( $form_id, $args ) { |
| 1733 | 1733 | |
@@ -343,7 +343,7 @@ |
||
| 343 | 343 | ?> |
| 344 | 344 | </div> |
| 345 | 345 | <?php |
| 346 | - elseif ( ( $show_register_form === 'login' || ( $show_register_form === 'both' && isset( $_GET['login'] ) ) ) && ! is_user_logged_in() ) : |
|
| 346 | + elseif ( ( $show_register_form === 'login' || ( $show_register_form === 'both' && isset( $_GET['login'] ) ) ) && ! is_user_logged_in() ) : |
|
| 347 | 347 | ?> |
| 348 | 348 | <div id="give-checkout-login-register-<?php echo $form_id; ?>"> |
| 349 | 349 | <?php |
@@ -1057,9 +1057,12 @@ |
||
| 1057 | 1057 | } |
| 1058 | 1058 | ?> |
| 1059 | 1059 | </select> |
| 1060 | - <?php else : ?> |
|
| 1060 | + <?php else { |
|
| 1061 | + : ?> |
|
| 1061 | 1062 | <input type="text" size="6" name="card_state" id="card_state" class="card_state give-input" |
| 1062 | - placeholder="<?php echo $label; ?>"/> |
|
| 1063 | + placeholder="<?php echo $label; |
|
| 1064 | +} |
|
| 1065 | +?>"/> |
|
| 1063 | 1066 | <?php endif; ?> |
| 1064 | 1067 | </p> |
| 1065 | 1068 | <?php |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | 12 | // Exit if accessed directly. |
| 13 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 13 | +if ( ! defined('ABSPATH')) { |
|
| 14 | 14 | exit; |
| 15 | 15 | } |
| 16 | 16 | |
@@ -23,50 +23,50 @@ discard block |
||
| 23 | 23 | * |
| 24 | 24 | * @return string Donation form. |
| 25 | 25 | */ |
| 26 | -function give_get_donation_form( $args = array() ) { |
|
| 26 | +function give_get_donation_form($args = array()) { |
|
| 27 | 27 | |
| 28 | 28 | global $post; |
| 29 | 29 | |
| 30 | - $form_id = is_object( $post ) ? $post->ID : 0; |
|
| 30 | + $form_id = is_object($post) ? $post->ID : 0; |
|
| 31 | 31 | |
| 32 | - if ( isset( $args['id'] ) ) { |
|
| 32 | + if (isset($args['id'])) { |
|
| 33 | 33 | $form_id = $args['id']; |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | - $defaults = apply_filters( 'give_form_args_defaults', array( |
|
| 36 | + $defaults = apply_filters('give_form_args_defaults', array( |
|
| 37 | 37 | 'form_id' => $form_id, |
| 38 | - ) ); |
|
| 38 | + )); |
|
| 39 | 39 | |
| 40 | - $args = wp_parse_args( $args, $defaults ); |
|
| 40 | + $args = wp_parse_args($args, $defaults); |
|
| 41 | 41 | |
| 42 | - $form = new Give_Donate_Form( $args['form_id'] ); |
|
| 42 | + $form = new Give_Donate_Form($args['form_id']); |
|
| 43 | 43 | |
| 44 | 44 | //bail if no form ID. |
| 45 | - if ( empty( $form->ID ) ) { |
|
| 45 | + if (empty($form->ID)) { |
|
| 46 | 46 | return false; |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - $payment_mode = give_get_chosen_gateway( $form->ID ); |
|
| 49 | + $payment_mode = give_get_chosen_gateway($form->ID); |
|
| 50 | 50 | |
| 51 | - $form_action = add_query_arg( apply_filters( 'give_form_action_args', array( |
|
| 51 | + $form_action = add_query_arg(apply_filters('give_form_action_args', array( |
|
| 52 | 52 | 'payment-mode' => $payment_mode, |
| 53 | - ) ), |
|
| 53 | + )), |
|
| 54 | 54 | give_get_current_page_url() |
| 55 | 55 | ); |
| 56 | 56 | |
| 57 | 57 | //Sanity Check: Donation form not published or user doesn't have permission to view drafts. |
| 58 | 58 | if ( |
| 59 | - ( 'publish' !== $form->post_status && ! current_user_can( 'edit_give_forms', $form->ID ) ) |
|
| 60 | - || ( 'trash' === $form->post_status ) |
|
| 59 | + ('publish' !== $form->post_status && ! current_user_can('edit_give_forms', $form->ID)) |
|
| 60 | + || ('trash' === $form->post_status) |
|
| 61 | 61 | ) { |
| 62 | 62 | return false; |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | //Get the form wrap CSS classes. |
| 66 | - $form_wrap_classes = $form->get_form_wrap_classes( $args ); |
|
| 66 | + $form_wrap_classes = $form->get_form_wrap_classes($args); |
|
| 67 | 67 | |
| 68 | 68 | //Get the <form> tag wrap CSS classes. |
| 69 | - $form_classes = $form->get_form_classes( $args ); |
|
| 69 | + $form_classes = $form->get_form_classes($args); |
|
| 70 | 70 | |
| 71 | 71 | ob_start(); |
| 72 | 72 | |
@@ -78,19 +78,19 @@ discard block |
||
| 78 | 78 | * @param int $form_id The form ID. |
| 79 | 79 | * @param array $args An array of form arguments. |
| 80 | 80 | */ |
| 81 | - do_action( 'give_pre_form_output', $form->ID, $args ); |
|
| 81 | + do_action('give_pre_form_output', $form->ID, $args); |
|
| 82 | 82 | |
| 83 | 83 | ?> |
| 84 | 84 | <div id="give-form-<?php echo $form->ID; ?>-wrap" class="<?php echo $form_wrap_classes; ?>"> |
| 85 | 85 | |
| 86 | - <?php if ( $form->is_close_donation_form() ) { |
|
| 86 | + <?php if ($form->is_close_donation_form()) { |
|
| 87 | 87 | |
| 88 | 88 | // Get Goal thank you message. |
| 89 | - $goal_achieved_message = give_get_meta( $form->ID, '_give_form_goal_achieved_message', true ); |
|
| 90 | - $goal_achieved_message = ! empty( $goal_achieved_message ) ? apply_filters( 'the_content', $goal_achieved_message ) : ''; |
|
| 89 | + $goal_achieved_message = give_get_meta($form->ID, '_give_form_goal_achieved_message', true); |
|
| 90 | + $goal_achieved_message = ! empty($goal_achieved_message) ? apply_filters('the_content', $goal_achieved_message) : ''; |
|
| 91 | 91 | |
| 92 | 92 | // Print thank you message. |
| 93 | - echo apply_filters( 'give_goal_closed_output', $goal_achieved_message, $form->ID ); |
|
| 93 | + echo apply_filters('give_goal_closed_output', $goal_achieved_message, $form->ID); |
|
| 94 | 94 | |
| 95 | 95 | } else { |
| 96 | 96 | /** |
@@ -98,10 +98,10 @@ discard block |
||
| 98 | 98 | * 1. if show_title params set to true |
| 99 | 99 | * 2. if admin set form display_style to button |
| 100 | 100 | */ |
| 101 | - $form_title = apply_filters( 'give_form_title', '<h2 class="give-form-title">' . get_the_title( $form_id ) . '</h2>' ); |
|
| 101 | + $form_title = apply_filters('give_form_title', '<h2 class="give-form-title">'.get_the_title($form_id).'</h2>'); |
|
| 102 | 102 | if ( |
| 103 | - ( isset( $args['show_title'] ) && $args['show_title'] == true ) |
|
| 104 | - && ! doing_action( 'give_single_form_summary' ) |
|
| 103 | + (isset($args['show_title']) && $args['show_title'] == true) |
|
| 104 | + && ! doing_action('give_single_form_summary') |
|
| 105 | 105 | ) { |
| 106 | 106 | echo $form_title; |
| 107 | 107 | } |
@@ -114,19 +114,19 @@ discard block |
||
| 114 | 114 | * @param int $form_id The form ID. |
| 115 | 115 | * @param array $args An array of form arguments. |
| 116 | 116 | */ |
| 117 | - do_action( 'give_pre_form', $form->ID, $args ); |
|
| 117 | + do_action('give_pre_form', $form->ID, $args); |
|
| 118 | 118 | ?> |
| 119 | 119 | |
| 120 | 120 | <form id="give-form-<?php echo $form_id; ?>" class="<?php echo $form_classes; ?>" |
| 121 | - action="<?php echo esc_url_raw( $form_action ); ?>" method="post"> |
|
| 121 | + action="<?php echo esc_url_raw($form_action); ?>" method="post"> |
|
| 122 | 122 | <input type="hidden" name="give-form-id" value="<?php echo $form->ID; ?>"/> |
| 123 | - <input type="hidden" name="give-form-title" value="<?php echo htmlentities( $form->post_title ); ?>"/> |
|
| 123 | + <input type="hidden" name="give-form-title" value="<?php echo htmlentities($form->post_title); ?>"/> |
|
| 124 | 124 | <input type="hidden" name="give-current-url" |
| 125 | - value="<?php echo htmlspecialchars( give_get_current_page_url() ); ?>"/> |
|
| 125 | + value="<?php echo htmlspecialchars(give_get_current_page_url()); ?>"/> |
|
| 126 | 126 | <input type="hidden" name="give-form-url" |
| 127 | - value="<?php echo htmlspecialchars( give_get_current_page_url() ); ?>"/> |
|
| 127 | + value="<?php echo htmlspecialchars(give_get_current_page_url()); ?>"/> |
|
| 128 | 128 | <input type="hidden" name="give-form-minimum" |
| 129 | - value="<?php echo give_format_amount( give_get_form_minimum_price( $form->ID ), array( 'sanitize' => false ) ); ?>"/> |
|
| 129 | + value="<?php echo give_format_amount(give_get_form_minimum_price($form->ID), array('sanitize' => false)); ?>"/> |
|
| 130 | 130 | |
| 131 | 131 | <!-- The following field is for robots only, invisible to humans: --> |
| 132 | 132 | <span class="give-hidden" style="display: none !important;"> |
@@ -138,13 +138,13 @@ discard block |
||
| 138 | 138 | <?php |
| 139 | 139 | |
| 140 | 140 | // Price ID hidden field for variable (multi-level) donation forms. |
| 141 | - if ( give_has_variable_prices( $form_id ) ) { |
|
| 141 | + if (give_has_variable_prices($form_id)) { |
|
| 142 | 142 | // Get default selected price ID. |
| 143 | - $prices = apply_filters( 'give_form_variable_prices', give_get_variable_prices( $form_id ), $form_id ); |
|
| 143 | + $prices = apply_filters('give_form_variable_prices', give_get_variable_prices($form_id), $form_id); |
|
| 144 | 144 | $price_id = 0; |
| 145 | 145 | //loop through prices. |
| 146 | - foreach ( $prices as $price ) { |
|
| 147 | - if ( isset( $price['_give_default'] ) && $price['_give_default'] === 'default' ) { |
|
| 146 | + foreach ($prices as $price) { |
|
| 147 | + if (isset($price['_give_default']) && $price['_give_default'] === 'default') { |
|
| 148 | 148 | $price_id = $price['_give_id']['level_id']; |
| 149 | 149 | }; |
| 150 | 150 | } |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | * @param int $form_id The form ID. |
| 161 | 161 | * @param array $args An array of form arguments. |
| 162 | 162 | */ |
| 163 | - do_action( 'give_donation_form_top', $form->ID, $args ); |
|
| 163 | + do_action('give_donation_form_top', $form->ID, $args); |
|
| 164 | 164 | |
| 165 | 165 | /** |
| 166 | 166 | * Fires while outputting donation form, for payment gateway fields. |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | * @param int $form_id The form ID. |
| 171 | 171 | * @param array $args An array of form arguments. |
| 172 | 172 | */ |
| 173 | - do_action( 'give_payment_mode_select', $form->ID, $args ); |
|
| 173 | + do_action('give_payment_mode_select', $form->ID, $args); |
|
| 174 | 174 | |
| 175 | 175 | /** |
| 176 | 176 | * Fires while outputting donation form, after all other fields. |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | * @param int $form_id The form ID. |
| 181 | 181 | * @param array $args An array of form arguments. |
| 182 | 182 | */ |
| 183 | - do_action( 'give_donation_form_bottom', $form->ID, $args ); |
|
| 183 | + do_action('give_donation_form_bottom', $form->ID, $args); |
|
| 184 | 184 | |
| 185 | 185 | ?> |
| 186 | 186 | </form> |
@@ -194,12 +194,12 @@ discard block |
||
| 194 | 194 | * @param int $form_id The form ID. |
| 195 | 195 | * @param array $args An array of form arguments. |
| 196 | 196 | */ |
| 197 | - do_action( 'give_post_form', $form->ID, $args ); |
|
| 197 | + do_action('give_post_form', $form->ID, $args); |
|
| 198 | 198 | |
| 199 | 199 | } |
| 200 | 200 | ?> |
| 201 | 201 | |
| 202 | - </div><!--end #give-form-<?php echo absint( $form->ID ); ?>--> |
|
| 202 | + </div><!--end #give-form-<?php echo absint($form->ID); ?>--> |
|
| 203 | 203 | <?php |
| 204 | 204 | |
| 205 | 205 | /** |
@@ -210,11 +210,11 @@ discard block |
||
| 210 | 210 | * @param int $form_id The form ID. |
| 211 | 211 | * @param array $args An array of form arguments. |
| 212 | 212 | */ |
| 213 | - do_action( 'give_post_form_output', $form->ID, $args ); |
|
| 213 | + do_action('give_post_form_output', $form->ID, $args); |
|
| 214 | 214 | |
| 215 | 215 | $final_output = ob_get_clean(); |
| 216 | 216 | |
| 217 | - echo apply_filters( 'give_donate_form', $final_output, $args ); |
|
| 217 | + echo apply_filters('give_donate_form', $final_output, $args); |
|
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | /** |
@@ -231,11 +231,11 @@ discard block |
||
| 231 | 231 | * |
| 232 | 232 | * @return string |
| 233 | 233 | */ |
| 234 | -function give_show_purchase_form( $form_id ) { |
|
| 234 | +function give_show_purchase_form($form_id) { |
|
| 235 | 235 | |
| 236 | - $payment_mode = give_get_chosen_gateway( $form_id ); |
|
| 236 | + $payment_mode = give_get_chosen_gateway($form_id); |
|
| 237 | 237 | |
| 238 | - if ( ! isset( $form_id ) && isset( $_POST['give_form_id'] ) ) { |
|
| 238 | + if ( ! isset($form_id) && isset($_POST['give_form_id'])) { |
|
| 239 | 239 | $form_id = $_POST['give_form_id']; |
| 240 | 240 | } |
| 241 | 241 | |
@@ -244,33 +244,33 @@ discard block |
||
| 244 | 244 | * |
| 245 | 245 | * @since 1.7 |
| 246 | 246 | */ |
| 247 | - do_action( 'give_payment_fields_top', $form_id ); |
|
| 247 | + do_action('give_payment_fields_top', $form_id); |
|
| 248 | 248 | |
| 249 | - if ( give_can_checkout() && isset( $form_id ) ) { |
|
| 249 | + if (give_can_checkout() && isset($form_id)) { |
|
| 250 | 250 | |
| 251 | 251 | /** |
| 252 | 252 | * Fires while displaying donation form, before registration login. |
| 253 | 253 | * |
| 254 | 254 | * @since 1.7 |
| 255 | 255 | */ |
| 256 | - do_action( 'give_donation_form_before_register_login', $form_id ); |
|
| 256 | + do_action('give_donation_form_before_register_login', $form_id); |
|
| 257 | 257 | |
| 258 | 258 | /** |
| 259 | 259 | * Fire when register/login form fields render. |
| 260 | 260 | * |
| 261 | 261 | * @since 1.7 |
| 262 | 262 | */ |
| 263 | - do_action( 'give_donation_form_register_login_fields', $form_id ); |
|
| 263 | + do_action('give_donation_form_register_login_fields', $form_id); |
|
| 264 | 264 | |
| 265 | 265 | /** |
| 266 | 266 | * Fire when credit card form fields render. |
| 267 | 267 | * |
| 268 | 268 | * @since 1.7 |
| 269 | 269 | */ |
| 270 | - do_action( 'give_donation_form_before_cc_form', $form_id ); |
|
| 270 | + do_action('give_donation_form_before_cc_form', $form_id); |
|
| 271 | 271 | |
| 272 | 272 | // Load the credit card form and allow gateways to load their own if they wish. |
| 273 | - if ( has_action( 'give_' . $payment_mode . '_cc_form' ) ) { |
|
| 273 | + if (has_action('give_'.$payment_mode.'_cc_form')) { |
|
| 274 | 274 | /** |
| 275 | 275 | * Fires while displaying donation form, credit card form fields for a given gateway. |
| 276 | 276 | * |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | * |
| 279 | 279 | * @param int $form_id The form ID. |
| 280 | 280 | */ |
| 281 | - do_action( "give_{$payment_mode}_cc_form", $form_id ); |
|
| 281 | + do_action("give_{$payment_mode}_cc_form", $form_id); |
|
| 282 | 282 | } else { |
| 283 | 283 | /** |
| 284 | 284 | * Fires while displaying donation form, credit card form fields. |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | * |
| 288 | 288 | * @param int $form_id The form ID. |
| 289 | 289 | */ |
| 290 | - do_action( 'give_cc_form', $form_id ); |
|
| 290 | + do_action('give_cc_form', $form_id); |
|
| 291 | 291 | } |
| 292 | 292 | |
| 293 | 293 | /** |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | * |
| 296 | 296 | * @since 1.7 |
| 297 | 297 | */ |
| 298 | - do_action( 'give_donation_form_after_cc_form', $form_id ); |
|
| 298 | + do_action('give_donation_form_after_cc_form', $form_id); |
|
| 299 | 299 | |
| 300 | 300 | } else { |
| 301 | 301 | /** |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | * |
| 304 | 304 | * @since 1.7 |
| 305 | 305 | */ |
| 306 | - do_action( 'give_donation_form_no_access', $form_id ); |
|
| 306 | + do_action('give_donation_form_no_access', $form_id); |
|
| 307 | 307 | |
| 308 | 308 | } |
| 309 | 309 | |
@@ -312,10 +312,10 @@ discard block |
||
| 312 | 312 | * |
| 313 | 313 | * @since 1.7 |
| 314 | 314 | */ |
| 315 | - do_action( 'give_payment_fields_bottom', $form_id ); |
|
| 315 | + do_action('give_payment_fields_bottom', $form_id); |
|
| 316 | 316 | } |
| 317 | 317 | |
| 318 | -add_action( 'give_donation_form', 'give_show_purchase_form' ); |
|
| 318 | +add_action('give_donation_form', 'give_show_purchase_form'); |
|
| 319 | 319 | |
| 320 | 320 | /** |
| 321 | 321 | * Give Show Login/Register Form Fields. |
@@ -326,11 +326,11 @@ discard block |
||
| 326 | 326 | * |
| 327 | 327 | * @return void |
| 328 | 328 | */ |
| 329 | -function give_show_register_login_fields( $form_id ) { |
|
| 329 | +function give_show_register_login_fields($form_id) { |
|
| 330 | 330 | |
| 331 | - $show_register_form = give_show_login_register_option( $form_id ); |
|
| 331 | + $show_register_form = give_show_login_register_option($form_id); |
|
| 332 | 332 | |
| 333 | - if ( ( $show_register_form === 'registration' || ( $show_register_form === 'both' && ! isset( $_GET['login'] ) ) ) && ! is_user_logged_in() ) : |
|
| 333 | + if (($show_register_form === 'registration' || ($show_register_form === 'both' && ! isset($_GET['login']))) && ! is_user_logged_in()) : |
|
| 334 | 334 | ?> |
| 335 | 335 | <div id="give-checkout-login-register-<?php echo $form_id; ?>"> |
| 336 | 336 | <?php |
@@ -339,11 +339,11 @@ discard block |
||
| 339 | 339 | * |
| 340 | 340 | * @since 1.7 |
| 341 | 341 | */ |
| 342 | - do_action( 'give_donation_form_register_fields', $form_id ); |
|
| 342 | + do_action('give_donation_form_register_fields', $form_id); |
|
| 343 | 343 | ?> |
| 344 | 344 | </div> |
| 345 | 345 | <?php |
| 346 | - elseif ( ( $show_register_form === 'login' || ( $show_register_form === 'both' && isset( $_GET['login'] ) ) ) && ! is_user_logged_in() ) : |
|
| 346 | + elseif (($show_register_form === 'login' || ($show_register_form === 'both' && isset($_GET['login']))) && ! is_user_logged_in()) : |
|
| 347 | 347 | ?> |
| 348 | 348 | <div id="give-checkout-login-register-<?php echo $form_id; ?>"> |
| 349 | 349 | <?php |
@@ -352,23 +352,23 @@ discard block |
||
| 352 | 352 | * |
| 353 | 353 | * @since 1.7 |
| 354 | 354 | */ |
| 355 | - do_action( 'give_donation_form_login_fields', $form_id ); |
|
| 355 | + do_action('give_donation_form_login_fields', $form_id); |
|
| 356 | 356 | ?> |
| 357 | 357 | </div> |
| 358 | 358 | <?php |
| 359 | 359 | endif; |
| 360 | 360 | |
| 361 | - if ( ( ! isset( $_GET['login'] ) && is_user_logged_in() ) || ! isset( $show_register_form ) || 'none' === $show_register_form || 'login' === $show_register_form ) { |
|
| 361 | + if (( ! isset($_GET['login']) && is_user_logged_in()) || ! isset($show_register_form) || 'none' === $show_register_form || 'login' === $show_register_form) { |
|
| 362 | 362 | /** |
| 363 | 363 | * Fire when user info render. |
| 364 | 364 | * |
| 365 | 365 | * @since 1.7 |
| 366 | 366 | */ |
| 367 | - do_action( 'give_donation_form_after_user_info', $form_id ); |
|
| 367 | + do_action('give_donation_form_after_user_info', $form_id); |
|
| 368 | 368 | } |
| 369 | 369 | } |
| 370 | 370 | |
| 371 | -add_action( 'give_donation_form_register_login_fields', 'give_show_register_login_fields' ); |
|
| 371 | +add_action('give_donation_form_register_login_fields', 'give_show_register_login_fields'); |
|
| 372 | 372 | |
| 373 | 373 | /** |
| 374 | 374 | * Donation Amount Field. |
@@ -383,16 +383,16 @@ discard block |
||
| 383 | 383 | * |
| 384 | 384 | * @return void |
| 385 | 385 | */ |
| 386 | -function give_output_donation_amount_top( $form_id = 0, $args = array() ) { |
|
| 386 | +function give_output_donation_amount_top($form_id = 0, $args = array()) { |
|
| 387 | 387 | |
| 388 | 388 | $give_options = give_get_settings(); |
| 389 | - $variable_pricing = give_has_variable_prices( $form_id ); |
|
| 390 | - $allow_custom_amount = give_get_meta( $form_id, '_give_custom_amount', true ); |
|
| 391 | - $currency_position = isset( $give_options['currency_position'] ) ? $give_options['currency_position'] : 'before'; |
|
| 392 | - $symbol = give_currency_symbol( give_get_currency() ); |
|
| 393 | - $currency_output = '<span class="give-currency-symbol give-currency-position-' . $currency_position . '">' . $symbol . '</span>'; |
|
| 394 | - $default_amount = give_format_amount( give_get_default_form_amount( $form_id ), array( 'sanitize' => false ) ); |
|
| 395 | - $custom_amount_text = give_get_meta( $form_id, '_give_custom_amount_text', true ); |
|
| 389 | + $variable_pricing = give_has_variable_prices($form_id); |
|
| 390 | + $allow_custom_amount = give_get_meta($form_id, '_give_custom_amount', true); |
|
| 391 | + $currency_position = isset($give_options['currency_position']) ? $give_options['currency_position'] : 'before'; |
|
| 392 | + $symbol = give_currency_symbol(give_get_currency()); |
|
| 393 | + $currency_output = '<span class="give-currency-symbol give-currency-position-'.$currency_position.'">'.$symbol.'</span>'; |
|
| 394 | + $default_amount = give_format_amount(give_get_default_form_amount($form_id), array('sanitize' => false)); |
|
| 395 | + $custom_amount_text = give_get_meta($form_id, '_give_custom_amount_text', true); |
|
| 396 | 396 | |
| 397 | 397 | /** |
| 398 | 398 | * Fires while displaying donation form, before donation level fields. |
@@ -402,20 +402,20 @@ discard block |
||
| 402 | 402 | * @param int $form_id The form ID. |
| 403 | 403 | * @param array $args An array of form arguments. |
| 404 | 404 | */ |
| 405 | - do_action( 'give_before_donation_levels', $form_id, $args ); |
|
| 405 | + do_action('give_before_donation_levels', $form_id, $args); |
|
| 406 | 406 | |
| 407 | 407 | //Set Price, No Custom Amount Allowed means hidden price field |
| 408 | - if ( ! give_is_setting_enabled( $allow_custom_amount ) ) { |
|
| 408 | + if ( ! give_is_setting_enabled($allow_custom_amount)) { |
|
| 409 | 409 | ?> |
| 410 | - <label class="give-hidden" for="give-amount-hidden"><?php esc_html_e( 'Donation Amount:', 'give' ); ?></label> |
|
| 410 | + <label class="give-hidden" for="give-amount-hidden"><?php esc_html_e('Donation Amount:', 'give'); ?></label> |
|
| 411 | 411 | <input id="give-amount" class="give-amount-hidden" type="hidden" name="give-amount" |
| 412 | 412 | value="<?php echo $default_amount; ?>" required aria-required="true"/> |
| 413 | 413 | <div class="set-price give-donation-amount form-row-wide"> |
| 414 | - <?php if ( $currency_position == 'before' ) { |
|
| 414 | + <?php if ($currency_position == 'before') { |
|
| 415 | 415 | echo $currency_output; |
| 416 | 416 | } ?> |
| 417 | 417 | <span id="give-amount-text" class="give-text-input give-amount-top"><?php echo $default_amount; ?></span> |
| 418 | - <?php if ( $currency_position == 'after' ) { |
|
| 418 | + <?php if ($currency_position == 'after') { |
|
| 419 | 419 | echo $currency_output; |
| 420 | 420 | } ?> |
| 421 | 421 | </div> |
@@ -425,13 +425,13 @@ discard block |
||
| 425 | 425 | ?> |
| 426 | 426 | <div class="give-total-wrap"> |
| 427 | 427 | <div class="give-donation-amount form-row-wide"> |
| 428 | - <?php if ( $currency_position == 'before' ) { |
|
| 428 | + <?php if ($currency_position == 'before') { |
|
| 429 | 429 | echo $currency_output; |
| 430 | 430 | } ?> |
| 431 | - <label class="give-hidden" for="give-amount"><?php esc_html_e( 'Donation Amount:', 'give' ); ?></label> |
|
| 431 | + <label class="give-hidden" for="give-amount"><?php esc_html_e('Donation Amount:', 'give'); ?></label> |
|
| 432 | 432 | <input class="give-text-input give-amount-top" id="give-amount" name="give-amount" type="tel" |
| 433 | 433 | placeholder="" value="<?php echo $default_amount; ?>" autocomplete="off"> |
| 434 | - <?php if ( $currency_position == 'after' ) { |
|
| 434 | + <?php if ($currency_position == 'after') { |
|
| 435 | 435 | echo $currency_output; |
| 436 | 436 | } ?> |
| 437 | 437 | </div> |
@@ -446,16 +446,16 @@ discard block |
||
| 446 | 446 | * @param int $form_id The form ID. |
| 447 | 447 | * @param array $args An array of form arguments. |
| 448 | 448 | */ |
| 449 | - do_action( 'give_after_donation_amount', $form_id, $args ); |
|
| 449 | + do_action('give_after_donation_amount', $form_id, $args); |
|
| 450 | 450 | |
| 451 | 451 | //Custom Amount Text |
| 452 | - if ( ! $variable_pricing && give_is_setting_enabled( $allow_custom_amount ) && ! empty( $custom_amount_text ) ) { ?> |
|
| 452 | + if ( ! $variable_pricing && give_is_setting_enabled($allow_custom_amount) && ! empty($custom_amount_text)) { ?> |
|
| 453 | 453 | <p class="give-custom-amount-text"><?php echo $custom_amount_text; ?></p> |
| 454 | 454 | <?php } |
| 455 | 455 | |
| 456 | 456 | //Output Variable Pricing Levels. |
| 457 | - if ( $variable_pricing ) { |
|
| 458 | - give_output_levels( $form_id ); |
|
| 457 | + if ($variable_pricing) { |
|
| 458 | + give_output_levels($form_id); |
|
| 459 | 459 | } |
| 460 | 460 | |
| 461 | 461 | /** |
@@ -466,10 +466,10 @@ discard block |
||
| 466 | 466 | * @param int $form_id The form ID. |
| 467 | 467 | * @param array $args An array of form arguments. |
| 468 | 468 | */ |
| 469 | - do_action( 'give_after_donation_levels', $form_id, $args ); |
|
| 469 | + do_action('give_after_donation_levels', $form_id, $args); |
|
| 470 | 470 | } |
| 471 | 471 | |
| 472 | -add_action( 'give_donation_form_top', 'give_output_donation_amount_top', 10, 2 ); |
|
| 472 | +add_action('give_donation_form_top', 'give_output_donation_amount_top', 10, 2); |
|
| 473 | 473 | |
| 474 | 474 | /** |
| 475 | 475 | * Outputs the Donation Levels in various formats such as dropdown, radios, and buttons. |
@@ -480,30 +480,30 @@ discard block |
||
| 480 | 480 | * |
| 481 | 481 | * @return string Donation levels. |
| 482 | 482 | */ |
| 483 | -function give_output_levels( $form_id ) { |
|
| 483 | +function give_output_levels($form_id) { |
|
| 484 | 484 | |
| 485 | 485 | //Get variable pricing. |
| 486 | - $prices = apply_filters( 'give_form_variable_prices', give_get_variable_prices( $form_id ), $form_id ); |
|
| 487 | - $display_style = give_get_meta( $form_id, '_give_display_style', true ); |
|
| 488 | - $custom_amount = give_get_meta( $form_id, '_give_custom_amount', true ); |
|
| 489 | - $custom_amount_text = give_get_meta( $form_id, '_give_custom_amount_text', true ); |
|
| 490 | - if ( empty( $custom_amount_text ) ) { |
|
| 491 | - $custom_amount_text = esc_html__( 'Give a Custom Amount', 'give' ); |
|
| 486 | + $prices = apply_filters('give_form_variable_prices', give_get_variable_prices($form_id), $form_id); |
|
| 487 | + $display_style = give_get_meta($form_id, '_give_display_style', true); |
|
| 488 | + $custom_amount = give_get_meta($form_id, '_give_custom_amount', true); |
|
| 489 | + $custom_amount_text = give_get_meta($form_id, '_give_custom_amount_text', true); |
|
| 490 | + if (empty($custom_amount_text)) { |
|
| 491 | + $custom_amount_text = esc_html__('Give a Custom Amount', 'give'); |
|
| 492 | 492 | } |
| 493 | 493 | |
| 494 | 494 | $output = ''; |
| 495 | 495 | |
| 496 | - switch ( $display_style ) { |
|
| 496 | + switch ($display_style) { |
|
| 497 | 497 | case 'buttons': |
| 498 | 498 | |
| 499 | 499 | $output .= '<ul id="give-donation-level-button-wrap" class="give-donation-levels-wrap give-list-inline">'; |
| 500 | 500 | |
| 501 | - foreach ( $prices as $price ) { |
|
| 502 | - $level_text = apply_filters( 'give_form_level_text', ! empty( $price['_give_text'] ) ? $price['_give_text'] : give_currency_filter( give_format_amount( $price['_give_amount'], array( 'sanitize' => false ) ) ), $form_id, $price ); |
|
| 503 | - $level_classes = apply_filters( 'give_form_level_classes', 'give-donation-level-btn give-btn give-btn-level-' . $price['_give_id']['level_id'] . ' ' . ( ( isset( $price['_give_default'] ) && $price['_give_default'] === 'default' ) ? 'give-default-level' : '' ), $form_id, $price ); |
|
| 501 | + foreach ($prices as $price) { |
|
| 502 | + $level_text = apply_filters('give_form_level_text', ! empty($price['_give_text']) ? $price['_give_text'] : give_currency_filter(give_format_amount($price['_give_amount'], array('sanitize' => false))), $form_id, $price); |
|
| 503 | + $level_classes = apply_filters('give_form_level_classes', 'give-donation-level-btn give-btn give-btn-level-'.$price['_give_id']['level_id'].' '.((isset($price['_give_default']) && $price['_give_default'] === 'default') ? 'give-default-level' : ''), $form_id, $price); |
|
| 504 | 504 | |
| 505 | 505 | $output .= '<li>'; |
| 506 | - $output .= '<button type="button" data-price-id="' . $price['_give_id']['level_id'] . '" class=" ' . $level_classes . '" value="' . give_format_amount( $price['_give_amount'], array( 'sanitize' => false ) ) . '">'; |
|
| 506 | + $output .= '<button type="button" data-price-id="'.$price['_give_id']['level_id'].'" class=" '.$level_classes.'" value="'.give_format_amount($price['_give_amount'], array('sanitize' => false)).'">'; |
|
| 507 | 507 | $output .= $level_text; |
| 508 | 508 | $output .= '</button>'; |
| 509 | 509 | $output .= '</li>'; |
@@ -511,7 +511,7 @@ discard block |
||
| 511 | 511 | } |
| 512 | 512 | |
| 513 | 513 | //Custom Amount. |
| 514 | - if ( give_is_setting_enabled( $custom_amount ) && ! empty( $custom_amount_text ) ) { |
|
| 514 | + if (give_is_setting_enabled($custom_amount) && ! empty($custom_amount_text)) { |
|
| 515 | 515 | $output .= '<li>'; |
| 516 | 516 | $output .= '<button type="button" data-price-id="custom" class="give-donation-level-btn give-btn give-btn-level-custom" value="custom">'; |
| 517 | 517 | $output .= $custom_amount_text; |
@@ -527,22 +527,22 @@ discard block |
||
| 527 | 527 | |
| 528 | 528 | $output .= '<ul id="give-donation-level-radio-list" class="give-donation-levels-wrap">'; |
| 529 | 529 | |
| 530 | - foreach ( $prices as $price ) { |
|
| 531 | - $level_text = apply_filters( 'give_form_level_text', ! empty( $price['_give_text'] ) ? $price['_give_text'] : give_currency_filter( give_format_amount( $price['_give_amount'], array( 'sanitize' => false ) ) ), $form_id, $price ); |
|
| 532 | - $level_classes = apply_filters( 'give_form_level_classes', 'give-radio-input give-radio-input-level give-radio-level-' . $price['_give_id']['level_id'] . ( ( isset( $price['_give_default'] ) && $price['_give_default'] === 'default' ) ? ' give-default-level' : '' ), $form_id, $price ); |
|
| 530 | + foreach ($prices as $price) { |
|
| 531 | + $level_text = apply_filters('give_form_level_text', ! empty($price['_give_text']) ? $price['_give_text'] : give_currency_filter(give_format_amount($price['_give_amount'], array('sanitize' => false))), $form_id, $price); |
|
| 532 | + $level_classes = apply_filters('give_form_level_classes', 'give-radio-input give-radio-input-level give-radio-level-'.$price['_give_id']['level_id'].((isset($price['_give_default']) && $price['_give_default'] === 'default') ? ' give-default-level' : ''), $form_id, $price); |
|
| 533 | 533 | |
| 534 | 534 | $output .= '<li>'; |
| 535 | - $output .= '<input type="radio" data-price-id="' . $price['_give_id']['level_id'] . '" class="' . $level_classes . '" name="give-radio-donation-level" id="give-radio-level-' . $price['_give_id']['level_id'] . '" ' . ( ( isset( $price['_give_default'] ) && $price['_give_default'] === 'default' ) ? 'checked="checked"' : '' ) . ' value="' . give_format_amount( $price['_give_amount'], array( 'sanitize' => false ) ) . '">'; |
|
| 536 | - $output .= '<label for="give-radio-level-' . $price['_give_id']['level_id'] . '">' . $level_text . '</label>'; |
|
| 535 | + $output .= '<input type="radio" data-price-id="'.$price['_give_id']['level_id'].'" class="'.$level_classes.'" name="give-radio-donation-level" id="give-radio-level-'.$price['_give_id']['level_id'].'" '.((isset($price['_give_default']) && $price['_give_default'] === 'default') ? 'checked="checked"' : '').' value="'.give_format_amount($price['_give_amount'], array('sanitize' => false)).'">'; |
|
| 536 | + $output .= '<label for="give-radio-level-'.$price['_give_id']['level_id'].'">'.$level_text.'</label>'; |
|
| 537 | 537 | $output .= '</li>'; |
| 538 | 538 | |
| 539 | 539 | } |
| 540 | 540 | |
| 541 | 541 | //Custom Amount. |
| 542 | - if ( give_is_setting_enabled( $custom_amount ) && ! empty( $custom_amount_text ) ) { |
|
| 542 | + if (give_is_setting_enabled($custom_amount) && ! empty($custom_amount_text)) { |
|
| 543 | 543 | $output .= '<li>'; |
| 544 | 544 | $output .= '<input type="radio" data-price-id="custom" class="give-radio-input give-radio-input-level give-radio-level-custom" name="give-radio-donation-level" id="give-radio-level-custom" value="custom">'; |
| 545 | - $output .= '<label for="give-radio-level-custom">' . $custom_amount_text . '</label>'; |
|
| 545 | + $output .= '<label for="give-radio-level-custom">'.$custom_amount_text.'</label>'; |
|
| 546 | 546 | $output .= '</li>'; |
| 547 | 547 | } |
| 548 | 548 | |
@@ -552,23 +552,23 @@ discard block |
||
| 552 | 552 | |
| 553 | 553 | case 'dropdown': |
| 554 | 554 | |
| 555 | - $output .= '<label for="give-donation-level-select-' . $form_id . '" class="give-hidden">' . esc_html__( 'Choose Your Donation Amount', 'give' ) . ':</label>'; |
|
| 556 | - $output .= '<select id="give-donation-level-select-' . $form_id . '" class="give-select give-select-level give-donation-levels-wrap">'; |
|
| 555 | + $output .= '<label for="give-donation-level-select-'.$form_id.'" class="give-hidden">'.esc_html__('Choose Your Donation Amount', 'give').':</label>'; |
|
| 556 | + $output .= '<select id="give-donation-level-select-'.$form_id.'" class="give-select give-select-level give-donation-levels-wrap">'; |
|
| 557 | 557 | |
| 558 | 558 | //first loop through prices. |
| 559 | - foreach ( $prices as $price ) { |
|
| 560 | - $level_text = apply_filters( 'give_form_level_text', ! empty( $price['_give_text'] ) ? $price['_give_text'] : give_currency_filter( give_format_amount( $price['_give_amount'], array( 'sanitize' => false ) ) ), $form_id, $price ); |
|
| 561 | - $level_classes = apply_filters( 'give_form_level_classes', 'give-donation-level-' . $price['_give_id']['level_id'] . ( ( isset( $price['_give_default'] ) && $price['_give_default'] === 'default' ) ? ' give-default-level' : '' ), $form_id, $price ); |
|
| 559 | + foreach ($prices as $price) { |
|
| 560 | + $level_text = apply_filters('give_form_level_text', ! empty($price['_give_text']) ? $price['_give_text'] : give_currency_filter(give_format_amount($price['_give_amount'], array('sanitize' => false))), $form_id, $price); |
|
| 561 | + $level_classes = apply_filters('give_form_level_classes', 'give-donation-level-'.$price['_give_id']['level_id'].((isset($price['_give_default']) && $price['_give_default'] === 'default') ? ' give-default-level' : ''), $form_id, $price); |
|
| 562 | 562 | |
| 563 | - $output .= '<option data-price-id="' . $price['_give_id']['level_id'] . '" class="' . $level_classes . '" ' . ( ( isset( $price['_give_default'] ) && $price['_give_default'] === 'default' ) ? 'selected="selected"' : '' ) . ' value="' . give_format_amount( $price['_give_amount'], array( 'sanitize' => false ) ) . '">'; |
|
| 563 | + $output .= '<option data-price-id="'.$price['_give_id']['level_id'].'" class="'.$level_classes.'" '.((isset($price['_give_default']) && $price['_give_default'] === 'default') ? 'selected="selected"' : '').' value="'.give_format_amount($price['_give_amount'], array('sanitize' => false)).'">'; |
|
| 564 | 564 | $output .= $level_text; |
| 565 | 565 | $output .= '</option>'; |
| 566 | 566 | |
| 567 | 567 | } |
| 568 | 568 | |
| 569 | 569 | //Custom Amount. |
| 570 | - if ( give_is_setting_enabled( $custom_amount ) && ! empty( $custom_amount_text ) ) { |
|
| 571 | - $output .= '<option data-price-id="custom" class="give-donation-level-custom" value="custom">' . $custom_amount_text . '</option>'; |
|
| 570 | + if (give_is_setting_enabled($custom_amount) && ! empty($custom_amount_text)) { |
|
| 571 | + $output .= '<option data-price-id="custom" class="give-donation-level-custom" value="custom">'.$custom_amount_text.'</option>'; |
|
| 572 | 572 | } |
| 573 | 573 | |
| 574 | 574 | $output .= '</select>'; |
@@ -576,7 +576,7 @@ discard block |
||
| 576 | 576 | break; |
| 577 | 577 | } |
| 578 | 578 | |
| 579 | - echo apply_filters( 'give_form_level_output', $output, $form_id ); |
|
| 579 | + echo apply_filters('give_form_level_output', $output, $form_id); |
|
| 580 | 580 | } |
| 581 | 581 | |
| 582 | 582 | /** |
@@ -591,27 +591,27 @@ discard block |
||
| 591 | 591 | * |
| 592 | 592 | * @return string Checkout button. |
| 593 | 593 | */ |
| 594 | -function give_display_checkout_button( $form_id, $args ) { |
|
| 594 | +function give_display_checkout_button($form_id, $args) { |
|
| 595 | 595 | |
| 596 | - $display_option = ( isset( $args['display_style'] ) && ! empty( $args['display_style'] ) ) |
|
| 596 | + $display_option = (isset($args['display_style']) && ! empty($args['display_style'])) |
|
| 597 | 597 | ? $args['display_style'] |
| 598 | - : give_get_meta( $form_id, '_give_payment_display', true ); |
|
| 598 | + : give_get_meta($form_id, '_give_payment_display', true); |
|
| 599 | 599 | |
| 600 | - if ( 'button' === $display_option ) { |
|
| 600 | + if ('button' === $display_option) { |
|
| 601 | 601 | $display_option = 'modal'; |
| 602 | - } elseif ( $display_option === 'onpage' ) { |
|
| 602 | + } elseif ($display_option === 'onpage') { |
|
| 603 | 603 | return ''; |
| 604 | 604 | } |
| 605 | 605 | |
| 606 | - $display_label_field = give_get_meta( $form_id, '_give_reveal_label', true ); |
|
| 607 | - $display_label = ! empty( $args['continue_button_title'] ) ? $args['continue_button_title'] : ( ! empty( $display_label_field ) ? $display_label_field : esc_html__( 'Donate Now', 'give' ) ); |
|
| 606 | + $display_label_field = give_get_meta($form_id, '_give_reveal_label', true); |
|
| 607 | + $display_label = ! empty($args['continue_button_title']) ? $args['continue_button_title'] : ( ! empty($display_label_field) ? $display_label_field : esc_html__('Donate Now', 'give')); |
|
| 608 | 608 | |
| 609 | - $output = '<button type="button" class="give-btn give-btn-' . $display_option . '">' . $display_label . '</button>'; |
|
| 609 | + $output = '<button type="button" class="give-btn give-btn-'.$display_option.'">'.$display_label.'</button>'; |
|
| 610 | 610 | |
| 611 | - echo apply_filters( 'give_display_checkout_button', $output ); |
|
| 611 | + echo apply_filters('give_display_checkout_button', $output); |
|
| 612 | 612 | } |
| 613 | 613 | |
| 614 | -add_action( 'give_after_donation_levels', 'give_display_checkout_button', 10, 2 ); |
|
| 614 | +add_action('give_after_donation_levels', 'give_display_checkout_button', 10, 2); |
|
| 615 | 615 | |
| 616 | 616 | /** |
| 617 | 617 | * Shows the User Info fields in the Personal Info box, more fields can be added via the hooks provided. |
@@ -622,57 +622,57 @@ discard block |
||
| 622 | 622 | * |
| 623 | 623 | * @return void |
| 624 | 624 | */ |
| 625 | -function give_user_info_fields( $form_id ) { |
|
| 625 | +function give_user_info_fields($form_id) { |
|
| 626 | 626 | // Get user info. |
| 627 | - $give_user_info = _give_get_prefill_form_field_values( $form_id ); |
|
| 627 | + $give_user_info = _give_get_prefill_form_field_values($form_id); |
|
| 628 | 628 | |
| 629 | 629 | /** |
| 630 | 630 | * Fire before user personal information fields |
| 631 | 631 | * |
| 632 | 632 | * @since 1.7 |
| 633 | 633 | */ |
| 634 | - do_action( 'give_donation_form_before_personal_info', $form_id ); |
|
| 634 | + do_action('give_donation_form_before_personal_info', $form_id); |
|
| 635 | 635 | ?> |
| 636 | 636 | <fieldset id="give_checkout_user_info"> |
| 637 | - <legend><?php echo apply_filters( 'give_checkout_personal_info_text', esc_html__( 'Personal Info', 'give' ) ); ?></legend> |
|
| 637 | + <legend><?php echo apply_filters('give_checkout_personal_info_text', esc_html__('Personal Info', 'give')); ?></legend> |
|
| 638 | 638 | <p id="give-first-name-wrap" class="form-row form-row-first form-row-responsive"> |
| 639 | 639 | <label class="give-label" for="give-first"> |
| 640 | - <?php esc_html_e( 'First Name', 'give' ); ?> |
|
| 641 | - <?php if ( give_field_is_required( 'give_first', $form_id ) ) : ?> |
|
| 640 | + <?php esc_html_e('First Name', 'give'); ?> |
|
| 641 | + <?php if (give_field_is_required('give_first', $form_id)) : ?> |
|
| 642 | 642 | <span class="give-required-indicator">*</span> |
| 643 | 643 | <?php endif ?> |
| 644 | 644 | <span class="give-tooltip give-icon give-icon-question" |
| 645 | - data-tooltip="<?php esc_attr_e( 'We will use this to personalize your account experience.', 'give' ); ?>"></span> |
|
| 645 | + data-tooltip="<?php esc_attr_e('We will use this to personalize your account experience.', 'give'); ?>"></span> |
|
| 646 | 646 | </label> |
| 647 | 647 | <input |
| 648 | 648 | class="give-input required" |
| 649 | 649 | type="text" |
| 650 | 650 | name="give_first" |
| 651 | - placeholder="<?php esc_attr_e( 'First Name', 'give' ); ?>" |
|
| 651 | + placeholder="<?php esc_attr_e('First Name', 'give'); ?>" |
|
| 652 | 652 | id="give-first" |
| 653 | - value="<?php echo isset( $give_user_info['give_first'] ) ? $give_user_info['give_first'] : ''; ?>" |
|
| 654 | - <?php echo( give_field_is_required( 'give_first', $form_id ) ? ' required aria-required="true" ' : '' ); ?> |
|
| 653 | + value="<?php echo isset($give_user_info['give_first']) ? $give_user_info['give_first'] : ''; ?>" |
|
| 654 | + <?php echo(give_field_is_required('give_first', $form_id) ? ' required aria-required="true" ' : ''); ?> |
|
| 655 | 655 | /> |
| 656 | 656 | </p> |
| 657 | 657 | |
| 658 | 658 | <p id="give-last-name-wrap" class="form-row form-row-last form-row-responsive"> |
| 659 | 659 | <label class="give-label" for="give-last"> |
| 660 | - <?php esc_html_e( 'Last Name', 'give' ); ?> |
|
| 661 | - <?php if ( give_field_is_required( 'give_last', $form_id ) ) : ?> |
|
| 660 | + <?php esc_html_e('Last Name', 'give'); ?> |
|
| 661 | + <?php if (give_field_is_required('give_last', $form_id)) : ?> |
|
| 662 | 662 | <span class="give-required-indicator">*</span> |
| 663 | 663 | <?php endif ?> |
| 664 | 664 | <span class="give-tooltip give-icon give-icon-question" |
| 665 | - data-tooltip="<?php esc_attr_e( 'We will use this as well to personalize your account experience.', 'give' ); ?>"></span> |
|
| 665 | + data-tooltip="<?php esc_attr_e('We will use this as well to personalize your account experience.', 'give'); ?>"></span> |
|
| 666 | 666 | </label> |
| 667 | 667 | |
| 668 | 668 | <input |
| 669 | - class="give-input<?php echo( give_field_is_required( 'give_last', $form_id ) ? ' required' : '' ); ?>" |
|
| 669 | + class="give-input<?php echo(give_field_is_required('give_last', $form_id) ? ' required' : ''); ?>" |
|
| 670 | 670 | type="text" |
| 671 | 671 | name="give_last" |
| 672 | 672 | id="give-last" |
| 673 | - placeholder="<?php esc_attr_e( 'Last Name', 'give' ); ?>" |
|
| 674 | - value="<?php echo isset( $give_user_info['give_last'] ) ? $give_user_info['give_last'] : ''; ?>" |
|
| 675 | - <?php echo( give_field_is_required( 'give_last', $form_id ) ? ' required aria-required="true" ' : '' ); ?> |
|
| 673 | + placeholder="<?php esc_attr_e('Last Name', 'give'); ?>" |
|
| 674 | + value="<?php echo isset($give_user_info['give_last']) ? $give_user_info['give_last'] : ''; ?>" |
|
| 675 | + <?php echo(give_field_is_required('give_last', $form_id) ? ' required aria-required="true" ' : ''); ?> |
|
| 676 | 676 | /> |
| 677 | 677 | </p> |
| 678 | 678 | |
@@ -682,26 +682,26 @@ discard block |
||
| 682 | 682 | * |
| 683 | 683 | * @since 1.7 |
| 684 | 684 | */ |
| 685 | - do_action( 'give_donation_form_before_email', $form_id ); |
|
| 685 | + do_action('give_donation_form_before_email', $form_id); |
|
| 686 | 686 | ?> |
| 687 | 687 | <p id="give-email-wrap" class="form-row form-row-wide"> |
| 688 | 688 | <label class="give-label" for="give-email"> |
| 689 | - <?php esc_html_e( 'Email Address', 'give' ); ?> |
|
| 690 | - <?php if ( give_field_is_required( 'give_email', $form_id ) ) { ?> |
|
| 689 | + <?php esc_html_e('Email Address', 'give'); ?> |
|
| 690 | + <?php if (give_field_is_required('give_email', $form_id)) { ?> |
|
| 691 | 691 | <span class="give-required-indicator">*</span> |
| 692 | 692 | <?php } ?> |
| 693 | 693 | <span class="give-tooltip give-icon give-icon-question" |
| 694 | - data-tooltip="<?php esc_attr_e( 'We will send the donation receipt to this address.', 'give' ); ?>"></span> |
|
| 694 | + data-tooltip="<?php esc_attr_e('We will send the donation receipt to this address.', 'give'); ?>"></span> |
|
| 695 | 695 | </label> |
| 696 | 696 | |
| 697 | 697 | <input |
| 698 | 698 | class="give-input required" |
| 699 | 699 | type="email" |
| 700 | 700 | name="give_email" |
| 701 | - placeholder="<?php esc_attr_e( 'Email Address', 'give' ); ?>" |
|
| 701 | + placeholder="<?php esc_attr_e('Email Address', 'give'); ?>" |
|
| 702 | 702 | id="give-email" |
| 703 | - value="<?php echo isset( $give_user_info['give_email'] ) ? $give_user_info['give_email'] : ''; ?>" |
|
| 704 | - <?php echo( give_field_is_required( 'give_email', $form_id ) ? ' required aria-required="true" ' : '' ); ?> |
|
| 703 | + value="<?php echo isset($give_user_info['give_email']) ? $give_user_info['give_email'] : ''; ?>" |
|
| 704 | + <?php echo(give_field_is_required('give_email', $form_id) ? ' required aria-required="true" ' : ''); ?> |
|
| 705 | 705 | /> |
| 706 | 706 | |
| 707 | 707 | </p> |
@@ -711,14 +711,14 @@ discard block |
||
| 711 | 711 | * |
| 712 | 712 | * @since 1.7 |
| 713 | 713 | */ |
| 714 | - do_action( 'give_donation_form_after_email', $form_id ); |
|
| 714 | + do_action('give_donation_form_after_email', $form_id); |
|
| 715 | 715 | |
| 716 | 716 | /** |
| 717 | 717 | * Fire after personal email field |
| 718 | 718 | * |
| 719 | 719 | * @since 1.7 |
| 720 | 720 | */ |
| 721 | - do_action( 'give_donation_form_user_info', $form_id ); |
|
| 721 | + do_action('give_donation_form_user_info', $form_id); |
|
| 722 | 722 | ?> |
| 723 | 723 | </fieldset> |
| 724 | 724 | <?php |
@@ -727,11 +727,11 @@ discard block |
||
| 727 | 727 | * |
| 728 | 728 | * @since 1.7 |
| 729 | 729 | */ |
| 730 | - do_action( 'give_donation_form_after_personal_info', $form_id ); |
|
| 730 | + do_action('give_donation_form_after_personal_info', $form_id); |
|
| 731 | 731 | } |
| 732 | 732 | |
| 733 | -add_action( 'give_donation_form_after_user_info', 'give_user_info_fields' ); |
|
| 734 | -add_action( 'give_register_fields_before', 'give_user_info_fields' ); |
|
| 733 | +add_action('give_donation_form_after_user_info', 'give_user_info_fields'); |
|
| 734 | +add_action('give_register_fields_before', 'give_user_info_fields'); |
|
| 735 | 735 | |
| 736 | 736 | /** |
| 737 | 737 | * Renders the credit card info form. |
@@ -742,7 +742,7 @@ discard block |
||
| 742 | 742 | * |
| 743 | 743 | * @return void |
| 744 | 744 | */ |
| 745 | -function give_get_cc_form( $form_id ) { |
|
| 745 | +function give_get_cc_form($form_id) { |
|
| 746 | 746 | |
| 747 | 747 | ob_start(); |
| 748 | 748 | |
@@ -753,53 +753,53 @@ discard block |
||
| 753 | 753 | * |
| 754 | 754 | * @param int $form_id The form ID. |
| 755 | 755 | */ |
| 756 | - do_action( 'give_before_cc_fields', $form_id ); |
|
| 756 | + do_action('give_before_cc_fields', $form_id); |
|
| 757 | 757 | ?> |
| 758 | 758 | <fieldset id="give_cc_fields-<?php echo $form_id ?>" class="give-do-validate"> |
| 759 | - <legend><?php echo apply_filters( 'give_credit_card_fieldset_heading', esc_html__( 'Credit Card Info', 'give' ) ); ?></legend> |
|
| 760 | - <?php if ( is_ssl() ) : ?> |
|
| 759 | + <legend><?php echo apply_filters('give_credit_card_fieldset_heading', esc_html__('Credit Card Info', 'give')); ?></legend> |
|
| 760 | + <?php if (is_ssl()) : ?> |
|
| 761 | 761 | <div id="give_secure_site_wrapper-<?php echo $form_id ?>"> |
| 762 | 762 | <span class="give-icon padlock"></span> |
| 763 | - <span><?php esc_html_e( 'This is a secure SSL encrypted payment.', 'give' ); ?></span> |
|
| 763 | + <span><?php esc_html_e('This is a secure SSL encrypted payment.', 'give'); ?></span> |
|
| 764 | 764 | </div> |
| 765 | 765 | <?php endif; ?> |
| 766 | 766 | <p id="give-card-number-wrap-<?php echo $form_id ?>" class="form-row form-row-two-thirds form-row-responsive"> |
| 767 | 767 | <label for="card_number-<?php echo $form_id ?>" class="give-label"> |
| 768 | - <?php esc_html_e( 'Card Number', 'give' ); ?> |
|
| 768 | + <?php esc_html_e('Card Number', 'give'); ?> |
|
| 769 | 769 | <span class="give-required-indicator">*</span> |
| 770 | 770 | <span class="give-tooltip give-icon give-icon-question" |
| 771 | - data-tooltip="<?php esc_attr_e( 'The (typically) 16 digits on the front of your credit card.', 'give' ); ?>"></span> |
|
| 771 | + data-tooltip="<?php esc_attr_e('The (typically) 16 digits on the front of your credit card.', 'give'); ?>"></span> |
|
| 772 | 772 | <span class="card-type"></span> |
| 773 | 773 | </label> |
| 774 | 774 | |
| 775 | 775 | <input type="tel" autocomplete="off" name="card_number" id="card_number-<?php echo $form_id ?>" |
| 776 | - class="card-number give-input required" placeholder="<?php esc_attr_e( 'Card number', 'give' ); ?>" |
|
| 776 | + class="card-number give-input required" placeholder="<?php esc_attr_e('Card number', 'give'); ?>" |
|
| 777 | 777 | required aria-required="true"/> |
| 778 | 778 | </p> |
| 779 | 779 | |
| 780 | 780 | <p id="give-card-cvc-wrap-<?php echo $form_id ?>" class="form-row form-row-one-third form-row-responsive"> |
| 781 | 781 | <label for="card_cvc-<?php echo $form_id ?>" class="give-label"> |
| 782 | - <?php esc_html_e( 'CVC', 'give' ); ?> |
|
| 782 | + <?php esc_html_e('CVC', 'give'); ?> |
|
| 783 | 783 | <span class="give-required-indicator">*</span> |
| 784 | 784 | <span class="give-tooltip give-icon give-icon-question" |
| 785 | - data-tooltip="<?php esc_attr_e( 'The 3 digit (back) or 4 digit (front) value on your card.', 'give' ); ?>"></span> |
|
| 785 | + data-tooltip="<?php esc_attr_e('The 3 digit (back) or 4 digit (front) value on your card.', 'give'); ?>"></span> |
|
| 786 | 786 | </label> |
| 787 | 787 | |
| 788 | 788 | <input type="tel" size="4" autocomplete="off" name="card_cvc" id="card_cvc-<?php echo $form_id ?>" |
| 789 | - class="card-cvc give-input required" placeholder="<?php esc_attr_e( 'Security code', 'give' ); ?>" |
|
| 789 | + class="card-cvc give-input required" placeholder="<?php esc_attr_e('Security code', 'give'); ?>" |
|
| 790 | 790 | required aria-required="true"/> |
| 791 | 791 | </p> |
| 792 | 792 | |
| 793 | 793 | <p id="give-card-name-wrap-<?php echo $form_id ?>" class="form-row form-row-two-thirds form-row-responsive"> |
| 794 | 794 | <label for="card_name-<?php echo $form_id ?>" class="give-label"> |
| 795 | - <?php esc_html_e( 'Name on the Card', 'give' ); ?> |
|
| 795 | + <?php esc_html_e('Name on the Card', 'give'); ?> |
|
| 796 | 796 | <span class="give-required-indicator">*</span> |
| 797 | 797 | <span class="give-tooltip give-icon give-icon-question" |
| 798 | - data-tooltip="<?php esc_attr_e( 'The name printed on the front of your credit card.', 'give' ); ?>"></span> |
|
| 798 | + data-tooltip="<?php esc_attr_e('The name printed on the front of your credit card.', 'give'); ?>"></span> |
|
| 799 | 799 | </label> |
| 800 | 800 | |
| 801 | 801 | <input type="text" autocomplete="off" name="card_name" id="card_name-<?php echo $form_id ?>" |
| 802 | - class="card-name give-input required" placeholder="<?php esc_attr_e( 'Card name', 'give' ); ?>" |
|
| 802 | + class="card-name give-input required" placeholder="<?php esc_attr_e('Card name', 'give'); ?>" |
|
| 803 | 803 | required aria-required="true"/> |
| 804 | 804 | </p> |
| 805 | 805 | <?php |
@@ -810,14 +810,14 @@ discard block |
||
| 810 | 810 | * |
| 811 | 811 | * @param int $form_id The form ID. |
| 812 | 812 | */ |
| 813 | - do_action( 'give_before_cc_expiration' ); |
|
| 813 | + do_action('give_before_cc_expiration'); |
|
| 814 | 814 | ?> |
| 815 | 815 | <p class="card-expiration form-row form-row-one-third form-row-responsive"> |
| 816 | 816 | <label for="card_expiry-<?php echo $form_id ?>" class="give-label"> |
| 817 | - <?php esc_html_e( 'Expiration', 'give' ); ?> |
|
| 817 | + <?php esc_html_e('Expiration', 'give'); ?> |
|
| 818 | 818 | <span class="give-required-indicator">*</span> |
| 819 | 819 | <span class="give-tooltip give-icon give-icon-question" |
| 820 | - data-tooltip="<?php esc_attr_e( 'The date your credit card expires, typically on the front of the card.', 'give' ); ?>"></span> |
|
| 820 | + data-tooltip="<?php esc_attr_e('The date your credit card expires, typically on the front of the card.', 'give'); ?>"></span> |
|
| 821 | 821 | </label> |
| 822 | 822 | |
| 823 | 823 | <input type="hidden" id="card_exp_month-<?php echo $form_id ?>" name="card_exp_month" |
@@ -826,7 +826,7 @@ discard block |
||
| 826 | 826 | class="card-expiry-year"/> |
| 827 | 827 | |
| 828 | 828 | <input type="tel" autocomplete="off" name="card_expiry" id="card_expiry-<?php echo $form_id ?>" |
| 829 | - class="card-expiry give-input required" placeholder="<?php esc_attr_e( 'MM / YY', 'give' ); ?>" |
|
| 829 | + class="card-expiry give-input required" placeholder="<?php esc_attr_e('MM / YY', 'give'); ?>" |
|
| 830 | 830 | required aria-required="true"/> |
| 831 | 831 | </p> |
| 832 | 832 | <?php |
@@ -837,7 +837,7 @@ discard block |
||
| 837 | 837 | * |
| 838 | 838 | * @param int $form_id The form ID. |
| 839 | 839 | */ |
| 840 | - do_action( 'give_after_cc_expiration', $form_id ); |
|
| 840 | + do_action('give_after_cc_expiration', $form_id); |
|
| 841 | 841 | ?> |
| 842 | 842 | </fieldset> |
| 843 | 843 | <?php |
@@ -848,12 +848,12 @@ discard block |
||
| 848 | 848 | * |
| 849 | 849 | * @param int $form_id The form ID. |
| 850 | 850 | */ |
| 851 | - do_action( 'give_after_cc_fields', $form_id ); |
|
| 851 | + do_action('give_after_cc_fields', $form_id); |
|
| 852 | 852 | |
| 853 | 853 | echo ob_get_clean(); |
| 854 | 854 | } |
| 855 | 855 | |
| 856 | -add_action( 'give_cc_form', 'give_get_cc_form' ); |
|
| 856 | +add_action('give_cc_form', 'give_get_cc_form'); |
|
| 857 | 857 | |
| 858 | 858 | /** |
| 859 | 859 | * Outputs the default credit card address fields. |
@@ -864,24 +864,24 @@ discard block |
||
| 864 | 864 | * |
| 865 | 865 | * @return void |
| 866 | 866 | */ |
| 867 | -function give_default_cc_address_fields( $form_id ) { |
|
| 867 | +function give_default_cc_address_fields($form_id) { |
|
| 868 | 868 | // Get user info. |
| 869 | - $give_user_info = _give_get_prefill_form_field_values( $form_id ); |
|
| 869 | + $give_user_info = _give_get_prefill_form_field_values($form_id); |
|
| 870 | 870 | |
| 871 | 871 | $logged_in = is_user_logged_in(); |
| 872 | 872 | |
| 873 | - if ( $logged_in ) { |
|
| 874 | - $user_address = get_user_meta( get_current_user_id(), '_give_user_address', true ); |
|
| 873 | + if ($logged_in) { |
|
| 874 | + $user_address = get_user_meta(get_current_user_id(), '_give_user_address', true); |
|
| 875 | 875 | } |
| 876 | - $line1 = $logged_in && ! empty( $user_address['line1'] ) ? $user_address['line1'] : ''; |
|
| 877 | - $line2 = $logged_in && ! empty( $user_address['line2'] ) ? $user_address['line2'] : ''; |
|
| 878 | - $city = $logged_in && ! empty( $user_address['city'] ) ? $user_address['city'] : ''; |
|
| 879 | - $zip = $logged_in && ! empty( $user_address['zip'] ) ? $user_address['zip'] : ''; |
|
| 876 | + $line1 = $logged_in && ! empty($user_address['line1']) ? $user_address['line1'] : ''; |
|
| 877 | + $line2 = $logged_in && ! empty($user_address['line2']) ? $user_address['line2'] : ''; |
|
| 878 | + $city = $logged_in && ! empty($user_address['city']) ? $user_address['city'] : ''; |
|
| 879 | + $zip = $logged_in && ! empty($user_address['zip']) ? $user_address['zip'] : ''; |
|
| 880 | 880 | |
| 881 | 881 | ob_start(); |
| 882 | 882 | ?> |
| 883 | 883 | <fieldset id="give_cc_address" class="cc-address"> |
| 884 | - <legend><?php echo apply_filters( 'give_billing_details_fieldset_heading', esc_html__( 'Billing Details', 'give' ) ); ?></legend> |
|
| 884 | + <legend><?php echo apply_filters('give_billing_details_fieldset_heading', esc_html__('Billing Details', 'give')); ?></legend> |
|
| 885 | 885 | <?php |
| 886 | 886 | /** |
| 887 | 887 | * Fires while rendering credit card billing form, before address fields. |
@@ -890,79 +890,79 @@ discard block |
||
| 890 | 890 | * |
| 891 | 891 | * @param int $form_id The form ID. |
| 892 | 892 | */ |
| 893 | - do_action( 'give_cc_billing_top' ); |
|
| 893 | + do_action('give_cc_billing_top'); |
|
| 894 | 894 | ?> |
| 895 | 895 | <p id="give-card-address-wrap" class="form-row form-row-wide"> |
| 896 | 896 | <label for="card_address" class="give-label"> |
| 897 | - <?php esc_html_e( 'Address 1', 'give' ); ?> |
|
| 897 | + <?php esc_html_e('Address 1', 'give'); ?> |
|
| 898 | 898 | <?php |
| 899 | - if ( give_field_is_required( 'card_address', $form_id ) ) : ?> |
|
| 899 | + if (give_field_is_required('card_address', $form_id)) : ?> |
|
| 900 | 900 | <span class="give-required-indicator">*</span> |
| 901 | 901 | <?php endif; ?> |
| 902 | 902 | <span class="give-tooltip give-icon give-icon-question" |
| 903 | - data-tooltip="<?php esc_attr_e( 'The primary billing address for your credit card.', 'give' ); ?>"></span> |
|
| 903 | + data-tooltip="<?php esc_attr_e('The primary billing address for your credit card.', 'give'); ?>"></span> |
|
| 904 | 904 | </label> |
| 905 | 905 | |
| 906 | 906 | <input |
| 907 | 907 | type="text" |
| 908 | 908 | id="card_address" |
| 909 | 909 | name="card_address" |
| 910 | - class="card-address give-input<?php echo( give_field_is_required( 'card_address', $form_id ) ? ' required' : '' ); ?>" |
|
| 911 | - placeholder="<?php esc_attr_e( 'Address line 1', 'give' ); ?>" |
|
| 912 | - value="<?php echo isset( $give_user_info['card_address'] ) ? $give_user_info['card_address'] : ''; ?>" |
|
| 913 | - <?php echo( give_field_is_required( 'card_address', $form_id ) ? ' required aria-required="true" ' : '' ); ?> |
|
| 910 | + class="card-address give-input<?php echo(give_field_is_required('card_address', $form_id) ? ' required' : ''); ?>" |
|
| 911 | + placeholder="<?php esc_attr_e('Address line 1', 'give'); ?>" |
|
| 912 | + value="<?php echo isset($give_user_info['card_address']) ? $give_user_info['card_address'] : ''; ?>" |
|
| 913 | + <?php echo(give_field_is_required('card_address', $form_id) ? ' required aria-required="true" ' : ''); ?> |
|
| 914 | 914 | /> |
| 915 | 915 | </p> |
| 916 | 916 | |
| 917 | 917 | <p id="give-card-address-2-wrap" class="form-row form-row-wide"> |
| 918 | 918 | <label for="card_address_2" class="give-label"> |
| 919 | - <?php esc_html_e( 'Address 2', 'give' ); ?> |
|
| 920 | - <?php if ( give_field_is_required( 'card_address_2', $form_id ) ) : ?> |
|
| 919 | + <?php esc_html_e('Address 2', 'give'); ?> |
|
| 920 | + <?php if (give_field_is_required('card_address_2', $form_id)) : ?> |
|
| 921 | 921 | <span class="give-required-indicator">*</span> |
| 922 | 922 | <?php endif; ?> |
| 923 | 923 | <span class="give-tooltip give-icon give-icon-question" |
| 924 | - data-tooltip="<?php esc_attr_e( '(optional) The suite, apt no, PO box, etc, associated with your billing address.', 'give' ); ?>"></span> |
|
| 924 | + data-tooltip="<?php esc_attr_e('(optional) The suite, apt no, PO box, etc, associated with your billing address.', 'give'); ?>"></span> |
|
| 925 | 925 | </label> |
| 926 | 926 | |
| 927 | 927 | <input |
| 928 | 928 | type="text" |
| 929 | 929 | id="card_address_2" |
| 930 | 930 | name="card_address_2" |
| 931 | - class="card-address-2 give-input<?php echo( give_field_is_required( 'card_address_2', $form_id ) ? ' required' : '' ); ?>" |
|
| 932 | - placeholder="<?php esc_attr_e( 'Address line 2', 'give' ); ?>" |
|
| 933 | - value="<?php echo isset( $give_user_info['card_address_2'] ) ? $give_user_info['card_address_2'] : ''; ?>" |
|
| 934 | - <?php echo( give_field_is_required( 'card_address_2', $form_id ) ? ' required aria-required="true" ' : '' ); ?> |
|
| 931 | + class="card-address-2 give-input<?php echo(give_field_is_required('card_address_2', $form_id) ? ' required' : ''); ?>" |
|
| 932 | + placeholder="<?php esc_attr_e('Address line 2', 'give'); ?>" |
|
| 933 | + value="<?php echo isset($give_user_info['card_address_2']) ? $give_user_info['card_address_2'] : ''; ?>" |
|
| 934 | + <?php echo(give_field_is_required('card_address_2', $form_id) ? ' required aria-required="true" ' : ''); ?> |
|
| 935 | 935 | /> |
| 936 | 936 | </p> |
| 937 | 937 | |
| 938 | 938 | <p id="give-card-city-wrap" class="form-row form-row-first form-row-responsive"> |
| 939 | 939 | <label for="card_city" class="give-label"> |
| 940 | - <?php esc_html_e( 'City', 'give' ); ?> |
|
| 941 | - <?php if ( give_field_is_required( 'card_city', $form_id ) ) : ?> |
|
| 940 | + <?php esc_html_e('City', 'give'); ?> |
|
| 941 | + <?php if (give_field_is_required('card_city', $form_id)) : ?> |
|
| 942 | 942 | <span class="give-required-indicator">*</span> |
| 943 | 943 | <?php endif; ?> |
| 944 | 944 | <span class="give-tooltip give-icon give-icon-question" |
| 945 | - data-tooltip="<?php esc_attr_e( 'The city for your billing address.', 'give' ); ?>"></span> |
|
| 945 | + data-tooltip="<?php esc_attr_e('The city for your billing address.', 'give'); ?>"></span> |
|
| 946 | 946 | </label> |
| 947 | 947 | <input |
| 948 | 948 | type="text" |
| 949 | 949 | id="card_city" |
| 950 | 950 | name="card_city" |
| 951 | - class="card-city give-input<?php echo( give_field_is_required( 'card_city', $form_id ) ? ' required' : '' ); ?>" |
|
| 952 | - placeholder="<?php esc_attr_e( 'City', 'give' ); ?>" |
|
| 953 | - value="<?php echo isset( $give_user_info['card_city'] ) ? $give_user_info['card_city'] : ''; ?>" |
|
| 954 | - <?php echo( give_field_is_required( 'card_city', $form_id ) ? ' required aria-required="true" ' : '' ); ?> |
|
| 951 | + class="card-city give-input<?php echo(give_field_is_required('card_city', $form_id) ? ' required' : ''); ?>" |
|
| 952 | + placeholder="<?php esc_attr_e('City', 'give'); ?>" |
|
| 953 | + value="<?php echo isset($give_user_info['card_city']) ? $give_user_info['card_city'] : ''; ?>" |
|
| 954 | + <?php echo(give_field_is_required('card_city', $form_id) ? ' required aria-required="true" ' : ''); ?> |
|
| 955 | 955 | /> |
| 956 | 956 | </p> |
| 957 | 957 | |
| 958 | 958 | <p id="give-card-zip-wrap" class="form-row form-row-last form-row-responsive"> |
| 959 | 959 | <label for="card_zip" class="give-label"> |
| 960 | - <?php esc_html_e( 'Zip / Postal Code', 'give' ); ?> |
|
| 961 | - <?php if ( give_field_is_required( 'card_zip', $form_id ) ) : ?> |
|
| 960 | + <?php esc_html_e('Zip / Postal Code', 'give'); ?> |
|
| 961 | + <?php if (give_field_is_required('card_zip', $form_id)) : ?> |
|
| 962 | 962 | <span class="give-required-indicator">*</span> |
| 963 | 963 | <?php endif; ?> |
| 964 | 964 | <span class="give-tooltip give-icon give-icon-question" |
| 965 | - data-tooltip="<?php esc_attr_e( 'The zip or postal code for your billing address.', 'give' ); ?>"></span> |
|
| 965 | + data-tooltip="<?php esc_attr_e('The zip or postal code for your billing address.', 'give'); ?>"></span> |
|
| 966 | 966 | </label> |
| 967 | 967 | |
| 968 | 968 | <input |
@@ -970,40 +970,40 @@ discard block |
||
| 970 | 970 | size="4" |
| 971 | 971 | id="card_zip" |
| 972 | 972 | name="card_zip" |
| 973 | - class="card-zip give-input<?php echo( give_field_is_required( 'card_zip', $form_id ) ? ' required' : '' ); ?>" |
|
| 974 | - placeholder="<?php esc_attr_e( 'Zip / Postal Code', 'give' ); ?>" |
|
| 975 | - value="<?php echo isset( $give_user_info['card_zip'] ) ? $give_user_info['card_zip'] : ''; ?>" |
|
| 976 | - <?php echo( give_field_is_required( 'card_zip', $form_id ) ? ' required aria-required="true" ' : '' ); ?> |
|
| 973 | + class="card-zip give-input<?php echo(give_field_is_required('card_zip', $form_id) ? ' required' : ''); ?>" |
|
| 974 | + placeholder="<?php esc_attr_e('Zip / Postal Code', 'give'); ?>" |
|
| 975 | + value="<?php echo isset($give_user_info['card_zip']) ? $give_user_info['card_zip'] : ''; ?>" |
|
| 976 | + <?php echo(give_field_is_required('card_zip', $form_id) ? ' required aria-required="true" ' : ''); ?> |
|
| 977 | 977 | /> |
| 978 | 978 | </p> |
| 979 | 979 | |
| 980 | 980 | <p id="give-card-country-wrap" class="form-row form-row-first form-row-responsive"> |
| 981 | 981 | <label for="billing_country" class="give-label"> |
| 982 | - <?php esc_html_e( 'Country', 'give' ); ?> |
|
| 983 | - <?php if ( give_field_is_required( 'billing_country', $form_id ) ) : ?> |
|
| 982 | + <?php esc_html_e('Country', 'give'); ?> |
|
| 983 | + <?php if (give_field_is_required('billing_country', $form_id)) : ?> |
|
| 984 | 984 | <span class="give-required-indicator">*</span> |
| 985 | 985 | <?php endif; ?> |
| 986 | 986 | <span class="give-tooltip give-icon give-icon-question" |
| 987 | - data-tooltip="<?php esc_attr_e( 'The country for your billing address.', 'give' ); ?>"></span> |
|
| 987 | + data-tooltip="<?php esc_attr_e('The country for your billing address.', 'give'); ?>"></span> |
|
| 988 | 988 | </label> |
| 989 | 989 | |
| 990 | 990 | <select |
| 991 | 991 | name="billing_country" |
| 992 | 992 | id="billing_country" |
| 993 | - class="billing-country billing_country give-select<?php echo( give_field_is_required( 'billing_country', $form_id ) ? ' required' : '' ); ?>" |
|
| 994 | - <?php echo( give_field_is_required( 'billing_country', $form_id ) ? ' required aria-required="true" ' : '' ); ?> |
|
| 993 | + class="billing-country billing_country give-select<?php echo(give_field_is_required('billing_country', $form_id) ? ' required' : ''); ?>" |
|
| 994 | + <?php echo(give_field_is_required('billing_country', $form_id) ? ' required aria-required="true" ' : ''); ?> |
|
| 995 | 995 | > |
| 996 | 996 | <?php |
| 997 | 997 | |
| 998 | 998 | $selected_country = give_get_country(); |
| 999 | 999 | |
| 1000 | - if ( ! empty( $give_user_info['billing_country'] ) && '*' !== $give_user_info['billing_country'] ) { |
|
| 1000 | + if ( ! empty($give_user_info['billing_country']) && '*' !== $give_user_info['billing_country']) { |
|
| 1001 | 1001 | $selected_country = $give_user_info['billing_country']; |
| 1002 | 1002 | } |
| 1003 | 1003 | |
| 1004 | 1004 | $countries = give_get_country_list(); |
| 1005 | - foreach ( $countries as $country_code => $country ) { |
|
| 1006 | - echo '<option value="' . esc_attr( $country_code ) . '"' . selected( $country_code, $selected_country, false ) . '>' . $country . '</option>'; |
|
| 1005 | + foreach ($countries as $country_code => $country) { |
|
| 1006 | + echo '<option value="'.esc_attr($country_code).'"'.selected($country_code, $selected_country, false).'>'.$country.'</option>'; |
|
| 1007 | 1007 | } |
| 1008 | 1008 | ?> |
| 1009 | 1009 | </select> |
@@ -1013,19 +1013,19 @@ discard block |
||
| 1013 | 1013 | <?php |
| 1014 | 1014 | $selected_state = give_get_state(); |
| 1015 | 1015 | |
| 1016 | - $label = __( 'State', 'give' ); |
|
| 1016 | + $label = __('State', 'give'); |
|
| 1017 | 1017 | $states_label = give_get_states_label(); |
| 1018 | 1018 | // Check if $country code exists in the array key for states label. |
| 1019 | - if ( array_key_exists( $selected_country, $states_label ) ) { |
|
| 1020 | - $label = $states_label[ $selected_country ]; |
|
| 1019 | + if (array_key_exists($selected_country, $states_label)) { |
|
| 1020 | + $label = $states_label[$selected_country]; |
|
| 1021 | 1021 | } |
| 1022 | 1022 | |
| 1023 | - $states = give_get_states( $selected_country ); |
|
| 1023 | + $states = give_get_states($selected_country); |
|
| 1024 | 1024 | |
| 1025 | 1025 | // Get the country list that do not have any states init. |
| 1026 | 1026 | $no_states_country = give_no_states_country_list(); |
| 1027 | 1027 | |
| 1028 | - if ( ! empty( $give_user_info['card_state'] ) ) { |
|
| 1028 | + if ( ! empty($give_user_info['card_state'])) { |
|
| 1029 | 1029 | $selected_state = $give_user_info['card_state']; |
| 1030 | 1030 | } |
| 1031 | 1031 | |
@@ -1033,27 +1033,27 @@ discard block |
||
| 1033 | 1033 | $states_not_required_country_list = give_states_not_required_country_list(); |
| 1034 | 1034 | ?> |
| 1035 | 1035 | <p id="give-card-state-wrap" |
| 1036 | - class="form-row form-row-last form-row-responsive <?php echo ( ! empty( $selected_country ) && array_key_exists( $selected_country, $no_states_country ) ) ? 'give-hidden' : ''; ?> "> |
|
| 1036 | + class="form-row form-row-last form-row-responsive <?php echo ( ! empty($selected_country) && array_key_exists($selected_country, $no_states_country)) ? 'give-hidden' : ''; ?> "> |
|
| 1037 | 1037 | <label for="card_state" class="give-label"> |
| 1038 | 1038 | <span class="state-label-text"><?php echo $label; ?></span> |
| 1039 | - <?php if ( give_field_is_required( 'card_state', $form_id ) ) : |
|
| 1039 | + <?php if (give_field_is_required('card_state', $form_id)) : |
|
| 1040 | 1040 | ?> |
| 1041 | - <span class="give-required-indicator <?php echo( array_key_exists( $selected_country, $states_not_required_country_list ) ? 'give-hidden' : '' ) ?> ">*</span> |
|
| 1041 | + <span class="give-required-indicator <?php echo(array_key_exists($selected_country, $states_not_required_country_list) ? 'give-hidden' : '') ?> ">*</span> |
|
| 1042 | 1042 | <?php endif; ?> |
| 1043 | 1043 | <span class="give-tooltip give-icon give-icon-question" |
| 1044 | - data-tooltip="<?php esc_attr_e( 'The state or province or county for your billing address.', 'give' ); ?>"></span> |
|
| 1044 | + data-tooltip="<?php esc_attr_e('The state or province or county for your billing address.', 'give'); ?>"></span> |
|
| 1045 | 1045 | </label> |
| 1046 | 1046 | <?php |
| 1047 | 1047 | |
| 1048 | - if ( ! empty( $states ) ) : ?> |
|
| 1048 | + if ( ! empty($states)) : ?> |
|
| 1049 | 1049 | <select |
| 1050 | 1050 | name="card_state" |
| 1051 | 1051 | id="card_state" |
| 1052 | - class="card_state give-select<?php echo( give_field_is_required( 'card_state', $form_id ) ? ' required' : '' ); ?>" |
|
| 1053 | - <?php echo( give_field_is_required( 'card_state', $form_id ) ? ' required aria-required="true" ' : '' ); ?>> |
|
| 1052 | + class="card_state give-select<?php echo(give_field_is_required('card_state', $form_id) ? ' required' : ''); ?>" |
|
| 1053 | + <?php echo(give_field_is_required('card_state', $form_id) ? ' required aria-required="true" ' : ''); ?>> |
|
| 1054 | 1054 | <?php |
| 1055 | - foreach ( $states as $state_code => $state ) { |
|
| 1056 | - echo '<option value="' . $state_code . '"' . selected( $state_code, $selected_state, false ) . '>' . $state . '</option>'; |
|
| 1055 | + foreach ($states as $state_code => $state) { |
|
| 1056 | + echo '<option value="'.$state_code.'"'.selected($state_code, $selected_state, false).'>'.$state.'</option>'; |
|
| 1057 | 1057 | } |
| 1058 | 1058 | ?> |
| 1059 | 1059 | </select> |
@@ -1070,14 +1070,14 @@ discard block |
||
| 1070 | 1070 | * |
| 1071 | 1071 | * @param int $form_id The form ID. |
| 1072 | 1072 | */ |
| 1073 | - do_action( 'give_cc_billing_bottom' ); |
|
| 1073 | + do_action('give_cc_billing_bottom'); |
|
| 1074 | 1074 | ?> |
| 1075 | 1075 | </fieldset> |
| 1076 | 1076 | <?php |
| 1077 | 1077 | echo ob_get_clean(); |
| 1078 | 1078 | } |
| 1079 | 1079 | |
| 1080 | -add_action( 'give_after_cc_fields', 'give_default_cc_address_fields' ); |
|
| 1080 | +add_action('give_after_cc_fields', 'give_default_cc_address_fields'); |
|
| 1081 | 1081 | |
| 1082 | 1082 | |
| 1083 | 1083 | /** |
@@ -1090,24 +1090,24 @@ discard block |
||
| 1090 | 1090 | * |
| 1091 | 1091 | * @return string |
| 1092 | 1092 | */ |
| 1093 | -function give_get_register_fields( $form_id ) { |
|
| 1093 | +function give_get_register_fields($form_id) { |
|
| 1094 | 1094 | |
| 1095 | 1095 | global $user_ID; |
| 1096 | 1096 | |
| 1097 | - if ( is_user_logged_in() ) { |
|
| 1098 | - $user_data = get_userdata( $user_ID ); |
|
| 1097 | + if (is_user_logged_in()) { |
|
| 1098 | + $user_data = get_userdata($user_ID); |
|
| 1099 | 1099 | } |
| 1100 | 1100 | |
| 1101 | - $show_register_form = give_show_login_register_option( $form_id ); |
|
| 1101 | + $show_register_form = give_show_login_register_option($form_id); |
|
| 1102 | 1102 | |
| 1103 | 1103 | ob_start(); ?> |
| 1104 | 1104 | <fieldset id="give-register-fields-<?php echo $form_id; ?>"> |
| 1105 | 1105 | |
| 1106 | - <?php if ( $show_register_form == 'both' ) { ?> |
|
| 1106 | + <?php if ($show_register_form == 'both') { ?> |
|
| 1107 | 1107 | <div class="give-login-account-wrap"> |
| 1108 | - <p class="give-login-message"><?php esc_html_e( 'Already have an account?', 'give' ); ?> |
|
| 1109 | - <a href="<?php echo esc_url( add_query_arg( 'login', 1 ) ); ?>" class="give-checkout-login" |
|
| 1110 | - data-action="give_checkout_login"><?php esc_html_e( 'Login', 'give' ); ?></a> |
|
| 1108 | + <p class="give-login-message"><?php esc_html_e('Already have an account?', 'give'); ?> |
|
| 1109 | + <a href="<?php echo esc_url(add_query_arg('login', 1)); ?>" class="give-checkout-login" |
|
| 1110 | + data-action="give_checkout_login"><?php esc_html_e('Login', 'give'); ?></a> |
|
| 1111 | 1111 | </p> |
| 1112 | 1112 | <p class="give-loading-text"> |
| 1113 | 1113 | <span class="give-loading-animation"></span> |
@@ -1123,15 +1123,15 @@ discard block |
||
| 1123 | 1123 | * |
| 1124 | 1124 | * @param int $form_id The form ID. |
| 1125 | 1125 | */ |
| 1126 | - do_action( 'give_register_fields_before', $form_id ); |
|
| 1126 | + do_action('give_register_fields_before', $form_id); |
|
| 1127 | 1127 | ?> |
| 1128 | 1128 | |
| 1129 | 1129 | <fieldset id="give-register-account-fields-<?php echo $form_id; ?>"> |
| 1130 | 1130 | <legend> |
| 1131 | 1131 | <?php |
| 1132 | - echo apply_filters( 'give_create_account_fieldset_heading', esc_html__( 'Create an account', 'give' ) ); |
|
| 1133 | - if ( ! give_logged_in_only( $form_id ) ) { |
|
| 1134 | - echo ' <span class="sub-text">' . esc_html__( '(optional)', 'give' ) . '</span>'; |
|
| 1132 | + echo apply_filters('give_create_account_fieldset_heading', esc_html__('Create an account', 'give')); |
|
| 1133 | + if ( ! give_logged_in_only($form_id)) { |
|
| 1134 | + echo ' <span class="sub-text">'.esc_html__('(optional)', 'give').'</span>'; |
|
| 1135 | 1135 | } |
| 1136 | 1136 | ?> |
| 1137 | 1137 | </legend> |
@@ -1143,54 +1143,54 @@ discard block |
||
| 1143 | 1143 | * |
| 1144 | 1144 | * @param int $form_id The form ID. |
| 1145 | 1145 | */ |
| 1146 | - do_action( 'give_register_account_fields_before', $form_id ); |
|
| 1146 | + do_action('give_register_account_fields_before', $form_id); |
|
| 1147 | 1147 | ?> |
| 1148 | 1148 | <div id="give-user-login-wrap-<?php echo $form_id; ?>" |
| 1149 | 1149 | class="form-row form-row-one-third form-row-first form-row-responsive"> |
| 1150 | 1150 | <label for="give-user-login-<?php echo $form_id; ?>"> |
| 1151 | - <?php esc_html_e( 'Username', 'give' ); ?> |
|
| 1152 | - <?php if ( give_logged_in_only( $form_id ) ) { ?> |
|
| 1151 | + <?php esc_html_e('Username', 'give'); ?> |
|
| 1152 | + <?php if (give_logged_in_only($form_id)) { ?> |
|
| 1153 | 1153 | <span class="give-required-indicator">*</span> |
| 1154 | 1154 | <?php } ?> |
| 1155 | 1155 | <span class="give-tooltip give-icon give-icon-question" |
| 1156 | - data-tooltip="<?php esc_attr_e( 'The username you will use to log into your account.', 'give' ); ?>"></span> |
|
| 1156 | + data-tooltip="<?php esc_attr_e('The username you will use to log into your account.', 'give'); ?>"></span> |
|
| 1157 | 1157 | </label> |
| 1158 | 1158 | |
| 1159 | 1159 | <input name="give_user_login" id="give-user-login-<?php echo $form_id; ?>" class="give-input" |
| 1160 | 1160 | type="text" |
| 1161 | - placeholder="<?php esc_attr_e( 'Username', 'give' ); ?>"<?php echo ( give_logged_in_only( $form_id ) ) ? ' required aria-required="true" ' : ''; ?>/> |
|
| 1161 | + placeholder="<?php esc_attr_e('Username', 'give'); ?>"<?php echo (give_logged_in_only($form_id)) ? ' required aria-required="true" ' : ''; ?>/> |
|
| 1162 | 1162 | </div> |
| 1163 | 1163 | |
| 1164 | 1164 | <div id="give-user-pass-wrap-<?php echo $form_id; ?>" |
| 1165 | 1165 | class="form-row form-row-one-third form-row-responsive"> |
| 1166 | 1166 | <label for="give-user-pass-<?php echo $form_id; ?>"> |
| 1167 | - <?php esc_html_e( 'Password', 'give' ); ?> |
|
| 1168 | - <?php if ( give_logged_in_only( $form_id ) ) { ?> |
|
| 1167 | + <?php esc_html_e('Password', 'give'); ?> |
|
| 1168 | + <?php if (give_logged_in_only($form_id)) { ?> |
|
| 1169 | 1169 | <span class="give-required-indicator">*</span> |
| 1170 | 1170 | <?php } ?> |
| 1171 | 1171 | <span class="give-tooltip give-icon give-icon-question" |
| 1172 | - data-tooltip="<?php esc_attr_e( 'The password used to access your account.', 'give' ); ?>"></span> |
|
| 1172 | + data-tooltip="<?php esc_attr_e('The password used to access your account.', 'give'); ?>"></span> |
|
| 1173 | 1173 | </label> |
| 1174 | 1174 | |
| 1175 | 1175 | <input name="give_user_pass" id="give-user-pass-<?php echo $form_id; ?>" class="give-input" |
| 1176 | - placeholder="<?php esc_attr_e( 'Password', 'give' ); ?>" |
|
| 1177 | - type="password"<?php echo ( give_logged_in_only( $form_id ) ) ? ' required aria-required="true" ' : ''; ?>/> |
|
| 1176 | + placeholder="<?php esc_attr_e('Password', 'give'); ?>" |
|
| 1177 | + type="password"<?php echo (give_logged_in_only($form_id)) ? ' required aria-required="true" ' : ''; ?>/> |
|
| 1178 | 1178 | </div> |
| 1179 | 1179 | |
| 1180 | 1180 | <div id="give-user-pass-confirm-wrap-<?php echo $form_id; ?>" |
| 1181 | 1181 | class="give-register-password form-row form-row-one-third form-row-responsive"> |
| 1182 | 1182 | <label for="give-user-pass-confirm-<?php echo $form_id; ?>"> |
| 1183 | - <?php esc_html_e( 'Confirm PW', 'give' ); ?> |
|
| 1184 | - <?php if ( give_logged_in_only( $form_id ) ) { ?> |
|
| 1183 | + <?php esc_html_e('Confirm PW', 'give'); ?> |
|
| 1184 | + <?php if (give_logged_in_only($form_id)) { ?> |
|
| 1185 | 1185 | <span class="give-required-indicator">*</span> |
| 1186 | 1186 | <?php } ?> |
| 1187 | 1187 | <span class="give-tooltip give-icon give-icon-question" |
| 1188 | - data-tooltip="<?php esc_attr_e( 'Please retype your password to confirm.', 'give' ); ?>"></span> |
|
| 1188 | + data-tooltip="<?php esc_attr_e('Please retype your password to confirm.', 'give'); ?>"></span> |
|
| 1189 | 1189 | </label> |
| 1190 | 1190 | |
| 1191 | 1191 | <input name="give_user_pass_confirm" id="give-user-pass-confirm-<?php echo $form_id; ?>" |
| 1192 | - class="give-input" placeholder="<?php esc_attr_e( 'Confirm password', 'give' ); ?>" |
|
| 1193 | - type="password"<?php echo ( give_logged_in_only( $form_id ) ) ? ' required aria-required="true" ' : ''; ?>/> |
|
| 1192 | + class="give-input" placeholder="<?php esc_attr_e('Confirm password', 'give'); ?>" |
|
| 1193 | + type="password"<?php echo (give_logged_in_only($form_id)) ? ' required aria-required="true" ' : ''; ?>/> |
|
| 1194 | 1194 | </div> |
| 1195 | 1195 | <?php |
| 1196 | 1196 | /** |
@@ -1200,7 +1200,7 @@ discard block |
||
| 1200 | 1200 | * |
| 1201 | 1201 | * @param int $form_id The form ID. |
| 1202 | 1202 | */ |
| 1203 | - do_action( 'give_register_account_fields_after', $form_id ); |
|
| 1203 | + do_action('give_register_account_fields_after', $form_id); |
|
| 1204 | 1204 | ?> |
| 1205 | 1205 | </fieldset> |
| 1206 | 1206 | |
@@ -1212,7 +1212,7 @@ discard block |
||
| 1212 | 1212 | * |
| 1213 | 1213 | * @param int $form_id The form ID. |
| 1214 | 1214 | */ |
| 1215 | - do_action( 'give_register_fields_after', $form_id ); |
|
| 1215 | + do_action('give_register_fields_after', $form_id); |
|
| 1216 | 1216 | ?> |
| 1217 | 1217 | |
| 1218 | 1218 | <input type="hidden" name="give-purchase-var" value="needs-to-register"/> |
@@ -1223,7 +1223,7 @@ discard block |
||
| 1223 | 1223 | * |
| 1224 | 1224 | * @since 1.7 |
| 1225 | 1225 | */ |
| 1226 | - do_action( 'give_donation_form_user_info', $form_id ); |
|
| 1226 | + do_action('give_donation_form_user_info', $form_id); |
|
| 1227 | 1227 | ?> |
| 1228 | 1228 | |
| 1229 | 1229 | </fieldset> |
@@ -1231,7 +1231,7 @@ discard block |
||
| 1231 | 1231 | echo ob_get_clean(); |
| 1232 | 1232 | } |
| 1233 | 1233 | |
| 1234 | -add_action( 'give_donation_form_register_fields', 'give_get_register_fields' ); |
|
| 1234 | +add_action('give_donation_form_register_fields', 'give_get_register_fields'); |
|
| 1235 | 1235 | |
| 1236 | 1236 | /** |
| 1237 | 1237 | * Gets the login fields for the login form on the checkout. This function hooks |
@@ -1244,27 +1244,27 @@ discard block |
||
| 1244 | 1244 | * |
| 1245 | 1245 | * @return string |
| 1246 | 1246 | */ |
| 1247 | -function give_get_login_fields( $form_id ) { |
|
| 1247 | +function give_get_login_fields($form_id) { |
|
| 1248 | 1248 | |
| 1249 | - $form_id = isset( $_POST['form_id'] ) ? $_POST['form_id'] : $form_id; |
|
| 1250 | - $show_register_form = give_show_login_register_option( $form_id ); |
|
| 1249 | + $form_id = isset($_POST['form_id']) ? $_POST['form_id'] : $form_id; |
|
| 1250 | + $show_register_form = give_show_login_register_option($form_id); |
|
| 1251 | 1251 | |
| 1252 | 1252 | ob_start(); |
| 1253 | 1253 | ?> |
| 1254 | 1254 | <fieldset id="give-login-fields-<?php echo $form_id; ?>"> |
| 1255 | - <legend><?php echo apply_filters( 'give_account_login_fieldset_heading', esc_html__( 'Login to Your Account', 'give' ) ); |
|
| 1256 | - if ( ! give_logged_in_only( $form_id ) ) { |
|
| 1257 | - echo ' <span class="sub-text">' . esc_html__( '(optional)', 'give' ) . '</span>'; |
|
| 1255 | + <legend><?php echo apply_filters('give_account_login_fieldset_heading', esc_html__('Login to Your Account', 'give')); |
|
| 1256 | + if ( ! give_logged_in_only($form_id)) { |
|
| 1257 | + echo ' <span class="sub-text">'.esc_html__('(optional)', 'give').'</span>'; |
|
| 1258 | 1258 | } ?> |
| 1259 | 1259 | </legend> |
| 1260 | - <?php if ( $show_register_form == 'both' ) { ?> |
|
| 1260 | + <?php if ($show_register_form == 'both') { ?> |
|
| 1261 | 1261 | <p class="give-new-account-link"> |
| 1262 | - <?php esc_html_e( 'Need to create an account?', 'give' ); ?> |
|
| 1263 | - <a href="<?php echo remove_query_arg( 'login' ); ?>" class="give-checkout-register-cancel" |
|
| 1262 | + <?php esc_html_e('Need to create an account?', 'give'); ?> |
|
| 1263 | + <a href="<?php echo remove_query_arg('login'); ?>" class="give-checkout-register-cancel" |
|
| 1264 | 1264 | data-action="give_checkout_register"> |
| 1265 | - <?php esc_html_e( 'Register', 'give' ); |
|
| 1266 | - if ( ! give_logged_in_only( $form_id ) ) { |
|
| 1267 | - echo ' ' . esc_html__( 'and donate as a guest »', 'give' ); |
|
| 1265 | + <?php esc_html_e('Register', 'give'); |
|
| 1266 | + if ( ! give_logged_in_only($form_id)) { |
|
| 1267 | + echo ' '.esc_html__('and donate as a guest »', 'give'); |
|
| 1268 | 1268 | } ?> |
| 1269 | 1269 | </a> |
| 1270 | 1270 | </p> |
@@ -1280,49 +1280,49 @@ discard block |
||
| 1280 | 1280 | * |
| 1281 | 1281 | * @param int $form_id The form ID. |
| 1282 | 1282 | */ |
| 1283 | - do_action( 'give_checkout_login_fields_before', $form_id ); |
|
| 1283 | + do_action('give_checkout_login_fields_before', $form_id); |
|
| 1284 | 1284 | ?> |
| 1285 | 1285 | <div id="give-user-login-wrap-<?php echo $form_id; ?>" class="form-row form-row-first form-row-responsive"> |
| 1286 | 1286 | <label class="give-label" for="give-user-login-<?php echo $form_id; ?>"> |
| 1287 | - <?php esc_html_e( 'Username', 'give' ); ?> |
|
| 1288 | - <?php if ( give_logged_in_only( $form_id ) ) { ?> |
|
| 1287 | + <?php esc_html_e('Username', 'give'); ?> |
|
| 1288 | + <?php if (give_logged_in_only($form_id)) { ?> |
|
| 1289 | 1289 | <span class="give-required-indicator">*</span> |
| 1290 | 1290 | <?php } ?> |
| 1291 | 1291 | </label> |
| 1292 | 1292 | |
| 1293 | - <input class="give-input<?php echo ( give_logged_in_only( $form_id ) ) ? ' required' : ''; ?>" type="text" |
|
| 1293 | + <input class="give-input<?php echo (give_logged_in_only($form_id)) ? ' required' : ''; ?>" type="text" |
|
| 1294 | 1294 | name="give_user_login" id="give-user-login-<?php echo $form_id; ?>" value="" |
| 1295 | - placeholder="<?php esc_attr_e( 'Your username', 'give' ); ?>"<?php echo ( give_logged_in_only( $form_id ) ) ? ' required aria-required="true" ' : ''; ?>/> |
|
| 1295 | + placeholder="<?php esc_attr_e('Your username', 'give'); ?>"<?php echo (give_logged_in_only($form_id)) ? ' required aria-required="true" ' : ''; ?>/> |
|
| 1296 | 1296 | </div> |
| 1297 | 1297 | |
| 1298 | 1298 | <div id="give-user-pass-wrap-<?php echo $form_id; ?>" |
| 1299 | 1299 | class="give_login_password form-row form-row-last form-row-responsive"> |
| 1300 | 1300 | <label class="give-label" for="give-user-pass-<?php echo $form_id; ?>"> |
| 1301 | - <?php esc_html_e( 'Password', 'give' ); ?> |
|
| 1302 | - <?php if ( give_logged_in_only( $form_id ) ) { ?> |
|
| 1301 | + <?php esc_html_e('Password', 'give'); ?> |
|
| 1302 | + <?php if (give_logged_in_only($form_id)) { ?> |
|
| 1303 | 1303 | <span class="give-required-indicator">*</span> |
| 1304 | 1304 | <?php } ?> |
| 1305 | 1305 | </label> |
| 1306 | - <input class="give-input<?php echo ( give_logged_in_only( $form_id ) ) ? ' required' : ''; ?>" |
|
| 1306 | + <input class="give-input<?php echo (give_logged_in_only($form_id)) ? ' required' : ''; ?>" |
|
| 1307 | 1307 | type="password" name="give_user_pass" id="give-user-pass-<?php echo $form_id; ?>" |
| 1308 | - placeholder="<?php esc_attr_e( 'Your password', 'give' ); ?>"<?php echo ( give_logged_in_only( $form_id ) ) ? ' required aria-required="true" ' : ''; ?>/> |
|
| 1308 | + placeholder="<?php esc_attr_e('Your password', 'give'); ?>"<?php echo (give_logged_in_only($form_id)) ? ' required aria-required="true" ' : ''; ?>/> |
|
| 1309 | 1309 | <input type="hidden" name="give-purchase-var" value="needs-to-login"/> |
| 1310 | 1310 | </div> |
| 1311 | 1311 | |
| 1312 | 1312 | <div id="give-forgot-password-wrap-<?php echo $form_id; ?>" class="give_login_forgot_password"> |
| 1313 | 1313 | <span class="give-forgot-password "> |
| 1314 | 1314 | <a href="<?php echo wp_lostpassword_url() ?>" |
| 1315 | - target="_blank"><?php esc_html_e( 'Reset Password', 'give' ) ?></a> |
|
| 1315 | + target="_blank"><?php esc_html_e('Reset Password', 'give') ?></a> |
|
| 1316 | 1316 | </span> |
| 1317 | 1317 | </div> |
| 1318 | 1318 | |
| 1319 | 1319 | <div id="give-user-login-submit-<?php echo $form_id; ?>" class="give-clearfix"> |
| 1320 | 1320 | <input type="submit" class="give-submit give-btn button" name="give_login_submit" |
| 1321 | - value="<?php esc_attr_e( 'Login', 'give' ); ?>"/> |
|
| 1322 | - <?php if ( $show_register_form !== 'login' ) { ?> |
|
| 1321 | + value="<?php esc_attr_e('Login', 'give'); ?>"/> |
|
| 1322 | + <?php if ($show_register_form !== 'login') { ?> |
|
| 1323 | 1323 | <input type="button" data-action="give_cancel_login" |
| 1324 | 1324 | class="give-cancel-login give-checkout-register-cancel give-btn button" name="give_login_cancel" |
| 1325 | - value="<?php esc_attr_e( 'Cancel', 'give' ); ?>"/> |
|
| 1325 | + value="<?php esc_attr_e('Cancel', 'give'); ?>"/> |
|
| 1326 | 1326 | <?php } ?> |
| 1327 | 1327 | <span class="give-loading-animation"></span> |
| 1328 | 1328 | </div> |
@@ -1334,14 +1334,14 @@ discard block |
||
| 1334 | 1334 | * |
| 1335 | 1335 | * @param int $form_id The form ID. |
| 1336 | 1336 | */ |
| 1337 | - do_action( 'give_checkout_login_fields_after', $form_id ); |
|
| 1337 | + do_action('give_checkout_login_fields_after', $form_id); |
|
| 1338 | 1338 | ?> |
| 1339 | 1339 | </fieldset><!--end #give-login-fields--> |
| 1340 | 1340 | <?php |
| 1341 | 1341 | echo ob_get_clean(); |
| 1342 | 1342 | } |
| 1343 | 1343 | |
| 1344 | -add_action( 'give_donation_form_login_fields', 'give_get_login_fields', 10, 1 ); |
|
| 1344 | +add_action('give_donation_form_login_fields', 'give_get_login_fields', 10, 1); |
|
| 1345 | 1345 | |
| 1346 | 1346 | /** |
| 1347 | 1347 | * Payment Mode Select. |
@@ -1357,9 +1357,9 @@ discard block |
||
| 1357 | 1357 | * |
| 1358 | 1358 | * @return void |
| 1359 | 1359 | */ |
| 1360 | -function give_payment_mode_select( $form_id ) { |
|
| 1360 | +function give_payment_mode_select($form_id) { |
|
| 1361 | 1361 | |
| 1362 | - $gateways = give_get_enabled_payment_gateways( $form_id ); |
|
| 1362 | + $gateways = give_get_enabled_payment_gateways($form_id); |
|
| 1363 | 1363 | |
| 1364 | 1364 | /** |
| 1365 | 1365 | * Fires while selecting payment gateways, before the fields. |
@@ -1368,10 +1368,10 @@ discard block |
||
| 1368 | 1368 | * |
| 1369 | 1369 | * @param int $form_id The form ID. |
| 1370 | 1370 | */ |
| 1371 | - do_action( 'give_payment_mode_top', $form_id ); |
|
| 1371 | + do_action('give_payment_mode_top', $form_id); |
|
| 1372 | 1372 | ?> |
| 1373 | 1373 | |
| 1374 | - <fieldset id="give-payment-mode-select" <?php if ( count( $gateways ) <= 1 ) { |
|
| 1374 | + <fieldset id="give-payment-mode-select" <?php if (count($gateways) <= 1) { |
|
| 1375 | 1375 | echo 'style="display: none;"'; |
| 1376 | 1376 | } ?>> |
| 1377 | 1377 | <?php |
@@ -1382,10 +1382,10 @@ discard block |
||
| 1382 | 1382 | * |
| 1383 | 1383 | * @param int $form_id The form ID. |
| 1384 | 1384 | */ |
| 1385 | - do_action( 'give_payment_mode_before_gateways_wrap' ); |
|
| 1385 | + do_action('give_payment_mode_before_gateways_wrap'); |
|
| 1386 | 1386 | ?> |
| 1387 | 1387 | <legend |
| 1388 | - class="give-payment-mode-label"><?php echo apply_filters( 'give_checkout_payment_method_text', esc_html__( 'Select Payment Method', 'give' ) ); ?> |
|
| 1388 | + class="give-payment-mode-label"><?php echo apply_filters('give_checkout_payment_method_text', esc_html__('Select Payment Method', 'give')); ?> |
|
| 1389 | 1389 | <span class="give-loading-text"><span |
| 1390 | 1390 | class="give-loading-animation"></span> |
| 1391 | 1391 | </span> |
@@ -1398,26 +1398,26 @@ discard block |
||
| 1398 | 1398 | * |
| 1399 | 1399 | * @since 1.7 |
| 1400 | 1400 | */ |
| 1401 | - do_action( 'give_payment_mode_before_gateways' ) |
|
| 1401 | + do_action('give_payment_mode_before_gateways') |
|
| 1402 | 1402 | ?> |
| 1403 | 1403 | <ul id="give-gateway-radio-list"> |
| 1404 | 1404 | <?php |
| 1405 | 1405 | /** |
| 1406 | 1406 | * Loop through the active payment gateways. |
| 1407 | 1407 | */ |
| 1408 | - $selected_gateway = give_get_chosen_gateway( $form_id ); |
|
| 1408 | + $selected_gateway = give_get_chosen_gateway($form_id); |
|
| 1409 | 1409 | |
| 1410 | - foreach ( $gateways as $gateway_id => $gateway ) : |
|
| 1410 | + foreach ($gateways as $gateway_id => $gateway) : |
|
| 1411 | 1411 | //Determine the default gateway. |
| 1412 | - $checked = checked( $gateway_id, $selected_gateway, false ); |
|
| 1412 | + $checked = checked($gateway_id, $selected_gateway, false); |
|
| 1413 | 1413 | $checked_class = $checked ? ' class="give-gateway-option-selected"' : ''; ?> |
| 1414 | 1414 | <li<?php echo $checked_class ?>> |
| 1415 | 1415 | <input type="radio" name="payment-mode" class="give-gateway" |
| 1416 | - id="give-gateway-<?php echo esc_attr( $gateway_id ) . '-' . $form_id; ?>" |
|
| 1417 | - value="<?php echo esc_attr( $gateway_id ); ?>"<?php echo $checked; ?>> |
|
| 1418 | - <label for="give-gateway-<?php echo esc_attr( $gateway_id ) . '-' . $form_id; ?>" |
|
| 1416 | + id="give-gateway-<?php echo esc_attr($gateway_id).'-'.$form_id; ?>" |
|
| 1417 | + value="<?php echo esc_attr($gateway_id); ?>"<?php echo $checked; ?>> |
|
| 1418 | + <label for="give-gateway-<?php echo esc_attr($gateway_id).'-'.$form_id; ?>" |
|
| 1419 | 1419 | class="give-gateway-option" |
| 1420 | - id="give-gateway-option-<?php echo esc_attr( $gateway_id ); ?>"> <?php echo esc_html( $gateway['checkout_label'] ); ?></label> |
|
| 1420 | + id="give-gateway-option-<?php echo esc_attr($gateway_id); ?>"> <?php echo esc_html($gateway['checkout_label']); ?></label> |
|
| 1421 | 1421 | </li> |
| 1422 | 1422 | <?php |
| 1423 | 1423 | endforeach; |
@@ -1429,7 +1429,7 @@ discard block |
||
| 1429 | 1429 | * |
| 1430 | 1430 | * @since 1.7 |
| 1431 | 1431 | */ |
| 1432 | - do_action( 'give_payment_mode_after_gateways' ); |
|
| 1432 | + do_action('give_payment_mode_after_gateways'); |
|
| 1433 | 1433 | ?> |
| 1434 | 1434 | </div> |
| 1435 | 1435 | <?php |
@@ -1440,7 +1440,7 @@ discard block |
||
| 1440 | 1440 | * |
| 1441 | 1441 | * @param int $form_id The form ID. |
| 1442 | 1442 | */ |
| 1443 | - do_action( 'give_payment_mode_after_gateways_wrap' ); |
|
| 1443 | + do_action('give_payment_mode_after_gateways_wrap'); |
|
| 1444 | 1444 | ?> |
| 1445 | 1445 | </fieldset> |
| 1446 | 1446 | |
@@ -1452,7 +1452,7 @@ discard block |
||
| 1452 | 1452 | * |
| 1453 | 1453 | * @param int $form_id The form ID. |
| 1454 | 1454 | */ |
| 1455 | - do_action( 'give_payment_mode_bottom', $form_id ); |
|
| 1455 | + do_action('give_payment_mode_bottom', $form_id); |
|
| 1456 | 1456 | ?> |
| 1457 | 1457 | |
| 1458 | 1458 | <div id="give_purchase_form_wrap"> |
@@ -1463,7 +1463,7 @@ discard block |
||
| 1463 | 1463 | * |
| 1464 | 1464 | * @since 1.7 |
| 1465 | 1465 | */ |
| 1466 | - do_action( 'give_donation_form', $form_id ); |
|
| 1466 | + do_action('give_donation_form', $form_id); |
|
| 1467 | 1467 | ?> |
| 1468 | 1468 | |
| 1469 | 1469 | </div> |
@@ -1474,10 +1474,10 @@ discard block |
||
| 1474 | 1474 | * |
| 1475 | 1475 | * @since 1.7 |
| 1476 | 1476 | */ |
| 1477 | - do_action( 'give_donation_form_wrap_bottom', $form_id ); |
|
| 1477 | + do_action('give_donation_form_wrap_bottom', $form_id); |
|
| 1478 | 1478 | } |
| 1479 | 1479 | |
| 1480 | -add_action( 'give_payment_mode_select', 'give_payment_mode_select' ); |
|
| 1480 | +add_action('give_payment_mode_select', 'give_payment_mode_select'); |
|
| 1481 | 1481 | |
| 1482 | 1482 | /** |
| 1483 | 1483 | * Renders the Checkout Agree to Terms, this displays a checkbox for users to |
@@ -1490,31 +1490,31 @@ discard block |
||
| 1490 | 1490 | * |
| 1491 | 1491 | * @return bool |
| 1492 | 1492 | */ |
| 1493 | -function give_terms_agreement( $form_id ) { |
|
| 1494 | - $form_option = give_get_meta( $form_id, '_give_terms_option', true ); |
|
| 1493 | +function give_terms_agreement($form_id) { |
|
| 1494 | + $form_option = give_get_meta($form_id, '_give_terms_option', true); |
|
| 1495 | 1495 | |
| 1496 | 1496 | // Bailout if per form and global term and conditions is not setup. |
| 1497 | 1497 | if ( |
| 1498 | - give_is_setting_enabled( $form_option, 'global' ) |
|
| 1499 | - && give_is_setting_enabled( give_get_option( 'terms' ) ) |
|
| 1498 | + give_is_setting_enabled($form_option, 'global') |
|
| 1499 | + && give_is_setting_enabled(give_get_option('terms')) |
|
| 1500 | 1500 | ) { |
| 1501 | - $label = give_get_option( 'agree_to_terms_label', esc_html__( 'Agree to Terms?', 'give' ) ); |
|
| 1502 | - $terms = $terms = give_get_option( 'agreement_text', '' ); |
|
| 1503 | - $edit_term_url = admin_url( 'edit.php?post_type=give_forms&page=give-settings&tab=display§ion=term-and-conditions' ); |
|
| 1501 | + $label = give_get_option('agree_to_terms_label', esc_html__('Agree to Terms?', 'give')); |
|
| 1502 | + $terms = $terms = give_get_option('agreement_text', ''); |
|
| 1503 | + $edit_term_url = admin_url('edit.php?post_type=give_forms&page=give-settings&tab=display§ion=term-and-conditions'); |
|
| 1504 | 1504 | |
| 1505 | - } elseif ( give_is_setting_enabled( $form_option ) ) { |
|
| 1506 | - $label = ( $label = give_get_meta( $form_id, '_give_agree_label', true ) ) ? stripslashes( $label ) : esc_html__( 'Agree to Terms?', 'give' ); |
|
| 1507 | - $terms = give_get_meta( $form_id, '_give_agree_text', true ); |
|
| 1508 | - $edit_term_url = admin_url( 'post.php?post=' . $form_id . '&action=edit#form_terms_options' ); |
|
| 1505 | + } elseif (give_is_setting_enabled($form_option)) { |
|
| 1506 | + $label = ($label = give_get_meta($form_id, '_give_agree_label', true)) ? stripslashes($label) : esc_html__('Agree to Terms?', 'give'); |
|
| 1507 | + $terms = give_get_meta($form_id, '_give_agree_text', true); |
|
| 1508 | + $edit_term_url = admin_url('post.php?post='.$form_id.'&action=edit#form_terms_options'); |
|
| 1509 | 1509 | |
| 1510 | 1510 | } else { |
| 1511 | 1511 | return false; |
| 1512 | 1512 | } |
| 1513 | 1513 | |
| 1514 | 1514 | // Bailout: Check if term and conditions text is empty or not. |
| 1515 | - if ( empty( $terms ) ) { |
|
| 1516 | - if ( is_user_logged_in() && current_user_can( 'edit_give_forms' ) ) { |
|
| 1517 | - echo sprintf( __( 'Please enter valid terms and conditions in <a href="%s">this form\'s settings</a>.', 'give' ), $edit_term_url ); |
|
| 1515 | + if (empty($terms)) { |
|
| 1516 | + if (is_user_logged_in() && current_user_can('edit_give_forms')) { |
|
| 1517 | + echo sprintf(__('Please enter valid terms and conditions in <a href="%s">this form\'s settings</a>.', 'give'), $edit_term_url); |
|
| 1518 | 1518 | } |
| 1519 | 1519 | |
| 1520 | 1520 | return false; |
@@ -1522,7 +1522,7 @@ discard block |
||
| 1522 | 1522 | |
| 1523 | 1523 | ?> |
| 1524 | 1524 | <fieldset id="give_terms_agreement"> |
| 1525 | - <legend><?php echo apply_filters( 'give_terms_agreement_text', esc_html__( 'Terms', 'give' ) ); ?></legend> |
|
| 1525 | + <legend><?php echo apply_filters('give_terms_agreement_text', esc_html__('Terms', 'give')); ?></legend> |
|
| 1526 | 1526 | <div id="give_terms" class="give_terms-<?php echo $form_id; ?>" style="display:none;"> |
| 1527 | 1527 | <?php |
| 1528 | 1528 | /** |
@@ -1530,22 +1530,22 @@ discard block |
||
| 1530 | 1530 | * |
| 1531 | 1531 | * @since 1.0 |
| 1532 | 1532 | */ |
| 1533 | - do_action( 'give_before_terms' ); |
|
| 1533 | + do_action('give_before_terms'); |
|
| 1534 | 1534 | |
| 1535 | - echo wpautop( stripslashes( $terms ) ); |
|
| 1535 | + echo wpautop(stripslashes($terms)); |
|
| 1536 | 1536 | /** |
| 1537 | 1537 | * Fires while rendering terms of agreement, after the fields. |
| 1538 | 1538 | * |
| 1539 | 1539 | * @since 1.0 |
| 1540 | 1540 | */ |
| 1541 | - do_action( 'give_after_terms' ); |
|
| 1541 | + do_action('give_after_terms'); |
|
| 1542 | 1542 | ?> |
| 1543 | 1543 | </div> |
| 1544 | 1544 | <div id="give_show_terms"> |
| 1545 | 1545 | <a href="#" class="give_terms_links give_terms_links-<?php echo $form_id; ?>" role="button" |
| 1546 | - aria-controls="give_terms"><?php esc_html_e( 'Show Terms', 'give' ); ?></a> |
|
| 1546 | + aria-controls="give_terms"><?php esc_html_e('Show Terms', 'give'); ?></a> |
|
| 1547 | 1547 | <a href="#" class="give_terms_links give_terms_links-<?php echo $form_id; ?>" role="button" |
| 1548 | - aria-controls="give_terms" style="display:none;"><?php esc_html_e( 'Hide Terms', 'give' ); ?></a> |
|
| 1548 | + aria-controls="give_terms" style="display:none;"><?php esc_html_e('Hide Terms', 'give'); ?></a> |
|
| 1549 | 1549 | </div> |
| 1550 | 1550 | |
| 1551 | 1551 | <input name="give_agree_to_terms" class="required" type="checkbox" |
@@ -1556,7 +1556,7 @@ discard block |
||
| 1556 | 1556 | <?php |
| 1557 | 1557 | } |
| 1558 | 1558 | |
| 1559 | -add_action( 'give_donation_form_after_cc_form', 'give_terms_agreement', 8888, 1 ); |
|
| 1559 | +add_action('give_donation_form_after_cc_form', 'give_terms_agreement', 8888, 1); |
|
| 1560 | 1560 | |
| 1561 | 1561 | /** |
| 1562 | 1562 | * Checkout Final Total. |
@@ -1569,31 +1569,30 @@ discard block |
||
| 1569 | 1569 | * |
| 1570 | 1570 | * @return void |
| 1571 | 1571 | */ |
| 1572 | -function give_checkout_final_total( $form_id ) { |
|
| 1572 | +function give_checkout_final_total($form_id) { |
|
| 1573 | 1573 | |
| 1574 | - $total = isset( $_POST['give_total'] ) ? |
|
| 1575 | - apply_filters( 'give_donation_total', give_maybe_sanitize_amount( $_POST['give_total'] ) ) : |
|
| 1576 | - give_get_default_form_amount( $form_id ); |
|
| 1574 | + $total = isset($_POST['give_total']) ? |
|
| 1575 | + apply_filters('give_donation_total', give_maybe_sanitize_amount($_POST['give_total'])) : give_get_default_form_amount($form_id); |
|
| 1577 | 1576 | |
| 1578 | 1577 | |
| 1579 | 1578 | //Only proceed if give_total available. |
| 1580 | - if ( empty( $total ) ) { |
|
| 1579 | + if (empty($total)) { |
|
| 1581 | 1580 | return; |
| 1582 | 1581 | } |
| 1583 | 1582 | ?> |
| 1584 | 1583 | <p id="give-final-total-wrap" class="form-wrap "> |
| 1585 | 1584 | <span class="give-donation-total-label"> |
| 1586 | - <?php echo apply_filters( 'give_donation_total_label', esc_html__( 'Donation Total:', 'give' ) ); ?> |
|
| 1585 | + <?php echo apply_filters('give_donation_total_label', esc_html__('Donation Total:', 'give')); ?> |
|
| 1587 | 1586 | </span> |
| 1588 | 1587 | <span class="give-final-total-amount" |
| 1589 | - data-total="<?php echo give_format_amount( $total, array( 'sanitize' => false ) ); ?>"> |
|
| 1590 | - <?php echo give_currency_filter( give_format_amount( $total, array( 'sanitize' => false ) ) ); ?> |
|
| 1588 | + data-total="<?php echo give_format_amount($total, array('sanitize' => false)); ?>"> |
|
| 1589 | + <?php echo give_currency_filter(give_format_amount($total, array('sanitize' => false))); ?> |
|
| 1591 | 1590 | </span> |
| 1592 | 1591 | </p> |
| 1593 | 1592 | <?php |
| 1594 | 1593 | } |
| 1595 | 1594 | |
| 1596 | -add_action( 'give_donation_form_before_submit', 'give_checkout_final_total', 999 ); |
|
| 1595 | +add_action('give_donation_form_before_submit', 'give_checkout_final_total', 999); |
|
| 1597 | 1596 | |
| 1598 | 1597 | /** |
| 1599 | 1598 | * Renders the Checkout Submit section. |
@@ -1604,7 +1603,7 @@ discard block |
||
| 1604 | 1603 | * |
| 1605 | 1604 | * @return void |
| 1606 | 1605 | */ |
| 1607 | -function give_checkout_submit( $form_id ) { |
|
| 1606 | +function give_checkout_submit($form_id) { |
|
| 1608 | 1607 | ?> |
| 1609 | 1608 | <fieldset id="give_purchase_submit"> |
| 1610 | 1609 | <?php |
@@ -1613,24 +1612,24 @@ discard block |
||
| 1613 | 1612 | * |
| 1614 | 1613 | * @since 1.7 |
| 1615 | 1614 | */ |
| 1616 | - do_action( 'give_donation_form_before_submit', $form_id ); |
|
| 1615 | + do_action('give_donation_form_before_submit', $form_id); |
|
| 1617 | 1616 | |
| 1618 | - give_checkout_hidden_fields( $form_id ); |
|
| 1617 | + give_checkout_hidden_fields($form_id); |
|
| 1619 | 1618 | |
| 1620 | - echo give_get_donation_form_submit_button( $form_id ); |
|
| 1619 | + echo give_get_donation_form_submit_button($form_id); |
|
| 1621 | 1620 | |
| 1622 | 1621 | /** |
| 1623 | 1622 | * Fire after donation form submit. |
| 1624 | 1623 | * |
| 1625 | 1624 | * @since 1.7 |
| 1626 | 1625 | */ |
| 1627 | - do_action( 'give_donation_form_after_submit', $form_id ); |
|
| 1626 | + do_action('give_donation_form_after_submit', $form_id); |
|
| 1628 | 1627 | ?> |
| 1629 | 1628 | </fieldset> |
| 1630 | 1629 | <?php |
| 1631 | 1630 | } |
| 1632 | 1631 | |
| 1633 | -add_action( 'give_donation_form_after_cc_form', 'give_checkout_submit', 9999 ); |
|
| 1632 | +add_action('give_donation_form_after_cc_form', 'give_checkout_submit', 9999); |
|
| 1634 | 1633 | |
| 1635 | 1634 | /** |
| 1636 | 1635 | * Give Donation form submit button. |
@@ -1641,10 +1640,10 @@ discard block |
||
| 1641 | 1640 | * |
| 1642 | 1641 | * @return string |
| 1643 | 1642 | */ |
| 1644 | -function give_get_donation_form_submit_button( $form_id ) { |
|
| 1643 | +function give_get_donation_form_submit_button($form_id) { |
|
| 1645 | 1644 | |
| 1646 | - $display_label_field = give_get_meta( $form_id, '_give_checkout_label', true ); |
|
| 1647 | - $display_label = ( ! empty( $display_label_field ) ? $display_label_field : esc_html__( 'Donate Now', 'give' ) ); |
|
| 1645 | + $display_label_field = give_get_meta($form_id, '_give_checkout_label', true); |
|
| 1646 | + $display_label = ( ! empty($display_label_field) ? $display_label_field : esc_html__('Donate Now', 'give')); |
|
| 1648 | 1647 | ob_start(); |
| 1649 | 1648 | ?> |
| 1650 | 1649 | <div class="give-submit-button-wrap give-clearfix"> |
@@ -1653,7 +1652,7 @@ discard block |
||
| 1653 | 1652 | <span class="give-loading-animation"></span> |
| 1654 | 1653 | </div> |
| 1655 | 1654 | <?php |
| 1656 | - return apply_filters( 'give_donation_form_submit_button', ob_get_clean(), $form_id ); |
|
| 1655 | + return apply_filters('give_donation_form_submit_button', ob_get_clean(), $form_id); |
|
| 1657 | 1656 | } |
| 1658 | 1657 | |
| 1659 | 1658 | /** |
@@ -1668,17 +1667,17 @@ discard block |
||
| 1668 | 1667 | * |
| 1669 | 1668 | * @return mixed |
| 1670 | 1669 | */ |
| 1671 | -function give_show_goal_progress( $form_id, $args ) { |
|
| 1670 | +function give_show_goal_progress($form_id, $args) { |
|
| 1672 | 1671 | |
| 1673 | 1672 | ob_start(); |
| 1674 | - give_get_template( 'shortcode-goal', array( 'form_id' => $form_id, 'args' => $args ) ); |
|
| 1673 | + give_get_template('shortcode-goal', array('form_id' => $form_id, 'args' => $args)); |
|
| 1675 | 1674 | |
| 1676 | - echo apply_filters( 'give_goal_output', ob_get_clean() ); |
|
| 1675 | + echo apply_filters('give_goal_output', ob_get_clean()); |
|
| 1677 | 1676 | |
| 1678 | 1677 | return true; |
| 1679 | 1678 | } |
| 1680 | 1679 | |
| 1681 | -add_action( 'give_pre_form', 'give_show_goal_progress', 10, 2 ); |
|
| 1680 | +add_action('give_pre_form', 'give_show_goal_progress', 10, 2); |
|
| 1682 | 1681 | |
| 1683 | 1682 | |
| 1684 | 1683 | /** |
@@ -1691,10 +1690,10 @@ discard block |
||
| 1691 | 1690 | * |
| 1692 | 1691 | * @return mixed|string |
| 1693 | 1692 | */ |
| 1694 | -function give_get_form_content_placement( $form_id, $args ) { |
|
| 1693 | +function give_get_form_content_placement($form_id, $args) { |
|
| 1695 | 1694 | $show_content = ''; |
| 1696 | 1695 | |
| 1697 | - if ( isset( $args['show_content'] ) && ! empty( $args['show_content'] ) ) { |
|
| 1696 | + if (isset($args['show_content']) && ! empty($args['show_content'])) { |
|
| 1698 | 1697 | // Content positions. |
| 1699 | 1698 | $content_placement = array( |
| 1700 | 1699 | 'above' => 'give_pre_form', |
@@ -1702,18 +1701,18 @@ discard block |
||
| 1702 | 1701 | ); |
| 1703 | 1702 | |
| 1704 | 1703 | // Check if content position already decoded. |
| 1705 | - if ( in_array( $args['show_content'], $content_placement ) ) { |
|
| 1704 | + if (in_array($args['show_content'], $content_placement)) { |
|
| 1706 | 1705 | return $args['show_content']; |
| 1707 | 1706 | } |
| 1708 | 1707 | |
| 1709 | - $show_content = ( 'none' !== $args['show_content'] ? $content_placement[ $args['show_content'] ] : '' ); |
|
| 1708 | + $show_content = ('none' !== $args['show_content'] ? $content_placement[$args['show_content']] : ''); |
|
| 1710 | 1709 | |
| 1711 | - } elseif ( give_is_setting_enabled( give_get_meta( $form_id, '_give_display_content', true ) ) ) { |
|
| 1712 | - $show_content = give_get_meta( $form_id, '_give_content_placement', true ); |
|
| 1710 | + } elseif (give_is_setting_enabled(give_get_meta($form_id, '_give_display_content', true))) { |
|
| 1711 | + $show_content = give_get_meta($form_id, '_give_content_placement', true); |
|
| 1713 | 1712 | |
| 1714 | - } elseif ( 'none' !== give_get_meta( $form_id, '_give_content_option', true ) ) { |
|
| 1713 | + } elseif ('none' !== give_get_meta($form_id, '_give_content_option', true)) { |
|
| 1715 | 1714 | // Backward compatibility for _give_content_option for v18. |
| 1716 | - $show_content = give_get_meta( $form_id, '_give_content_option', true ); |
|
| 1715 | + $show_content = give_get_meta($form_id, '_give_content_option', true); |
|
| 1717 | 1716 | } |
| 1718 | 1717 | |
| 1719 | 1718 | return $show_content; |
@@ -1729,20 +1728,20 @@ discard block |
||
| 1729 | 1728 | * |
| 1730 | 1729 | * @return void|bool |
| 1731 | 1730 | */ |
| 1732 | -function give_form_content( $form_id, $args ) { |
|
| 1731 | +function give_form_content($form_id, $args) { |
|
| 1733 | 1732 | |
| 1734 | - $show_content = give_get_form_content_placement( $form_id, $args ); |
|
| 1733 | + $show_content = give_get_form_content_placement($form_id, $args); |
|
| 1735 | 1734 | |
| 1736 | 1735 | // Bailout. |
| 1737 | - if ( empty( $show_content ) ) { |
|
| 1736 | + if (empty($show_content)) { |
|
| 1738 | 1737 | return false; |
| 1739 | 1738 | } |
| 1740 | 1739 | |
| 1741 | 1740 | // Add action according to value. |
| 1742 | - add_action( $show_content, 'give_form_display_content', 10, 2 ); |
|
| 1741 | + add_action($show_content, 'give_form_display_content', 10, 2); |
|
| 1743 | 1742 | } |
| 1744 | 1743 | |
| 1745 | -add_action( 'give_pre_form_output', 'give_form_content', 10, 2 ); |
|
| 1744 | +add_action('give_pre_form_output', 'give_form_content', 10, 2); |
|
| 1746 | 1745 | |
| 1747 | 1746 | /** |
| 1748 | 1747 | * Renders Post Form Content. |
@@ -1756,22 +1755,22 @@ discard block |
||
| 1756 | 1755 | * |
| 1757 | 1756 | * @return void |
| 1758 | 1757 | */ |
| 1759 | -function give_form_display_content( $form_id, $args ) { |
|
| 1758 | +function give_form_display_content($form_id, $args) { |
|
| 1760 | 1759 | |
| 1761 | - $content = wpautop( give_get_meta( $form_id, '_give_form_content', true ) ); |
|
| 1762 | - $show_content = give_get_form_content_placement( $form_id, $args ); |
|
| 1760 | + $content = wpautop(give_get_meta($form_id, '_give_form_content', true)); |
|
| 1761 | + $show_content = give_get_form_content_placement($form_id, $args); |
|
| 1763 | 1762 | |
| 1764 | - if ( give_is_setting_enabled( give_get_option( 'the_content_filter' ) ) ) { |
|
| 1765 | - $content = apply_filters( 'the_content', $content ); |
|
| 1763 | + if (give_is_setting_enabled(give_get_option('the_content_filter'))) { |
|
| 1764 | + $content = apply_filters('the_content', $content); |
|
| 1766 | 1765 | } |
| 1767 | 1766 | |
| 1768 | - $output = '<div id="give-form-content-' . $form_id . '" class="give-form-content-wrap ' . $show_content . '-content">' . $content . '</div>'; |
|
| 1767 | + $output = '<div id="give-form-content-'.$form_id.'" class="give-form-content-wrap '.$show_content.'-content">'.$content.'</div>'; |
|
| 1769 | 1768 | |
| 1770 | - echo apply_filters( 'give_form_content_output', $output ); |
|
| 1769 | + echo apply_filters('give_form_content_output', $output); |
|
| 1771 | 1770 | |
| 1772 | 1771 | //remove action to prevent content output on addition forms on page. |
| 1773 | 1772 | //@see: https://github.com/WordImpress/Give/issues/634. |
| 1774 | - remove_action( $show_content, 'give_form_display_content' ); |
|
| 1773 | + remove_action($show_content, 'give_form_display_content'); |
|
| 1775 | 1774 | } |
| 1776 | 1775 | |
| 1777 | 1776 | /** |
@@ -1783,7 +1782,7 @@ discard block |
||
| 1783 | 1782 | * |
| 1784 | 1783 | * @return void |
| 1785 | 1784 | */ |
| 1786 | -function give_checkout_hidden_fields( $form_id ) { |
|
| 1785 | +function give_checkout_hidden_fields($form_id) { |
|
| 1787 | 1786 | |
| 1788 | 1787 | /** |
| 1789 | 1788 | * Fires while rendering hidden checkout fields, before the fields. |
@@ -1792,13 +1791,13 @@ discard block |
||
| 1792 | 1791 | * |
| 1793 | 1792 | * @param int $form_id The form ID. |
| 1794 | 1793 | */ |
| 1795 | - do_action( 'give_hidden_fields_before', $form_id ); |
|
| 1794 | + do_action('give_hidden_fields_before', $form_id); |
|
| 1796 | 1795 | |
| 1797 | - if ( is_user_logged_in() ) { ?> |
|
| 1796 | + if (is_user_logged_in()) { ?> |
|
| 1798 | 1797 | <input type="hidden" name="give-user-id" value="<?php echo get_current_user_id(); ?>"/> |
| 1799 | 1798 | <?php } ?> |
| 1800 | 1799 | <input type="hidden" name="give_action" value="purchase"/> |
| 1801 | - <input type="hidden" name="give-gateway" value="<?php echo give_get_chosen_gateway( $form_id ); ?>"/> |
|
| 1800 | + <input type="hidden" name="give-gateway" value="<?php echo give_get_chosen_gateway($form_id); ?>"/> |
|
| 1802 | 1801 | <?php |
| 1803 | 1802 | /** |
| 1804 | 1803 | * Fires while rendering hidden checkout fields, after the fields. |
@@ -1807,7 +1806,7 @@ discard block |
||
| 1807 | 1806 | * |
| 1808 | 1807 | * @param int $form_id The form ID. |
| 1809 | 1808 | */ |
| 1810 | - do_action( 'give_hidden_fields_after', $form_id ); |
|
| 1809 | + do_action('give_hidden_fields_after', $form_id); |
|
| 1811 | 1810 | |
| 1812 | 1811 | } |
| 1813 | 1812 | |
@@ -1822,20 +1821,20 @@ discard block |
||
| 1822 | 1821 | * |
| 1823 | 1822 | * @return string $content Filtered content. |
| 1824 | 1823 | */ |
| 1825 | -function give_filter_success_page_content( $content ) { |
|
| 1824 | +function give_filter_success_page_content($content) { |
|
| 1826 | 1825 | |
| 1827 | 1826 | $give_options = give_get_settings(); |
| 1828 | 1827 | |
| 1829 | - if ( isset( $give_options['success_page'] ) && isset( $_GET['payment-confirmation'] ) && is_page( $give_options['success_page'] ) ) { |
|
| 1830 | - if ( has_filter( 'give_payment_confirm_' . $_GET['payment-confirmation'] ) ) { |
|
| 1831 | - $content = apply_filters( 'give_payment_confirm_' . $_GET['payment-confirmation'], $content ); |
|
| 1828 | + if (isset($give_options['success_page']) && isset($_GET['payment-confirmation']) && is_page($give_options['success_page'])) { |
|
| 1829 | + if (has_filter('give_payment_confirm_'.$_GET['payment-confirmation'])) { |
|
| 1830 | + $content = apply_filters('give_payment_confirm_'.$_GET['payment-confirmation'], $content); |
|
| 1832 | 1831 | } |
| 1833 | 1832 | } |
| 1834 | 1833 | |
| 1835 | 1834 | return $content; |
| 1836 | 1835 | } |
| 1837 | 1836 | |
| 1838 | -add_filter( 'the_content', 'give_filter_success_page_content' ); |
|
| 1837 | +add_filter('the_content', 'give_filter_success_page_content'); |
|
| 1839 | 1838 | |
| 1840 | 1839 | /** |
| 1841 | 1840 | * Test Mode Frontend Warning. |
@@ -1846,12 +1845,12 @@ discard block |
||
| 1846 | 1845 | */ |
| 1847 | 1846 | function give_test_mode_frontend_warning() { |
| 1848 | 1847 | |
| 1849 | - if ( give_is_test_mode() ) { |
|
| 1850 | - echo '<div class="give_error give_warning" id="give_error_test_mode"><p><strong>' . esc_html__( 'Notice:', 'give' ) . '</strong> ' . esc_html__( 'Test mode is enabled. While in test mode no live donations are processed.', 'give' ) . '</p></div>'; |
|
| 1848 | + if (give_is_test_mode()) { |
|
| 1849 | + echo '<div class="give_error give_warning" id="give_error_test_mode"><p><strong>'.esc_html__('Notice:', 'give').'</strong> '.esc_html__('Test mode is enabled. While in test mode no live donations are processed.', 'give').'</p></div>'; |
|
| 1851 | 1850 | } |
| 1852 | 1851 | } |
| 1853 | 1852 | |
| 1854 | -add_action( 'give_pre_form', 'give_test_mode_frontend_warning', 10 ); |
|
| 1853 | +add_action('give_pre_form', 'give_test_mode_frontend_warning', 10); |
|
| 1855 | 1854 | |
| 1856 | 1855 | /** |
| 1857 | 1856 | * Members-only Form. |
@@ -1865,21 +1864,21 @@ discard block |
||
| 1865 | 1864 | * |
| 1866 | 1865 | * @return string |
| 1867 | 1866 | */ |
| 1868 | -function give_members_only_form( $final_output, $args ) { |
|
| 1867 | +function give_members_only_form($final_output, $args) { |
|
| 1869 | 1868 | |
| 1870 | - $form_id = isset( $args['form_id'] ) ? $args['form_id'] : 0; |
|
| 1869 | + $form_id = isset($args['form_id']) ? $args['form_id'] : 0; |
|
| 1871 | 1870 | |
| 1872 | 1871 | //Sanity Check: Must have form_id & not be logged in. |
| 1873 | - if ( empty( $form_id ) || is_user_logged_in() ) { |
|
| 1872 | + if (empty($form_id) || is_user_logged_in()) { |
|
| 1874 | 1873 | return $final_output; |
| 1875 | 1874 | } |
| 1876 | 1875 | |
| 1877 | 1876 | //Logged in only and Register / Login set to none. |
| 1878 | - if ( give_logged_in_only( $form_id ) && give_show_login_register_option( $form_id ) == 'none' ) { |
|
| 1877 | + if (give_logged_in_only($form_id) && give_show_login_register_option($form_id) == 'none') { |
|
| 1879 | 1878 | |
| 1880 | - $final_output = Give()->notices->print_frontend_notice( esc_html__( 'Please log in in order to complete your donation.', 'give' ), false ); |
|
| 1879 | + $final_output = Give()->notices->print_frontend_notice(esc_html__('Please log in in order to complete your donation.', 'give'), false); |
|
| 1881 | 1880 | |
| 1882 | - return apply_filters( 'give_members_only_output', $final_output, $form_id ); |
|
| 1881 | + return apply_filters('give_members_only_output', $final_output, $form_id); |
|
| 1883 | 1882 | |
| 1884 | 1883 | } |
| 1885 | 1884 | |
@@ -1887,4 +1886,4 @@ discard block |
||
| 1887 | 1886 | |
| 1888 | 1887 | } |
| 1889 | 1888 | |
| 1890 | -add_filter( 'give_donate_form', 'give_members_only_form', 10, 2 ); |
|
| 1889 | +add_filter('give_donate_form', 'give_members_only_form', 10, 2); |
|
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | 12 | // Exit if accessed directly. |
| 13 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 13 | +if ( ! defined('ABSPATH')) { |
|
| 14 | 14 | exit; |
| 15 | 15 | } |
| 16 | 16 | |
@@ -25,52 +25,52 @@ discard block |
||
| 25 | 25 | * |
| 26 | 26 | * @return void |
| 27 | 27 | */ |
| 28 | -function give_update_payment_details( $data ) { |
|
| 28 | +function give_update_payment_details($data) { |
|
| 29 | 29 | |
| 30 | - if ( ! current_user_can( 'edit_give_payments', $data['give_payment_id'] ) ) { |
|
| 31 | - wp_die( esc_html__( 'You do not have permission to edit payments.', 'give' ), esc_html__( 'Error', 'give' ), array( 'response' => 403 ) ); |
|
| 30 | + if ( ! current_user_can('edit_give_payments', $data['give_payment_id'])) { |
|
| 31 | + wp_die(esc_html__('You do not have permission to edit payments.', 'give'), esc_html__('Error', 'give'), array('response' => 403)); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | - check_admin_referer( 'give_update_payment_details_nonce' ); |
|
| 34 | + check_admin_referer('give_update_payment_details_nonce'); |
|
| 35 | 35 | |
| 36 | 36 | // Retrieve the payment ID. |
| 37 | - $payment_id = absint( $data['give_payment_id'] ); |
|
| 37 | + $payment_id = absint($data['give_payment_id']); |
|
| 38 | 38 | |
| 39 | 39 | /* @var Give_Payment $payment */ |
| 40 | - $payment = new Give_Payment( $payment_id ); |
|
| 40 | + $payment = new Give_Payment($payment_id); |
|
| 41 | 41 | |
| 42 | 42 | // Retrieve existing payment meta. |
| 43 | 43 | $meta = $payment->get_meta(); |
| 44 | 44 | $user_info = $payment->user_info; |
| 45 | 45 | |
| 46 | 46 | $status = $data['give-payment-status']; |
| 47 | - $date = sanitize_text_field( $data['give-payment-date'] ); |
|
| 48 | - $hour = sanitize_text_field( $data['give-payment-time-hour'] ); |
|
| 47 | + $date = sanitize_text_field($data['give-payment-date']); |
|
| 48 | + $hour = sanitize_text_field($data['give-payment-time-hour']); |
|
| 49 | 49 | |
| 50 | 50 | // Restrict to our high and low. |
| 51 | - if ( $hour > 23 ) { |
|
| 51 | + if ($hour > 23) { |
|
| 52 | 52 | $hour = 23; |
| 53 | - } elseif ( $hour < 0 ) { |
|
| 53 | + } elseif ($hour < 0) { |
|
| 54 | 54 | $hour = 00; |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - $minute = sanitize_text_field( $data['give-payment-time-min'] ); |
|
| 57 | + $minute = sanitize_text_field($data['give-payment-time-min']); |
|
| 58 | 58 | |
| 59 | 59 | // Restrict to our high and low. |
| 60 | - if ( $minute > 59 ) { |
|
| 60 | + if ($minute > 59) { |
|
| 61 | 61 | $minute = 59; |
| 62 | - } elseif ( $minute < 0 ) { |
|
| 62 | + } elseif ($minute < 0) { |
|
| 63 | 63 | $minute = 00; |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - $address = array_map( 'trim', $data['give-payment-address'][0] ); |
|
| 66 | + $address = array_map('trim', $data['give-payment-address'][0]); |
|
| 67 | 67 | |
| 68 | 68 | $curr_total = $payment->total; |
| 69 | - $new_total = give_maybe_sanitize_amount( $data['give-payment-total'] ); |
|
| 70 | - $date = date( 'Y-m-d', strtotime( $date ) ) . ' ' . $hour . ':' . $minute . ':00'; |
|
| 69 | + $new_total = give_maybe_sanitize_amount($data['give-payment-total']); |
|
| 70 | + $date = date('Y-m-d', strtotime($date)).' '.$hour.':'.$minute.':00'; |
|
| 71 | 71 | |
| 72 | - $curr_donor_id = sanitize_text_field( $data['give-current-donor'] ); |
|
| 73 | - $new_donor_id = sanitize_text_field( $data['donor-id'] ); |
|
| 72 | + $curr_donor_id = sanitize_text_field($data['give-current-donor']); |
|
| 73 | + $new_donor_id = sanitize_text_field($data['donor-id']); |
|
| 74 | 74 | |
| 75 | 75 | /** |
| 76 | 76 | * Fires before updating edited donation. |
@@ -80,98 +80,98 @@ discard block |
||
| 80 | 80 | * |
| 81 | 81 | * @param int $payment_id The ID of the payment. |
| 82 | 82 | */ |
| 83 | - do_action( 'give_update_edited_donation', $payment_id ); |
|
| 83 | + do_action('give_update_edited_donation', $payment_id); |
|
| 84 | 84 | |
| 85 | 85 | $payment->date = $date; |
| 86 | 86 | $updated = $payment->save(); |
| 87 | 87 | |
| 88 | - if ( 0 === $updated ) { |
|
| 89 | - wp_die( esc_html__( 'Error Updating Donation.', 'give' ), esc_html__( 'Error', 'give' ), array( 'response' => 400 ) ); |
|
| 88 | + if (0 === $updated) { |
|
| 89 | + wp_die(esc_html__('Error Updating Donation.', 'give'), esc_html__('Error', 'give'), array('response' => 400)); |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | $donor_changed = false; |
| 93 | 93 | |
| 94 | - if ( isset( $data['give-new-donor'] ) && $data['give-new-donor'] == '1' ) { |
|
| 94 | + if (isset($data['give-new-donor']) && $data['give-new-donor'] == '1') { |
|
| 95 | 95 | |
| 96 | - $email = isset( $data['give-new-donor-email'] ) ? sanitize_text_field( $data['give-new-donor-email'] ) : ''; |
|
| 97 | - $names = isset( $data['give-new-donor-name'] ) ? sanitize_text_field( $data['give-new-donor-name'] ) : ''; |
|
| 96 | + $email = isset($data['give-new-donor-email']) ? sanitize_text_field($data['give-new-donor-email']) : ''; |
|
| 97 | + $names = isset($data['give-new-donor-name']) ? sanitize_text_field($data['give-new-donor-name']) : ''; |
|
| 98 | 98 | |
| 99 | - if ( empty( $email ) || empty( $names ) ) { |
|
| 100 | - wp_die( esc_html__( 'New donors require a name and email address.', 'give' ), esc_html__( 'Error', 'give' ), array( 'response' => 400 ) ); |
|
| 99 | + if (empty($email) || empty($names)) { |
|
| 100 | + wp_die(esc_html__('New donors require a name and email address.', 'give'), esc_html__('Error', 'give'), array('response' => 400)); |
|
| 101 | 101 | } |
| 102 | 102 | |
| 103 | - $donor = new Give_Donor( $email ); |
|
| 104 | - if ( empty( $donor->id ) ) { |
|
| 105 | - $donor_data = array( 'name' => $names, 'email' => $email ); |
|
| 106 | - $user_id = email_exists( $email ); |
|
| 107 | - if ( false !== $user_id ) { |
|
| 103 | + $donor = new Give_Donor($email); |
|
| 104 | + if (empty($donor->id)) { |
|
| 105 | + $donor_data = array('name' => $names, 'email' => $email); |
|
| 106 | + $user_id = email_exists($email); |
|
| 107 | + if (false !== $user_id) { |
|
| 108 | 108 | $donor_data['user_id'] = $user_id; |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | - if ( ! $donor->create( $donor_data ) ) { |
|
| 111 | + if ( ! $donor->create($donor_data)) { |
|
| 112 | 112 | // Failed to crete the new donor, assume the previous donor. |
| 113 | 113 | $donor_changed = false; |
| 114 | - $donor = new Give_Donor( $curr_donor_id ); |
|
| 115 | - give_set_error( 'give-payment-new-donor-fail', __( 'Error creating new donor.', 'give' ) ); |
|
| 114 | + $donor = new Give_Donor($curr_donor_id); |
|
| 115 | + give_set_error('give-payment-new-donor-fail', __('Error creating new donor.', 'give')); |
|
| 116 | 116 | } |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | $new_donor_id = $donor->id; |
| 120 | 120 | |
| 121 | - $previous_donor = new Give_Donor( $curr_donor_id ); |
|
| 121 | + $previous_donor = new Give_Donor($curr_donor_id); |
|
| 122 | 122 | |
| 123 | 123 | $donor_changed = true; |
| 124 | 124 | |
| 125 | - } elseif ( $curr_donor_id !== $new_donor_id ) { |
|
| 125 | + } elseif ($curr_donor_id !== $new_donor_id) { |
|
| 126 | 126 | |
| 127 | - $donor = new Give_Donor( $new_donor_id ); |
|
| 127 | + $donor = new Give_Donor($new_donor_id); |
|
| 128 | 128 | $email = $donor->email; |
| 129 | 129 | $names = $donor->name; |
| 130 | 130 | |
| 131 | - $previous_donor = new Give_Donor( $curr_donor_id ); |
|
| 131 | + $previous_donor = new Give_Donor($curr_donor_id); |
|
| 132 | 132 | |
| 133 | 133 | $donor_changed = true; |
| 134 | 134 | |
| 135 | 135 | } else { |
| 136 | 136 | |
| 137 | - $donor = new Give_Donor( $curr_donor_id ); |
|
| 137 | + $donor = new Give_Donor($curr_donor_id); |
|
| 138 | 138 | $email = $donor->email; |
| 139 | 139 | $names = $donor->name; |
| 140 | 140 | |
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | // Setup first and last name from input values. |
| 144 | - $names = explode( ' ', $names ); |
|
| 145 | - $first_name = ! empty( $names[0] ) ? $names[0] : ''; |
|
| 144 | + $names = explode(' ', $names); |
|
| 145 | + $first_name = ! empty($names[0]) ? $names[0] : ''; |
|
| 146 | 146 | $last_name = ''; |
| 147 | - if ( ! empty( $names[1] ) ) { |
|
| 148 | - unset( $names[0] ); |
|
| 149 | - $last_name = implode( ' ', $names ); |
|
| 147 | + if ( ! empty($names[1])) { |
|
| 148 | + unset($names[0]); |
|
| 149 | + $last_name = implode(' ', $names); |
|
| 150 | 150 | } |
| 151 | 151 | |
| 152 | - if ( $donor_changed ) { |
|
| 152 | + if ($donor_changed) { |
|
| 153 | 153 | |
| 154 | 154 | // Remove the stats and payment from the previous donor and attach it to the new donor. |
| 155 | - $previous_donor->remove_payment( $payment_id, false ); |
|
| 156 | - $donor->attach_payment( $payment_id, false ); |
|
| 155 | + $previous_donor->remove_payment($payment_id, false); |
|
| 156 | + $donor->attach_payment($payment_id, false); |
|
| 157 | 157 | |
| 158 | - if ( 'publish' == $status ) { |
|
| 158 | + if ('publish' == $status) { |
|
| 159 | 159 | |
| 160 | 160 | // Reduce previous user donation count and amount. |
| 161 | 161 | $previous_donor->decrease_donation_count(); |
| 162 | - $previous_donor->decrease_value( $curr_total ); |
|
| 162 | + $previous_donor->decrease_value($curr_total); |
|
| 163 | 163 | |
| 164 | 164 | // If donation was completed adjust stats of new donors. |
| 165 | 165 | $donor->increase_purchase_count(); |
| 166 | - $donor->increase_value( $new_total ); |
|
| 166 | + $donor->increase_value($new_total); |
|
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | $payment->customer_id = $donor->id; |
| 170 | 170 | } else { |
| 171 | 171 | |
| 172 | - if ( 'publish' === $status ) { |
|
| 172 | + if ('publish' === $status) { |
|
| 173 | 173 | // Update user donation stat. |
| 174 | - $donor->update_donation_value( $curr_total, $new_total ); |
|
| 174 | + $donor->update_donation_value($curr_total, $new_total); |
|
| 175 | 175 | } |
| 176 | 176 | } |
| 177 | 177 | |
@@ -184,10 +184,10 @@ discard block |
||
| 184 | 184 | $payment->total = $new_total; |
| 185 | 185 | |
| 186 | 186 | // Check for payment notes. |
| 187 | - if ( ! empty( $data['give-payment-note'] ) ) { |
|
| 187 | + if ( ! empty($data['give-payment-note'])) { |
|
| 188 | 188 | |
| 189 | - $note = wp_kses( $data['give-payment-note'], array() ); |
|
| 190 | - give_insert_payment_note( $payment_id, $note ); |
|
| 189 | + $note = wp_kses($data['give-payment-note'], array()); |
|
| 190 | + give_insert_payment_note($payment_id, $note); |
|
| 191 | 191 | |
| 192 | 192 | } |
| 193 | 193 | |
@@ -195,17 +195,17 @@ discard block |
||
| 195 | 195 | $payment->status = $status; |
| 196 | 196 | |
| 197 | 197 | // Adjust total store earnings if the payment total has been changed. |
| 198 | - if ( $new_total !== $curr_total && 'publish' == $status ) { |
|
| 198 | + if ($new_total !== $curr_total && 'publish' == $status) { |
|
| 199 | 199 | |
| 200 | - if ( $new_total > $curr_total ) { |
|
| 200 | + if ($new_total > $curr_total) { |
|
| 201 | 201 | // Increase if our new total is higher. |
| 202 | 202 | $difference = $new_total - $curr_total; |
| 203 | - give_increase_total_earnings( $difference ); |
|
| 203 | + give_increase_total_earnings($difference); |
|
| 204 | 204 | |
| 205 | - } elseif ( $curr_total > $new_total ) { |
|
| 205 | + } elseif ($curr_total > $new_total) { |
|
| 206 | 206 | // Decrease if our new total is lower. |
| 207 | 207 | $difference = $curr_total - $new_total; |
| 208 | - give_decrease_total_earnings( $difference ); |
|
| 208 | + give_decrease_total_earnings($difference); |
|
| 209 | 209 | |
| 210 | 210 | } |
| 211 | 211 | } |
@@ -213,16 +213,16 @@ discard block |
||
| 213 | 213 | $payment->save(); |
| 214 | 214 | |
| 215 | 215 | // Get new give form ID. |
| 216 | - $new_form_id = absint( $data['give-payment-form-select'] ); |
|
| 217 | - $current_form_id = absint( $payment->get_meta( '_give_payment_form_id' ) ); |
|
| 216 | + $new_form_id = absint($data['give-payment-form-select']); |
|
| 217 | + $current_form_id = absint($payment->get_meta('_give_payment_form_id')); |
|
| 218 | 218 | |
| 219 | 219 | // We are adding payment transfer code in last to remove any conflict with above functionality. |
| 220 | 220 | // For example: above code will automatically handle form stat (increase/decrease) when payment status changes. |
| 221 | 221 | // Check if user want to transfer current payment to new give form id. |
| 222 | - if ( $new_form_id != $current_form_id ) { |
|
| 222 | + if ($new_form_id != $current_form_id) { |
|
| 223 | 223 | |
| 224 | 224 | // Get new give form title. |
| 225 | - $new_form_title = get_the_title( $new_form_id ); |
|
| 225 | + $new_form_title = get_the_title($new_form_id); |
|
| 226 | 226 | |
| 227 | 227 | // Update new give form data in payment data. |
| 228 | 228 | $payment_meta = $payment->get_meta(); |
@@ -230,43 +230,43 @@ discard block |
||
| 230 | 230 | $payment_meta['form_id'] = $new_form_id; |
| 231 | 231 | |
| 232 | 232 | // Update price id post meta data for set donation form. |
| 233 | - if ( ! give_has_variable_prices( $new_form_id ) ) { |
|
| 233 | + if ( ! give_has_variable_prices($new_form_id)) { |
|
| 234 | 234 | $payment_meta['price_id'] = ''; |
| 235 | 235 | } |
| 236 | 236 | |
| 237 | 237 | // Update payment give form meta data. |
| 238 | - $payment->update_meta( '_give_payment_form_id', $new_form_id ); |
|
| 239 | - $payment->update_meta( '_give_payment_form_title', $new_form_title ); |
|
| 240 | - $payment->update_meta( '_give_payment_meta', $payment_meta ); |
|
| 238 | + $payment->update_meta('_give_payment_form_id', $new_form_id); |
|
| 239 | + $payment->update_meta('_give_payment_form_title', $new_form_title); |
|
| 240 | + $payment->update_meta('_give_payment_meta', $payment_meta); |
|
| 241 | 241 | |
| 242 | 242 | // Update price id payment metadata. |
| 243 | - if ( ! give_has_variable_prices( $new_form_id ) ) { |
|
| 244 | - $payment->update_meta( '_give_payment_price_id', '' ); |
|
| 243 | + if ( ! give_has_variable_prices($new_form_id)) { |
|
| 244 | + $payment->update_meta('_give_payment_price_id', ''); |
|
| 245 | 245 | } |
| 246 | 246 | |
| 247 | 247 | // If donation was completed, adjust stats of forms. |
| 248 | - if ( 'publish' == $status ) { |
|
| 248 | + if ('publish' == $status) { |
|
| 249 | 249 | |
| 250 | 250 | // Decrease sale of old give form. For other payment status. |
| 251 | - $current_form = new Give_Donate_Form( $current_form_id ); |
|
| 251 | + $current_form = new Give_Donate_Form($current_form_id); |
|
| 252 | 252 | $current_form->decrease_sales(); |
| 253 | - $current_form->decrease_earnings( $curr_total ); |
|
| 253 | + $current_form->decrease_earnings($curr_total); |
|
| 254 | 254 | |
| 255 | 255 | // Increase sale of new give form. |
| 256 | - $new_form = new Give_Donate_Form( $new_form_id ); |
|
| 256 | + $new_form = new Give_Donate_Form($new_form_id); |
|
| 257 | 257 | $new_form->increase_sales(); |
| 258 | - $new_form->increase_earnings( $new_total ); |
|
| 258 | + $new_form->increase_earnings($new_total); |
|
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | // Re setup payment to update new meta value in object. |
| 262 | - $payment->update_payment_setup( $payment->ID ); |
|
| 262 | + $payment->update_payment_setup($payment->ID); |
|
| 263 | 263 | } |
| 264 | 264 | |
| 265 | 265 | // Update price id if current form is variable form. |
| 266 | 266 | /* @var Give_Donate_Form $form */ |
| 267 | - $form = new Give_Donate_Form( $payment->form_id ); |
|
| 267 | + $form = new Give_Donate_Form($payment->form_id); |
|
| 268 | 268 | |
| 269 | - if ( isset( $data['give-variable-price'] ) && $form->has_variable_prices() ) { |
|
| 269 | + if (isset($data['give-variable-price']) && $form->has_variable_prices()) { |
|
| 270 | 270 | |
| 271 | 271 | // Get payment meta data. |
| 272 | 272 | $payment_meta = $payment->get_meta(); |
@@ -275,9 +275,9 @@ discard block |
||
| 275 | 275 | $price_id = ''; |
| 276 | 276 | |
| 277 | 277 | // Get price info |
| 278 | - if( 0 <= $data['give-variable-price'] ) { |
|
| 279 | - foreach ( $form->prices as $variable_price ) { |
|
| 280 | - if( $new_total === give_maybe_sanitize_amount( $variable_price['_give_amount'] ) ) { |
|
| 278 | + if (0 <= $data['give-variable-price']) { |
|
| 279 | + foreach ($form->prices as $variable_price) { |
|
| 280 | + if ($new_total === give_maybe_sanitize_amount($variable_price['_give_amount'])) { |
|
| 281 | 281 | $price_info = $variable_price; |
| 282 | 282 | break; |
| 283 | 283 | } |
@@ -285,15 +285,15 @@ discard block |
||
| 285 | 285 | } |
| 286 | 286 | |
| 287 | 287 | // Set price id. |
| 288 | - if( ! empty( $price_info ) ) { |
|
| 288 | + if ( ! empty($price_info)) { |
|
| 289 | 289 | $price_id = $data['give-variable-price']; |
| 290 | 290 | |
| 291 | - if( $data['give-variable-price'] !== $price_info['_give_id']['level_id'] ) { |
|
| 291 | + if ($data['give-variable-price'] !== $price_info['_give_id']['level_id']) { |
|
| 292 | 292 | // Set price id to amount match. |
| 293 | 293 | $price_id = $price_info['_give_id']['level_id']; |
| 294 | 294 | } |
| 295 | 295 | |
| 296 | - } elseif( $form->is_custom_price_mode() ){ |
|
| 296 | + } elseif ($form->is_custom_price_mode()) { |
|
| 297 | 297 | $price_id = 'custom'; |
| 298 | 298 | } |
| 299 | 299 | |
@@ -301,11 +301,11 @@ discard block |
||
| 301 | 301 | $payment_meta['price_id'] = $price_id; |
| 302 | 302 | |
| 303 | 303 | // Update payment give form meta data. |
| 304 | - $payment->update_meta( '_give_payment_price_id', $price_id ); |
|
| 305 | - $payment->update_meta( '_give_payment_meta', $payment_meta ); |
|
| 304 | + $payment->update_meta('_give_payment_price_id', $price_id); |
|
| 305 | + $payment->update_meta('_give_payment_meta', $payment_meta); |
|
| 306 | 306 | |
| 307 | 307 | // Re setup payment to update new meta value in object. |
| 308 | - $payment->update_payment_setup( $payment->ID ); |
|
| 308 | + $payment->update_payment_setup($payment->ID); |
|
| 309 | 309 | } |
| 310 | 310 | |
| 311 | 311 | /** |
@@ -316,13 +316,13 @@ discard block |
||
| 316 | 316 | * |
| 317 | 317 | * @param int $payment_id The ID of the payment. |
| 318 | 318 | */ |
| 319 | - do_action( 'give_updated_edited_donation', $payment_id ); |
|
| 319 | + do_action('give_updated_edited_donation', $payment_id); |
|
| 320 | 320 | |
| 321 | - wp_safe_redirect( admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&give-message=payment-updated&id=' . $payment_id ) ); |
|
| 321 | + wp_safe_redirect(admin_url('edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&give-message=payment-updated&id='.$payment_id)); |
|
| 322 | 322 | exit; |
| 323 | 323 | } |
| 324 | 324 | |
| 325 | -add_action( 'give_update_payment_details', 'give_update_payment_details' ); |
|
| 325 | +add_action('give_update_payment_details', 'give_update_payment_details'); |
|
| 326 | 326 | |
| 327 | 327 | /** |
| 328 | 328 | * Trigger a Donation Deletion. |
@@ -333,48 +333,48 @@ discard block |
||
| 333 | 333 | * |
| 334 | 334 | * @return void |
| 335 | 335 | */ |
| 336 | -function give_trigger_donation_delete( $data ) { |
|
| 337 | - if ( wp_verify_nonce( $data['_wpnonce'], 'give_donation_nonce' ) ) { |
|
| 336 | +function give_trigger_donation_delete($data) { |
|
| 337 | + if (wp_verify_nonce($data['_wpnonce'], 'give_donation_nonce')) { |
|
| 338 | 338 | |
| 339 | - $payment_id = absint( $data['purchase_id'] ); |
|
| 339 | + $payment_id = absint($data['purchase_id']); |
|
| 340 | 340 | |
| 341 | - if ( ! current_user_can( 'edit_give_payments', $payment_id ) ) { |
|
| 342 | - wp_die( __( 'You do not have permission to edit payments.', 'give' ), __( 'Error', 'give' ), array( 'response' => 403 ) ); |
|
| 341 | + if ( ! current_user_can('edit_give_payments', $payment_id)) { |
|
| 342 | + wp_die(__('You do not have permission to edit payments.', 'give'), __('Error', 'give'), array('response' => 403)); |
|
| 343 | 343 | } |
| 344 | 344 | |
| 345 | - give_delete_donation( $payment_id ); |
|
| 346 | - wp_redirect( admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&give-message=donation_deleted' ) ); |
|
| 345 | + give_delete_donation($payment_id); |
|
| 346 | + wp_redirect(admin_url('edit.php?post_type=give_forms&page=give-payment-history&give-message=donation_deleted')); |
|
| 347 | 347 | give_die(); |
| 348 | 348 | } |
| 349 | 349 | } |
| 350 | 350 | |
| 351 | -add_action( 'give_delete_payment', 'give_trigger_donation_delete' ); |
|
| 351 | +add_action('give_delete_payment', 'give_trigger_donation_delete'); |
|
| 352 | 352 | |
| 353 | 353 | /** |
| 354 | 354 | * AJAX Store Donation Note |
| 355 | 355 | */ |
| 356 | 356 | function give_ajax_store_payment_note() { |
| 357 | 357 | |
| 358 | - $payment_id = absint( $_POST['payment_id'] ); |
|
| 359 | - $note = wp_kses( $_POST['note'], array() ); |
|
| 358 | + $payment_id = absint($_POST['payment_id']); |
|
| 359 | + $note = wp_kses($_POST['note'], array()); |
|
| 360 | 360 | |
| 361 | - if ( ! current_user_can( 'edit_give_payments', $payment_id ) ) { |
|
| 362 | - wp_die( __( 'You do not have permission to edit payments.', 'give' ), __( 'Error', 'give' ), array( 'response' => 403 ) ); |
|
| 361 | + if ( ! current_user_can('edit_give_payments', $payment_id)) { |
|
| 362 | + wp_die(__('You do not have permission to edit payments.', 'give'), __('Error', 'give'), array('response' => 403)); |
|
| 363 | 363 | } |
| 364 | 364 | |
| 365 | - if ( empty( $payment_id ) ) { |
|
| 366 | - die( '-1' ); |
|
| 365 | + if (empty($payment_id)) { |
|
| 366 | + die('-1'); |
|
| 367 | 367 | } |
| 368 | 368 | |
| 369 | - if ( empty( $note ) ) { |
|
| 370 | - die( '-1' ); |
|
| 369 | + if (empty($note)) { |
|
| 370 | + die('-1'); |
|
| 371 | 371 | } |
| 372 | 372 | |
| 373 | - $note_id = give_insert_payment_note( $payment_id, $note ); |
|
| 374 | - die( give_get_payment_note_html( $note_id ) ); |
|
| 373 | + $note_id = give_insert_payment_note($payment_id, $note); |
|
| 374 | + die(give_get_payment_note_html($note_id)); |
|
| 375 | 375 | } |
| 376 | 376 | |
| 377 | -add_action( 'wp_ajax_give_insert_payment_note', 'give_ajax_store_payment_note' ); |
|
| 377 | +add_action('wp_ajax_give_insert_payment_note', 'give_ajax_store_payment_note'); |
|
| 378 | 378 | |
| 379 | 379 | /** |
| 380 | 380 | * Triggers a donation note deletion without ajax |
@@ -385,24 +385,24 @@ discard block |
||
| 385 | 385 | * |
| 386 | 386 | * @return void |
| 387 | 387 | */ |
| 388 | -function give_trigger_payment_note_deletion( $data ) { |
|
| 388 | +function give_trigger_payment_note_deletion($data) { |
|
| 389 | 389 | |
| 390 | - if ( ! wp_verify_nonce( $data['_wpnonce'], 'give_delete_payment_note_' . $data['note_id'] ) ) { |
|
| 390 | + if ( ! wp_verify_nonce($data['_wpnonce'], 'give_delete_payment_note_'.$data['note_id'])) { |
|
| 391 | 391 | return; |
| 392 | 392 | } |
| 393 | 393 | |
| 394 | - if ( ! current_user_can( 'edit_give_payments', $data['payment_id'] ) ) { |
|
| 395 | - wp_die( esc_html__( 'You do not have permission to edit payments.', 'give' ), esc_html__( 'Error', 'give' ), array( 'response' => 403 ) ); |
|
| 394 | + if ( ! current_user_can('edit_give_payments', $data['payment_id'])) { |
|
| 395 | + wp_die(esc_html__('You do not have permission to edit payments.', 'give'), esc_html__('Error', 'give'), array('response' => 403)); |
|
| 396 | 396 | } |
| 397 | 397 | |
| 398 | - $edit_order_url = admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&give-message=donation-note-deleted&id=' . absint( $data['payment_id'] ) ); |
|
| 398 | + $edit_order_url = admin_url('edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&give-message=donation-note-deleted&id='.absint($data['payment_id'])); |
|
| 399 | 399 | |
| 400 | - give_delete_payment_note( $data['note_id'], $data['payment_id'] ); |
|
| 400 | + give_delete_payment_note($data['note_id'], $data['payment_id']); |
|
| 401 | 401 | |
| 402 | - wp_redirect( $edit_order_url ); |
|
| 402 | + wp_redirect($edit_order_url); |
|
| 403 | 403 | } |
| 404 | 404 | |
| 405 | -add_action( 'give_delete_payment_note', 'give_trigger_payment_note_deletion' ); |
|
| 405 | +add_action('give_delete_payment_note', 'give_trigger_payment_note_deletion'); |
|
| 406 | 406 | |
| 407 | 407 | /** |
| 408 | 408 | * Delete a payment note deletion with ajax |
@@ -413,16 +413,16 @@ discard block |
||
| 413 | 413 | */ |
| 414 | 414 | function give_ajax_delete_payment_note() { |
| 415 | 415 | |
| 416 | - if ( ! current_user_can( 'edit_give_payments', $_POST['payment_id'] ) ) { |
|
| 417 | - wp_die( esc_html__( 'You do not have permission to edit payments.', 'give' ), esc_html__( 'Error', 'give' ), array( 'response' => 403 ) ); |
|
| 416 | + if ( ! current_user_can('edit_give_payments', $_POST['payment_id'])) { |
|
| 417 | + wp_die(esc_html__('You do not have permission to edit payments.', 'give'), esc_html__('Error', 'give'), array('response' => 403)); |
|
| 418 | 418 | } |
| 419 | 419 | |
| 420 | - if ( give_delete_payment_note( $_POST['note_id'], $_POST['payment_id'] ) ) { |
|
| 421 | - die( '1' ); |
|
| 420 | + if (give_delete_payment_note($_POST['note_id'], $_POST['payment_id'])) { |
|
| 421 | + die('1'); |
|
| 422 | 422 | } else { |
| 423 | - die( '-1' ); |
|
| 423 | + die('-1'); |
|
| 424 | 424 | } |
| 425 | 425 | |
| 426 | 426 | } |
| 427 | 427 | |
| 428 | -add_action( 'wp_ajax_give_delete_payment_note', 'give_ajax_delete_payment_note' ); |
|
| 428 | +add_action('wp_ajax_give_delete_payment_note', 'give_ajax_delete_payment_note'); |
|
@@ -10,13 +10,13 @@ discard block |
||
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | 12 | // Exit if accessed directly. |
| 13 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 13 | +if ( ! defined('ABSPATH')) { |
|
| 14 | 14 | exit; |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | // Load WP_List_Table if not loaded |
| 18 | -if ( ! class_exists( 'WP_List_Table' ) ) { |
|
| 19 | - require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php'; |
|
| 18 | +if ( ! class_exists('WP_List_Table')) { |
|
| 19 | + require_once ABSPATH.'wp-admin/includes/class-wp-list-table.php'; |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | /** |
@@ -45,11 +45,11 @@ discard block |
||
| 45 | 45 | global $status, $page; |
| 46 | 46 | |
| 47 | 47 | // Set parent defaults |
| 48 | - parent::__construct( array( |
|
| 49 | - 'singular' => give_get_forms_label_singular(), // Singular name of the listed records |
|
| 50 | - 'plural' => give_get_forms_label_plural(), // Plural name of the listed records |
|
| 48 | + parent::__construct(array( |
|
| 49 | + 'singular' => give_get_forms_label_singular(), // Singular name of the listed records |
|
| 50 | + 'plural' => give_get_forms_label_plural(), // Plural name of the listed records |
|
| 51 | 51 | 'ajax' => false // Does this table support ajax? |
| 52 | - ) ); |
|
| 52 | + )); |
|
| 53 | 53 | |
| 54 | 54 | } |
| 55 | 55 | |
@@ -64,10 +64,10 @@ discard block |
||
| 64 | 64 | * |
| 65 | 65 | * @return string Column Name |
| 66 | 66 | */ |
| 67 | - public function column_default( $item, $column_name ) { |
|
| 68 | - switch ( $column_name ) { |
|
| 67 | + public function column_default($item, $column_name) { |
|
| 68 | + switch ($column_name) { |
|
| 69 | 69 | default: |
| 70 | - return $item[ $column_name ]; |
|
| 70 | + return $item[$column_name]; |
|
| 71 | 71 | } |
| 72 | 72 | } |
| 73 | 73 | |
@@ -80,11 +80,11 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | public function get_columns() { |
| 82 | 82 | $columns = array( |
| 83 | - 'label' => esc_attr__( 'Gateway', 'give' ), |
|
| 84 | - 'complete_sales' => esc_attr__( 'Complete Payments', 'give' ), |
|
| 85 | - 'pending_sales' => esc_attr__( 'Pending / Failed Payments', 'give' ), |
|
| 86 | - 'total_sales' => esc_attr__( 'Total Payments', 'give' ), |
|
| 87 | - 'total_donations' => esc_attr__( 'Total Donated', 'give' ) |
|
| 83 | + 'label' => esc_attr__('Gateway', 'give'), |
|
| 84 | + 'complete_sales' => esc_attr__('Complete Payments', 'give'), |
|
| 85 | + 'pending_sales' => esc_attr__('Pending / Failed Payments', 'give'), |
|
| 86 | + 'total_sales' => esc_attr__('Total Payments', 'give'), |
|
| 87 | + 'total_donations' => esc_attr__('Total Donated', 'give') |
|
| 88 | 88 | ); |
| 89 | 89 | |
| 90 | 90 | return $columns; |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | */ |
| 100 | 100 | public function get_sortable_columns() { |
| 101 | 101 | return array( |
| 102 | - 'total_donations' => array( 'total_donations', false ) |
|
| 102 | + 'total_donations' => array('total_donations', false) |
|
| 103 | 103 | ); |
| 104 | 104 | } |
| 105 | 105 | |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | * @return int Current page number |
| 113 | 113 | */ |
| 114 | 114 | public function get_paged() { |
| 115 | - return isset( $_GET['paged'] ) ? absint( $_GET['paged'] ) : 1; |
|
| 115 | + return isset($_GET['paged']) ? absint($_GET['paged']) : 1; |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | * @since 1.0 |
| 124 | 124 | * @return void |
| 125 | 125 | */ |
| 126 | - public function bulk_actions( $which = '' ) { |
|
| 126 | + public function bulk_actions($which = '') { |
|
| 127 | 127 | |
| 128 | 128 | } |
| 129 | 129 | |
@@ -135,27 +135,27 @@ discard block |
||
| 135 | 135 | * |
| 136 | 136 | * @param string $which |
| 137 | 137 | */ |
| 138 | - protected function display_tablenav( $which ) { |
|
| 138 | + protected function display_tablenav($which) { |
|
| 139 | 139 | |
| 140 | - if ( 'top' === $which ) { |
|
| 141 | - wp_nonce_field( 'bulk-' . $this->_args['plural'] ); |
|
| 140 | + if ('top' === $which) { |
|
| 141 | + wp_nonce_field('bulk-'.$this->_args['plural']); |
|
| 142 | 142 | } |
| 143 | 143 | ?> |
| 144 | - <div class="tablenav gateways-report-tablenav give-clearfix <?php echo esc_attr( $which ); ?>"> |
|
| 144 | + <div class="tablenav gateways-report-tablenav give-clearfix <?php echo esc_attr($which); ?>"> |
|
| 145 | 145 | |
| 146 | - <?php if ( 'top' === $which ) { ?> |
|
| 146 | + <?php if ('top' === $which) { ?> |
|
| 147 | 147 | <h3 class="alignleft reports-earnings-title"> |
| 148 | - <span><?php esc_html_e( 'Donation Methods Report', 'give' ); ?></span> |
|
| 148 | + <span><?php esc_html_e('Donation Methods Report', 'give'); ?></span> |
|
| 149 | 149 | </h3> |
| 150 | 150 | <?php } ?> |
| 151 | 151 | |
| 152 | 152 | <div class="alignright tablenav-right"> |
| 153 | 153 | <div class="actions bulkactions"> |
| 154 | - <?php $this->bulk_actions( $which ); ?> |
|
| 154 | + <?php $this->bulk_actions($which); ?> |
|
| 155 | 155 | </div> |
| 156 | 156 | <?php |
| 157 | - $this->extra_tablenav( $which ); |
|
| 158 | - $this->pagination( $which ); |
|
| 157 | + $this->extra_tablenav($which); |
|
| 158 | + $this->pagination($which); |
|
| 159 | 159 | ?> |
| 160 | 160 | </div> |
| 161 | 161 | |
@@ -177,17 +177,17 @@ discard block |
||
| 177 | 177 | * |
| 178 | 178 | * @return int |
| 179 | 179 | */ |
| 180 | - public function give_sort_total_donations( $old_value, $new_value ) { |
|
| 180 | + public function give_sort_total_donations($old_value, $new_value) { |
|
| 181 | 181 | // If no sort, default to label. |
| 182 | - $orderby = ( ! empty( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : 'label'; |
|
| 182 | + $orderby = ( ! empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'label'; |
|
| 183 | 183 | |
| 184 | 184 | //If no order, default to asc. |
| 185 | - $order = ( ! empty( $_REQUEST['order'] ) ) ? $_REQUEST['order'] : 'asc'; |
|
| 185 | + $order = ( ! empty($_REQUEST['order'])) ? $_REQUEST['order'] : 'asc'; |
|
| 186 | 186 | |
| 187 | 187 | //Determine sort order. |
| 188 | - $result = strcmp( $old_value[ $orderby ], $new_value[ $orderby ] ); |
|
| 188 | + $result = strcmp($old_value[$orderby], $new_value[$orderby]); |
|
| 189 | 189 | |
| 190 | - return ( $order === 'asc' ) ? $result : -$result; |
|
| 190 | + return ($order === 'asc') ? $result : -$result; |
|
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | |
@@ -204,10 +204,10 @@ discard block |
||
| 204 | 204 | $gateways = give_get_payment_gateways(); |
| 205 | 205 | $stats = new Give_Payment_Stats(); |
| 206 | 206 | |
| 207 | - foreach ( $gateways as $gateway_id => $gateway ) { |
|
| 207 | + foreach ($gateways as $gateway_id => $gateway) { |
|
| 208 | 208 | |
| 209 | - $complete_count = give_count_sales_by_gateway( $gateway_id, 'publish' ); |
|
| 210 | - $pending_count = give_count_sales_by_gateway( $gateway_id, array( 'pending', 'failed' ) ); |
|
| 209 | + $complete_count = give_count_sales_by_gateway($gateway_id, 'publish'); |
|
| 210 | + $pending_count = give_count_sales_by_gateway($gateway_id, array('pending', 'failed')); |
|
| 211 | 211 | |
| 212 | 212 | $reports_data[] = array( |
| 213 | 213 | 'ID' => $gateway_id, |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | 'complete_sales' => $complete_count, |
| 216 | 216 | 'pending_sales' => $pending_count, |
| 217 | 217 | 'total_sales' => $complete_count + $pending_count, |
| 218 | - 'total_donations' => give_currency_filter( give_format_amount( $stats->get_earnings( 0, strtotime('04/13/2015' ), current_time('timestamp' ), $gateway_id ), array( 'sanitize' => false ) ) ), |
|
| 218 | + 'total_donations' => give_currency_filter(give_format_amount($stats->get_earnings(0, strtotime('04/13/2015'), current_time('timestamp'), $gateway_id), array('sanitize' => false))), |
|
| 219 | 219 | ); |
| 220 | 220 | } |
| 221 | 221 | |
@@ -236,11 +236,11 @@ discard block |
||
| 236 | 236 | $columns = $this->get_columns(); |
| 237 | 237 | $hidden = array(); // No hidden columns |
| 238 | 238 | $sortable = $this->get_sortable_columns(); |
| 239 | - $this->_column_headers = array( $columns, $hidden, $sortable ); |
|
| 239 | + $this->_column_headers = array($columns, $hidden, $sortable); |
|
| 240 | 240 | $this->items = $this->reports_data(); |
| 241 | 241 | |
| 242 | 242 | // Sort Array when we are sorting data in array. |
| 243 | - usort( $this->items, array( $this, 'give_sort_total_donations' ) ); |
|
| 243 | + usort($this->items, array($this, 'give_sort_total_donations')); |
|
| 244 | 244 | |
| 245 | 245 | } |
| 246 | 246 | } |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | 12 | // Exit if accessed directly. |
| 13 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 13 | +if ( ! defined('ABSPATH')) { |
|
| 14 | 14 | exit; |
| 15 | 15 | } |
| 16 | 16 | |
@@ -22,9 +22,9 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | function give_get_country() { |
| 24 | 24 | $give_options = give_get_settings(); |
| 25 | - $country = isset( $give_options['base_country'] ) ? $give_options['base_country'] : 'US'; |
|
| 25 | + $country = isset($give_options['base_country']) ? $give_options['base_country'] : 'US'; |
|
| 26 | 26 | |
| 27 | - return apply_filters( 'give_give_country', $country ); |
|
| 27 | + return apply_filters('give_give_country', $country); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | /** |
@@ -35,9 +35,9 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | function give_get_state() { |
| 37 | 37 | $give_options = give_get_settings(); |
| 38 | - $state = isset( $give_options['base_state'] ) ? $give_options['base_state'] : false; |
|
| 38 | + $state = isset($give_options['base_state']) ? $give_options['base_state'] : false; |
|
| 39 | 39 | |
| 40 | - return apply_filters( 'give_give_state', $state ); |
|
| 40 | + return apply_filters('give_give_state', $state); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |
@@ -49,12 +49,12 @@ discard block |
||
| 49 | 49 | * |
| 50 | 50 | * @return mixed A list of states for the site's base country. |
| 51 | 51 | */ |
| 52 | -function give_get_states( $country = null ) { |
|
| 52 | +function give_get_states($country = null) { |
|
| 53 | 53 | // If Country have no states return empty array. |
| 54 | 54 | $states = array(); |
| 55 | 55 | |
| 56 | 56 | // Check if Country Code is empty or not. |
| 57 | - if ( empty( $country ) ) { |
|
| 57 | + if (empty($country)) { |
|
| 58 | 58 | // Get defalut country code that is being set by the admin. |
| 59 | 59 | $country = give_get_country(); |
| 60 | 60 | } |
@@ -63,8 +63,8 @@ discard block |
||
| 63 | 63 | $states_list = give_states_list(); |
| 64 | 64 | |
| 65 | 65 | // Check if $country code exists in the array key. |
| 66 | - if ( array_key_exists( $country, $states_list ) ) { |
|
| 67 | - $states = $states_list[ $country ]; |
|
| 66 | + if (array_key_exists($country, $states_list)) { |
|
| 67 | + $states = $states_list[$country]; |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | /** |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | * |
| 73 | 73 | * @param string $query Database count query |
| 74 | 74 | */ |
| 75 | - return (array) apply_filters( 'give_give_states', $states ); |
|
| 75 | + return (array) apply_filters('give_give_states', $states); |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | /** |
@@ -84,253 +84,253 @@ discard block |
||
| 84 | 84 | function give_get_country_list() { |
| 85 | 85 | $countries = array( |
| 86 | 86 | '' => '', |
| 87 | - 'US' => esc_html__( 'United States', 'give' ), |
|
| 88 | - 'CA' => esc_html__( 'Canada', 'give' ), |
|
| 89 | - 'GB' => esc_html__( 'United Kingdom', 'give' ), |
|
| 90 | - 'AF' => esc_html__( 'Afghanistan', 'give' ), |
|
| 91 | - 'AL' => esc_html__( 'Albania', 'give' ), |
|
| 92 | - 'DZ' => esc_html__( 'Algeria', 'give' ), |
|
| 93 | - 'AS' => esc_html__( 'American Samoa', 'give' ), |
|
| 94 | - 'AD' => esc_html__( 'Andorra', 'give' ), |
|
| 95 | - 'AO' => esc_html__( 'Angola', 'give' ), |
|
| 96 | - 'AI' => esc_html__( 'Anguilla', 'give' ), |
|
| 97 | - 'AQ' => esc_html__( 'Antarctica', 'give' ), |
|
| 98 | - 'AG' => esc_html__( 'Antigua and Barbuda', 'give' ), |
|
| 99 | - 'AR' => esc_html__( 'Argentina', 'give' ), |
|
| 100 | - 'AM' => esc_html__( 'Armenia', 'give' ), |
|
| 101 | - 'AW' => esc_html__( 'Aruba', 'give' ), |
|
| 102 | - 'AU' => esc_html__( 'Australia', 'give' ), |
|
| 103 | - 'AT' => esc_html__( 'Austria', 'give' ), |
|
| 104 | - 'AZ' => esc_html__( 'Azerbaijan', 'give' ), |
|
| 105 | - 'BS' => esc_html__( 'Bahamas', 'give' ), |
|
| 106 | - 'BH' => esc_html__( 'Bahrain', 'give' ), |
|
| 107 | - 'BD' => esc_html__( 'Bangladesh', 'give' ), |
|
| 108 | - 'BB' => esc_html__( 'Barbados', 'give' ), |
|
| 109 | - 'BY' => esc_html__( 'Belarus', 'give' ), |
|
| 110 | - 'BE' => esc_html__( 'Belgium', 'give' ), |
|
| 111 | - 'BZ' => esc_html__( 'Belize', 'give' ), |
|
| 112 | - 'BJ' => esc_html__( 'Benin', 'give' ), |
|
| 113 | - 'BM' => esc_html__( 'Bermuda', 'give' ), |
|
| 114 | - 'BT' => esc_html__( 'Bhutan', 'give' ), |
|
| 115 | - 'BO' => esc_html__( 'Bolivia', 'give' ), |
|
| 116 | - 'BA' => esc_html__( 'Bosnia and Herzegovina', 'give' ), |
|
| 117 | - 'BW' => esc_html__( 'Botswana', 'give' ), |
|
| 118 | - 'BV' => esc_html__( 'Bouvet Island', 'give' ), |
|
| 119 | - 'BR' => esc_html__( 'Brazil', 'give' ), |
|
| 120 | - 'IO' => esc_html__( 'British Indian Ocean Territory', 'give' ), |
|
| 121 | - 'BN' => esc_html__( 'Brunei Darrussalam', 'give' ), |
|
| 122 | - 'BG' => esc_html__( 'Bulgaria', 'give' ), |
|
| 123 | - 'BF' => esc_html__( 'Burkina Faso', 'give' ), |
|
| 124 | - 'BI' => esc_html__( 'Burundi', 'give' ), |
|
| 125 | - 'KH' => esc_html__( 'Cambodia', 'give' ), |
|
| 126 | - 'CM' => esc_html__( 'Cameroon', 'give' ), |
|
| 127 | - 'CV' => esc_html__( 'Cape Verde', 'give' ), |
|
| 128 | - 'KY' => esc_html__( 'Cayman Islands', 'give' ), |
|
| 129 | - 'CF' => esc_html__( 'Central African Republic', 'give' ), |
|
| 130 | - 'TD' => esc_html__( 'Chad', 'give' ), |
|
| 131 | - 'CL' => esc_html__( 'Chile', 'give' ), |
|
| 132 | - 'CN' => esc_html__( 'China', 'give' ), |
|
| 133 | - 'CX' => esc_html__( 'Christmas Island', 'give' ), |
|
| 134 | - 'CC' => esc_html__( 'Cocos Islands', 'give' ), |
|
| 135 | - 'CO' => esc_html__( 'Colombia', 'give' ), |
|
| 136 | - 'KM' => esc_html__( 'Comoros', 'give' ), |
|
| 137 | - 'CD' => esc_html__( 'Congo, Democratic People\'s Republic', 'give' ), |
|
| 138 | - 'CG' => esc_html__( 'Congo, Republic of', 'give' ), |
|
| 139 | - 'CK' => esc_html__( 'Cook Islands', 'give' ), |
|
| 140 | - 'CR' => esc_html__( 'Costa Rica', 'give' ), |
|
| 141 | - 'CI' => esc_html__( 'Cote d\'Ivoire', 'give' ), |
|
| 142 | - 'HR' => esc_html__( 'Croatia/Hrvatska', 'give' ), |
|
| 143 | - 'CU' => esc_html__( 'Cuba', 'give' ), |
|
| 144 | - 'CY' => esc_html__( 'Cyprus Island', 'give' ), |
|
| 145 | - 'CZ' => esc_html__( 'Czech Republic', 'give' ), |
|
| 146 | - 'DK' => esc_html__( 'Denmark', 'give' ), |
|
| 147 | - 'DJ' => esc_html__( 'Djibouti', 'give' ), |
|
| 148 | - 'DM' => esc_html__( 'Dominica', 'give' ), |
|
| 149 | - 'DO' => esc_html__( 'Dominican Republic', 'give' ), |
|
| 150 | - 'TP' => esc_html__( 'East Timor', 'give' ), |
|
| 151 | - 'EC' => esc_html__( 'Ecuador', 'give' ), |
|
| 152 | - 'EG' => esc_html__( 'Egypt', 'give' ), |
|
| 153 | - 'GQ' => esc_html__( 'Equatorial Guinea', 'give' ), |
|
| 154 | - 'SV' => esc_html__( 'El Salvador', 'give' ), |
|
| 155 | - 'ER' => esc_html__( 'Eritrea', 'give' ), |
|
| 156 | - 'EE' => esc_html__( 'Estonia', 'give' ), |
|
| 157 | - 'ET' => esc_html__( 'Ethiopia', 'give' ), |
|
| 158 | - 'FK' => esc_html__( 'Falkland Islands', 'give' ), |
|
| 159 | - 'FO' => esc_html__( 'Faroe Islands', 'give' ), |
|
| 160 | - 'FJ' => esc_html__( 'Fiji', 'give' ), |
|
| 161 | - 'FI' => esc_html__( 'Finland', 'give' ), |
|
| 162 | - 'FR' => esc_html__( 'France', 'give' ), |
|
| 163 | - 'GF' => esc_html__( 'French Guiana', 'give' ), |
|
| 164 | - 'PF' => esc_html__( 'French Polynesia', 'give' ), |
|
| 165 | - 'TF' => esc_html__( 'French Southern Territories', 'give' ), |
|
| 166 | - 'GA' => esc_html__( 'Gabon', 'give' ), |
|
| 167 | - 'GM' => esc_html__( 'Gambia', 'give' ), |
|
| 168 | - 'GE' => esc_html__( 'Georgia', 'give' ), |
|
| 169 | - 'DE' => esc_html__( 'Germany', 'give' ), |
|
| 170 | - 'GR' => esc_html__( 'Greece', 'give' ), |
|
| 171 | - 'GH' => esc_html__( 'Ghana', 'give' ), |
|
| 172 | - 'GI' => esc_html__( 'Gibraltar', 'give' ), |
|
| 173 | - 'GL' => esc_html__( 'Greenland', 'give' ), |
|
| 174 | - 'GD' => esc_html__( 'Grenada', 'give' ), |
|
| 175 | - 'GP' => esc_html__( 'Guadeloupe', 'give' ), |
|
| 176 | - 'GU' => esc_html__( 'Guam', 'give' ), |
|
| 177 | - 'GT' => esc_html__( 'Guatemala', 'give' ), |
|
| 178 | - 'GG' => esc_html__( 'Guernsey', 'give' ), |
|
| 179 | - 'GN' => esc_html__( 'Guinea', 'give' ), |
|
| 180 | - 'GW' => esc_html__( 'Guinea-Bissau', 'give' ), |
|
| 181 | - 'GY' => esc_html__( 'Guyana', 'give' ), |
|
| 182 | - 'HT' => esc_html__( 'Haiti', 'give' ), |
|
| 183 | - 'HM' => esc_html__( 'Heard and McDonald Islands', 'give' ), |
|
| 184 | - 'VA' => esc_html__( 'Holy See (City Vatican State)', 'give' ), |
|
| 185 | - 'HN' => esc_html__( 'Honduras', 'give' ), |
|
| 186 | - 'HK' => esc_html__( 'Hong Kong', 'give' ), |
|
| 187 | - 'HU' => esc_html__( 'Hungary', 'give' ), |
|
| 188 | - 'IS' => esc_html__( 'Iceland', 'give' ), |
|
| 189 | - 'IN' => esc_html__( 'India', 'give' ), |
|
| 190 | - 'ID' => esc_html__( 'Indonesia', 'give' ), |
|
| 191 | - 'IR' => esc_html__( 'Iran', 'give' ), |
|
| 192 | - 'IQ' => esc_html__( 'Iraq', 'give' ), |
|
| 193 | - 'IE' => esc_html__( 'Ireland', 'give' ), |
|
| 194 | - 'IM' => esc_html__( 'Isle of Man', 'give' ), |
|
| 195 | - 'IL' => esc_html__( 'Israel', 'give' ), |
|
| 196 | - 'IT' => esc_html__( 'Italy', 'give' ), |
|
| 197 | - 'JM' => esc_html__( 'Jamaica', 'give' ), |
|
| 198 | - 'JP' => esc_html__( 'Japan', 'give' ), |
|
| 199 | - 'JE' => esc_html__( 'Jersey', 'give' ), |
|
| 200 | - 'JO' => esc_html__( 'Jordan', 'give' ), |
|
| 201 | - 'KZ' => esc_html__( 'Kazakhstan', 'give' ), |
|
| 202 | - 'KE' => esc_html__( 'Kenya', 'give' ), |
|
| 203 | - 'KI' => esc_html__( 'Kiribati', 'give' ), |
|
| 204 | - 'KW' => esc_html__( 'Kuwait', 'give' ), |
|
| 205 | - 'KG' => esc_html__( 'Kyrgyzstan', 'give' ), |
|
| 206 | - 'LA' => esc_html__( 'Lao People\'s Democratic Republic', 'give' ), |
|
| 207 | - 'LV' => esc_html__( 'Latvia', 'give' ), |
|
| 208 | - 'LB' => esc_html__( 'Lebanon', 'give' ), |
|
| 209 | - 'LS' => esc_html__( 'Lesotho', 'give' ), |
|
| 210 | - 'LR' => esc_html__( 'Liberia', 'give' ), |
|
| 211 | - 'LY' => esc_html__( 'Libyan Arab Jamahiriya', 'give' ), |
|
| 212 | - 'LI' => esc_html__( 'Liechtenstein', 'give' ), |
|
| 213 | - 'LT' => esc_html__( 'Lithuania', 'give' ), |
|
| 214 | - 'LU' => esc_html__( 'Luxembourg', 'give' ), |
|
| 215 | - 'MO' => esc_html__( 'Macau', 'give' ), |
|
| 216 | - 'MK' => esc_html__( 'Macedonia', 'give' ), |
|
| 217 | - 'MG' => esc_html__( 'Madagascar', 'give' ), |
|
| 218 | - 'MW' => esc_html__( 'Malawi', 'give' ), |
|
| 219 | - 'MY' => esc_html__( 'Malaysia', 'give' ), |
|
| 220 | - 'MV' => esc_html__( 'Maldives', 'give' ), |
|
| 221 | - 'ML' => esc_html__( 'Mali', 'give' ), |
|
| 222 | - 'MT' => esc_html__( 'Malta', 'give' ), |
|
| 223 | - 'MH' => esc_html__( 'Marshall Islands', 'give' ), |
|
| 224 | - 'MQ' => esc_html__( 'Martinique', 'give' ), |
|
| 225 | - 'MR' => esc_html__( 'Mauritania', 'give' ), |
|
| 226 | - 'MU' => esc_html__( 'Mauritius', 'give' ), |
|
| 227 | - 'YT' => esc_html__( 'Mayotte', 'give' ), |
|
| 228 | - 'MX' => esc_html__( 'Mexico', 'give' ), |
|
| 229 | - 'FM' => esc_html__( 'Micronesia', 'give' ), |
|
| 230 | - 'MD' => esc_html__( 'Moldova, Republic of', 'give' ), |
|
| 231 | - 'MC' => esc_html__( 'Monaco', 'give' ), |
|
| 232 | - 'MN' => esc_html__( 'Mongolia', 'give' ), |
|
| 233 | - 'ME' => esc_html__( 'Montenegro', 'give' ), |
|
| 234 | - 'MS' => esc_html__( 'Montserrat', 'give' ), |
|
| 235 | - 'MA' => esc_html__( 'Morocco', 'give' ), |
|
| 236 | - 'MZ' => esc_html__( 'Mozambique', 'give' ), |
|
| 237 | - 'MM' => esc_html__( 'Myanmar', 'give' ), |
|
| 238 | - 'NA' => esc_html__( 'Namibia', 'give' ), |
|
| 239 | - 'NR' => esc_html__( 'Nauru', 'give' ), |
|
| 240 | - 'NP' => esc_html__( 'Nepal', 'give' ), |
|
| 241 | - 'NL' => esc_html__( 'Netherlands', 'give' ), |
|
| 242 | - 'AN' => esc_html__( 'Netherlands Antilles', 'give' ), |
|
| 243 | - 'NC' => esc_html__( 'New Caledonia', 'give' ), |
|
| 244 | - 'NZ' => esc_html__( 'New Zealand', 'give' ), |
|
| 245 | - 'NI' => esc_html__( 'Nicaragua', 'give' ), |
|
| 246 | - 'NE' => esc_html__( 'Niger', 'give' ), |
|
| 247 | - 'NG' => esc_html__( 'Nigeria', 'give' ), |
|
| 248 | - 'NU' => esc_html__( 'Niue', 'give' ), |
|
| 249 | - 'NF' => esc_html__( 'Norfolk Island', 'give' ), |
|
| 250 | - 'KP' => esc_html__( 'North Korea', 'give' ), |
|
| 251 | - 'MP' => esc_html__( 'Northern Mariana Islands', 'give' ), |
|
| 252 | - 'NO' => esc_html__( 'Norway', 'give' ), |
|
| 253 | - 'OM' => esc_html__( 'Oman', 'give' ), |
|
| 254 | - 'PK' => esc_html__( 'Pakistan', 'give' ), |
|
| 255 | - 'PW' => esc_html__( 'Palau', 'give' ), |
|
| 256 | - 'PS' => esc_html__( 'Palestinian Territories', 'give' ), |
|
| 257 | - 'PA' => esc_html__( 'Panama', 'give' ), |
|
| 258 | - 'PG' => esc_html__( 'Papua New Guinea', 'give' ), |
|
| 259 | - 'PY' => esc_html__( 'Paraguay', 'give' ), |
|
| 260 | - 'PE' => esc_html__( 'Peru', 'give' ), |
|
| 261 | - 'PH' => esc_html__( 'Phillipines', 'give' ), |
|
| 262 | - 'PN' => esc_html__( 'Pitcairn Island', 'give' ), |
|
| 263 | - 'PL' => esc_html__( 'Poland', 'give' ), |
|
| 264 | - 'PT' => esc_html__( 'Portugal', 'give' ), |
|
| 265 | - 'PR' => esc_html__( 'Puerto Rico', 'give' ), |
|
| 266 | - 'QA' => esc_html__( 'Qatar', 'give' ), |
|
| 267 | - 'RE' => esc_html__( 'Reunion Island', 'give' ), |
|
| 268 | - 'RO' => esc_html__( 'Romania', 'give' ), |
|
| 269 | - 'RU' => esc_html__( 'Russian Federation', 'give' ), |
|
| 270 | - 'RW' => esc_html__( 'Rwanda', 'give' ), |
|
| 271 | - 'SH' => esc_html__( 'Saint Helena', 'give' ), |
|
| 272 | - 'KN' => esc_html__( 'Saint Kitts and Nevis', 'give' ), |
|
| 273 | - 'LC' => esc_html__( 'Saint Lucia', 'give' ), |
|
| 274 | - 'PM' => esc_html__( 'Saint Pierre and Miquelon', 'give' ), |
|
| 275 | - 'VC' => esc_html__( 'Saint Vincent and the Grenadines', 'give' ), |
|
| 276 | - 'SM' => esc_html__( 'San Marino', 'give' ), |
|
| 277 | - 'ST' => esc_html__( 'Sao Tome and Principe', 'give' ), |
|
| 278 | - 'SA' => esc_html__( 'Saudi Arabia', 'give' ), |
|
| 279 | - 'SN' => esc_html__( 'Senegal', 'give' ), |
|
| 280 | - 'RS' => esc_html__( 'Serbia', 'give' ), |
|
| 281 | - 'SC' => esc_html__( 'Seychelles', 'give' ), |
|
| 282 | - 'SL' => esc_html__( 'Sierra Leone', 'give' ), |
|
| 283 | - 'SG' => esc_html__( 'Singapore', 'give' ), |
|
| 284 | - 'SK' => esc_html__( 'Slovak Republic', 'give' ), |
|
| 285 | - 'SI' => esc_html__( 'Slovenia', 'give' ), |
|
| 286 | - 'SB' => esc_html__( 'Solomon Islands', 'give' ), |
|
| 287 | - 'SO' => esc_html__( 'Somalia', 'give' ), |
|
| 288 | - 'ZA' => esc_html__( 'South Africa', 'give' ), |
|
| 289 | - 'GS' => esc_html__( 'South Georgia', 'give' ), |
|
| 290 | - 'KR' => esc_html__( 'South Korea', 'give' ), |
|
| 291 | - 'ES' => esc_html__( 'Spain', 'give' ), |
|
| 292 | - 'LK' => esc_html__( 'Sri Lanka', 'give' ), |
|
| 293 | - 'SD' => esc_html__( 'Sudan', 'give' ), |
|
| 294 | - 'SR' => esc_html__( 'Suriname', 'give' ), |
|
| 295 | - 'SJ' => esc_html__( 'Svalbard and Jan Mayen Islands', 'give' ), |
|
| 296 | - 'SZ' => esc_html__( 'Swaziland', 'give' ), |
|
| 297 | - 'SE' => esc_html__( 'Sweden', 'give' ), |
|
| 298 | - 'CH' => esc_html__( 'Switzerland', 'give' ), |
|
| 299 | - 'SY' => esc_html__( 'Syrian Arab Republic', 'give' ), |
|
| 300 | - 'TW' => esc_html__( 'Taiwan', 'give' ), |
|
| 301 | - 'TJ' => esc_html__( 'Tajikistan', 'give' ), |
|
| 302 | - 'TZ' => esc_html__( 'Tanzania', 'give' ), |
|
| 303 | - 'TG' => esc_html__( 'Togo', 'give' ), |
|
| 304 | - 'TK' => esc_html__( 'Tokelau', 'give' ), |
|
| 305 | - 'TO' => esc_html__( 'Tonga', 'give' ), |
|
| 306 | - 'TH' => esc_html__( 'Thailand', 'give' ), |
|
| 307 | - 'TT' => esc_html__( 'Trinidad and Tobago', 'give' ), |
|
| 308 | - 'TN' => esc_html__( 'Tunisia', 'give' ), |
|
| 309 | - 'TR' => esc_html__( 'Turkey', 'give' ), |
|
| 310 | - 'TM' => esc_html__( 'Turkmenistan', 'give' ), |
|
| 311 | - 'TC' => esc_html__( 'Turks and Caicos Islands', 'give' ), |
|
| 312 | - 'TV' => esc_html__( 'Tuvalu', 'give' ), |
|
| 313 | - 'UG' => esc_html__( 'Uganda', 'give' ), |
|
| 314 | - 'UA' => esc_html__( 'Ukraine', 'give' ), |
|
| 315 | - 'AE' => esc_html__( 'United Arab Emirates', 'give' ), |
|
| 316 | - 'UY' => esc_html__( 'Uruguay', 'give' ), |
|
| 317 | - 'UM' => esc_html__( 'US Minor Outlying Islands', 'give' ), |
|
| 318 | - 'UZ' => esc_html__( 'Uzbekistan', 'give' ), |
|
| 319 | - 'VU' => esc_html__( 'Vanuatu', 'give' ), |
|
| 320 | - 'VE' => esc_html__( 'Venezuela', 'give' ), |
|
| 321 | - 'VN' => esc_html__( 'Vietnam', 'give' ), |
|
| 322 | - 'VG' => esc_html__( 'Virgin Islands (British)', 'give' ), |
|
| 323 | - 'VI' => esc_html__( 'Virgin Islands (USA)', 'give' ), |
|
| 324 | - 'WF' => esc_html__( 'Wallis and Futuna Islands', 'give' ), |
|
| 325 | - 'EH' => esc_html__( 'Western Sahara', 'give' ), |
|
| 326 | - 'WS' => esc_html__( 'Western Samoa', 'give' ), |
|
| 327 | - 'YE' => esc_html__( 'Yemen', 'give' ), |
|
| 328 | - 'YU' => esc_html__( 'Yugoslavia', 'give' ), |
|
| 329 | - 'ZM' => esc_html__( 'Zambia', 'give' ), |
|
| 330 | - 'ZW' => esc_html__( 'Zimbabwe', 'give' ), |
|
| 87 | + 'US' => esc_html__('United States', 'give'), |
|
| 88 | + 'CA' => esc_html__('Canada', 'give'), |
|
| 89 | + 'GB' => esc_html__('United Kingdom', 'give'), |
|
| 90 | + 'AF' => esc_html__('Afghanistan', 'give'), |
|
| 91 | + 'AL' => esc_html__('Albania', 'give'), |
|
| 92 | + 'DZ' => esc_html__('Algeria', 'give'), |
|
| 93 | + 'AS' => esc_html__('American Samoa', 'give'), |
|
| 94 | + 'AD' => esc_html__('Andorra', 'give'), |
|
| 95 | + 'AO' => esc_html__('Angola', 'give'), |
|
| 96 | + 'AI' => esc_html__('Anguilla', 'give'), |
|
| 97 | + 'AQ' => esc_html__('Antarctica', 'give'), |
|
| 98 | + 'AG' => esc_html__('Antigua and Barbuda', 'give'), |
|
| 99 | + 'AR' => esc_html__('Argentina', 'give'), |
|
| 100 | + 'AM' => esc_html__('Armenia', 'give'), |
|
| 101 | + 'AW' => esc_html__('Aruba', 'give'), |
|
| 102 | + 'AU' => esc_html__('Australia', 'give'), |
|
| 103 | + 'AT' => esc_html__('Austria', 'give'), |
|
| 104 | + 'AZ' => esc_html__('Azerbaijan', 'give'), |
|
| 105 | + 'BS' => esc_html__('Bahamas', 'give'), |
|
| 106 | + 'BH' => esc_html__('Bahrain', 'give'), |
|
| 107 | + 'BD' => esc_html__('Bangladesh', 'give'), |
|
| 108 | + 'BB' => esc_html__('Barbados', 'give'), |
|
| 109 | + 'BY' => esc_html__('Belarus', 'give'), |
|
| 110 | + 'BE' => esc_html__('Belgium', 'give'), |
|
| 111 | + 'BZ' => esc_html__('Belize', 'give'), |
|
| 112 | + 'BJ' => esc_html__('Benin', 'give'), |
|
| 113 | + 'BM' => esc_html__('Bermuda', 'give'), |
|
| 114 | + 'BT' => esc_html__('Bhutan', 'give'), |
|
| 115 | + 'BO' => esc_html__('Bolivia', 'give'), |
|
| 116 | + 'BA' => esc_html__('Bosnia and Herzegovina', 'give'), |
|
| 117 | + 'BW' => esc_html__('Botswana', 'give'), |
|
| 118 | + 'BV' => esc_html__('Bouvet Island', 'give'), |
|
| 119 | + 'BR' => esc_html__('Brazil', 'give'), |
|
| 120 | + 'IO' => esc_html__('British Indian Ocean Territory', 'give'), |
|
| 121 | + 'BN' => esc_html__('Brunei Darrussalam', 'give'), |
|
| 122 | + 'BG' => esc_html__('Bulgaria', 'give'), |
|
| 123 | + 'BF' => esc_html__('Burkina Faso', 'give'), |
|
| 124 | + 'BI' => esc_html__('Burundi', 'give'), |
|
| 125 | + 'KH' => esc_html__('Cambodia', 'give'), |
|
| 126 | + 'CM' => esc_html__('Cameroon', 'give'), |
|
| 127 | + 'CV' => esc_html__('Cape Verde', 'give'), |
|
| 128 | + 'KY' => esc_html__('Cayman Islands', 'give'), |
|
| 129 | + 'CF' => esc_html__('Central African Republic', 'give'), |
|
| 130 | + 'TD' => esc_html__('Chad', 'give'), |
|
| 131 | + 'CL' => esc_html__('Chile', 'give'), |
|
| 132 | + 'CN' => esc_html__('China', 'give'), |
|
| 133 | + 'CX' => esc_html__('Christmas Island', 'give'), |
|
| 134 | + 'CC' => esc_html__('Cocos Islands', 'give'), |
|
| 135 | + 'CO' => esc_html__('Colombia', 'give'), |
|
| 136 | + 'KM' => esc_html__('Comoros', 'give'), |
|
| 137 | + 'CD' => esc_html__('Congo, Democratic People\'s Republic', 'give'), |
|
| 138 | + 'CG' => esc_html__('Congo, Republic of', 'give'), |
|
| 139 | + 'CK' => esc_html__('Cook Islands', 'give'), |
|
| 140 | + 'CR' => esc_html__('Costa Rica', 'give'), |
|
| 141 | + 'CI' => esc_html__('Cote d\'Ivoire', 'give'), |
|
| 142 | + 'HR' => esc_html__('Croatia/Hrvatska', 'give'), |
|
| 143 | + 'CU' => esc_html__('Cuba', 'give'), |
|
| 144 | + 'CY' => esc_html__('Cyprus Island', 'give'), |
|
| 145 | + 'CZ' => esc_html__('Czech Republic', 'give'), |
|
| 146 | + 'DK' => esc_html__('Denmark', 'give'), |
|
| 147 | + 'DJ' => esc_html__('Djibouti', 'give'), |
|
| 148 | + 'DM' => esc_html__('Dominica', 'give'), |
|
| 149 | + 'DO' => esc_html__('Dominican Republic', 'give'), |
|
| 150 | + 'TP' => esc_html__('East Timor', 'give'), |
|
| 151 | + 'EC' => esc_html__('Ecuador', 'give'), |
|
| 152 | + 'EG' => esc_html__('Egypt', 'give'), |
|
| 153 | + 'GQ' => esc_html__('Equatorial Guinea', 'give'), |
|
| 154 | + 'SV' => esc_html__('El Salvador', 'give'), |
|
| 155 | + 'ER' => esc_html__('Eritrea', 'give'), |
|
| 156 | + 'EE' => esc_html__('Estonia', 'give'), |
|
| 157 | + 'ET' => esc_html__('Ethiopia', 'give'), |
|
| 158 | + 'FK' => esc_html__('Falkland Islands', 'give'), |
|
| 159 | + 'FO' => esc_html__('Faroe Islands', 'give'), |
|
| 160 | + 'FJ' => esc_html__('Fiji', 'give'), |
|
| 161 | + 'FI' => esc_html__('Finland', 'give'), |
|
| 162 | + 'FR' => esc_html__('France', 'give'), |
|
| 163 | + 'GF' => esc_html__('French Guiana', 'give'), |
|
| 164 | + 'PF' => esc_html__('French Polynesia', 'give'), |
|
| 165 | + 'TF' => esc_html__('French Southern Territories', 'give'), |
|
| 166 | + 'GA' => esc_html__('Gabon', 'give'), |
|
| 167 | + 'GM' => esc_html__('Gambia', 'give'), |
|
| 168 | + 'GE' => esc_html__('Georgia', 'give'), |
|
| 169 | + 'DE' => esc_html__('Germany', 'give'), |
|
| 170 | + 'GR' => esc_html__('Greece', 'give'), |
|
| 171 | + 'GH' => esc_html__('Ghana', 'give'), |
|
| 172 | + 'GI' => esc_html__('Gibraltar', 'give'), |
|
| 173 | + 'GL' => esc_html__('Greenland', 'give'), |
|
| 174 | + 'GD' => esc_html__('Grenada', 'give'), |
|
| 175 | + 'GP' => esc_html__('Guadeloupe', 'give'), |
|
| 176 | + 'GU' => esc_html__('Guam', 'give'), |
|
| 177 | + 'GT' => esc_html__('Guatemala', 'give'), |
|
| 178 | + 'GG' => esc_html__('Guernsey', 'give'), |
|
| 179 | + 'GN' => esc_html__('Guinea', 'give'), |
|
| 180 | + 'GW' => esc_html__('Guinea-Bissau', 'give'), |
|
| 181 | + 'GY' => esc_html__('Guyana', 'give'), |
|
| 182 | + 'HT' => esc_html__('Haiti', 'give'), |
|
| 183 | + 'HM' => esc_html__('Heard and McDonald Islands', 'give'), |
|
| 184 | + 'VA' => esc_html__('Holy See (City Vatican State)', 'give'), |
|
| 185 | + 'HN' => esc_html__('Honduras', 'give'), |
|
| 186 | + 'HK' => esc_html__('Hong Kong', 'give'), |
|
| 187 | + 'HU' => esc_html__('Hungary', 'give'), |
|
| 188 | + 'IS' => esc_html__('Iceland', 'give'), |
|
| 189 | + 'IN' => esc_html__('India', 'give'), |
|
| 190 | + 'ID' => esc_html__('Indonesia', 'give'), |
|
| 191 | + 'IR' => esc_html__('Iran', 'give'), |
|
| 192 | + 'IQ' => esc_html__('Iraq', 'give'), |
|
| 193 | + 'IE' => esc_html__('Ireland', 'give'), |
|
| 194 | + 'IM' => esc_html__('Isle of Man', 'give'), |
|
| 195 | + 'IL' => esc_html__('Israel', 'give'), |
|
| 196 | + 'IT' => esc_html__('Italy', 'give'), |
|
| 197 | + 'JM' => esc_html__('Jamaica', 'give'), |
|
| 198 | + 'JP' => esc_html__('Japan', 'give'), |
|
| 199 | + 'JE' => esc_html__('Jersey', 'give'), |
|
| 200 | + 'JO' => esc_html__('Jordan', 'give'), |
|
| 201 | + 'KZ' => esc_html__('Kazakhstan', 'give'), |
|
| 202 | + 'KE' => esc_html__('Kenya', 'give'), |
|
| 203 | + 'KI' => esc_html__('Kiribati', 'give'), |
|
| 204 | + 'KW' => esc_html__('Kuwait', 'give'), |
|
| 205 | + 'KG' => esc_html__('Kyrgyzstan', 'give'), |
|
| 206 | + 'LA' => esc_html__('Lao People\'s Democratic Republic', 'give'), |
|
| 207 | + 'LV' => esc_html__('Latvia', 'give'), |
|
| 208 | + 'LB' => esc_html__('Lebanon', 'give'), |
|
| 209 | + 'LS' => esc_html__('Lesotho', 'give'), |
|
| 210 | + 'LR' => esc_html__('Liberia', 'give'), |
|
| 211 | + 'LY' => esc_html__('Libyan Arab Jamahiriya', 'give'), |
|
| 212 | + 'LI' => esc_html__('Liechtenstein', 'give'), |
|
| 213 | + 'LT' => esc_html__('Lithuania', 'give'), |
|
| 214 | + 'LU' => esc_html__('Luxembourg', 'give'), |
|
| 215 | + 'MO' => esc_html__('Macau', 'give'), |
|
| 216 | + 'MK' => esc_html__('Macedonia', 'give'), |
|
| 217 | + 'MG' => esc_html__('Madagascar', 'give'), |
|
| 218 | + 'MW' => esc_html__('Malawi', 'give'), |
|
| 219 | + 'MY' => esc_html__('Malaysia', 'give'), |
|
| 220 | + 'MV' => esc_html__('Maldives', 'give'), |
|
| 221 | + 'ML' => esc_html__('Mali', 'give'), |
|
| 222 | + 'MT' => esc_html__('Malta', 'give'), |
|
| 223 | + 'MH' => esc_html__('Marshall Islands', 'give'), |
|
| 224 | + 'MQ' => esc_html__('Martinique', 'give'), |
|
| 225 | + 'MR' => esc_html__('Mauritania', 'give'), |
|
| 226 | + 'MU' => esc_html__('Mauritius', 'give'), |
|
| 227 | + 'YT' => esc_html__('Mayotte', 'give'), |
|
| 228 | + 'MX' => esc_html__('Mexico', 'give'), |
|
| 229 | + 'FM' => esc_html__('Micronesia', 'give'), |
|
| 230 | + 'MD' => esc_html__('Moldova, Republic of', 'give'), |
|
| 231 | + 'MC' => esc_html__('Monaco', 'give'), |
|
| 232 | + 'MN' => esc_html__('Mongolia', 'give'), |
|
| 233 | + 'ME' => esc_html__('Montenegro', 'give'), |
|
| 234 | + 'MS' => esc_html__('Montserrat', 'give'), |
|
| 235 | + 'MA' => esc_html__('Morocco', 'give'), |
|
| 236 | + 'MZ' => esc_html__('Mozambique', 'give'), |
|
| 237 | + 'MM' => esc_html__('Myanmar', 'give'), |
|
| 238 | + 'NA' => esc_html__('Namibia', 'give'), |
|
| 239 | + 'NR' => esc_html__('Nauru', 'give'), |
|
| 240 | + 'NP' => esc_html__('Nepal', 'give'), |
|
| 241 | + 'NL' => esc_html__('Netherlands', 'give'), |
|
| 242 | + 'AN' => esc_html__('Netherlands Antilles', 'give'), |
|
| 243 | + 'NC' => esc_html__('New Caledonia', 'give'), |
|
| 244 | + 'NZ' => esc_html__('New Zealand', 'give'), |
|
| 245 | + 'NI' => esc_html__('Nicaragua', 'give'), |
|
| 246 | + 'NE' => esc_html__('Niger', 'give'), |
|
| 247 | + 'NG' => esc_html__('Nigeria', 'give'), |
|
| 248 | + 'NU' => esc_html__('Niue', 'give'), |
|
| 249 | + 'NF' => esc_html__('Norfolk Island', 'give'), |
|
| 250 | + 'KP' => esc_html__('North Korea', 'give'), |
|
| 251 | + 'MP' => esc_html__('Northern Mariana Islands', 'give'), |
|
| 252 | + 'NO' => esc_html__('Norway', 'give'), |
|
| 253 | + 'OM' => esc_html__('Oman', 'give'), |
|
| 254 | + 'PK' => esc_html__('Pakistan', 'give'), |
|
| 255 | + 'PW' => esc_html__('Palau', 'give'), |
|
| 256 | + 'PS' => esc_html__('Palestinian Territories', 'give'), |
|
| 257 | + 'PA' => esc_html__('Panama', 'give'), |
|
| 258 | + 'PG' => esc_html__('Papua New Guinea', 'give'), |
|
| 259 | + 'PY' => esc_html__('Paraguay', 'give'), |
|
| 260 | + 'PE' => esc_html__('Peru', 'give'), |
|
| 261 | + 'PH' => esc_html__('Phillipines', 'give'), |
|
| 262 | + 'PN' => esc_html__('Pitcairn Island', 'give'), |
|
| 263 | + 'PL' => esc_html__('Poland', 'give'), |
|
| 264 | + 'PT' => esc_html__('Portugal', 'give'), |
|
| 265 | + 'PR' => esc_html__('Puerto Rico', 'give'), |
|
| 266 | + 'QA' => esc_html__('Qatar', 'give'), |
|
| 267 | + 'RE' => esc_html__('Reunion Island', 'give'), |
|
| 268 | + 'RO' => esc_html__('Romania', 'give'), |
|
| 269 | + 'RU' => esc_html__('Russian Federation', 'give'), |
|
| 270 | + 'RW' => esc_html__('Rwanda', 'give'), |
|
| 271 | + 'SH' => esc_html__('Saint Helena', 'give'), |
|
| 272 | + 'KN' => esc_html__('Saint Kitts and Nevis', 'give'), |
|
| 273 | + 'LC' => esc_html__('Saint Lucia', 'give'), |
|
| 274 | + 'PM' => esc_html__('Saint Pierre and Miquelon', 'give'), |
|
| 275 | + 'VC' => esc_html__('Saint Vincent and the Grenadines', 'give'), |
|
| 276 | + 'SM' => esc_html__('San Marino', 'give'), |
|
| 277 | + 'ST' => esc_html__('Sao Tome and Principe', 'give'), |
|
| 278 | + 'SA' => esc_html__('Saudi Arabia', 'give'), |
|
| 279 | + 'SN' => esc_html__('Senegal', 'give'), |
|
| 280 | + 'RS' => esc_html__('Serbia', 'give'), |
|
| 281 | + 'SC' => esc_html__('Seychelles', 'give'), |
|
| 282 | + 'SL' => esc_html__('Sierra Leone', 'give'), |
|
| 283 | + 'SG' => esc_html__('Singapore', 'give'), |
|
| 284 | + 'SK' => esc_html__('Slovak Republic', 'give'), |
|
| 285 | + 'SI' => esc_html__('Slovenia', 'give'), |
|
| 286 | + 'SB' => esc_html__('Solomon Islands', 'give'), |
|
| 287 | + 'SO' => esc_html__('Somalia', 'give'), |
|
| 288 | + 'ZA' => esc_html__('South Africa', 'give'), |
|
| 289 | + 'GS' => esc_html__('South Georgia', 'give'), |
|
| 290 | + 'KR' => esc_html__('South Korea', 'give'), |
|
| 291 | + 'ES' => esc_html__('Spain', 'give'), |
|
| 292 | + 'LK' => esc_html__('Sri Lanka', 'give'), |
|
| 293 | + 'SD' => esc_html__('Sudan', 'give'), |
|
| 294 | + 'SR' => esc_html__('Suriname', 'give'), |
|
| 295 | + 'SJ' => esc_html__('Svalbard and Jan Mayen Islands', 'give'), |
|
| 296 | + 'SZ' => esc_html__('Swaziland', 'give'), |
|
| 297 | + 'SE' => esc_html__('Sweden', 'give'), |
|
| 298 | + 'CH' => esc_html__('Switzerland', 'give'), |
|
| 299 | + 'SY' => esc_html__('Syrian Arab Republic', 'give'), |
|
| 300 | + 'TW' => esc_html__('Taiwan', 'give'), |
|
| 301 | + 'TJ' => esc_html__('Tajikistan', 'give'), |
|
| 302 | + 'TZ' => esc_html__('Tanzania', 'give'), |
|
| 303 | + 'TG' => esc_html__('Togo', 'give'), |
|
| 304 | + 'TK' => esc_html__('Tokelau', 'give'), |
|
| 305 | + 'TO' => esc_html__('Tonga', 'give'), |
|
| 306 | + 'TH' => esc_html__('Thailand', 'give'), |
|
| 307 | + 'TT' => esc_html__('Trinidad and Tobago', 'give'), |
|
| 308 | + 'TN' => esc_html__('Tunisia', 'give'), |
|
| 309 | + 'TR' => esc_html__('Turkey', 'give'), |
|
| 310 | + 'TM' => esc_html__('Turkmenistan', 'give'), |
|
| 311 | + 'TC' => esc_html__('Turks and Caicos Islands', 'give'), |
|
| 312 | + 'TV' => esc_html__('Tuvalu', 'give'), |
|
| 313 | + 'UG' => esc_html__('Uganda', 'give'), |
|
| 314 | + 'UA' => esc_html__('Ukraine', 'give'), |
|
| 315 | + 'AE' => esc_html__('United Arab Emirates', 'give'), |
|
| 316 | + 'UY' => esc_html__('Uruguay', 'give'), |
|
| 317 | + 'UM' => esc_html__('US Minor Outlying Islands', 'give'), |
|
| 318 | + 'UZ' => esc_html__('Uzbekistan', 'give'), |
|
| 319 | + 'VU' => esc_html__('Vanuatu', 'give'), |
|
| 320 | + 'VE' => esc_html__('Venezuela', 'give'), |
|
| 321 | + 'VN' => esc_html__('Vietnam', 'give'), |
|
| 322 | + 'VG' => esc_html__('Virgin Islands (British)', 'give'), |
|
| 323 | + 'VI' => esc_html__('Virgin Islands (USA)', 'give'), |
|
| 324 | + 'WF' => esc_html__('Wallis and Futuna Islands', 'give'), |
|
| 325 | + 'EH' => esc_html__('Western Sahara', 'give'), |
|
| 326 | + 'WS' => esc_html__('Western Samoa', 'give'), |
|
| 327 | + 'YE' => esc_html__('Yemen', 'give'), |
|
| 328 | + 'YU' => esc_html__('Yugoslavia', 'give'), |
|
| 329 | + 'ZM' => esc_html__('Zambia', 'give'), |
|
| 330 | + 'ZW' => esc_html__('Zimbabwe', 'give'), |
|
| 331 | 331 | ); |
| 332 | 332 | |
| 333 | - return (array) apply_filters( 'give_countries', $countries ); |
|
| 333 | + return (array) apply_filters('give_countries', $countries); |
|
| 334 | 334 | } |
| 335 | 335 | |
| 336 | 336 | /** |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | * |
| 385 | 385 | * @param array $states Contain the list of states in array key format where key of the array is there respected country code. |
| 386 | 386 | */ |
| 387 | - return (array) apply_filters( 'give_states_list', $states ); |
|
| 387 | + return (array) apply_filters('give_states_list', $states); |
|
| 388 | 388 | } |
| 389 | 389 | |
| 390 | 390 | /** |
@@ -399,9 +399,9 @@ discard block |
||
| 399 | 399 | function give_no_states_country_list() { |
| 400 | 400 | $country_list = array(); |
| 401 | 401 | $locale = give_get_country_locale(); |
| 402 | - foreach ( $locale as $key => $value ) { |
|
| 403 | - if ( ! empty( $value['state'] ) && isset( $value['state']['hidden'] ) && true === $value['state']['hidden'] ) { |
|
| 404 | - $country_list[ $key ] = $value['state']; |
|
| 402 | + foreach ($locale as $key => $value) { |
|
| 403 | + if ( ! empty($value['state']) && isset($value['state']['hidden']) && true === $value['state']['hidden']) { |
|
| 404 | + $country_list[$key] = $value['state']; |
|
| 405 | 405 | } |
| 406 | 406 | } |
| 407 | 407 | |
@@ -412,7 +412,7 @@ discard block |
||
| 412 | 412 | * |
| 413 | 413 | * @param array $country Contain key as there country code & value as there country name. |
| 414 | 414 | */ |
| 415 | - return (array) apply_filters( 'give_no_states_country_list', $country_list ); |
|
| 415 | + return (array) apply_filters('give_no_states_country_list', $country_list); |
|
| 416 | 416 | } |
| 417 | 417 | |
| 418 | 418 | /** |
@@ -427,9 +427,9 @@ discard block |
||
| 427 | 427 | function give_states_not_required_country_list() { |
| 428 | 428 | $country_list = array(); |
| 429 | 429 | $locale = give_get_country_locale(); |
| 430 | - foreach ( $locale as $key => $value ) { |
|
| 431 | - if ( ! empty( $value['state'] ) && isset( $value['state']['required'] ) && false === $value['state']['required'] ) { |
|
| 432 | - $country_list[ $key ] = $value['state']; |
|
| 430 | + foreach ($locale as $key => $value) { |
|
| 431 | + if ( ! empty($value['state']) && isset($value['state']['required']) && false === $value['state']['required']) { |
|
| 432 | + $country_list[$key] = $value['state']; |
|
| 433 | 433 | } |
| 434 | 434 | } |
| 435 | 435 | |
@@ -440,7 +440,7 @@ discard block |
||
| 440 | 440 | * |
| 441 | 441 | * @param array $country Contain key as there country code & value as there country name. |
| 442 | 442 | */ |
| 443 | - return (array) apply_filters( 'give_states_not_required_country_list', $country_list ); |
|
| 443 | + return (array) apply_filters('give_states_not_required_country_list', $country_list); |
|
| 444 | 444 | } |
| 445 | 445 | |
| 446 | 446 | /** |
@@ -452,11 +452,11 @@ discard block |
||
| 452 | 452 | * |
| 453 | 453 | * @return string|bool |
| 454 | 454 | */ |
| 455 | -function give_get_country_name_by_key( $key ) { |
|
| 455 | +function give_get_country_name_by_key($key) { |
|
| 456 | 456 | $country_list = give_get_country_list(); |
| 457 | 457 | |
| 458 | - if ( array_key_exists( $key, $country_list ) ) { |
|
| 459 | - return $country_list[ $key ]; |
|
| 458 | + if (array_key_exists($key, $country_list)) { |
|
| 459 | + return $country_list[$key]; |
|
| 460 | 460 | } |
| 461 | 461 | |
| 462 | 462 | return false; |
@@ -471,14 +471,14 @@ discard block |
||
| 471 | 471 | */ |
| 472 | 472 | function give_get_states_label() { |
| 473 | 473 | $country_states_label = array(); |
| 474 | - $default_label = __( 'State', 'give' ); |
|
| 474 | + $default_label = __('State', 'give'); |
|
| 475 | 475 | $locale = give_get_country_locale(); |
| 476 | - foreach ( $locale as $key => $value ) { |
|
| 476 | + foreach ($locale as $key => $value) { |
|
| 477 | 477 | $label = $default_label; |
| 478 | - if ( ! empty( $value['state'] ) && ! empty( $value['state']['label'] ) ) { |
|
| 478 | + if ( ! empty($value['state']) && ! empty($value['state']['label'])) { |
|
| 479 | 479 | $label = $value['state']['label']; |
| 480 | 480 | } |
| 481 | - $country_states_label[ $key ] = $label; |
|
| 481 | + $country_states_label[$key] = $label; |
|
| 482 | 482 | } |
| 483 | 483 | |
| 484 | 484 | /** |
@@ -488,7 +488,7 @@ discard block |
||
| 488 | 488 | * |
| 489 | 489 | * @param array $country Contain key as there country code & value as there country name. |
| 490 | 490 | */ |
| 491 | - return (array) apply_filters( 'give_get_states_label', $country_states_label ); |
|
| 491 | + return (array) apply_filters('give_get_states_label', $country_states_label); |
|
| 492 | 492 | } |
| 493 | 493 | |
| 494 | 494 | /** |
@@ -499,7 +499,7 @@ discard block |
||
| 499 | 499 | * @return array |
| 500 | 500 | */ |
| 501 | 501 | function give_get_country_locale() { |
| 502 | - return (array) apply_filters( 'give_get_country_locale', array( |
|
| 502 | + return (array) apply_filters('give_get_country_locale', array( |
|
| 503 | 503 | 'AE' => array( |
| 504 | 504 | 'state' => array( |
| 505 | 505 | 'required' => false, |
@@ -519,7 +519,7 @@ discard block |
||
| 519 | 519 | ), |
| 520 | 520 | 'AU' => array( |
| 521 | 521 | 'state' => array( |
| 522 | - 'label' => __( 'State', 'give' ), |
|
| 522 | + 'label' => __('State', 'give'), |
|
| 523 | 523 | ), |
| 524 | 524 | ), |
| 525 | 525 | 'AX' => array( |
@@ -529,13 +529,13 @@ discard block |
||
| 529 | 529 | ), |
| 530 | 530 | 'BD' => array( |
| 531 | 531 | 'state' => array( |
| 532 | - 'label' => __( 'District', 'give' ), |
|
| 532 | + 'label' => __('District', 'give'), |
|
| 533 | 533 | ), |
| 534 | 534 | ), |
| 535 | 535 | 'BE' => array( |
| 536 | 536 | 'state' => array( |
| 537 | 537 | 'required' => false, |
| 538 | - 'label' => __( 'Province', 'give' ), |
|
| 538 | + 'label' => __('Province', 'give'), |
|
| 539 | 539 | 'hidden' => true, |
| 540 | 540 | ), |
| 541 | 541 | ), |
@@ -546,24 +546,24 @@ discard block |
||
| 546 | 546 | ), |
| 547 | 547 | 'CA' => array( |
| 548 | 548 | 'state' => array( |
| 549 | - 'label' => __( 'Province', 'give' ), |
|
| 549 | + 'label' => __('Province', 'give'), |
|
| 550 | 550 | ), |
| 551 | 551 | ), |
| 552 | 552 | 'CH' => array( |
| 553 | 553 | 'state' => array( |
| 554 | - 'label' => __( 'Canton', 'give' ), |
|
| 554 | + 'label' => __('Canton', 'give'), |
|
| 555 | 555 | 'required' => false, |
| 556 | 556 | 'hidden' => true, |
| 557 | 557 | ), |
| 558 | 558 | ), |
| 559 | 559 | 'CL' => array( |
| 560 | 560 | 'state' => array( |
| 561 | - 'label' => __( 'Region', 'give' ), |
|
| 561 | + 'label' => __('Region', 'give'), |
|
| 562 | 562 | ), |
| 563 | 563 | ), |
| 564 | 564 | 'CN' => array( |
| 565 | 565 | 'state' => array( |
| 566 | - 'label' => __( 'Province', 'give' ), |
|
| 566 | + 'label' => __('Province', 'give'), |
|
| 567 | 567 | ), |
| 568 | 568 | ), |
| 569 | 569 | 'CZ' => array( |
@@ -614,23 +614,23 @@ discard block |
||
| 614 | 614 | ), |
| 615 | 615 | 'HK' => array( |
| 616 | 616 | 'state' => array( |
| 617 | - 'label' => __( 'Region', 'give' ), |
|
| 617 | + 'label' => __('Region', 'give'), |
|
| 618 | 618 | ), |
| 619 | 619 | ), |
| 620 | 620 | 'HU' => array( |
| 621 | 621 | 'state' => array( |
| 622 | - 'label' => __( 'County', 'give' ), |
|
| 622 | + 'label' => __('County', 'give'), |
|
| 623 | 623 | 'hidden' => true, |
| 624 | 624 | ), |
| 625 | 625 | ), |
| 626 | 626 | 'ID' => array( |
| 627 | 627 | 'state' => array( |
| 628 | - 'label' => __( 'Province', 'give' ), |
|
| 628 | + 'label' => __('Province', 'give'), |
|
| 629 | 629 | ), |
| 630 | 630 | ), |
| 631 | 631 | 'IE' => array( |
| 632 | 632 | 'state' => array( |
| 633 | - 'label' => __( 'County', 'give' ), |
|
| 633 | + 'label' => __('County', 'give'), |
|
| 634 | 634 | ), |
| 635 | 635 | ), |
| 636 | 636 | 'IS' => array( |
@@ -647,12 +647,12 @@ discard block |
||
| 647 | 647 | 'IT' => array( |
| 648 | 648 | 'state' => array( |
| 649 | 649 | 'required' => true, |
| 650 | - 'label' => __( 'Province', 'give' ), |
|
| 650 | + 'label' => __('Province', 'give'), |
|
| 651 | 651 | ), |
| 652 | 652 | ), |
| 653 | 653 | 'JP' => array( |
| 654 | 654 | 'state' => array( |
| 655 | - 'label' => __( 'Prefecture', 'give' ), |
|
| 655 | + 'label' => __('Prefecture', 'give'), |
|
| 656 | 656 | ), |
| 657 | 657 | ), |
| 658 | 658 | 'KR' => array( |
@@ -678,14 +678,14 @@ discard block |
||
| 678 | 678 | 'NL' => array( |
| 679 | 679 | 'state' => array( |
| 680 | 680 | 'required' => false, |
| 681 | - 'label' => __( 'Province', 'give' ), |
|
| 681 | + 'label' => __('Province', 'give'), |
|
| 682 | 682 | 'hidden' => true, |
| 683 | 683 | ), |
| 684 | 684 | ), |
| 685 | 685 | 'NZ' => array( |
| 686 | 686 | 'state' => array( |
| 687 | 687 | 'required' => false, |
| 688 | - 'label' => __( 'Region', 'give' ), |
|
| 688 | + 'label' => __('Region', 'give'), |
|
| 689 | 689 | 'hidden' => true, |
| 690 | 690 | ), |
| 691 | 691 | ), |
@@ -697,7 +697,7 @@ discard block |
||
| 697 | 697 | ), |
| 698 | 698 | 'NP' => array( |
| 699 | 699 | 'state' => array( |
| 700 | - 'label' => __( 'State / Zone', 'give' ), |
|
| 700 | + 'label' => __('State / Zone', 'give'), |
|
| 701 | 701 | ), |
| 702 | 702 | ), |
| 703 | 703 | 'PL' => array( |
@@ -741,12 +741,12 @@ discard block |
||
| 741 | 741 | ), |
| 742 | 742 | 'ES' => array( |
| 743 | 743 | 'state' => array( |
| 744 | - 'label' => __( 'Province', 'give' ), |
|
| 744 | + 'label' => __('Province', 'give'), |
|
| 745 | 745 | ), |
| 746 | 746 | ), |
| 747 | 747 | 'LI' => array( |
| 748 | 748 | 'state' => array( |
| 749 | - 'label' => __( 'Municipality', 'give' ), |
|
| 749 | + 'label' => __('Municipality', 'give'), |
|
| 750 | 750 | 'required' => false, |
| 751 | 751 | 'hidden' => true, |
| 752 | 752 | ), |
@@ -764,17 +764,17 @@ discard block |
||
| 764 | 764 | ), |
| 765 | 765 | 'TR' => array( |
| 766 | 766 | 'state' => array( |
| 767 | - 'label' => __( 'Province', 'give' ), |
|
| 767 | + 'label' => __('Province', 'give'), |
|
| 768 | 768 | ), |
| 769 | 769 | ), |
| 770 | 770 | 'US' => array( |
| 771 | 771 | 'state' => array( |
| 772 | - 'label' => __( 'State', 'give' ), |
|
| 772 | + 'label' => __('State', 'give'), |
|
| 773 | 773 | ), |
| 774 | 774 | ), |
| 775 | 775 | 'GB' => array( |
| 776 | 776 | 'state' => array( |
| 777 | - 'label' => __( 'County', 'give' ), |
|
| 777 | + 'label' => __('County', 'give'), |
|
| 778 | 778 | 'required' => false, |
| 779 | 779 | ), |
| 780 | 780 | ), |
@@ -791,10 +791,10 @@ discard block |
||
| 791 | 791 | ), |
| 792 | 792 | 'ZA' => array( |
| 793 | 793 | 'state' => array( |
| 794 | - 'label' => __( 'Province', 'give' ), |
|
| 794 | + 'label' => __('Province', 'give'), |
|
| 795 | 795 | ), |
| 796 | 796 | ), |
| 797 | - ) ); |
|
| 797 | + )); |
|
| 798 | 798 | } |
| 799 | 799 | |
| 800 | 800 | /** |
@@ -806,90 +806,90 @@ discard block |
||
| 806 | 806 | function give_get_turkey_states_list() { |
| 807 | 807 | $states = array( |
| 808 | 808 | '' => '', |
| 809 | - 'TR01' => __( 'Adana', 'give' ), |
|
| 810 | - 'TR02' => __( 'Adıyaman', 'give' ), |
|
| 811 | - 'TR03' => __( 'Afyon', 'give' ), |
|
| 812 | - 'TR04' => __( 'Ağrı', 'give' ), |
|
| 813 | - 'TR05' => __( 'Amasya', 'give' ), |
|
| 814 | - 'TR06' => __( 'Ankara', 'give' ), |
|
| 815 | - 'TR07' => __( 'Antalya', 'give' ), |
|
| 816 | - 'TR08' => __( 'Artvin', 'give' ), |
|
| 817 | - 'TR09' => __( 'Aydın', 'give' ), |
|
| 818 | - 'TR10' => __( 'Balıkesir', 'give' ), |
|
| 819 | - 'TR11' => __( 'Bilecik', 'give' ), |
|
| 820 | - 'TR12' => __( 'Bingöl', 'give' ), |
|
| 821 | - 'TR13' => __( 'Bitlis', 'give' ), |
|
| 822 | - 'TR14' => __( 'Bolu', 'give' ), |
|
| 823 | - 'TR15' => __( 'Burdur', 'give' ), |
|
| 824 | - 'TR16' => __( 'Bursa', 'give' ), |
|
| 825 | - 'TR17' => __( 'Çanakkale', 'give' ), |
|
| 826 | - 'TR18' => __( 'Çankırı', 'give' ), |
|
| 827 | - 'TR19' => __( 'Çorum', 'give' ), |
|
| 828 | - 'TR20' => __( 'Denizli', 'give' ), |
|
| 829 | - 'TR21' => __( 'Diyarbakır', 'give' ), |
|
| 830 | - 'TR22' => __( 'Edirne', 'give' ), |
|
| 831 | - 'TR23' => __( 'Elazığ', 'give' ), |
|
| 832 | - 'TR24' => __( 'Erzincan', 'give' ), |
|
| 833 | - 'TR25' => __( 'Erzurum', 'give' ), |
|
| 834 | - 'TR26' => __( 'Eskişehir', 'give' ), |
|
| 835 | - 'TR27' => __( 'Gaziantep', 'give' ), |
|
| 836 | - 'TR28' => __( 'Giresun', 'give' ), |
|
| 837 | - 'TR29' => __( 'Gümüşhane', 'give' ), |
|
| 838 | - 'TR30' => __( 'Hakkari', 'give' ), |
|
| 839 | - 'TR31' => __( 'Hatay', 'give' ), |
|
| 840 | - 'TR32' => __( 'Isparta', 'give' ), |
|
| 841 | - 'TR33' => __( 'İçel', 'give' ), |
|
| 842 | - 'TR34' => __( 'İstanbul', 'give' ), |
|
| 843 | - 'TR35' => __( 'İzmir', 'give' ), |
|
| 844 | - 'TR36' => __( 'Kars', 'give' ), |
|
| 845 | - 'TR37' => __( 'Kastamonu', 'give' ), |
|
| 846 | - 'TR38' => __( 'Kayseri', 'give' ), |
|
| 847 | - 'TR39' => __( 'Kırklareli', 'give' ), |
|
| 848 | - 'TR40' => __( 'Kırşehir', 'give' ), |
|
| 849 | - 'TR41' => __( 'Kocaeli', 'give' ), |
|
| 850 | - 'TR42' => __( 'Konya', 'give' ), |
|
| 851 | - 'TR43' => __( 'Kütahya', 'give' ), |
|
| 852 | - 'TR44' => __( 'Malatya', 'give' ), |
|
| 853 | - 'TR45' => __( 'Manisa', 'give' ), |
|
| 854 | - 'TR46' => __( 'Kahramanmaraş', 'give' ), |
|
| 855 | - 'TR47' => __( 'Mardin', 'give' ), |
|
| 856 | - 'TR48' => __( 'Muğla', 'give' ), |
|
| 857 | - 'TR49' => __( 'Muş', 'give' ), |
|
| 858 | - 'TR50' => __( 'Nevşehir', 'give' ), |
|
| 859 | - 'TR51' => __( 'Niğde', 'give' ), |
|
| 860 | - 'TR52' => __( 'Ordu', 'give' ), |
|
| 861 | - 'TR53' => __( 'Rize', 'give' ), |
|
| 862 | - 'TR54' => __( 'Sakarya', 'give' ), |
|
| 863 | - 'TR55' => __( 'Samsun', 'give' ), |
|
| 864 | - 'TR56' => __( 'Siirt', 'give' ), |
|
| 865 | - 'TR57' => __( 'Sinop', 'give' ), |
|
| 866 | - 'TR58' => __( 'Sivas', 'give' ), |
|
| 867 | - 'TR59' => __( 'Tekirdağ', 'give' ), |
|
| 868 | - 'TR60' => __( 'Tokat', 'give' ), |
|
| 869 | - 'TR61' => __( 'Trabzon', 'give' ), |
|
| 870 | - 'TR62' => __( 'Tunceli', 'give' ), |
|
| 871 | - 'TR63' => __( 'Şanlıurfa', 'give' ), |
|
| 872 | - 'TR64' => __( 'Uşak', 'give' ), |
|
| 873 | - 'TR65' => __( 'Van', 'give' ), |
|
| 874 | - 'TR66' => __( 'Yozgat', 'give' ), |
|
| 875 | - 'TR67' => __( 'Zonguldak', 'give' ), |
|
| 876 | - 'TR68' => __( 'Aksaray', 'give' ), |
|
| 877 | - 'TR69' => __( 'Bayburt', 'give' ), |
|
| 878 | - 'TR70' => __( 'Karaman', 'give' ), |
|
| 879 | - 'TR71' => __( 'Kırıkkale', 'give' ), |
|
| 880 | - 'TR72' => __( 'Batman', 'give' ), |
|
| 881 | - 'TR73' => __( 'Şırnak', 'give' ), |
|
| 882 | - 'TR74' => __( 'Bartın', 'give' ), |
|
| 883 | - 'TR75' => __( 'Ardahan', 'give' ), |
|
| 884 | - 'TR76' => __( 'Iğdır', 'give' ), |
|
| 885 | - 'TR77' => __( 'Yalova', 'give' ), |
|
| 886 | - 'TR78' => __( 'Karabük', 'give' ), |
|
| 887 | - 'TR79' => __( 'Kilis', 'give' ), |
|
| 888 | - 'TR80' => __( 'Osmaniye', 'give' ), |
|
| 889 | - 'TR81' => __( 'Düzce', 'give' ), |
|
| 809 | + 'TR01' => __('Adana', 'give'), |
|
| 810 | + 'TR02' => __('Adıyaman', 'give'), |
|
| 811 | + 'TR03' => __('Afyon', 'give'), |
|
| 812 | + 'TR04' => __('Ağrı', 'give'), |
|
| 813 | + 'TR05' => __('Amasya', 'give'), |
|
| 814 | + 'TR06' => __('Ankara', 'give'), |
|
| 815 | + 'TR07' => __('Antalya', 'give'), |
|
| 816 | + 'TR08' => __('Artvin', 'give'), |
|
| 817 | + 'TR09' => __('Aydın', 'give'), |
|
| 818 | + 'TR10' => __('Balıkesir', 'give'), |
|
| 819 | + 'TR11' => __('Bilecik', 'give'), |
|
| 820 | + 'TR12' => __('Bingöl', 'give'), |
|
| 821 | + 'TR13' => __('Bitlis', 'give'), |
|
| 822 | + 'TR14' => __('Bolu', 'give'), |
|
| 823 | + 'TR15' => __('Burdur', 'give'), |
|
| 824 | + 'TR16' => __('Bursa', 'give'), |
|
| 825 | + 'TR17' => __('Çanakkale', 'give'), |
|
| 826 | + 'TR18' => __('Çankırı', 'give'), |
|
| 827 | + 'TR19' => __('Çorum', 'give'), |
|
| 828 | + 'TR20' => __('Denizli', 'give'), |
|
| 829 | + 'TR21' => __('Diyarbakır', 'give'), |
|
| 830 | + 'TR22' => __('Edirne', 'give'), |
|
| 831 | + 'TR23' => __('Elazığ', 'give'), |
|
| 832 | + 'TR24' => __('Erzincan', 'give'), |
|
| 833 | + 'TR25' => __('Erzurum', 'give'), |
|
| 834 | + 'TR26' => __('Eskişehir', 'give'), |
|
| 835 | + 'TR27' => __('Gaziantep', 'give'), |
|
| 836 | + 'TR28' => __('Giresun', 'give'), |
|
| 837 | + 'TR29' => __('Gümüşhane', 'give'), |
|
| 838 | + 'TR30' => __('Hakkari', 'give'), |
|
| 839 | + 'TR31' => __('Hatay', 'give'), |
|
| 840 | + 'TR32' => __('Isparta', 'give'), |
|
| 841 | + 'TR33' => __('İçel', 'give'), |
|
| 842 | + 'TR34' => __('İstanbul', 'give'), |
|
| 843 | + 'TR35' => __('İzmir', 'give'), |
|
| 844 | + 'TR36' => __('Kars', 'give'), |
|
| 845 | + 'TR37' => __('Kastamonu', 'give'), |
|
| 846 | + 'TR38' => __('Kayseri', 'give'), |
|
| 847 | + 'TR39' => __('Kırklareli', 'give'), |
|
| 848 | + 'TR40' => __('Kırşehir', 'give'), |
|
| 849 | + 'TR41' => __('Kocaeli', 'give'), |
|
| 850 | + 'TR42' => __('Konya', 'give'), |
|
| 851 | + 'TR43' => __('Kütahya', 'give'), |
|
| 852 | + 'TR44' => __('Malatya', 'give'), |
|
| 853 | + 'TR45' => __('Manisa', 'give'), |
|
| 854 | + 'TR46' => __('Kahramanmaraş', 'give'), |
|
| 855 | + 'TR47' => __('Mardin', 'give'), |
|
| 856 | + 'TR48' => __('Muğla', 'give'), |
|
| 857 | + 'TR49' => __('Muş', 'give'), |
|
| 858 | + 'TR50' => __('Nevşehir', 'give'), |
|
| 859 | + 'TR51' => __('Niğde', 'give'), |
|
| 860 | + 'TR52' => __('Ordu', 'give'), |
|
| 861 | + 'TR53' => __('Rize', 'give'), |
|
| 862 | + 'TR54' => __('Sakarya', 'give'), |
|
| 863 | + 'TR55' => __('Samsun', 'give'), |
|
| 864 | + 'TR56' => __('Siirt', 'give'), |
|
| 865 | + 'TR57' => __('Sinop', 'give'), |
|
| 866 | + 'TR58' => __('Sivas', 'give'), |
|
| 867 | + 'TR59' => __('Tekirdağ', 'give'), |
|
| 868 | + 'TR60' => __('Tokat', 'give'), |
|
| 869 | + 'TR61' => __('Trabzon', 'give'), |
|
| 870 | + 'TR62' => __('Tunceli', 'give'), |
|
| 871 | + 'TR63' => __('Şanlıurfa', 'give'), |
|
| 872 | + 'TR64' => __('Uşak', 'give'), |
|
| 873 | + 'TR65' => __('Van', 'give'), |
|
| 874 | + 'TR66' => __('Yozgat', 'give'), |
|
| 875 | + 'TR67' => __('Zonguldak', 'give'), |
|
| 876 | + 'TR68' => __('Aksaray', 'give'), |
|
| 877 | + 'TR69' => __('Bayburt', 'give'), |
|
| 878 | + 'TR70' => __('Karaman', 'give'), |
|
| 879 | + 'TR71' => __('Kırıkkale', 'give'), |
|
| 880 | + 'TR72' => __('Batman', 'give'), |
|
| 881 | + 'TR73' => __('Şırnak', 'give'), |
|
| 882 | + 'TR74' => __('Bartın', 'give'), |
|
| 883 | + 'TR75' => __('Ardahan', 'give'), |
|
| 884 | + 'TR76' => __('Iğdır', 'give'), |
|
| 885 | + 'TR77' => __('Yalova', 'give'), |
|
| 886 | + 'TR78' => __('Karabük', 'give'), |
|
| 887 | + 'TR79' => __('Kilis', 'give'), |
|
| 888 | + 'TR80' => __('Osmaniye', 'give'), |
|
| 889 | + 'TR81' => __('Düzce', 'give'), |
|
| 890 | 890 | ); |
| 891 | 891 | |
| 892 | - return apply_filters( 'give_turkey_states', $states ); |
|
| 892 | + return apply_filters('give_turkey_states', $states); |
|
| 893 | 893 | } |
| 894 | 894 | |
| 895 | 895 | /** |
@@ -901,51 +901,51 @@ discard block |
||
| 901 | 901 | function give_get_romania_states_list() { |
| 902 | 902 | $states = array( |
| 903 | 903 | '' => '', |
| 904 | - 'AB' => __( 'Alba', 'give' ), |
|
| 905 | - 'AR' => __( 'Arad', 'give' ), |
|
| 906 | - 'AG' => __( 'Arges', 'give' ), |
|
| 907 | - 'BC' => __( 'Bacau', 'give' ), |
|
| 908 | - 'BH' => __( 'Bihor', 'give' ), |
|
| 909 | - 'BN' => __( 'Bistrita-Nasaud', 'give' ), |
|
| 910 | - 'BT' => __( 'Botosani', 'give' ), |
|
| 911 | - 'BR' => __( 'Braila', 'give' ), |
|
| 912 | - 'BV' => __( 'Brasov', 'give' ), |
|
| 913 | - 'B' => __( 'Bucuresti', 'give' ), |
|
| 914 | - 'BZ' => __( 'Buzau', 'give' ), |
|
| 915 | - 'CL' => __( 'Calarasi', 'give' ), |
|
| 916 | - 'CS' => __( 'Caras-Severin', 'give' ), |
|
| 917 | - 'CJ' => __( 'Cluj', 'give' ), |
|
| 918 | - 'CT' => __( 'Constanta', 'give' ), |
|
| 919 | - 'CV' => __( 'Covasna', 'give' ), |
|
| 920 | - 'DB' => __( 'Dambovita', 'give' ), |
|
| 921 | - 'DJ' => __( 'Dolj', 'give' ), |
|
| 922 | - 'GL' => __( 'Galati', 'give' ), |
|
| 923 | - 'GR' => __( 'Giurgiu', 'give' ), |
|
| 924 | - 'GJ' => __( 'Gorj', 'give' ), |
|
| 925 | - 'HR' => __( 'Harghita', 'give' ), |
|
| 926 | - 'HD' => __( 'Hunedoara', 'give' ), |
|
| 927 | - 'IL' => __( 'Ialomita', 'give' ), |
|
| 928 | - 'IS' => __( 'Iasi', 'give' ), |
|
| 929 | - 'IF' => __( 'Ilfov', 'give' ), |
|
| 930 | - 'MM' => __( 'Maramures', 'give' ), |
|
| 931 | - 'MH' => __( 'Mehedinti', 'give' ), |
|
| 932 | - 'MS' => __( 'Mures', 'give' ), |
|
| 933 | - 'NT' => __( 'Neamt', 'give' ), |
|
| 934 | - 'OT' => __( 'Olt', 'give' ), |
|
| 935 | - 'PH' => __( 'Prahova', 'give' ), |
|
| 936 | - 'SJ' => __( 'Salaj', 'give' ), |
|
| 937 | - 'SM' => __( 'Satu Mare', 'give' ), |
|
| 938 | - 'SB' => __( 'Sibiu', 'give' ), |
|
| 939 | - 'SV' => __( 'Suceava', 'give' ), |
|
| 940 | - 'TR' => __( 'Teleorman', 'give' ), |
|
| 941 | - 'TM' => __( 'Timis', 'give' ), |
|
| 942 | - 'TL' => __( 'Tulcea', 'give' ), |
|
| 943 | - 'VL' => __( 'Valcea', 'give' ), |
|
| 944 | - 'VS' => __( 'Vaslui', 'give' ), |
|
| 945 | - 'VN' => __( 'Vrancea', 'give' ), |
|
| 904 | + 'AB' => __('Alba', 'give'), |
|
| 905 | + 'AR' => __('Arad', 'give'), |
|
| 906 | + 'AG' => __('Arges', 'give'), |
|
| 907 | + 'BC' => __('Bacau', 'give'), |
|
| 908 | + 'BH' => __('Bihor', 'give'), |
|
| 909 | + 'BN' => __('Bistrita-Nasaud', 'give'), |
|
| 910 | + 'BT' => __('Botosani', 'give'), |
|
| 911 | + 'BR' => __('Braila', 'give'), |
|
| 912 | + 'BV' => __('Brasov', 'give'), |
|
| 913 | + 'B' => __('Bucuresti', 'give'), |
|
| 914 | + 'BZ' => __('Buzau', 'give'), |
|
| 915 | + 'CL' => __('Calarasi', 'give'), |
|
| 916 | + 'CS' => __('Caras-Severin', 'give'), |
|
| 917 | + 'CJ' => __('Cluj', 'give'), |
|
| 918 | + 'CT' => __('Constanta', 'give'), |
|
| 919 | + 'CV' => __('Covasna', 'give'), |
|
| 920 | + 'DB' => __('Dambovita', 'give'), |
|
| 921 | + 'DJ' => __('Dolj', 'give'), |
|
| 922 | + 'GL' => __('Galati', 'give'), |
|
| 923 | + 'GR' => __('Giurgiu', 'give'), |
|
| 924 | + 'GJ' => __('Gorj', 'give'), |
|
| 925 | + 'HR' => __('Harghita', 'give'), |
|
| 926 | + 'HD' => __('Hunedoara', 'give'), |
|
| 927 | + 'IL' => __('Ialomita', 'give'), |
|
| 928 | + 'IS' => __('Iasi', 'give'), |
|
| 929 | + 'IF' => __('Ilfov', 'give'), |
|
| 930 | + 'MM' => __('Maramures', 'give'), |
|
| 931 | + 'MH' => __('Mehedinti', 'give'), |
|
| 932 | + 'MS' => __('Mures', 'give'), |
|
| 933 | + 'NT' => __('Neamt', 'give'), |
|
| 934 | + 'OT' => __('Olt', 'give'), |
|
| 935 | + 'PH' => __('Prahova', 'give'), |
|
| 936 | + 'SJ' => __('Salaj', 'give'), |
|
| 937 | + 'SM' => __('Satu Mare', 'give'), |
|
| 938 | + 'SB' => __('Sibiu', 'give'), |
|
| 939 | + 'SV' => __('Suceava', 'give'), |
|
| 940 | + 'TR' => __('Teleorman', 'give'), |
|
| 941 | + 'TM' => __('Timis', 'give'), |
|
| 942 | + 'TL' => __('Tulcea', 'give'), |
|
| 943 | + 'VL' => __('Valcea', 'give'), |
|
| 944 | + 'VS' => __('Vaslui', 'give'), |
|
| 945 | + 'VN' => __('Vrancea', 'give'), |
|
| 946 | 946 | ); |
| 947 | 947 | |
| 948 | - return apply_filters( 'give_romania_states', $states ); |
|
| 948 | + return apply_filters('give_romania_states', $states); |
|
| 949 | 949 | } |
| 950 | 950 | |
| 951 | 951 | /** |
@@ -957,17 +957,17 @@ discard block |
||
| 957 | 957 | function give_get_pakistan_states_list() { |
| 958 | 958 | $states = array( |
| 959 | 959 | '' => '', |
| 960 | - 'JK' => __( 'Azad Kashmir', 'give' ), |
|
| 961 | - 'BA' => __( 'Balochistan', 'give' ), |
|
| 962 | - 'TA' => __( 'FATA', 'give' ), |
|
| 963 | - 'GB' => __( 'Gilgit Baltistan', 'give' ), |
|
| 964 | - 'IS' => __( 'Islamabad Capital Territory', 'give' ), |
|
| 965 | - 'KP' => __( 'Khyber Pakhtunkhwa', 'give' ), |
|
| 966 | - 'PB' => __( 'Punjab', 'give' ), |
|
| 967 | - 'SD' => __( 'Sindh', 'give' ), |
|
| 960 | + 'JK' => __('Azad Kashmir', 'give'), |
|
| 961 | + 'BA' => __('Balochistan', 'give'), |
|
| 962 | + 'TA' => __('FATA', 'give'), |
|
| 963 | + 'GB' => __('Gilgit Baltistan', 'give'), |
|
| 964 | + 'IS' => __('Islamabad Capital Territory', 'give'), |
|
| 965 | + 'KP' => __('Khyber Pakhtunkhwa', 'give'), |
|
| 966 | + 'PB' => __('Punjab', 'give'), |
|
| 967 | + 'SD' => __('Sindh', 'give'), |
|
| 968 | 968 | ); |
| 969 | 969 | |
| 970 | - return apply_filters( 'give_pakistan_states', $states ); |
|
| 970 | + return apply_filters('give_pakistan_states', $states); |
|
| 971 | 971 | } |
| 972 | 972 | |
| 973 | 973 | /** |
@@ -979,91 +979,91 @@ discard block |
||
| 979 | 979 | function give_get_philippines_states_list() { |
| 980 | 980 | $states = array( |
| 981 | 981 | '' => '', |
| 982 | - 'ABR' => __( 'Abra', 'give' ), |
|
| 983 | - 'AGN' => __( 'Agusan del Norte', 'give' ), |
|
| 984 | - 'AGS' => __( 'Agusan del Sur', 'give' ), |
|
| 985 | - 'AKL' => __( 'Aklan', 'give' ), |
|
| 986 | - 'ALB' => __( 'Albay', 'give' ), |
|
| 987 | - 'ANT' => __( 'Antique', 'give' ), |
|
| 988 | - 'APA' => __( 'Apayao', 'give' ), |
|
| 989 | - 'AUR' => __( 'Aurora', 'give' ), |
|
| 990 | - 'BAS' => __( 'Basilan', 'give' ), |
|
| 991 | - 'BAN' => __( 'Bataan', 'give' ), |
|
| 992 | - 'BTN' => __( 'Batanes', 'give' ), |
|
| 993 | - 'BTG' => __( 'Batangas', 'give' ), |
|
| 994 | - 'BEN' => __( 'Benguet', 'give' ), |
|
| 995 | - 'BIL' => __( 'Biliran', 'give' ), |
|
| 996 | - 'BOH' => __( 'Bohol', 'give' ), |
|
| 997 | - 'BUK' => __( 'Bukidnon', 'give' ), |
|
| 998 | - 'BUL' => __( 'Bulacan', 'give' ), |
|
| 999 | - 'CAG' => __( 'Cagayan', 'give' ), |
|
| 1000 | - 'CAN' => __( 'Camarines Norte', 'give' ), |
|
| 1001 | - 'CAS' => __( 'Camarines Sur', 'give' ), |
|
| 1002 | - 'CAM' => __( 'Camiguin', 'give' ), |
|
| 1003 | - 'CAP' => __( 'Capiz', 'give' ), |
|
| 1004 | - 'CAT' => __( 'Catanduanes', 'give' ), |
|
| 1005 | - 'CAV' => __( 'Cavite', 'give' ), |
|
| 1006 | - 'CEB' => __( 'Cebu', 'give' ), |
|
| 1007 | - 'COM' => __( 'Compostela Valley', 'give' ), |
|
| 1008 | - 'NCO' => __( 'Cotabato', 'give' ), |
|
| 1009 | - 'DAV' => __( 'Davao del Norte', 'give' ), |
|
| 1010 | - 'DAS' => __( 'Davao del Sur', 'give' ), |
|
| 1011 | - 'DAC' => __( 'Davao Occidental', 'give' ), // TODO: Needs to be updated when ISO code is assigned |
|
| 1012 | - 'DAO' => __( 'Davao Oriental', 'give' ), |
|
| 1013 | - 'DIN' => __( 'Dinagat Islands', 'give' ), |
|
| 1014 | - 'EAS' => __( 'Eastern Samar', 'give' ), |
|
| 1015 | - 'GUI' => __( 'Guimaras', 'give' ), |
|
| 1016 | - 'IFU' => __( 'Ifugao', 'give' ), |
|
| 1017 | - 'ILN' => __( 'Ilocos Norte', 'give' ), |
|
| 1018 | - 'ILS' => __( 'Ilocos Sur', 'give' ), |
|
| 1019 | - 'ILI' => __( 'Iloilo', 'give' ), |
|
| 1020 | - 'ISA' => __( 'Isabela', 'give' ), |
|
| 1021 | - 'KAL' => __( 'Kalinga', 'give' ), |
|
| 1022 | - 'LUN' => __( 'La Union', 'give' ), |
|
| 1023 | - 'LAG' => __( 'Laguna', 'give' ), |
|
| 1024 | - 'LAN' => __( 'Lanao del Norte', 'give' ), |
|
| 1025 | - 'LAS' => __( 'Lanao del Sur', 'give' ), |
|
| 1026 | - 'LEY' => __( 'Leyte', 'give' ), |
|
| 1027 | - 'MAG' => __( 'Maguindanao', 'give' ), |
|
| 1028 | - 'MAD' => __( 'Marinduque', 'give' ), |
|
| 1029 | - 'MAS' => __( 'Masbate', 'give' ), |
|
| 1030 | - 'MSC' => __( 'Misamis Occidental', 'give' ), |
|
| 1031 | - 'MSR' => __( 'Misamis Oriental', 'give' ), |
|
| 1032 | - 'MOU' => __( 'Mountain Province', 'give' ), |
|
| 1033 | - 'NEC' => __( 'Negros Occidental', 'give' ), |
|
| 1034 | - 'NER' => __( 'Negros Oriental', 'give' ), |
|
| 1035 | - 'NSA' => __( 'Northern Samar', 'give' ), |
|
| 1036 | - 'NUE' => __( 'Nueva Ecija', 'give' ), |
|
| 1037 | - 'NUV' => __( 'Nueva Vizcaya', 'give' ), |
|
| 1038 | - 'MDC' => __( 'Occidental Mindoro', 'give' ), |
|
| 1039 | - 'MDR' => __( 'Oriental Mindoro', 'give' ), |
|
| 1040 | - 'PLW' => __( 'Palawan', 'give' ), |
|
| 1041 | - 'PAM' => __( 'Pampanga', 'give' ), |
|
| 1042 | - 'PAN' => __( 'Pangasinan', 'give' ), |
|
| 1043 | - 'QUE' => __( 'Quezon', 'give' ), |
|
| 1044 | - 'QUI' => __( 'Quirino', 'give' ), |
|
| 1045 | - 'RIZ' => __( 'Rizal', 'give' ), |
|
| 1046 | - 'ROM' => __( 'Romblon', 'give' ), |
|
| 1047 | - 'WSA' => __( 'Samar', 'give' ), |
|
| 1048 | - 'SAR' => __( 'Sarangani', 'give' ), |
|
| 1049 | - 'SIQ' => __( 'Siquijor', 'give' ), |
|
| 1050 | - 'SOR' => __( 'Sorsogon', 'give' ), |
|
| 1051 | - 'SCO' => __( 'South Cotabato', 'give' ), |
|
| 1052 | - 'SLE' => __( 'Southern Leyte', 'give' ), |
|
| 1053 | - 'SUK' => __( 'Sultan Kudarat', 'give' ), |
|
| 1054 | - 'SLU' => __( 'Sulu', 'give' ), |
|
| 1055 | - 'SUN' => __( 'Surigao del Norte', 'give' ), |
|
| 1056 | - 'SUR' => __( 'Surigao del Sur', 'give' ), |
|
| 1057 | - 'TAR' => __( 'Tarlac', 'give' ), |
|
| 1058 | - 'TAW' => __( 'Tawi-Tawi', 'give' ), |
|
| 1059 | - 'ZMB' => __( 'Zambales', 'give' ), |
|
| 1060 | - 'ZAN' => __( 'Zamboanga del Norte', 'give' ), |
|
| 1061 | - 'ZAS' => __( 'Zamboanga del Sur', 'give' ), |
|
| 1062 | - 'ZSI' => __( 'Zamboanga Sibugay', 'give' ), |
|
| 1063 | - '00' => __( 'Metro Manila', 'give' ), |
|
| 982 | + 'ABR' => __('Abra', 'give'), |
|
| 983 | + 'AGN' => __('Agusan del Norte', 'give'), |
|
| 984 | + 'AGS' => __('Agusan del Sur', 'give'), |
|
| 985 | + 'AKL' => __('Aklan', 'give'), |
|
| 986 | + 'ALB' => __('Albay', 'give'), |
|
| 987 | + 'ANT' => __('Antique', 'give'), |
|
| 988 | + 'APA' => __('Apayao', 'give'), |
|
| 989 | + 'AUR' => __('Aurora', 'give'), |
|
| 990 | + 'BAS' => __('Basilan', 'give'), |
|
| 991 | + 'BAN' => __('Bataan', 'give'), |
|
| 992 | + 'BTN' => __('Batanes', 'give'), |
|
| 993 | + 'BTG' => __('Batangas', 'give'), |
|
| 994 | + 'BEN' => __('Benguet', 'give'), |
|
| 995 | + 'BIL' => __('Biliran', 'give'), |
|
| 996 | + 'BOH' => __('Bohol', 'give'), |
|
| 997 | + 'BUK' => __('Bukidnon', 'give'), |
|
| 998 | + 'BUL' => __('Bulacan', 'give'), |
|
| 999 | + 'CAG' => __('Cagayan', 'give'), |
|
| 1000 | + 'CAN' => __('Camarines Norte', 'give'), |
|
| 1001 | + 'CAS' => __('Camarines Sur', 'give'), |
|
| 1002 | + 'CAM' => __('Camiguin', 'give'), |
|
| 1003 | + 'CAP' => __('Capiz', 'give'), |
|
| 1004 | + 'CAT' => __('Catanduanes', 'give'), |
|
| 1005 | + 'CAV' => __('Cavite', 'give'), |
|
| 1006 | + 'CEB' => __('Cebu', 'give'), |
|
| 1007 | + 'COM' => __('Compostela Valley', 'give'), |
|
| 1008 | + 'NCO' => __('Cotabato', 'give'), |
|
| 1009 | + 'DAV' => __('Davao del Norte', 'give'), |
|
| 1010 | + 'DAS' => __('Davao del Sur', 'give'), |
|
| 1011 | + 'DAC' => __('Davao Occidental', 'give'), // TODO: Needs to be updated when ISO code is assigned |
|
| 1012 | + 'DAO' => __('Davao Oriental', 'give'), |
|
| 1013 | + 'DIN' => __('Dinagat Islands', 'give'), |
|
| 1014 | + 'EAS' => __('Eastern Samar', 'give'), |
|
| 1015 | + 'GUI' => __('Guimaras', 'give'), |
|
| 1016 | + 'IFU' => __('Ifugao', 'give'), |
|
| 1017 | + 'ILN' => __('Ilocos Norte', 'give'), |
|
| 1018 | + 'ILS' => __('Ilocos Sur', 'give'), |
|
| 1019 | + 'ILI' => __('Iloilo', 'give'), |
|
| 1020 | + 'ISA' => __('Isabela', 'give'), |
|
| 1021 | + 'KAL' => __('Kalinga', 'give'), |
|
| 1022 | + 'LUN' => __('La Union', 'give'), |
|
| 1023 | + 'LAG' => __('Laguna', 'give'), |
|
| 1024 | + 'LAN' => __('Lanao del Norte', 'give'), |
|
| 1025 | + 'LAS' => __('Lanao del Sur', 'give'), |
|
| 1026 | + 'LEY' => __('Leyte', 'give'), |
|
| 1027 | + 'MAG' => __('Maguindanao', 'give'), |
|
| 1028 | + 'MAD' => __('Marinduque', 'give'), |
|
| 1029 | + 'MAS' => __('Masbate', 'give'), |
|
| 1030 | + 'MSC' => __('Misamis Occidental', 'give'), |
|
| 1031 | + 'MSR' => __('Misamis Oriental', 'give'), |
|
| 1032 | + 'MOU' => __('Mountain Province', 'give'), |
|
| 1033 | + 'NEC' => __('Negros Occidental', 'give'), |
|
| 1034 | + 'NER' => __('Negros Oriental', 'give'), |
|
| 1035 | + 'NSA' => __('Northern Samar', 'give'), |
|
| 1036 | + 'NUE' => __('Nueva Ecija', 'give'), |
|
| 1037 | + 'NUV' => __('Nueva Vizcaya', 'give'), |
|
| 1038 | + 'MDC' => __('Occidental Mindoro', 'give'), |
|
| 1039 | + 'MDR' => __('Oriental Mindoro', 'give'), |
|
| 1040 | + 'PLW' => __('Palawan', 'give'), |
|
| 1041 | + 'PAM' => __('Pampanga', 'give'), |
|
| 1042 | + 'PAN' => __('Pangasinan', 'give'), |
|
| 1043 | + 'QUE' => __('Quezon', 'give'), |
|
| 1044 | + 'QUI' => __('Quirino', 'give'), |
|
| 1045 | + 'RIZ' => __('Rizal', 'give'), |
|
| 1046 | + 'ROM' => __('Romblon', 'give'), |
|
| 1047 | + 'WSA' => __('Samar', 'give'), |
|
| 1048 | + 'SAR' => __('Sarangani', 'give'), |
|
| 1049 | + 'SIQ' => __('Siquijor', 'give'), |
|
| 1050 | + 'SOR' => __('Sorsogon', 'give'), |
|
| 1051 | + 'SCO' => __('South Cotabato', 'give'), |
|
| 1052 | + 'SLE' => __('Southern Leyte', 'give'), |
|
| 1053 | + 'SUK' => __('Sultan Kudarat', 'give'), |
|
| 1054 | + 'SLU' => __('Sulu', 'give'), |
|
| 1055 | + 'SUN' => __('Surigao del Norte', 'give'), |
|
| 1056 | + 'SUR' => __('Surigao del Sur', 'give'), |
|
| 1057 | + 'TAR' => __('Tarlac', 'give'), |
|
| 1058 | + 'TAW' => __('Tawi-Tawi', 'give'), |
|
| 1059 | + 'ZMB' => __('Zambales', 'give'), |
|
| 1060 | + 'ZAN' => __('Zamboanga del Norte', 'give'), |
|
| 1061 | + 'ZAS' => __('Zamboanga del Sur', 'give'), |
|
| 1062 | + 'ZSI' => __('Zamboanga Sibugay', 'give'), |
|
| 1063 | + '00' => __('Metro Manila', 'give'), |
|
| 1064 | 1064 | ); |
| 1065 | 1065 | |
| 1066 | - return apply_filters( 'give_philippines_states', $states ); |
|
| 1066 | + return apply_filters('give_philippines_states', $states); |
|
| 1067 | 1067 | } |
| 1068 | 1068 | |
| 1069 | 1069 | /** |
@@ -1075,35 +1075,35 @@ discard block |
||
| 1075 | 1075 | function give_get_peru_states_list() { |
| 1076 | 1076 | $states = array( |
| 1077 | 1077 | '' => '', |
| 1078 | - 'CAL' => __( 'El Callao', 'give' ), |
|
| 1079 | - 'LMA' => __( 'Municipalidad Metropolitana de Lima', 'give' ), |
|
| 1080 | - 'AMA' => __( 'Amazonas', 'give' ), |
|
| 1081 | - 'ANC' => __( 'Ancash', 'give' ), |
|
| 1082 | - 'APU' => __( 'Apurímac', 'give' ), |
|
| 1083 | - 'ARE' => __( 'Arequipa', 'give' ), |
|
| 1084 | - 'AYA' => __( 'Ayacucho', 'give' ), |
|
| 1085 | - 'CAJ' => __( 'Cajamarca', 'give' ), |
|
| 1086 | - 'CUS' => __( 'Cusco', 'give' ), |
|
| 1087 | - 'HUV' => __( 'Huancavelica', 'give' ), |
|
| 1088 | - 'HUC' => __( 'Huánuco', 'give' ), |
|
| 1089 | - 'ICA' => __( 'Ica', 'give' ), |
|
| 1090 | - 'JUN' => __( 'Junín', 'give' ), |
|
| 1091 | - 'LAL' => __( 'La Libertad', 'give' ), |
|
| 1092 | - 'LAM' => __( 'Lambayeque', 'give' ), |
|
| 1093 | - 'LIM' => __( 'Lima', 'give' ), |
|
| 1094 | - 'LOR' => __( 'Loreto', 'give' ), |
|
| 1095 | - 'MDD' => __( 'Madre de Dios', 'give' ), |
|
| 1096 | - 'MOQ' => __( 'Moquegua', 'give' ), |
|
| 1097 | - 'PAS' => __( 'Pasco', 'give' ), |
|
| 1098 | - 'PIU' => __( 'Piura', 'give' ), |
|
| 1099 | - 'PUN' => __( 'Puno', 'give' ), |
|
| 1100 | - 'SAM' => __( 'San Martín', 'give' ), |
|
| 1101 | - 'TAC' => __( 'Tacna', 'give' ), |
|
| 1102 | - 'TUM' => __( 'Tumbes', 'give' ), |
|
| 1103 | - 'UCA' => __( 'Ucayali', 'give' ), |
|
| 1078 | + 'CAL' => __('El Callao', 'give'), |
|
| 1079 | + 'LMA' => __('Municipalidad Metropolitana de Lima', 'give'), |
|
| 1080 | + 'AMA' => __('Amazonas', 'give'), |
|
| 1081 | + 'ANC' => __('Ancash', 'give'), |
|
| 1082 | + 'APU' => __('Apurímac', 'give'), |
|
| 1083 | + 'ARE' => __('Arequipa', 'give'), |
|
| 1084 | + 'AYA' => __('Ayacucho', 'give'), |
|
| 1085 | + 'CAJ' => __('Cajamarca', 'give'), |
|
| 1086 | + 'CUS' => __('Cusco', 'give'), |
|
| 1087 | + 'HUV' => __('Huancavelica', 'give'), |
|
| 1088 | + 'HUC' => __('Huánuco', 'give'), |
|
| 1089 | + 'ICA' => __('Ica', 'give'), |
|
| 1090 | + 'JUN' => __('Junín', 'give'), |
|
| 1091 | + 'LAL' => __('La Libertad', 'give'), |
|
| 1092 | + 'LAM' => __('Lambayeque', 'give'), |
|
| 1093 | + 'LIM' => __('Lima', 'give'), |
|
| 1094 | + 'LOR' => __('Loreto', 'give'), |
|
| 1095 | + 'MDD' => __('Madre de Dios', 'give'), |
|
| 1096 | + 'MOQ' => __('Moquegua', 'give'), |
|
| 1097 | + 'PAS' => __('Pasco', 'give'), |
|
| 1098 | + 'PIU' => __('Piura', 'give'), |
|
| 1099 | + 'PUN' => __('Puno', 'give'), |
|
| 1100 | + 'SAM' => __('San Martín', 'give'), |
|
| 1101 | + 'TAC' => __('Tacna', 'give'), |
|
| 1102 | + 'TUM' => __('Tumbes', 'give'), |
|
| 1103 | + 'UCA' => __('Ucayali', 'give'), |
|
| 1104 | 1104 | ); |
| 1105 | 1105 | |
| 1106 | - return apply_filters( 'give_peru_states', $states ); |
|
| 1106 | + return apply_filters('give_peru_states', $states); |
|
| 1107 | 1107 | } |
| 1108 | 1108 | |
| 1109 | 1109 | /** |
@@ -1115,23 +1115,23 @@ discard block |
||
| 1115 | 1115 | function give_get_nepal_states_list() { |
| 1116 | 1116 | $states = array( |
| 1117 | 1117 | '' => '', |
| 1118 | - 'BAG' => __( 'Bagmati', 'give' ), |
|
| 1119 | - 'BHE' => __( 'Bheri', 'give' ), |
|
| 1120 | - 'DHA' => __( 'Dhaulagiri', 'give' ), |
|
| 1121 | - 'GAN' => __( 'Gandaki', 'give' ), |
|
| 1122 | - 'JAN' => __( 'Janakpur', 'give' ), |
|
| 1123 | - 'KAR' => __( 'Karnali', 'give' ), |
|
| 1124 | - 'KOS' => __( 'Koshi', 'give' ), |
|
| 1125 | - 'LUM' => __( 'Lumbini', 'give' ), |
|
| 1126 | - 'MAH' => __( 'Mahakali', 'give' ), |
|
| 1127 | - 'MEC' => __( 'Mechi', 'give' ), |
|
| 1128 | - 'NAR' => __( 'Narayani', 'give' ), |
|
| 1129 | - 'RAP' => __( 'Rapti', 'give' ), |
|
| 1130 | - 'SAG' => __( 'Sagarmatha', 'give' ), |
|
| 1131 | - 'SET' => __( 'Seti', 'give' ), |
|
| 1118 | + 'BAG' => __('Bagmati', 'give'), |
|
| 1119 | + 'BHE' => __('Bheri', 'give'), |
|
| 1120 | + 'DHA' => __('Dhaulagiri', 'give'), |
|
| 1121 | + 'GAN' => __('Gandaki', 'give'), |
|
| 1122 | + 'JAN' => __('Janakpur', 'give'), |
|
| 1123 | + 'KAR' => __('Karnali', 'give'), |
|
| 1124 | + 'KOS' => __('Koshi', 'give'), |
|
| 1125 | + 'LUM' => __('Lumbini', 'give'), |
|
| 1126 | + 'MAH' => __('Mahakali', 'give'), |
|
| 1127 | + 'MEC' => __('Mechi', 'give'), |
|
| 1128 | + 'NAR' => __('Narayani', 'give'), |
|
| 1129 | + 'RAP' => __('Rapti', 'give'), |
|
| 1130 | + 'SAG' => __('Sagarmatha', 'give'), |
|
| 1131 | + 'SET' => __('Seti', 'give'), |
|
| 1132 | 1132 | ); |
| 1133 | 1133 | |
| 1134 | - return apply_filters( 'give_nepal_states', $states ); |
|
| 1134 | + return apply_filters('give_nepal_states', $states); |
|
| 1135 | 1135 | } |
| 1136 | 1136 | |
| 1137 | 1137 | /** |
@@ -1143,46 +1143,46 @@ discard block |
||
| 1143 | 1143 | function give_get_nigerian_states_list() { |
| 1144 | 1144 | $states = array( |
| 1145 | 1145 | '' => '', |
| 1146 | - 'AB' => __( 'Abia', 'give' ), |
|
| 1147 | - 'FC' => __( 'Abuja', 'give' ), |
|
| 1148 | - 'AD' => __( 'Adamawa', 'give' ), |
|
| 1149 | - 'AK' => __( 'Akwa Ibom', 'give' ), |
|
| 1150 | - 'AN' => __( 'Anambra', 'give' ), |
|
| 1151 | - 'BA' => __( 'Bauchi', 'give' ), |
|
| 1152 | - 'BY' => __( 'Bayelsa', 'give' ), |
|
| 1153 | - 'BE' => __( 'Benue', 'give' ), |
|
| 1154 | - 'BO' => __( 'Borno', 'give' ), |
|
| 1155 | - 'CR' => __( 'Cross River', 'give' ), |
|
| 1156 | - 'DE' => __( 'Delta', 'give' ), |
|
| 1157 | - 'EB' => __( 'Ebonyi', 'give' ), |
|
| 1158 | - 'ED' => __( 'Edo', 'give' ), |
|
| 1159 | - 'EK' => __( 'Ekiti', 'give' ), |
|
| 1160 | - 'EN' => __( 'Enugu', 'give' ), |
|
| 1161 | - 'GO' => __( 'Gombe', 'give' ), |
|
| 1162 | - 'IM' => __( 'Imo', 'give' ), |
|
| 1163 | - 'JI' => __( 'Jigawa', 'give' ), |
|
| 1164 | - 'KD' => __( 'Kaduna', 'give' ), |
|
| 1165 | - 'KN' => __( 'Kano', 'give' ), |
|
| 1166 | - 'KT' => __( 'Katsina', 'give' ), |
|
| 1167 | - 'KE' => __( 'Kebbi', 'give' ), |
|
| 1168 | - 'KO' => __( 'Kogi', 'give' ), |
|
| 1169 | - 'KW' => __( 'Kwara', 'give' ), |
|
| 1170 | - 'LA' => __( 'Lagos', 'give' ), |
|
| 1171 | - 'NA' => __( 'Nasarawa', 'give' ), |
|
| 1172 | - 'NI' => __( 'Niger', 'give' ), |
|
| 1173 | - 'OG' => __( 'Ogun', 'give' ), |
|
| 1174 | - 'ON' => __( 'Ondo', 'give' ), |
|
| 1175 | - 'OS' => __( 'Osun', 'give' ), |
|
| 1176 | - 'OY' => __( 'Oyo', 'give' ), |
|
| 1177 | - 'PL' => __( 'Plateau', 'give' ), |
|
| 1178 | - 'RI' => __( 'Rivers', 'give' ), |
|
| 1179 | - 'SO' => __( 'Sokoto', 'give' ), |
|
| 1180 | - 'TA' => __( 'Taraba', 'give' ), |
|
| 1181 | - 'YO' => __( 'Yobe', 'give' ), |
|
| 1182 | - 'ZA' => __( 'Zamfara', 'give' ), |
|
| 1146 | + 'AB' => __('Abia', 'give'), |
|
| 1147 | + 'FC' => __('Abuja', 'give'), |
|
| 1148 | + 'AD' => __('Adamawa', 'give'), |
|
| 1149 | + 'AK' => __('Akwa Ibom', 'give'), |
|
| 1150 | + 'AN' => __('Anambra', 'give'), |
|
| 1151 | + 'BA' => __('Bauchi', 'give'), |
|
| 1152 | + 'BY' => __('Bayelsa', 'give'), |
|
| 1153 | + 'BE' => __('Benue', 'give'), |
|
| 1154 | + 'BO' => __('Borno', 'give'), |
|
| 1155 | + 'CR' => __('Cross River', 'give'), |
|
| 1156 | + 'DE' => __('Delta', 'give'), |
|
| 1157 | + 'EB' => __('Ebonyi', 'give'), |
|
| 1158 | + 'ED' => __('Edo', 'give'), |
|
| 1159 | + 'EK' => __('Ekiti', 'give'), |
|
| 1160 | + 'EN' => __('Enugu', 'give'), |
|
| 1161 | + 'GO' => __('Gombe', 'give'), |
|
| 1162 | + 'IM' => __('Imo', 'give'), |
|
| 1163 | + 'JI' => __('Jigawa', 'give'), |
|
| 1164 | + 'KD' => __('Kaduna', 'give'), |
|
| 1165 | + 'KN' => __('Kano', 'give'), |
|
| 1166 | + 'KT' => __('Katsina', 'give'), |
|
| 1167 | + 'KE' => __('Kebbi', 'give'), |
|
| 1168 | + 'KO' => __('Kogi', 'give'), |
|
| 1169 | + 'KW' => __('Kwara', 'give'), |
|
| 1170 | + 'LA' => __('Lagos', 'give'), |
|
| 1171 | + 'NA' => __('Nasarawa', 'give'), |
|
| 1172 | + 'NI' => __('Niger', 'give'), |
|
| 1173 | + 'OG' => __('Ogun', 'give'), |
|
| 1174 | + 'ON' => __('Ondo', 'give'), |
|
| 1175 | + 'OS' => __('Osun', 'give'), |
|
| 1176 | + 'OY' => __('Oyo', 'give'), |
|
| 1177 | + 'PL' => __('Plateau', 'give'), |
|
| 1178 | + 'RI' => __('Rivers', 'give'), |
|
| 1179 | + 'SO' => __('Sokoto', 'give'), |
|
| 1180 | + 'TA' => __('Taraba', 'give'), |
|
| 1181 | + 'YO' => __('Yobe', 'give'), |
|
| 1182 | + 'ZA' => __('Zamfara', 'give'), |
|
| 1183 | 1183 | ); |
| 1184 | 1184 | |
| 1185 | - return apply_filters( 'give_nigerian_states', $states ); |
|
| 1185 | + return apply_filters('give_nigerian_states', $states); |
|
| 1186 | 1186 | } |
| 1187 | 1187 | |
| 1188 | 1188 | /** |
@@ -1194,41 +1194,41 @@ discard block |
||
| 1194 | 1194 | function give_get_mexico_states_list() { |
| 1195 | 1195 | $states = array( |
| 1196 | 1196 | '' => '', |
| 1197 | - 'Distrito Federal' => __( 'Distrito Federal', 'give' ), |
|
| 1198 | - 'Jalisco' => __( 'Jalisco', 'give' ), |
|
| 1199 | - 'Nuevo Leon' => __( 'Nuevo León', 'give' ), |
|
| 1200 | - 'Aguascalientes' => __( 'Aguascalientes', 'give' ), |
|
| 1201 | - 'Baja California' => __( 'Baja California', 'give' ), |
|
| 1202 | - 'Baja California Sur' => __( 'Baja California Sur', 'give' ), |
|
| 1203 | - 'Campeche' => __( 'Campeche', 'give' ), |
|
| 1204 | - 'Chiapas' => __( 'Chiapas', 'give' ), |
|
| 1205 | - 'Chihuahua' => __( 'Chihuahua', 'give' ), |
|
| 1206 | - 'Coahuila' => __( 'Coahuila', 'give' ), |
|
| 1207 | - 'Colima' => __( 'Colima', 'give' ), |
|
| 1208 | - 'Durango' => __( 'Durango', 'give' ), |
|
| 1209 | - 'Guanajuato' => __( 'Guanajuato', 'give' ), |
|
| 1210 | - 'Guerrero' => __( 'Guerrero', 'give' ), |
|
| 1211 | - 'Hidalgo' => __( 'Hidalgo', 'give' ), |
|
| 1212 | - 'Estado de Mexico' => __( 'Edo. de México', 'give' ), |
|
| 1213 | - 'Michoacan' => __( 'Michoacán', 'give' ), |
|
| 1214 | - 'Morelos' => __( 'Morelos', 'give' ), |
|
| 1215 | - 'Nayarit' => __( 'Nayarit', 'give' ), |
|
| 1216 | - 'Oaxaca' => __( 'Oaxaca', 'give' ), |
|
| 1217 | - 'Puebla' => __( 'Puebla', 'give' ), |
|
| 1218 | - 'Queretaro' => __( 'Querétaro', 'give' ), |
|
| 1219 | - 'Quintana Roo' => __( 'Quintana Roo', 'give' ), |
|
| 1220 | - 'San Luis Potosi' => __( 'San Luis Potosí', 'give' ), |
|
| 1221 | - 'Sinaloa' => __( 'Sinaloa', 'give' ), |
|
| 1222 | - 'Sonora' => __( 'Sonora', 'give' ), |
|
| 1223 | - 'Tabasco' => __( 'Tabasco', 'give' ), |
|
| 1224 | - 'Tamaulipas' => __( 'Tamaulipas', 'give' ), |
|
| 1225 | - 'Tlaxcala' => __( 'Tlaxcala', 'give' ), |
|
| 1226 | - 'Veracruz' => __( 'Veracruz', 'give' ), |
|
| 1227 | - 'Yucatan' => __( 'Yucatán', 'give' ), |
|
| 1228 | - 'Zacatecas' => __( 'Zacatecas', 'give' ), |
|
| 1197 | + 'Distrito Federal' => __('Distrito Federal', 'give'), |
|
| 1198 | + 'Jalisco' => __('Jalisco', 'give'), |
|
| 1199 | + 'Nuevo Leon' => __('Nuevo León', 'give'), |
|
| 1200 | + 'Aguascalientes' => __('Aguascalientes', 'give'), |
|
| 1201 | + 'Baja California' => __('Baja California', 'give'), |
|
| 1202 | + 'Baja California Sur' => __('Baja California Sur', 'give'), |
|
| 1203 | + 'Campeche' => __('Campeche', 'give'), |
|
| 1204 | + 'Chiapas' => __('Chiapas', 'give'), |
|
| 1205 | + 'Chihuahua' => __('Chihuahua', 'give'), |
|
| 1206 | + 'Coahuila' => __('Coahuila', 'give'), |
|
| 1207 | + 'Colima' => __('Colima', 'give'), |
|
| 1208 | + 'Durango' => __('Durango', 'give'), |
|
| 1209 | + 'Guanajuato' => __('Guanajuato', 'give'), |
|
| 1210 | + 'Guerrero' => __('Guerrero', 'give'), |
|
| 1211 | + 'Hidalgo' => __('Hidalgo', 'give'), |
|
| 1212 | + 'Estado de Mexico' => __('Edo. de México', 'give'), |
|
| 1213 | + 'Michoacan' => __('Michoacán', 'give'), |
|
| 1214 | + 'Morelos' => __('Morelos', 'give'), |
|
| 1215 | + 'Nayarit' => __('Nayarit', 'give'), |
|
| 1216 | + 'Oaxaca' => __('Oaxaca', 'give'), |
|
| 1217 | + 'Puebla' => __('Puebla', 'give'), |
|
| 1218 | + 'Queretaro' => __('Querétaro', 'give'), |
|
| 1219 | + 'Quintana Roo' => __('Quintana Roo', 'give'), |
|
| 1220 | + 'San Luis Potosi' => __('San Luis Potosí', 'give'), |
|
| 1221 | + 'Sinaloa' => __('Sinaloa', 'give'), |
|
| 1222 | + 'Sonora' => __('Sonora', 'give'), |
|
| 1223 | + 'Tabasco' => __('Tabasco', 'give'), |
|
| 1224 | + 'Tamaulipas' => __('Tamaulipas', 'give'), |
|
| 1225 | + 'Tlaxcala' => __('Tlaxcala', 'give'), |
|
| 1226 | + 'Veracruz' => __('Veracruz', 'give'), |
|
| 1227 | + 'Yucatan' => __('Yucatán', 'give'), |
|
| 1228 | + 'Zacatecas' => __('Zacatecas', 'give'), |
|
| 1229 | 1229 | ); |
| 1230 | 1230 | |
| 1231 | - return apply_filters( 'give_mexico_states', $states ); |
|
| 1231 | + return apply_filters('give_mexico_states', $states); |
|
| 1232 | 1232 | } |
| 1233 | 1233 | |
| 1234 | 1234 | /** |
@@ -1240,56 +1240,56 @@ discard block |
||
| 1240 | 1240 | function give_get_japan_states_list() { |
| 1241 | 1241 | $states = array( |
| 1242 | 1242 | '' => '', |
| 1243 | - 'JP01' => __( 'Hokkaido', 'give' ), |
|
| 1244 | - 'JP02' => __( 'Aomori', 'give' ), |
|
| 1245 | - 'JP03' => __( 'Iwate', 'give' ), |
|
| 1246 | - 'JP04' => __( 'Miyagi', 'give' ), |
|
| 1247 | - 'JP05' => __( 'Akita', 'give' ), |
|
| 1248 | - 'JP06' => __( 'Yamagata', 'give' ), |
|
| 1249 | - 'JP07' => __( 'Fukushima', 'give' ), |
|
| 1250 | - 'JP08' => __( 'Ibaraki', 'give' ), |
|
| 1251 | - 'JP09' => __( 'Tochigi', 'give' ), |
|
| 1252 | - 'JP10' => __( 'Gunma', 'give' ), |
|
| 1253 | - 'JP11' => __( 'Saitama', 'give' ), |
|
| 1254 | - 'JP12' => __( 'Chiba', 'give' ), |
|
| 1255 | - 'JP13' => __( 'Tokyo', 'give' ), |
|
| 1256 | - 'JP14' => __( 'Kanagawa', 'give' ), |
|
| 1257 | - 'JP15' => __( 'Niigata', 'give' ), |
|
| 1258 | - 'JP16' => __( 'Toyama', 'give' ), |
|
| 1259 | - 'JP17' => __( 'Ishikawa', 'give' ), |
|
| 1260 | - 'JP18' => __( 'Fukui', 'give' ), |
|
| 1261 | - 'JP19' => __( 'Yamanashi', 'give' ), |
|
| 1262 | - 'JP20' => __( 'Nagano', 'give' ), |
|
| 1263 | - 'JP21' => __( 'Gifu', 'give' ), |
|
| 1264 | - 'JP22' => __( 'Shizuoka', 'give' ), |
|
| 1265 | - 'JP23' => __( 'Aichi', 'give' ), |
|
| 1266 | - 'JP24' => __( 'Mie', 'give' ), |
|
| 1267 | - 'JP25' => __( 'Shiga', 'give' ), |
|
| 1268 | - 'JP26' => __( 'Kyoto', 'give' ), |
|
| 1269 | - 'JP27' => __( 'Osaka', 'give' ), |
|
| 1270 | - 'JP28' => __( 'Hyogo', 'give' ), |
|
| 1271 | - 'JP29' => __( 'Nara', 'give' ), |
|
| 1272 | - 'JP30' => __( 'Wakayama', 'give' ), |
|
| 1273 | - 'JP31' => __( 'Tottori', 'give' ), |
|
| 1274 | - 'JP32' => __( 'Shimane', 'give' ), |
|
| 1275 | - 'JP33' => __( 'Okayama', 'give' ), |
|
| 1276 | - 'JP34' => __( 'Hiroshima', 'give' ), |
|
| 1277 | - 'JP35' => __( 'Yamaguchi', 'give' ), |
|
| 1278 | - 'JP36' => __( 'Tokushima', 'give' ), |
|
| 1279 | - 'JP37' => __( 'Kagawa', 'give' ), |
|
| 1280 | - 'JP38' => __( 'Ehime', 'give' ), |
|
| 1281 | - 'JP39' => __( 'Kochi', 'give' ), |
|
| 1282 | - 'JP40' => __( 'Fukuoka', 'give' ), |
|
| 1283 | - 'JP41' => __( 'Saga', 'give' ), |
|
| 1284 | - 'JP42' => __( 'Nagasaki', 'give' ), |
|
| 1285 | - 'JP43' => __( 'Kumamoto', 'give' ), |
|
| 1286 | - 'JP44' => __( 'Oita', 'give' ), |
|
| 1287 | - 'JP45' => __( 'Miyazaki', 'give' ), |
|
| 1288 | - 'JP46' => __( 'Kagoshima', 'give' ), |
|
| 1289 | - 'JP47' => __( 'Okinawa', 'give' ), |
|
| 1243 | + 'JP01' => __('Hokkaido', 'give'), |
|
| 1244 | + 'JP02' => __('Aomori', 'give'), |
|
| 1245 | + 'JP03' => __('Iwate', 'give'), |
|
| 1246 | + 'JP04' => __('Miyagi', 'give'), |
|
| 1247 | + 'JP05' => __('Akita', 'give'), |
|
| 1248 | + 'JP06' => __('Yamagata', 'give'), |
|
| 1249 | + 'JP07' => __('Fukushima', 'give'), |
|
| 1250 | + 'JP08' => __('Ibaraki', 'give'), |
|
| 1251 | + 'JP09' => __('Tochigi', 'give'), |
|
| 1252 | + 'JP10' => __('Gunma', 'give'), |
|
| 1253 | + 'JP11' => __('Saitama', 'give'), |
|
| 1254 | + 'JP12' => __('Chiba', 'give'), |
|
| 1255 | + 'JP13' => __('Tokyo', 'give'), |
|
| 1256 | + 'JP14' => __('Kanagawa', 'give'), |
|
| 1257 | + 'JP15' => __('Niigata', 'give'), |
|
| 1258 | + 'JP16' => __('Toyama', 'give'), |
|
| 1259 | + 'JP17' => __('Ishikawa', 'give'), |
|
| 1260 | + 'JP18' => __('Fukui', 'give'), |
|
| 1261 | + 'JP19' => __('Yamanashi', 'give'), |
|
| 1262 | + 'JP20' => __('Nagano', 'give'), |
|
| 1263 | + 'JP21' => __('Gifu', 'give'), |
|
| 1264 | + 'JP22' => __('Shizuoka', 'give'), |
|
| 1265 | + 'JP23' => __('Aichi', 'give'), |
|
| 1266 | + 'JP24' => __('Mie', 'give'), |
|
| 1267 | + 'JP25' => __('Shiga', 'give'), |
|
| 1268 | + 'JP26' => __('Kyoto', 'give'), |
|
| 1269 | + 'JP27' => __('Osaka', 'give'), |
|
| 1270 | + 'JP28' => __('Hyogo', 'give'), |
|
| 1271 | + 'JP29' => __('Nara', 'give'), |
|
| 1272 | + 'JP30' => __('Wakayama', 'give'), |
|
| 1273 | + 'JP31' => __('Tottori', 'give'), |
|
| 1274 | + 'JP32' => __('Shimane', 'give'), |
|
| 1275 | + 'JP33' => __('Okayama', 'give'), |
|
| 1276 | + 'JP34' => __('Hiroshima', 'give'), |
|
| 1277 | + 'JP35' => __('Yamaguchi', 'give'), |
|
| 1278 | + 'JP36' => __('Tokushima', 'give'), |
|
| 1279 | + 'JP37' => __('Kagawa', 'give'), |
|
| 1280 | + 'JP38' => __('Ehime', 'give'), |
|
| 1281 | + 'JP39' => __('Kochi', 'give'), |
|
| 1282 | + 'JP40' => __('Fukuoka', 'give'), |
|
| 1283 | + 'JP41' => __('Saga', 'give'), |
|
| 1284 | + 'JP42' => __('Nagasaki', 'give'), |
|
| 1285 | + 'JP43' => __('Kumamoto', 'give'), |
|
| 1286 | + 'JP44' => __('Oita', 'give'), |
|
| 1287 | + 'JP45' => __('Miyazaki', 'give'), |
|
| 1288 | + 'JP46' => __('Kagoshima', 'give'), |
|
| 1289 | + 'JP47' => __('Okinawa', 'give'), |
|
| 1290 | 1290 | ); |
| 1291 | 1291 | |
| 1292 | - return apply_filters( 'give_japan_states', $states ); |
|
| 1292 | + return apply_filters('give_japan_states', $states); |
|
| 1293 | 1293 | } |
| 1294 | 1294 | |
| 1295 | 1295 | /** |
@@ -1301,119 +1301,119 @@ discard block |
||
| 1301 | 1301 | function give_get_italy_states_list() { |
| 1302 | 1302 | $states = array( |
| 1303 | 1303 | '' => '', |
| 1304 | - 'AG' => __( 'Agrigento', 'give' ), |
|
| 1305 | - 'AL' => __( 'Alessandria', 'give' ), |
|
| 1306 | - 'AN' => __( 'Ancona', 'give' ), |
|
| 1307 | - 'AO' => __( 'Aosta', 'give' ), |
|
| 1308 | - 'AR' => __( 'Arezzo', 'give' ), |
|
| 1309 | - 'AP' => __( 'Ascoli Piceno', 'give' ), |
|
| 1310 | - 'AT' => __( 'Asti', 'give' ), |
|
| 1311 | - 'AV' => __( 'Avellino', 'give' ), |
|
| 1312 | - 'BA' => __( 'Bari', 'give' ), |
|
| 1313 | - 'BT' => __( 'Barletta-Andria-Trani', 'give' ), |
|
| 1314 | - 'BL' => __( 'Belluno', 'give' ), |
|
| 1315 | - 'BN' => __( 'Benevento', 'give' ), |
|
| 1316 | - 'BG' => __( 'Bergamo', 'give' ), |
|
| 1317 | - 'BI' => __( 'Biella', 'give' ), |
|
| 1318 | - 'BO' => __( 'Bologna', 'give' ), |
|
| 1319 | - 'BZ' => __( 'Bolzano', 'give' ), |
|
| 1320 | - 'BS' => __( 'Brescia', 'give' ), |
|
| 1321 | - 'BR' => __( 'Brindisi', 'give' ), |
|
| 1322 | - 'CA' => __( 'Cagliari', 'give' ), |
|
| 1323 | - 'CL' => __( 'Caltanissetta', 'give' ), |
|
| 1324 | - 'CB' => __( 'Campobasso', 'give' ), |
|
| 1325 | - 'CI' => __( 'Carbonia-Iglesias', 'give' ), |
|
| 1326 | - 'CE' => __( 'Caserta', 'give' ), |
|
| 1327 | - 'CT' => __( 'Catania', 'give' ), |
|
| 1328 | - 'CZ' => __( 'Catanzaro', 'give' ), |
|
| 1329 | - 'CH' => __( 'Chieti', 'give' ), |
|
| 1330 | - 'CO' => __( 'Como', 'give' ), |
|
| 1331 | - 'CS' => __( 'Cosenza', 'give' ), |
|
| 1332 | - 'CR' => __( 'Cremona', 'give' ), |
|
| 1333 | - 'KR' => __( 'Crotone', 'give' ), |
|
| 1334 | - 'CN' => __( 'Cuneo', 'give' ), |
|
| 1335 | - 'EN' => __( 'Enna', 'give' ), |
|
| 1336 | - 'FM' => __( 'Fermo', 'give' ), |
|
| 1337 | - 'FE' => __( 'Ferrara', 'give' ), |
|
| 1338 | - 'FI' => __( 'Firenze', 'give' ), |
|
| 1339 | - 'FG' => __( 'Foggia', 'give' ), |
|
| 1340 | - 'FC' => __( 'Forlì-Cesena', 'give' ), |
|
| 1341 | - 'FR' => __( 'Frosinone', 'give' ), |
|
| 1342 | - 'GE' => __( 'Genova', 'give' ), |
|
| 1343 | - 'GO' => __( 'Gorizia', 'give' ), |
|
| 1344 | - 'GR' => __( 'Grosseto', 'give' ), |
|
| 1345 | - 'IM' => __( 'Imperia', 'give' ), |
|
| 1346 | - 'IS' => __( 'Isernia', 'give' ), |
|
| 1347 | - 'SP' => __( 'La Spezia', 'give' ), |
|
| 1348 | - 'AQ' => __( "L'Aquila", 'give' ), |
|
| 1349 | - 'LT' => __( 'Latina', 'give' ), |
|
| 1350 | - 'LE' => __( 'Lecce', 'give' ), |
|
| 1351 | - 'LC' => __( 'Lecco', 'give' ), |
|
| 1352 | - 'LI' => __( 'Livorno', 'give' ), |
|
| 1353 | - 'LO' => __( 'Lodi', 'give' ), |
|
| 1354 | - 'LU' => __( 'Lucca', 'give' ), |
|
| 1355 | - 'MC' => __( 'Macerata', 'give' ), |
|
| 1356 | - 'MN' => __( 'Mantova', 'give' ), |
|
| 1357 | - 'MS' => __( 'Massa-Carrara', 'give' ), |
|
| 1358 | - 'MT' => __( 'Matera', 'give' ), |
|
| 1359 | - 'ME' => __( 'Messina', 'give' ), |
|
| 1360 | - 'MI' => __( 'Milano', 'give' ), |
|
| 1361 | - 'MO' => __( 'Modena', 'give' ), |
|
| 1362 | - 'MB' => __( 'Monza e della Brianza', 'give' ), |
|
| 1363 | - 'NA' => __( 'Napoli', 'give' ), |
|
| 1364 | - 'NO' => __( 'Novara', 'give' ), |
|
| 1365 | - 'NU' => __( 'Nuoro', 'give' ), |
|
| 1366 | - 'OT' => __( 'Olbia-Tempio', 'give' ), |
|
| 1367 | - 'OR' => __( 'Oristano', 'give' ), |
|
| 1368 | - 'PD' => __( 'Padova', 'give' ), |
|
| 1369 | - 'PA' => __( 'Palermo', 'give' ), |
|
| 1370 | - 'PR' => __( 'Parma', 'give' ), |
|
| 1371 | - 'PV' => __( 'Pavia', 'give' ), |
|
| 1372 | - 'PG' => __( 'Perugia', 'give' ), |
|
| 1373 | - 'PU' => __( 'Pesaro e Urbino', 'give' ), |
|
| 1374 | - 'PE' => __( 'Pescara', 'give' ), |
|
| 1375 | - 'PC' => __( 'Piacenza', 'give' ), |
|
| 1376 | - 'PI' => __( 'Pisa', 'give' ), |
|
| 1377 | - 'PT' => __( 'Pistoia', 'give' ), |
|
| 1378 | - 'PN' => __( 'Pordenone', 'give' ), |
|
| 1379 | - 'PZ' => __( 'Potenza', 'give' ), |
|
| 1380 | - 'PO' => __( 'Prato', 'give' ), |
|
| 1381 | - 'RG' => __( 'Ragusa', 'give' ), |
|
| 1382 | - 'RA' => __( 'Ravenna', 'give' ), |
|
| 1383 | - 'RC' => __( 'Reggio Calabria', 'give' ), |
|
| 1384 | - 'RE' => __( 'Reggio Emilia', 'give' ), |
|
| 1385 | - 'RI' => __( 'Rieti', 'give' ), |
|
| 1386 | - 'RN' => __( 'Rimini', 'give' ), |
|
| 1387 | - 'RM' => __( 'Roma', 'give' ), |
|
| 1388 | - 'RO' => __( 'Rovigo', 'give' ), |
|
| 1389 | - 'SA' => __( 'Salerno', 'give' ), |
|
| 1390 | - 'VS' => __( 'Medio Campidano', 'give' ), |
|
| 1391 | - 'SS' => __( 'Sassari', 'give' ), |
|
| 1392 | - 'SV' => __( 'Savona', 'give' ), |
|
| 1393 | - 'SI' => __( 'Siena', 'give' ), |
|
| 1394 | - 'SR' => __( 'Siracusa', 'give' ), |
|
| 1395 | - 'SO' => __( 'Sondrio', 'give' ), |
|
| 1396 | - 'TA' => __( 'Taranto', 'give' ), |
|
| 1397 | - 'TE' => __( 'Teramo', 'give' ), |
|
| 1398 | - 'TR' => __( 'Terni', 'give' ), |
|
| 1399 | - 'TO' => __( 'Torino', 'give' ), |
|
| 1400 | - 'OG' => __( 'Ogliastra', 'give' ), |
|
| 1401 | - 'TP' => __( 'Trapani', 'give' ), |
|
| 1402 | - 'TN' => __( 'Trento', 'give' ), |
|
| 1403 | - 'TV' => __( 'Treviso', 'give' ), |
|
| 1404 | - 'TS' => __( 'Trieste', 'give' ), |
|
| 1405 | - 'UD' => __( 'Udine', 'give' ), |
|
| 1406 | - 'VA' => __( 'Varese', 'give' ), |
|
| 1407 | - 'VE' => __( 'Venezia', 'give' ), |
|
| 1408 | - 'VB' => __( 'Verbano-Cusio-Ossola', 'give' ), |
|
| 1409 | - 'VC' => __( 'Vercelli', 'give' ), |
|
| 1410 | - 'VR' => __( 'Verona', 'give' ), |
|
| 1411 | - 'VV' => __( 'Vibo Valentia', 'give' ), |
|
| 1412 | - 'VI' => __( 'Vicenza', 'give' ), |
|
| 1413 | - 'VT' => __( 'Viterbo', 'give' ), |
|
| 1304 | + 'AG' => __('Agrigento', 'give'), |
|
| 1305 | + 'AL' => __('Alessandria', 'give'), |
|
| 1306 | + 'AN' => __('Ancona', 'give'), |
|
| 1307 | + 'AO' => __('Aosta', 'give'), |
|
| 1308 | + 'AR' => __('Arezzo', 'give'), |
|
| 1309 | + 'AP' => __('Ascoli Piceno', 'give'), |
|
| 1310 | + 'AT' => __('Asti', 'give'), |
|
| 1311 | + 'AV' => __('Avellino', 'give'), |
|
| 1312 | + 'BA' => __('Bari', 'give'), |
|
| 1313 | + 'BT' => __('Barletta-Andria-Trani', 'give'), |
|
| 1314 | + 'BL' => __('Belluno', 'give'), |
|
| 1315 | + 'BN' => __('Benevento', 'give'), |
|
| 1316 | + 'BG' => __('Bergamo', 'give'), |
|
| 1317 | + 'BI' => __('Biella', 'give'), |
|
| 1318 | + 'BO' => __('Bologna', 'give'), |
|
| 1319 | + 'BZ' => __('Bolzano', 'give'), |
|
| 1320 | + 'BS' => __('Brescia', 'give'), |
|
| 1321 | + 'BR' => __('Brindisi', 'give'), |
|
| 1322 | + 'CA' => __('Cagliari', 'give'), |
|
| 1323 | + 'CL' => __('Caltanissetta', 'give'), |
|
| 1324 | + 'CB' => __('Campobasso', 'give'), |
|
| 1325 | + 'CI' => __('Carbonia-Iglesias', 'give'), |
|
| 1326 | + 'CE' => __('Caserta', 'give'), |
|
| 1327 | + 'CT' => __('Catania', 'give'), |
|
| 1328 | + 'CZ' => __('Catanzaro', 'give'), |
|
| 1329 | + 'CH' => __('Chieti', 'give'), |
|
| 1330 | + 'CO' => __('Como', 'give'), |
|
| 1331 | + 'CS' => __('Cosenza', 'give'), |
|
| 1332 | + 'CR' => __('Cremona', 'give'), |
|
| 1333 | + 'KR' => __('Crotone', 'give'), |
|
| 1334 | + 'CN' => __('Cuneo', 'give'), |
|
| 1335 | + 'EN' => __('Enna', 'give'), |
|
| 1336 | + 'FM' => __('Fermo', 'give'), |
|
| 1337 | + 'FE' => __('Ferrara', 'give'), |
|
| 1338 | + 'FI' => __('Firenze', 'give'), |
|
| 1339 | + 'FG' => __('Foggia', 'give'), |
|
| 1340 | + 'FC' => __('Forlì-Cesena', 'give'), |
|
| 1341 | + 'FR' => __('Frosinone', 'give'), |
|
| 1342 | + 'GE' => __('Genova', 'give'), |
|
| 1343 | + 'GO' => __('Gorizia', 'give'), |
|
| 1344 | + 'GR' => __('Grosseto', 'give'), |
|
| 1345 | + 'IM' => __('Imperia', 'give'), |
|
| 1346 | + 'IS' => __('Isernia', 'give'), |
|
| 1347 | + 'SP' => __('La Spezia', 'give'), |
|
| 1348 | + 'AQ' => __("L'Aquila", 'give'), |
|
| 1349 | + 'LT' => __('Latina', 'give'), |
|
| 1350 | + 'LE' => __('Lecce', 'give'), |
|
| 1351 | + 'LC' => __('Lecco', 'give'), |
|
| 1352 | + 'LI' => __('Livorno', 'give'), |
|
| 1353 | + 'LO' => __('Lodi', 'give'), |
|
| 1354 | + 'LU' => __('Lucca', 'give'), |
|
| 1355 | + 'MC' => __('Macerata', 'give'), |
|
| 1356 | + 'MN' => __('Mantova', 'give'), |
|
| 1357 | + 'MS' => __('Massa-Carrara', 'give'), |
|
| 1358 | + 'MT' => __('Matera', 'give'), |
|
| 1359 | + 'ME' => __('Messina', 'give'), |
|
| 1360 | + 'MI' => __('Milano', 'give'), |
|
| 1361 | + 'MO' => __('Modena', 'give'), |
|
| 1362 | + 'MB' => __('Monza e della Brianza', 'give'), |
|
| 1363 | + 'NA' => __('Napoli', 'give'), |
|
| 1364 | + 'NO' => __('Novara', 'give'), |
|
| 1365 | + 'NU' => __('Nuoro', 'give'), |
|
| 1366 | + 'OT' => __('Olbia-Tempio', 'give'), |
|
| 1367 | + 'OR' => __('Oristano', 'give'), |
|
| 1368 | + 'PD' => __('Padova', 'give'), |
|
| 1369 | + 'PA' => __('Palermo', 'give'), |
|
| 1370 | + 'PR' => __('Parma', 'give'), |
|
| 1371 | + 'PV' => __('Pavia', 'give'), |
|
| 1372 | + 'PG' => __('Perugia', 'give'), |
|
| 1373 | + 'PU' => __('Pesaro e Urbino', 'give'), |
|
| 1374 | + 'PE' => __('Pescara', 'give'), |
|
| 1375 | + 'PC' => __('Piacenza', 'give'), |
|
| 1376 | + 'PI' => __('Pisa', 'give'), |
|
| 1377 | + 'PT' => __('Pistoia', 'give'), |
|
| 1378 | + 'PN' => __('Pordenone', 'give'), |
|
| 1379 | + 'PZ' => __('Potenza', 'give'), |
|
| 1380 | + 'PO' => __('Prato', 'give'), |
|
| 1381 | + 'RG' => __('Ragusa', 'give'), |
|
| 1382 | + 'RA' => __('Ravenna', 'give'), |
|
| 1383 | + 'RC' => __('Reggio Calabria', 'give'), |
|
| 1384 | + 'RE' => __('Reggio Emilia', 'give'), |
|
| 1385 | + 'RI' => __('Rieti', 'give'), |
|
| 1386 | + 'RN' => __('Rimini', 'give'), |
|
| 1387 | + 'RM' => __('Roma', 'give'), |
|
| 1388 | + 'RO' => __('Rovigo', 'give'), |
|
| 1389 | + 'SA' => __('Salerno', 'give'), |
|
| 1390 | + 'VS' => __('Medio Campidano', 'give'), |
|
| 1391 | + 'SS' => __('Sassari', 'give'), |
|
| 1392 | + 'SV' => __('Savona', 'give'), |
|
| 1393 | + 'SI' => __('Siena', 'give'), |
|
| 1394 | + 'SR' => __('Siracusa', 'give'), |
|
| 1395 | + 'SO' => __('Sondrio', 'give'), |
|
| 1396 | + 'TA' => __('Taranto', 'give'), |
|
| 1397 | + 'TE' => __('Teramo', 'give'), |
|
| 1398 | + 'TR' => __('Terni', 'give'), |
|
| 1399 | + 'TO' => __('Torino', 'give'), |
|
| 1400 | + 'OG' => __('Ogliastra', 'give'), |
|
| 1401 | + 'TP' => __('Trapani', 'give'), |
|
| 1402 | + 'TN' => __('Trento', 'give'), |
|
| 1403 | + 'TV' => __('Treviso', 'give'), |
|
| 1404 | + 'TS' => __('Trieste', 'give'), |
|
| 1405 | + 'UD' => __('Udine', 'give'), |
|
| 1406 | + 'VA' => __('Varese', 'give'), |
|
| 1407 | + 'VE' => __('Venezia', 'give'), |
|
| 1408 | + 'VB' => __('Verbano-Cusio-Ossola', 'give'), |
|
| 1409 | + 'VC' => __('Vercelli', 'give'), |
|
| 1410 | + 'VR' => __('Verona', 'give'), |
|
| 1411 | + 'VV' => __('Vibo Valentia', 'give'), |
|
| 1412 | + 'VI' => __('Vicenza', 'give'), |
|
| 1413 | + 'VT' => __('Viterbo', 'give'), |
|
| 1414 | 1414 | ); |
| 1415 | 1415 | |
| 1416 | - return apply_filters( 'give_italy_states', $states ); |
|
| 1416 | + return apply_filters('give_italy_states', $states); |
|
| 1417 | 1417 | } |
| 1418 | 1418 | |
| 1419 | 1419 | /** |
@@ -1425,40 +1425,40 @@ discard block |
||
| 1425 | 1425 | function give_get_iran_states_list() { |
| 1426 | 1426 | $states = array( |
| 1427 | 1427 | '' => '', |
| 1428 | - 'KHZ' => __( 'Khuzestan (خوزستان)', 'give' ), |
|
| 1429 | - 'THR' => __( 'Tehran (تهران)', 'give' ), |
|
| 1430 | - 'ILM' => __( 'Ilaam (ایلام)', 'give' ), |
|
| 1431 | - 'BHR' => __( 'Bushehr (بوشهر)', 'give' ), |
|
| 1432 | - 'ADL' => __( 'Ardabil (اردبیل)', 'give' ), |
|
| 1433 | - 'ESF' => __( 'Isfahan (اصفهان)', 'give' ), |
|
| 1434 | - 'YZD' => __( 'Yazd (یزد)', 'give' ), |
|
| 1435 | - 'KRH' => __( 'Kermanshah (کرمانشاه)', 'give' ), |
|
| 1436 | - 'KRN' => __( 'Kerman (کرمان)', 'give' ), |
|
| 1437 | - 'HDN' => __( 'Hamadan (همدان)', 'give' ), |
|
| 1438 | - 'GZN' => __( 'Ghazvin (قزوین)', 'give' ), |
|
| 1439 | - 'ZJN' => __( 'Zanjan (زنجان)', 'give' ), |
|
| 1440 | - 'LRS' => __( 'Luristan (لرستان)', 'give' ), |
|
| 1441 | - 'ABZ' => __( 'Alborz (البرز)', 'give' ), |
|
| 1442 | - 'EAZ' => __( 'East Azarbaijan (آذربایجان شرقی)', 'give' ), |
|
| 1443 | - 'WAZ' => __( 'West Azarbaijan (آذربایجان غربی)', 'give' ), |
|
| 1444 | - 'CHB' => __( 'Chaharmahal and Bakhtiari (چهارمحال و بختیاری)', 'give' ), |
|
| 1445 | - 'SKH' => __( 'South Khorasan (خراسان جنوبی)', 'give' ), |
|
| 1446 | - 'RKH' => __( 'Razavi Khorasan (خراسان رضوی)', 'give' ), |
|
| 1447 | - 'NKH' => __( 'North Khorasan (خراسان جنوبی)', 'give' ), |
|
| 1448 | - 'SMN' => __( 'Semnan (سمنان)', 'give' ), |
|
| 1449 | - 'FRS' => __( 'Fars (فارس)', 'give' ), |
|
| 1450 | - 'QHM' => __( 'Qom (قم)', 'give' ), |
|
| 1451 | - 'KRD' => __( 'Kurdistan / کردستان)', 'give' ), |
|
| 1452 | - 'KBD' => __( 'Kohgiluyeh and BoyerAhmad (کهگیلوییه و بویراحمد)', 'give' ), |
|
| 1453 | - 'GLS' => __( 'Golestan (گلستان)', 'give' ), |
|
| 1454 | - 'GIL' => __( 'Gilan (گیلان)', 'give' ), |
|
| 1455 | - 'MZN' => __( 'Mazandaran (مازندران)', 'give' ), |
|
| 1456 | - 'MKZ' => __( 'Markazi (مرکزی)', 'give' ), |
|
| 1457 | - 'HRZ' => __( 'Hormozgan (هرمزگان)', 'give' ), |
|
| 1458 | - 'SBN' => __( 'Sistan and Baluchestan (سیستان و بلوچستان)', 'give' ), |
|
| 1428 | + 'KHZ' => __('Khuzestan (خوزستان)', 'give'), |
|
| 1429 | + 'THR' => __('Tehran (تهران)', 'give'), |
|
| 1430 | + 'ILM' => __('Ilaam (ایلام)', 'give'), |
|
| 1431 | + 'BHR' => __('Bushehr (بوشهر)', 'give'), |
|
| 1432 | + 'ADL' => __('Ardabil (اردبیل)', 'give'), |
|
| 1433 | + 'ESF' => __('Isfahan (اصفهان)', 'give'), |
|
| 1434 | + 'YZD' => __('Yazd (یزد)', 'give'), |
|
| 1435 | + 'KRH' => __('Kermanshah (کرمانشاه)', 'give'), |
|
| 1436 | + 'KRN' => __('Kerman (کرمان)', 'give'), |
|
| 1437 | + 'HDN' => __('Hamadan (همدان)', 'give'), |
|
| 1438 | + 'GZN' => __('Ghazvin (قزوین)', 'give'), |
|
| 1439 | + 'ZJN' => __('Zanjan (زنجان)', 'give'), |
|
| 1440 | + 'LRS' => __('Luristan (لرستان)', 'give'), |
|
| 1441 | + 'ABZ' => __('Alborz (البرز)', 'give'), |
|
| 1442 | + 'EAZ' => __('East Azarbaijan (آذربایجان شرقی)', 'give'), |
|
| 1443 | + 'WAZ' => __('West Azarbaijan (آذربایجان غربی)', 'give'), |
|
| 1444 | + 'CHB' => __('Chaharmahal and Bakhtiari (چهارمحال و بختیاری)', 'give'), |
|
| 1445 | + 'SKH' => __('South Khorasan (خراسان جنوبی)', 'give'), |
|
| 1446 | + 'RKH' => __('Razavi Khorasan (خراسان رضوی)', 'give'), |
|
| 1447 | + 'NKH' => __('North Khorasan (خراسان جنوبی)', 'give'), |
|
| 1448 | + 'SMN' => __('Semnan (سمنان)', 'give'), |
|
| 1449 | + 'FRS' => __('Fars (فارس)', 'give'), |
|
| 1450 | + 'QHM' => __('Qom (قم)', 'give'), |
|
| 1451 | + 'KRD' => __('Kurdistan / کردستان)', 'give'), |
|
| 1452 | + 'KBD' => __('Kohgiluyeh and BoyerAhmad (کهگیلوییه و بویراحمد)', 'give'), |
|
| 1453 | + 'GLS' => __('Golestan (گلستان)', 'give'), |
|
| 1454 | + 'GIL' => __('Gilan (گیلان)', 'give'), |
|
| 1455 | + 'MZN' => __('Mazandaran (مازندران)', 'give'), |
|
| 1456 | + 'MKZ' => __('Markazi (مرکزی)', 'give'), |
|
| 1457 | + 'HRZ' => __('Hormozgan (هرمزگان)', 'give'), |
|
| 1458 | + 'SBN' => __('Sistan and Baluchestan (سیستان و بلوچستان)', 'give'), |
|
| 1459 | 1459 | ); |
| 1460 | 1460 | |
| 1461 | - return apply_filters( 'give_iran_states', $states ); |
|
| 1461 | + return apply_filters('give_iran_states', $states); |
|
| 1462 | 1462 | } |
| 1463 | 1463 | |
| 1464 | 1464 | /** |
@@ -1470,35 +1470,35 @@ discard block |
||
| 1470 | 1470 | function give_get_ireland_states_list() { |
| 1471 | 1471 | $states = array( |
| 1472 | 1472 | '' => '', |
| 1473 | - 'CE' => __( 'Clare', 'give' ), |
|
| 1474 | - 'CK' => __( 'Cork', 'give' ), |
|
| 1475 | - 'CN' => __( 'Cavan', 'give' ), |
|
| 1476 | - 'CW' => __( 'Carlow', 'give' ), |
|
| 1477 | - 'DL' => __( 'Donegal', 'give' ), |
|
| 1478 | - 'DN' => __( 'Dublin', 'give' ), |
|
| 1479 | - 'GY' => __( 'Galway', 'give' ), |
|
| 1480 | - 'KE' => __( 'Kildare', 'give' ), |
|
| 1481 | - 'KK' => __( 'Kilkenny', 'give' ), |
|
| 1482 | - 'KY' => __( 'Kerry', 'give' ), |
|
| 1483 | - 'LD' => __( 'Longford', 'give' ), |
|
| 1484 | - 'LH' => __( 'Louth', 'give' ), |
|
| 1485 | - 'LK' => __( 'Limerick', 'give' ), |
|
| 1486 | - 'LM' => __( 'Leitrim', 'give' ), |
|
| 1487 | - 'LS' => __( 'Laois', 'give' ), |
|
| 1488 | - 'MH' => __( 'Meath', 'give' ), |
|
| 1489 | - 'MN' => __( 'Monaghan', 'give' ), |
|
| 1490 | - 'MO' => __( 'Mayo', 'give' ), |
|
| 1491 | - 'OY' => __( 'Offaly', 'give' ), |
|
| 1492 | - 'RN' => __( 'Roscommon', 'give' ), |
|
| 1493 | - 'SO' => __( 'Sligo', 'give' ), |
|
| 1494 | - 'TY' => __( 'Tipperary', 'give' ), |
|
| 1495 | - 'WD' => __( 'Waterford', 'give' ), |
|
| 1496 | - 'WH' => __( 'Westmeath', 'give' ), |
|
| 1497 | - 'WW' => __( 'Wicklow', 'give' ), |
|
| 1498 | - 'WX' => __( 'Wexford', 'give' ), |
|
| 1473 | + 'CE' => __('Clare', 'give'), |
|
| 1474 | + 'CK' => __('Cork', 'give'), |
|
| 1475 | + 'CN' => __('Cavan', 'give'), |
|
| 1476 | + 'CW' => __('Carlow', 'give'), |
|
| 1477 | + 'DL' => __('Donegal', 'give'), |
|
| 1478 | + 'DN' => __('Dublin', 'give'), |
|
| 1479 | + 'GY' => __('Galway', 'give'), |
|
| 1480 | + 'KE' => __('Kildare', 'give'), |
|
| 1481 | + 'KK' => __('Kilkenny', 'give'), |
|
| 1482 | + 'KY' => __('Kerry', 'give'), |
|
| 1483 | + 'LD' => __('Longford', 'give'), |
|
| 1484 | + 'LH' => __('Louth', 'give'), |
|
| 1485 | + 'LK' => __('Limerick', 'give'), |
|
| 1486 | + 'LM' => __('Leitrim', 'give'), |
|
| 1487 | + 'LS' => __('Laois', 'give'), |
|
| 1488 | + 'MH' => __('Meath', 'give'), |
|
| 1489 | + 'MN' => __('Monaghan', 'give'), |
|
| 1490 | + 'MO' => __('Mayo', 'give'), |
|
| 1491 | + 'OY' => __('Offaly', 'give'), |
|
| 1492 | + 'RN' => __('Roscommon', 'give'), |
|
| 1493 | + 'SO' => __('Sligo', 'give'), |
|
| 1494 | + 'TY' => __('Tipperary', 'give'), |
|
| 1495 | + 'WD' => __('Waterford', 'give'), |
|
| 1496 | + 'WH' => __('Westmeath', 'give'), |
|
| 1497 | + 'WW' => __('Wicklow', 'give'), |
|
| 1498 | + 'WX' => __('Wexford', 'give'), |
|
| 1499 | 1499 | ); |
| 1500 | 1500 | |
| 1501 | - return apply_filters( 'give_ireland_states', $states ); |
|
| 1501 | + return apply_filters('give_ireland_states', $states); |
|
| 1502 | 1502 | } |
| 1503 | 1503 | |
| 1504 | 1504 | /** |
@@ -1510,22 +1510,22 @@ discard block |
||
| 1510 | 1510 | function give_get_greek_states_list() { |
| 1511 | 1511 | $states = array( |
| 1512 | 1512 | '' => '', |
| 1513 | - 'I' => __( 'Αττική', 'give' ), |
|
| 1514 | - 'A' => __( 'Ανατολική Μακεδονία και Θράκη', 'give' ), |
|
| 1515 | - 'B' => __( 'Κεντρική Μακεδονία', 'give' ), |
|
| 1516 | - 'C' => __( 'Δυτική Μακεδονία', 'give' ), |
|
| 1517 | - 'D' => __( 'Ήπειρος', 'give' ), |
|
| 1518 | - 'E' => __( 'Θεσσαλία', 'give' ), |
|
| 1519 | - 'F' => __( 'Ιόνιοι Νήσοι', 'give' ), |
|
| 1520 | - 'G' => __( 'Δυτική Ελλάδα', 'give' ), |
|
| 1521 | - 'H' => __( 'Στερεά Ελλάδα', 'give' ), |
|
| 1522 | - 'J' => __( 'Πελοπόννησος', 'give' ), |
|
| 1523 | - 'K' => __( 'Βόρειο Αιγαίο', 'give' ), |
|
| 1524 | - 'L' => __( 'Νότιο Αιγαίο', 'give' ), |
|
| 1525 | - 'M' => __( 'Κρήτη', 'give' ), |
|
| 1513 | + 'I' => __('Αττική', 'give'), |
|
| 1514 | + 'A' => __('Ανατολική Μακεδονία και Θράκη', 'give'), |
|
| 1515 | + 'B' => __('Κεντρική Μακεδονία', 'give'), |
|
| 1516 | + 'C' => __('Δυτική Μακεδονία', 'give'), |
|
| 1517 | + 'D' => __('Ήπειρος', 'give'), |
|
| 1518 | + 'E' => __('Θεσσαλία', 'give'), |
|
| 1519 | + 'F' => __('Ιόνιοι Νήσοι', 'give'), |
|
| 1520 | + 'G' => __('Δυτική Ελλάδα', 'give'), |
|
| 1521 | + 'H' => __('Στερεά Ελλάδα', 'give'), |
|
| 1522 | + 'J' => __('Πελοπόννησος', 'give'), |
|
| 1523 | + 'K' => __('Βόρειο Αιγαίο', 'give'), |
|
| 1524 | + 'L' => __('Νότιο Αιγαίο', 'give'), |
|
| 1525 | + 'M' => __('Κρήτη', 'give'), |
|
| 1526 | 1526 | ); |
| 1527 | 1527 | |
| 1528 | - return apply_filters( 'give_greek_states', $states ); |
|
| 1528 | + return apply_filters('give_greek_states', $states); |
|
| 1529 | 1529 | } |
| 1530 | 1530 | |
| 1531 | 1531 | /** |
@@ -1537,18 +1537,18 @@ discard block |
||
| 1537 | 1537 | function give_get_bolivian_states_list() { |
| 1538 | 1538 | $states = array( |
| 1539 | 1539 | '' => '', |
| 1540 | - 'B' => __( 'Chuquisaca', 'give' ), |
|
| 1541 | - 'H' => __( 'Beni', 'give' ), |
|
| 1542 | - 'C' => __( 'Cochabamba', 'give' ), |
|
| 1543 | - 'L' => __( 'La Paz', 'give' ), |
|
| 1544 | - 'O' => __( 'Oruro', 'give' ), |
|
| 1545 | - 'N' => __( 'Pando', 'give' ), |
|
| 1546 | - 'P' => __( 'Potosí', 'give' ), |
|
| 1547 | - 'S' => __( 'Santa Cruz', 'give' ), |
|
| 1548 | - 'T' => __( 'Tarija', 'give' ), |
|
| 1540 | + 'B' => __('Chuquisaca', 'give'), |
|
| 1541 | + 'H' => __('Beni', 'give'), |
|
| 1542 | + 'C' => __('Cochabamba', 'give'), |
|
| 1543 | + 'L' => __('La Paz', 'give'), |
|
| 1544 | + 'O' => __('Oruro', 'give'), |
|
| 1545 | + 'N' => __('Pando', 'give'), |
|
| 1546 | + 'P' => __('Potosí', 'give'), |
|
| 1547 | + 'S' => __('Santa Cruz', 'give'), |
|
| 1548 | + 'T' => __('Tarija', 'give'), |
|
| 1549 | 1549 | ); |
| 1550 | 1550 | |
| 1551 | - return apply_filters( 'give_bolivian_states', $states ); |
|
| 1551 | + return apply_filters('give_bolivian_states', $states); |
|
| 1552 | 1552 | } |
| 1553 | 1553 | |
| 1554 | 1554 | /** |
@@ -1560,37 +1560,37 @@ discard block |
||
| 1560 | 1560 | function give_get_bulgarian_states_list() { |
| 1561 | 1561 | $states = array( |
| 1562 | 1562 | '' => '', |
| 1563 | - 'BG-01' => __( 'Blagoevgrad', 'give' ), |
|
| 1564 | - 'BG-02' => __( 'Burgas', 'give' ), |
|
| 1565 | - 'BG-08' => __( 'Dobrich', 'give' ), |
|
| 1566 | - 'BG-07' => __( 'Gabrovo', 'give' ), |
|
| 1567 | - 'BG-26' => __( 'Haskovo', 'give' ), |
|
| 1568 | - 'BG-09' => __( 'Kardzhali', 'give' ), |
|
| 1569 | - 'BG-10' => __( 'Kyustendil', 'give' ), |
|
| 1570 | - 'BG-11' => __( 'Lovech', 'give' ), |
|
| 1571 | - 'BG-12' => __( 'Montana', 'give' ), |
|
| 1572 | - 'BG-13' => __( 'Pazardzhik', 'give' ), |
|
| 1573 | - 'BG-14' => __( 'Pernik', 'give' ), |
|
| 1574 | - 'BG-15' => __( 'Pleven', 'give' ), |
|
| 1575 | - 'BG-16' => __( 'Plovdiv', 'give' ), |
|
| 1576 | - 'BG-17' => __( 'Razgrad', 'give' ), |
|
| 1577 | - 'BG-18' => __( 'Ruse', 'give' ), |
|
| 1578 | - 'BG-27' => __( 'Shumen', 'give' ), |
|
| 1579 | - 'BG-19' => __( 'Silistra', 'give' ), |
|
| 1580 | - 'BG-20' => __( 'Sliven', 'give' ), |
|
| 1581 | - 'BG-21' => __( 'Smolyan', 'give' ), |
|
| 1582 | - 'BG-23' => __( 'Sofia', 'give' ), |
|
| 1583 | - 'BG-22' => __( 'Sofia-Grad', 'give' ), |
|
| 1584 | - 'BG-24' => __( 'Stara Zagora', 'give' ), |
|
| 1585 | - 'BG-25' => __( 'Targovishte', 'give' ), |
|
| 1586 | - 'BG-03' => __( 'Varna', 'give' ), |
|
| 1587 | - 'BG-04' => __( 'Veliko Tarnovo', 'give' ), |
|
| 1588 | - 'BG-05' => __( 'Vidin', 'give' ), |
|
| 1589 | - 'BG-06' => __( 'Vratsa', 'give' ), |
|
| 1590 | - 'BG-28' => __( 'Yambol', 'give' ), |
|
| 1563 | + 'BG-01' => __('Blagoevgrad', 'give'), |
|
| 1564 | + 'BG-02' => __('Burgas', 'give'), |
|
| 1565 | + 'BG-08' => __('Dobrich', 'give'), |
|
| 1566 | + 'BG-07' => __('Gabrovo', 'give'), |
|
| 1567 | + 'BG-26' => __('Haskovo', 'give'), |
|
| 1568 | + 'BG-09' => __('Kardzhali', 'give'), |
|
| 1569 | + 'BG-10' => __('Kyustendil', 'give'), |
|
| 1570 | + 'BG-11' => __('Lovech', 'give'), |
|
| 1571 | + 'BG-12' => __('Montana', 'give'), |
|
| 1572 | + 'BG-13' => __('Pazardzhik', 'give'), |
|
| 1573 | + 'BG-14' => __('Pernik', 'give'), |
|
| 1574 | + 'BG-15' => __('Pleven', 'give'), |
|
| 1575 | + 'BG-16' => __('Plovdiv', 'give'), |
|
| 1576 | + 'BG-17' => __('Razgrad', 'give'), |
|
| 1577 | + 'BG-18' => __('Ruse', 'give'), |
|
| 1578 | + 'BG-27' => __('Shumen', 'give'), |
|
| 1579 | + 'BG-19' => __('Silistra', 'give'), |
|
| 1580 | + 'BG-20' => __('Sliven', 'give'), |
|
| 1581 | + 'BG-21' => __('Smolyan', 'give'), |
|
| 1582 | + 'BG-23' => __('Sofia', 'give'), |
|
| 1583 | + 'BG-22' => __('Sofia-Grad', 'give'), |
|
| 1584 | + 'BG-24' => __('Stara Zagora', 'give'), |
|
| 1585 | + 'BG-25' => __('Targovishte', 'give'), |
|
| 1586 | + 'BG-03' => __('Varna', 'give'), |
|
| 1587 | + 'BG-04' => __('Veliko Tarnovo', 'give'), |
|
| 1588 | + 'BG-05' => __('Vidin', 'give'), |
|
| 1589 | + 'BG-06' => __('Vratsa', 'give'), |
|
| 1590 | + 'BG-28' => __('Yambol', 'give'), |
|
| 1591 | 1591 | ); |
| 1592 | 1592 | |
| 1593 | - return apply_filters( 'give_bulgarian_states', $states ); |
|
| 1593 | + return apply_filters('give_bulgarian_states', $states); |
|
| 1594 | 1594 | } |
| 1595 | 1595 | |
| 1596 | 1596 | /** |
@@ -1602,73 +1602,73 @@ discard block |
||
| 1602 | 1602 | function give_get_bangladeshi_states_list() { |
| 1603 | 1603 | $states = array( |
| 1604 | 1604 | '' => '', |
| 1605 | - 'BAG' => __( 'Bagerhat', 'give' ), |
|
| 1606 | - 'BAN' => __( 'Bandarban', 'give' ), |
|
| 1607 | - 'BAR' => __( 'Barguna', 'give' ), |
|
| 1608 | - 'BARI' => __( 'Barisal', 'give' ), |
|
| 1609 | - 'BHO' => __( 'Bhola', 'give' ), |
|
| 1610 | - 'BOG' => __( 'Bogra', 'give' ), |
|
| 1611 | - 'BRA' => __( 'Brahmanbaria', 'give' ), |
|
| 1612 | - 'CHA' => __( 'Chandpur', 'give' ), |
|
| 1613 | - 'CHI' => __( 'Chittagong', 'give' ), |
|
| 1614 | - 'CHU' => __( 'Chuadanga', 'give' ), |
|
| 1615 | - 'COM' => __( 'Comilla', 'give' ), |
|
| 1616 | - 'COX' => __( "Cox's Bazar", 'give' ), |
|
| 1617 | - 'DHA' => __( 'Dhaka', 'give' ), |
|
| 1618 | - 'DIN' => __( 'Dinajpur', 'give' ), |
|
| 1619 | - 'FAR' => __( 'Faridpur ', 'give' ), |
|
| 1620 | - 'FEN' => __( 'Feni', 'give' ), |
|
| 1621 | - 'GAI' => __( 'Gaibandha', 'give' ), |
|
| 1622 | - 'GAZI' => __( 'Gazipur', 'give' ), |
|
| 1623 | - 'GOP' => __( 'Gopalganj', 'give' ), |
|
| 1624 | - 'HAB' => __( 'Habiganj', 'give' ), |
|
| 1625 | - 'JAM' => __( 'Jamalpur', 'give' ), |
|
| 1626 | - 'JES' => __( 'Jessore', 'give' ), |
|
| 1627 | - 'JHA' => __( 'Jhalokati', 'give' ), |
|
| 1628 | - 'JHE' => __( 'Jhenaidah', 'give' ), |
|
| 1629 | - 'JOY' => __( 'Joypurhat', 'give' ), |
|
| 1630 | - 'KHA' => __( 'Khagrachhari', 'give' ), |
|
| 1631 | - 'KHU' => __( 'Khulna', 'give' ), |
|
| 1632 | - 'KIS' => __( 'Kishoreganj', 'give' ), |
|
| 1633 | - 'KUR' => __( 'Kurigram', 'give' ), |
|
| 1634 | - 'KUS' => __( 'Kushtia', 'give' ), |
|
| 1635 | - 'LAK' => __( 'Lakshmipur', 'give' ), |
|
| 1636 | - 'LAL' => __( 'Lalmonirhat', 'give' ), |
|
| 1637 | - 'MAD' => __( 'Madaripur', 'give' ), |
|
| 1638 | - 'MAG' => __( 'Magura', 'give' ), |
|
| 1639 | - 'MAN' => __( 'Manikganj ', 'give' ), |
|
| 1640 | - 'MEH' => __( 'Meherpur', 'give' ), |
|
| 1641 | - 'MOU' => __( 'Moulvibazar', 'give' ), |
|
| 1642 | - 'MUN' => __( 'Munshiganj', 'give' ), |
|
| 1643 | - 'MYM' => __( 'Mymensingh', 'give' ), |
|
| 1644 | - 'NAO' => __( 'Naogaon', 'give' ), |
|
| 1645 | - 'NAR' => __( 'Narail', 'give' ), |
|
| 1646 | - 'NARG' => __( 'Narayanganj', 'give' ), |
|
| 1647 | - 'NARD' => __( 'Narsingdi', 'give' ), |
|
| 1648 | - 'NAT' => __( 'Natore', 'give' ), |
|
| 1649 | - 'NAW' => __( 'Nawabganj', 'give' ), |
|
| 1650 | - 'NET' => __( 'Netrakona', 'give' ), |
|
| 1651 | - 'NIL' => __( 'Nilphamari', 'give' ), |
|
| 1652 | - 'NOA' => __( 'Noakhali', 'give' ), |
|
| 1653 | - 'PAB' => __( 'Pabna', 'give' ), |
|
| 1654 | - 'PAN' => __( 'Panchagarh', 'give' ), |
|
| 1655 | - 'PAT' => __( 'Patuakhali', 'give' ), |
|
| 1656 | - 'PIR' => __( 'Pirojpur', 'give' ), |
|
| 1657 | - 'RAJB' => __( 'Rajbari', 'give' ), |
|
| 1658 | - 'RAJ' => __( 'Rajshahi', 'give' ), |
|
| 1659 | - 'RAN' => __( 'Rangamati', 'give' ), |
|
| 1660 | - 'RANP' => __( 'Rangpur', 'give' ), |
|
| 1661 | - 'SAT' => __( 'Satkhira', 'give' ), |
|
| 1662 | - 'SHA' => __( 'Shariatpur', 'give' ), |
|
| 1663 | - 'SHE' => __( 'Sherpur', 'give' ), |
|
| 1664 | - 'SIR' => __( 'Sirajganj', 'give' ), |
|
| 1665 | - 'SUN' => __( 'Sunamganj', 'give' ), |
|
| 1666 | - 'SYL' => __( 'Sylhet', 'give' ), |
|
| 1667 | - 'TAN' => __( 'Tangail', 'give' ), |
|
| 1668 | - 'THA' => __( 'Thakurgaon', 'give' ), |
|
| 1605 | + 'BAG' => __('Bagerhat', 'give'), |
|
| 1606 | + 'BAN' => __('Bandarban', 'give'), |
|
| 1607 | + 'BAR' => __('Barguna', 'give'), |
|
| 1608 | + 'BARI' => __('Barisal', 'give'), |
|
| 1609 | + 'BHO' => __('Bhola', 'give'), |
|
| 1610 | + 'BOG' => __('Bogra', 'give'), |
|
| 1611 | + 'BRA' => __('Brahmanbaria', 'give'), |
|
| 1612 | + 'CHA' => __('Chandpur', 'give'), |
|
| 1613 | + 'CHI' => __('Chittagong', 'give'), |
|
| 1614 | + 'CHU' => __('Chuadanga', 'give'), |
|
| 1615 | + 'COM' => __('Comilla', 'give'), |
|
| 1616 | + 'COX' => __("Cox's Bazar", 'give'), |
|
| 1617 | + 'DHA' => __('Dhaka', 'give'), |
|
| 1618 | + 'DIN' => __('Dinajpur', 'give'), |
|
| 1619 | + 'FAR' => __('Faridpur ', 'give'), |
|
| 1620 | + 'FEN' => __('Feni', 'give'), |
|
| 1621 | + 'GAI' => __('Gaibandha', 'give'), |
|
| 1622 | + 'GAZI' => __('Gazipur', 'give'), |
|
| 1623 | + 'GOP' => __('Gopalganj', 'give'), |
|
| 1624 | + 'HAB' => __('Habiganj', 'give'), |
|
| 1625 | + 'JAM' => __('Jamalpur', 'give'), |
|
| 1626 | + 'JES' => __('Jessore', 'give'), |
|
| 1627 | + 'JHA' => __('Jhalokati', 'give'), |
|
| 1628 | + 'JHE' => __('Jhenaidah', 'give'), |
|
| 1629 | + 'JOY' => __('Joypurhat', 'give'), |
|
| 1630 | + 'KHA' => __('Khagrachhari', 'give'), |
|
| 1631 | + 'KHU' => __('Khulna', 'give'), |
|
| 1632 | + 'KIS' => __('Kishoreganj', 'give'), |
|
| 1633 | + 'KUR' => __('Kurigram', 'give'), |
|
| 1634 | + 'KUS' => __('Kushtia', 'give'), |
|
| 1635 | + 'LAK' => __('Lakshmipur', 'give'), |
|
| 1636 | + 'LAL' => __('Lalmonirhat', 'give'), |
|
| 1637 | + 'MAD' => __('Madaripur', 'give'), |
|
| 1638 | + 'MAG' => __('Magura', 'give'), |
|
| 1639 | + 'MAN' => __('Manikganj ', 'give'), |
|
| 1640 | + 'MEH' => __('Meherpur', 'give'), |
|
| 1641 | + 'MOU' => __('Moulvibazar', 'give'), |
|
| 1642 | + 'MUN' => __('Munshiganj', 'give'), |
|
| 1643 | + 'MYM' => __('Mymensingh', 'give'), |
|
| 1644 | + 'NAO' => __('Naogaon', 'give'), |
|
| 1645 | + 'NAR' => __('Narail', 'give'), |
|
| 1646 | + 'NARG' => __('Narayanganj', 'give'), |
|
| 1647 | + 'NARD' => __('Narsingdi', 'give'), |
|
| 1648 | + 'NAT' => __('Natore', 'give'), |
|
| 1649 | + 'NAW' => __('Nawabganj', 'give'), |
|
| 1650 | + 'NET' => __('Netrakona', 'give'), |
|
| 1651 | + 'NIL' => __('Nilphamari', 'give'), |
|
| 1652 | + 'NOA' => __('Noakhali', 'give'), |
|
| 1653 | + 'PAB' => __('Pabna', 'give'), |
|
| 1654 | + 'PAN' => __('Panchagarh', 'give'), |
|
| 1655 | + 'PAT' => __('Patuakhali', 'give'), |
|
| 1656 | + 'PIR' => __('Pirojpur', 'give'), |
|
| 1657 | + 'RAJB' => __('Rajbari', 'give'), |
|
| 1658 | + 'RAJ' => __('Rajshahi', 'give'), |
|
| 1659 | + 'RAN' => __('Rangamati', 'give'), |
|
| 1660 | + 'RANP' => __('Rangpur', 'give'), |
|
| 1661 | + 'SAT' => __('Satkhira', 'give'), |
|
| 1662 | + 'SHA' => __('Shariatpur', 'give'), |
|
| 1663 | + 'SHE' => __('Sherpur', 'give'), |
|
| 1664 | + 'SIR' => __('Sirajganj', 'give'), |
|
| 1665 | + 'SUN' => __('Sunamganj', 'give'), |
|
| 1666 | + 'SYL' => __('Sylhet', 'give'), |
|
| 1667 | + 'TAN' => __('Tangail', 'give'), |
|
| 1668 | + 'THA' => __('Thakurgaon', 'give'), |
|
| 1669 | 1669 | ); |
| 1670 | 1670 | |
| 1671 | - return apply_filters( 'give_bangladeshi_states', $states ); |
|
| 1671 | + return apply_filters('give_bangladeshi_states', $states); |
|
| 1672 | 1672 | } |
| 1673 | 1673 | |
| 1674 | 1674 | /** |
@@ -1680,33 +1680,33 @@ discard block |
||
| 1680 | 1680 | function give_get_argentina_states_list() { |
| 1681 | 1681 | $states = array( |
| 1682 | 1682 | '' => '', |
| 1683 | - 'C' => __( 'Ciudad Autónoma de Buenos Aires', 'give' ), |
|
| 1684 | - 'B' => __( 'Buenos Aires', 'give' ), |
|
| 1685 | - 'K' => __( 'Catamarca', 'give' ), |
|
| 1686 | - 'H' => __( 'Chaco', 'give' ), |
|
| 1687 | - 'U' => __( 'Chubut', 'give' ), |
|
| 1688 | - 'X' => __( 'Córdoba', 'give' ), |
|
| 1689 | - 'W' => __( 'Corrientes', 'give' ), |
|
| 1690 | - 'E' => __( 'Entre Ríos', 'give' ), |
|
| 1691 | - 'P' => __( 'Formosa', 'give' ), |
|
| 1692 | - 'Y' => __( 'Jujuy', 'give' ), |
|
| 1693 | - 'L' => __( 'La Pampa', 'give' ), |
|
| 1694 | - 'F' => __( 'La Rioja', 'give' ), |
|
| 1695 | - 'M' => __( 'Mendoza', 'give' ), |
|
| 1696 | - 'N' => __( 'Misiones', 'give' ), |
|
| 1697 | - 'Q' => __( 'Neuquén', 'give' ), |
|
| 1698 | - 'R' => __( 'Río Negro', 'give' ), |
|
| 1699 | - 'A' => __( 'Salta', 'give' ), |
|
| 1700 | - 'J' => __( 'San Juan', 'give' ), |
|
| 1701 | - 'D' => __( 'San Luis', 'give' ), |
|
| 1702 | - 'Z' => __( 'Santa Cruz', 'give' ), |
|
| 1703 | - 'S' => __( 'Santa Fe', 'give' ), |
|
| 1704 | - 'G' => __( 'Santiago del Estero', 'give' ), |
|
| 1705 | - 'V' => __( 'Tierra del Fuego', 'give' ), |
|
| 1706 | - 'T' => __( 'Tucumán', 'give' ), |
|
| 1683 | + 'C' => __('Ciudad Autónoma de Buenos Aires', 'give'), |
|
| 1684 | + 'B' => __('Buenos Aires', 'give'), |
|
| 1685 | + 'K' => __('Catamarca', 'give'), |
|
| 1686 | + 'H' => __('Chaco', 'give'), |
|
| 1687 | + 'U' => __('Chubut', 'give'), |
|
| 1688 | + 'X' => __('Córdoba', 'give'), |
|
| 1689 | + 'W' => __('Corrientes', 'give'), |
|
| 1690 | + 'E' => __('Entre Ríos', 'give'), |
|
| 1691 | + 'P' => __('Formosa', 'give'), |
|
| 1692 | + 'Y' => __('Jujuy', 'give'), |
|
| 1693 | + 'L' => __('La Pampa', 'give'), |
|
| 1694 | + 'F' => __('La Rioja', 'give'), |
|
| 1695 | + 'M' => __('Mendoza', 'give'), |
|
| 1696 | + 'N' => __('Misiones', 'give'), |
|
| 1697 | + 'Q' => __('Neuquén', 'give'), |
|
| 1698 | + 'R' => __('Río Negro', 'give'), |
|
| 1699 | + 'A' => __('Salta', 'give'), |
|
| 1700 | + 'J' => __('San Juan', 'give'), |
|
| 1701 | + 'D' => __('San Luis', 'give'), |
|
| 1702 | + 'Z' => __('Santa Cruz', 'give'), |
|
| 1703 | + 'S' => __('Santa Fe', 'give'), |
|
| 1704 | + 'G' => __('Santiago del Estero', 'give'), |
|
| 1705 | + 'V' => __('Tierra del Fuego', 'give'), |
|
| 1706 | + 'T' => __('Tucumán', 'give'), |
|
| 1707 | 1707 | ); |
| 1708 | 1708 | |
| 1709 | - return apply_filters( 'give_argentina_states', $states ); |
|
| 1709 | + return apply_filters('give_argentina_states', $states); |
|
| 1710 | 1710 | } |
| 1711 | 1711 | |
| 1712 | 1712 | /** |
@@ -1787,7 +1787,7 @@ discard block |
||
| 1787 | 1787 | 'AP' => 'Armed Forces - Pacific', |
| 1788 | 1788 | ); |
| 1789 | 1789 | |
| 1790 | - return apply_filters( 'give_us_states', $states ); |
|
| 1790 | + return apply_filters('give_us_states', $states); |
|
| 1791 | 1791 | } |
| 1792 | 1792 | |
| 1793 | 1793 | /** |
@@ -1800,22 +1800,22 @@ discard block |
||
| 1800 | 1800 | function give_get_provinces_list() { |
| 1801 | 1801 | $provinces = array( |
| 1802 | 1802 | '' => '', |
| 1803 | - 'AB' => esc_html__( 'Alberta', 'give' ), |
|
| 1804 | - 'BC' => esc_html__( 'British Columbia', 'give' ), |
|
| 1805 | - 'MB' => esc_html__( 'Manitoba', 'give' ), |
|
| 1806 | - 'NB' => esc_html__( 'New Brunswick', 'give' ), |
|
| 1807 | - 'NL' => esc_html__( 'Newfoundland and Labrador', 'give' ), |
|
| 1808 | - 'NS' => esc_html__( 'Nova Scotia', 'give' ), |
|
| 1809 | - 'NT' => esc_html__( 'Northwest Territories', 'give' ), |
|
| 1810 | - 'NU' => esc_html__( 'Nunavut', 'give' ), |
|
| 1811 | - 'ON' => esc_html__( 'Ontario', 'give' ), |
|
| 1812 | - 'PE' => esc_html__( 'Prince Edward Island', 'give' ), |
|
| 1813 | - 'QC' => esc_html__( 'Quebec', 'give' ), |
|
| 1814 | - 'SK' => esc_html__( 'Saskatchewan', 'give' ), |
|
| 1815 | - 'YT' => esc_html__( 'Yukon', 'give' ), |
|
| 1803 | + 'AB' => esc_html__('Alberta', 'give'), |
|
| 1804 | + 'BC' => esc_html__('British Columbia', 'give'), |
|
| 1805 | + 'MB' => esc_html__('Manitoba', 'give'), |
|
| 1806 | + 'NB' => esc_html__('New Brunswick', 'give'), |
|
| 1807 | + 'NL' => esc_html__('Newfoundland and Labrador', 'give'), |
|
| 1808 | + 'NS' => esc_html__('Nova Scotia', 'give'), |
|
| 1809 | + 'NT' => esc_html__('Northwest Territories', 'give'), |
|
| 1810 | + 'NU' => esc_html__('Nunavut', 'give'), |
|
| 1811 | + 'ON' => esc_html__('Ontario', 'give'), |
|
| 1812 | + 'PE' => esc_html__('Prince Edward Island', 'give'), |
|
| 1813 | + 'QC' => esc_html__('Quebec', 'give'), |
|
| 1814 | + 'SK' => esc_html__('Saskatchewan', 'give'), |
|
| 1815 | + 'YT' => esc_html__('Yukon', 'give'), |
|
| 1816 | 1816 | ); |
| 1817 | 1817 | |
| 1818 | - return apply_filters( 'give_canada_provinces', $provinces ); |
|
| 1818 | + return apply_filters('give_canada_provinces', $provinces); |
|
| 1819 | 1819 | } |
| 1820 | 1820 | |
| 1821 | 1821 | /** |
@@ -1837,7 +1837,7 @@ discard block |
||
| 1837 | 1837 | 'WA' => 'Western Australia', |
| 1838 | 1838 | ); |
| 1839 | 1839 | |
| 1840 | - return apply_filters( 'give_australian_states', $states ); |
|
| 1840 | + return apply_filters('give_australian_states', $states); |
|
| 1841 | 1841 | } |
| 1842 | 1842 | |
| 1843 | 1843 | /** |
@@ -1878,7 +1878,7 @@ discard block |
||
| 1878 | 1878 | 'TO' => 'Tocantins', |
| 1879 | 1879 | ); |
| 1880 | 1880 | |
| 1881 | - return apply_filters( 'give_brazil_states', $states ); |
|
| 1881 | + return apply_filters('give_brazil_states', $states); |
|
| 1882 | 1882 | } |
| 1883 | 1883 | |
| 1884 | 1884 | /** |
@@ -1895,7 +1895,7 @@ discard block |
||
| 1895 | 1895 | 'NEW TERRITORIES' => 'New Territories', |
| 1896 | 1896 | ); |
| 1897 | 1897 | |
| 1898 | - return apply_filters( 'give_hong_kong_states', $states ); |
|
| 1898 | + return apply_filters('give_hong_kong_states', $states); |
|
| 1899 | 1899 | } |
| 1900 | 1900 | |
| 1901 | 1901 | /** |
@@ -1929,7 +1929,7 @@ discard block |
||
| 1929 | 1929 | 'ZA' => 'Zala', |
| 1930 | 1930 | ); |
| 1931 | 1931 | |
| 1932 | - return apply_filters( 'give_hungary_states', $states ); |
|
| 1932 | + return apply_filters('give_hungary_states', $states); |
|
| 1933 | 1933 | } |
| 1934 | 1934 | |
| 1935 | 1935 | /** |
@@ -1975,7 +1975,7 @@ discard block |
||
| 1975 | 1975 | 'CN32' => 'Xinjiang / 新疆', |
| 1976 | 1976 | ); |
| 1977 | 1977 | |
| 1978 | - return apply_filters( 'give_chinese_states', $states ); |
|
| 1978 | + return apply_filters('give_chinese_states', $states); |
|
| 1979 | 1979 | } |
| 1980 | 1980 | |
| 1981 | 1981 | /** |
@@ -2004,7 +2004,7 @@ discard block |
||
| 2004 | 2004 | 'WC' => 'West Coast', |
| 2005 | 2005 | ); |
| 2006 | 2006 | |
| 2007 | - return apply_filters( 'give_new_zealand_states', $states ); |
|
| 2007 | + return apply_filters('give_new_zealand_states', $states); |
|
| 2008 | 2008 | } |
| 2009 | 2009 | |
| 2010 | 2010 | /** |
@@ -2052,7 +2052,7 @@ discard block |
||
| 2052 | 2052 | 'PB' => 'Papua Barat', |
| 2053 | 2053 | ); |
| 2054 | 2054 | |
| 2055 | - return apply_filters( 'give_indonesia_states', $states ); |
|
| 2055 | + return apply_filters('give_indonesia_states', $states); |
|
| 2056 | 2056 | } |
| 2057 | 2057 | |
| 2058 | 2058 | /** |
@@ -2102,7 +2102,7 @@ discard block |
||
| 2102 | 2102 | 'PY' => 'Pondicherry (Puducherry)', |
| 2103 | 2103 | ); |
| 2104 | 2104 | |
| 2105 | - return apply_filters( 'give_indian_states', $states ); |
|
| 2105 | + return apply_filters('give_indian_states', $states); |
|
| 2106 | 2106 | } |
| 2107 | 2107 | |
| 2108 | 2108 | /** |
@@ -2132,7 +2132,7 @@ discard block |
||
| 2132 | 2132 | 'PJY' => 'W.P. Putrajaya', |
| 2133 | 2133 | ); |
| 2134 | 2134 | |
| 2135 | - return apply_filters( 'give_malaysian_states', $states ); |
|
| 2135 | + return apply_filters('give_malaysian_states', $states); |
|
| 2136 | 2136 | } |
| 2137 | 2137 | |
| 2138 | 2138 | /** |
@@ -2155,7 +2155,7 @@ discard block |
||
| 2155 | 2155 | 'WC' => 'Western Cape', |
| 2156 | 2156 | ); |
| 2157 | 2157 | |
| 2158 | - return apply_filters( 'give_south_african_states', $states ); |
|
| 2158 | + return apply_filters('give_south_african_states', $states); |
|
| 2159 | 2159 | } |
| 2160 | 2160 | |
| 2161 | 2161 | /** |
@@ -2246,7 +2246,7 @@ discard block |
||
| 2246 | 2246 | 'TH-35' => 'Yasothon (ยโสธร)', |
| 2247 | 2247 | ); |
| 2248 | 2248 | |
| 2249 | - return apply_filters( 'give_thailand_states', $states ); |
|
| 2249 | + return apply_filters('give_thailand_states', $states); |
|
| 2250 | 2250 | } |
| 2251 | 2251 | |
| 2252 | 2252 | /** |
@@ -2258,59 +2258,59 @@ discard block |
||
| 2258 | 2258 | function give_get_spain_states_list() { |
| 2259 | 2259 | $states = array( |
| 2260 | 2260 | '' => '', |
| 2261 | - 'C' => esc_html__( 'A Coruña', 'give' ), |
|
| 2262 | - 'VI' => esc_html__( 'Álava', 'give' ), |
|
| 2263 | - 'AB' => esc_html__( 'Albacete', 'give' ), |
|
| 2264 | - 'A' => esc_html__( 'Alicante', 'give' ), |
|
| 2265 | - 'AL' => esc_html__( 'Almería', 'give' ), |
|
| 2266 | - 'O' => esc_html__( 'Asturias', 'give' ), |
|
| 2267 | - 'AV' => esc_html__( 'Ávila', 'give' ), |
|
| 2268 | - 'BA' => esc_html__( 'Badajoz', 'give' ), |
|
| 2269 | - 'PM' => esc_html__( 'Baleares', 'give' ), |
|
| 2270 | - 'B' => esc_html__( 'Barcelona', 'give' ), |
|
| 2271 | - 'BU' => esc_html__( 'Burgos', 'give' ), |
|
| 2272 | - 'CC' => esc_html__( 'Cáceres', 'give' ), |
|
| 2273 | - 'CA' => esc_html__( 'Cádiz', 'give' ), |
|
| 2274 | - 'S' => esc_html__( 'Cantabria', 'give' ), |
|
| 2275 | - 'CS' => esc_html__( 'Castellón', 'give' ), |
|
| 2276 | - 'CE' => esc_html__( 'Ceuta', 'give' ), |
|
| 2277 | - 'CR' => esc_html__( 'Ciudad Real', 'give' ), |
|
| 2278 | - 'CO' => esc_html__( 'Córdoba', 'give' ), |
|
| 2279 | - 'CU' => esc_html__( 'Cuenca', 'give' ), |
|
| 2280 | - 'GI' => esc_html__( 'Girona', 'give' ), |
|
| 2281 | - 'GR' => esc_html__( 'Granada', 'give' ), |
|
| 2282 | - 'GU' => esc_html__( 'Guadalajara', 'give' ), |
|
| 2283 | - 'SS' => esc_html__( 'Gipuzkoa', 'give' ), |
|
| 2284 | - 'H' => esc_html__( 'Huelva', 'give' ), |
|
| 2285 | - 'HU' => esc_html__( 'Huesca', 'give' ), |
|
| 2286 | - 'J' => esc_html__( 'Jaén', 'give' ), |
|
| 2287 | - 'LO' => esc_html__( 'La Rioja', 'give' ), |
|
| 2288 | - 'GC' => esc_html__( 'Las Palmas', 'give' ), |
|
| 2289 | - 'LE' => esc_html__( 'León', 'give' ), |
|
| 2290 | - 'L' => esc_html__( 'Lleida', 'give' ), |
|
| 2291 | - 'LU' => esc_html__( 'Lugo', 'give' ), |
|
| 2292 | - 'M' => esc_html__( 'Madrid', 'give' ), |
|
| 2293 | - 'MA' => esc_html__( 'Málaga', 'give' ), |
|
| 2294 | - 'ML' => esc_html__( 'Melilla', 'give' ), |
|
| 2295 | - 'MU' => esc_html__( 'Murcia', 'give' ), |
|
| 2296 | - 'NA' => esc_html__( 'Navarra', 'give' ), |
|
| 2297 | - 'OR' => esc_html__( 'Ourense', 'give' ), |
|
| 2298 | - 'P' => esc_html__( 'Palencia', 'give' ), |
|
| 2299 | - 'PO' => esc_html__( 'Pontevedra', 'give' ), |
|
| 2300 | - 'SA' => esc_html__( 'Salamanca', 'give' ), |
|
| 2301 | - 'TF' => esc_html__( 'Santa Cruz de Tenerife', 'give' ), |
|
| 2302 | - 'SG' => esc_html__( 'Segovia', 'give' ), |
|
| 2303 | - 'SE' => esc_html__( 'Sevilla', 'give' ), |
|
| 2304 | - 'SO' => esc_html__( 'Soria', 'give' ), |
|
| 2305 | - 'T' => esc_html__( 'Tarragona', 'give' ), |
|
| 2306 | - 'TE' => esc_html__( 'Teruel', 'give' ), |
|
| 2307 | - 'TO' => esc_html__( 'Toledo', 'give' ), |
|
| 2308 | - 'V' => esc_html__( 'Valencia', 'give' ), |
|
| 2309 | - 'VA' => esc_html__( 'Valladolid', 'give' ), |
|
| 2310 | - 'BI' => esc_html__( 'Bizkaia', 'give' ), |
|
| 2311 | - 'ZA' => esc_html__( 'Zamora', 'give' ), |
|
| 2312 | - 'Z' => esc_html__( 'Zaragoza', 'give' ), |
|
| 2261 | + 'C' => esc_html__('A Coruña', 'give'), |
|
| 2262 | + 'VI' => esc_html__('Álava', 'give'), |
|
| 2263 | + 'AB' => esc_html__('Albacete', 'give'), |
|
| 2264 | + 'A' => esc_html__('Alicante', 'give'), |
|
| 2265 | + 'AL' => esc_html__('Almería', 'give'), |
|
| 2266 | + 'O' => esc_html__('Asturias', 'give'), |
|
| 2267 | + 'AV' => esc_html__('Ávila', 'give'), |
|
| 2268 | + 'BA' => esc_html__('Badajoz', 'give'), |
|
| 2269 | + 'PM' => esc_html__('Baleares', 'give'), |
|
| 2270 | + 'B' => esc_html__('Barcelona', 'give'), |
|
| 2271 | + 'BU' => esc_html__('Burgos', 'give'), |
|
| 2272 | + 'CC' => esc_html__('Cáceres', 'give'), |
|
| 2273 | + 'CA' => esc_html__('Cádiz', 'give'), |
|
| 2274 | + 'S' => esc_html__('Cantabria', 'give'), |
|
| 2275 | + 'CS' => esc_html__('Castellón', 'give'), |
|
| 2276 | + 'CE' => esc_html__('Ceuta', 'give'), |
|
| 2277 | + 'CR' => esc_html__('Ciudad Real', 'give'), |
|
| 2278 | + 'CO' => esc_html__('Córdoba', 'give'), |
|
| 2279 | + 'CU' => esc_html__('Cuenca', 'give'), |
|
| 2280 | + 'GI' => esc_html__('Girona', 'give'), |
|
| 2281 | + 'GR' => esc_html__('Granada', 'give'), |
|
| 2282 | + 'GU' => esc_html__('Guadalajara', 'give'), |
|
| 2283 | + 'SS' => esc_html__('Gipuzkoa', 'give'), |
|
| 2284 | + 'H' => esc_html__('Huelva', 'give'), |
|
| 2285 | + 'HU' => esc_html__('Huesca', 'give'), |
|
| 2286 | + 'J' => esc_html__('Jaén', 'give'), |
|
| 2287 | + 'LO' => esc_html__('La Rioja', 'give'), |
|
| 2288 | + 'GC' => esc_html__('Las Palmas', 'give'), |
|
| 2289 | + 'LE' => esc_html__('León', 'give'), |
|
| 2290 | + 'L' => esc_html__('Lleida', 'give'), |
|
| 2291 | + 'LU' => esc_html__('Lugo', 'give'), |
|
| 2292 | + 'M' => esc_html__('Madrid', 'give'), |
|
| 2293 | + 'MA' => esc_html__('Málaga', 'give'), |
|
| 2294 | + 'ML' => esc_html__('Melilla', 'give'), |
|
| 2295 | + 'MU' => esc_html__('Murcia', 'give'), |
|
| 2296 | + 'NA' => esc_html__('Navarra', 'give'), |
|
| 2297 | + 'OR' => esc_html__('Ourense', 'give'), |
|
| 2298 | + 'P' => esc_html__('Palencia', 'give'), |
|
| 2299 | + 'PO' => esc_html__('Pontevedra', 'give'), |
|
| 2300 | + 'SA' => esc_html__('Salamanca', 'give'), |
|
| 2301 | + 'TF' => esc_html__('Santa Cruz de Tenerife', 'give'), |
|
| 2302 | + 'SG' => esc_html__('Segovia', 'give'), |
|
| 2303 | + 'SE' => esc_html__('Sevilla', 'give'), |
|
| 2304 | + 'SO' => esc_html__('Soria', 'give'), |
|
| 2305 | + 'T' => esc_html__('Tarragona', 'give'), |
|
| 2306 | + 'TE' => esc_html__('Teruel', 'give'), |
|
| 2307 | + 'TO' => esc_html__('Toledo', 'give'), |
|
| 2308 | + 'V' => esc_html__('Valencia', 'give'), |
|
| 2309 | + 'VA' => esc_html__('Valladolid', 'give'), |
|
| 2310 | + 'BI' => esc_html__('Bizkaia', 'give'), |
|
| 2311 | + 'ZA' => esc_html__('Zamora', 'give'), |
|
| 2312 | + 'Z' => esc_html__('Zaragoza', 'give'), |
|
| 2313 | 2313 | ); |
| 2314 | 2314 | |
| 2315 | - return apply_filters( 'give_spain_states', $states ); |
|
| 2315 | + return apply_filters('give_spain_states', $states); |
|
| 2316 | 2316 | } |
@@ -6,16 +6,16 @@ discard block |
||
| 6 | 6 | * @version 1.0 |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 9 | +if ( ! defined('ABSPATH')) { |
|
| 10 | 10 | exit; |
| 11 | 11 | } // Exit if accessed directly. |
| 12 | 12 | |
| 13 | 13 | // For gmail compatibility, including CSS styles in head/body are stripped out therefore styles need to be inline. These variables contain rules which are added to the template inline. !important; is a gmail hack to prevent styles being stripped if it doesn't like something. |
| 14 | -$body = " |
|
| 14 | +$body = " |
|
| 15 | 15 | background-color: #f6f6f6; |
| 16 | 16 | font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; |
| 17 | 17 | "; |
| 18 | -$wrapper = " |
|
| 18 | +$wrapper = " |
|
| 19 | 19 | width:100%; |
| 20 | 20 | -webkit-text-size-adjust:none !important; |
| 21 | 21 | margin:0; |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | text-align: center; |
| 43 | 43 | vertical-align:middle; |
| 44 | 44 | "; |
| 45 | -$body_content = " |
|
| 45 | +$body_content = " |
|
| 46 | 46 | border-radius:3px !important; |
| 47 | 47 | font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; |
| 48 | 48 | "; |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | line-height:150%; |
| 54 | 54 | text-align:left; |
| 55 | 55 | "; |
| 56 | -$header_content_h1 = " |
|
| 56 | +$header_content_h1 = " |
|
| 57 | 57 | color: #000000; |
| 58 | 58 | margin:0; |
| 59 | 59 | padding: 28px 24px; |
@@ -63,13 +63,13 @@ discard block |
||
| 63 | 63 | font-weight: 500; |
| 64 | 64 | line-height: 1.2; |
| 65 | 65 | "; |
| 66 | -$header_img = give_get_option( 'email_logo', '' ); |
|
| 66 | +$header_img = give_get_option('email_logo', ''); |
|
| 67 | 67 | ?> |
| 68 | 68 | <!DOCTYPE html> |
| 69 | 69 | <html> |
| 70 | 70 | <head> |
| 71 | 71 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| 72 | - <title><?php echo get_bloginfo( 'name' ); ?></title> |
|
| 72 | + <title><?php echo get_bloginfo('name'); ?></title> |
|
| 73 | 73 | </head> |
| 74 | 74 | <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0" style="<?php echo $body; ?>"> |
| 75 | 75 | <div style="<?php echo $wrapper; ?>"> |
@@ -77,9 +77,9 @@ discard block |
||
| 77 | 77 | <tr> |
| 78 | 78 | <td align="center" valign="top"> |
| 79 | 79 | <?php |
| 80 | - if ( ! empty( $header_img ) ) : ?> |
|
| 80 | + if ( ! empty($header_img)) : ?> |
|
| 81 | 81 | <div id="template_header_image"> |
| 82 | - <?php echo '<p style="margin-top:0;"><img style="' . $template_image . '" src="' . esc_url( $header_img ) . '" alt="' . get_bloginfo( 'name' ) . '" /></p>'; ?> |
|
| 82 | + <?php echo '<p style="margin-top:0;"><img style="'.$template_image.'" src="'.esc_url($header_img).'" alt="'.get_bloginfo('name').'" /></p>'; ?> |
|
| 83 | 83 | </div> |
| 84 | 84 | <?php endif; ?> |
| 85 | 85 | <table border="0" cellpadding="0" cellspacing="0" width="600" id="template_container" style="<?php echo $template_container; ?>"> |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | * @version 1.0 |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly. |
|
| 9 | +if ( ! defined('ABSPATH')) exit; // Exit if accessed directly. |
|
| 10 | 10 | |
| 11 | 11 | // {email} is replaced by the content entered in Donations > Settings > Emails |
| 12 | 12 | |
@@ -6,7 +6,10 @@ |
||
| 6 | 6 | * @version 1.0 |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly. |
|
| 9 | +if ( ! defined( 'ABSPATH' ) ) { |
|
| 10 | + exit; |
|
| 11 | +} |
|
| 12 | +// Exit if accessed directly. |
|
| 10 | 13 | |
| 11 | 14 | // {email} is replaced by the content entered in Donations > Settings > Emails |
| 12 | 15 | |