@@ -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__( 'Philippines', '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__('Philippines', '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,13 +678,13 @@ 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 | - 'label' => __( 'Region', 'give' ), |
|
| 687 | + 'label' => __('Region', 'give'), |
|
| 688 | 688 | ), |
| 689 | 689 | ), |
| 690 | 690 | 'NO' => array( |
@@ -695,7 +695,7 @@ discard block |
||
| 695 | 695 | ), |
| 696 | 696 | 'NP' => array( |
| 697 | 697 | 'state' => array( |
| 698 | - 'label' => __( 'State / Zone', 'give' ), |
|
| 698 | + 'label' => __('State / Zone', 'give'), |
|
| 699 | 699 | ), |
| 700 | 700 | ), |
| 701 | 701 | 'PL' => array( |
@@ -739,12 +739,12 @@ discard block |
||
| 739 | 739 | ), |
| 740 | 740 | 'ES' => array( |
| 741 | 741 | 'state' => array( |
| 742 | - 'label' => __( 'Province', 'give' ), |
|
| 742 | + 'label' => __('Province', 'give'), |
|
| 743 | 743 | ), |
| 744 | 744 | ), |
| 745 | 745 | 'LI' => array( |
| 746 | 746 | 'state' => array( |
| 747 | - 'label' => __( 'Municipality', 'give' ), |
|
| 747 | + 'label' => __('Municipality', 'give'), |
|
| 748 | 748 | 'required' => false, |
| 749 | 749 | 'hidden' => true, |
| 750 | 750 | ), |
@@ -762,17 +762,17 @@ discard block |
||
| 762 | 762 | ), |
| 763 | 763 | 'TR' => array( |
| 764 | 764 | 'state' => array( |
| 765 | - 'label' => __( 'Province', 'give' ), |
|
| 765 | + 'label' => __('Province', 'give'), |
|
| 766 | 766 | ), |
| 767 | 767 | ), |
| 768 | 768 | 'US' => array( |
| 769 | 769 | 'state' => array( |
| 770 | - 'label' => __( 'State', 'give' ), |
|
| 770 | + 'label' => __('State', 'give'), |
|
| 771 | 771 | ), |
| 772 | 772 | ), |
| 773 | 773 | 'GB' => array( |
| 774 | 774 | 'state' => array( |
| 775 | - 'label' => __( 'County', 'give' ), |
|
| 775 | + 'label' => __('County', 'give'), |
|
| 776 | 776 | 'required' => false, |
| 777 | 777 | ), |
| 778 | 778 | ), |
@@ -789,10 +789,10 @@ discard block |
||
| 789 | 789 | ), |
| 790 | 790 | 'ZA' => array( |
| 791 | 791 | 'state' => array( |
| 792 | - 'label' => __( 'Province', 'give' ), |
|
| 792 | + 'label' => __('Province', 'give'), |
|
| 793 | 793 | ), |
| 794 | 794 | ), |
| 795 | - ) ); |
|
| 795 | + )); |
|
| 796 | 796 | } |
| 797 | 797 | |
| 798 | 798 | /** |
@@ -804,90 +804,90 @@ discard block |
||
| 804 | 804 | function give_get_turkey_states_list() { |
| 805 | 805 | $states = array( |
| 806 | 806 | '' => '', |
| 807 | - 'TR01' => __( 'Adana', 'give' ), |
|
| 808 | - 'TR02' => __( 'Adıyaman', 'give' ), |
|
| 809 | - 'TR03' => __( 'Afyon', 'give' ), |
|
| 810 | - 'TR04' => __( 'Ağrı', 'give' ), |
|
| 811 | - 'TR05' => __( 'Amasya', 'give' ), |
|
| 812 | - 'TR06' => __( 'Ankara', 'give' ), |
|
| 813 | - 'TR07' => __( 'Antalya', 'give' ), |
|
| 814 | - 'TR08' => __( 'Artvin', 'give' ), |
|
| 815 | - 'TR09' => __( 'Aydın', 'give' ), |
|
| 816 | - 'TR10' => __( 'Balıkesir', 'give' ), |
|
| 817 | - 'TR11' => __( 'Bilecik', 'give' ), |
|
| 818 | - 'TR12' => __( 'Bingöl', 'give' ), |
|
| 819 | - 'TR13' => __( 'Bitlis', 'give' ), |
|
| 820 | - 'TR14' => __( 'Bolu', 'give' ), |
|
| 821 | - 'TR15' => __( 'Burdur', 'give' ), |
|
| 822 | - 'TR16' => __( 'Bursa', 'give' ), |
|
| 823 | - 'TR17' => __( 'Çanakkale', 'give' ), |
|
| 824 | - 'TR18' => __( 'Çankırı', 'give' ), |
|
| 825 | - 'TR19' => __( 'Çorum', 'give' ), |
|
| 826 | - 'TR20' => __( 'Denizli', 'give' ), |
|
| 827 | - 'TR21' => __( 'Diyarbakır', 'give' ), |
|
| 828 | - 'TR22' => __( 'Edirne', 'give' ), |
|
| 829 | - 'TR23' => __( 'Elazığ', 'give' ), |
|
| 830 | - 'TR24' => __( 'Erzincan', 'give' ), |
|
| 831 | - 'TR25' => __( 'Erzurum', 'give' ), |
|
| 832 | - 'TR26' => __( 'Eskişehir', 'give' ), |
|
| 833 | - 'TR27' => __( 'Gaziantep', 'give' ), |
|
| 834 | - 'TR28' => __( 'Giresun', 'give' ), |
|
| 835 | - 'TR29' => __( 'Gümüşhane', 'give' ), |
|
| 836 | - 'TR30' => __( 'Hakkari', 'give' ), |
|
| 837 | - 'TR31' => __( 'Hatay', 'give' ), |
|
| 838 | - 'TR32' => __( 'Isparta', 'give' ), |
|
| 839 | - 'TR33' => __( 'İçel', 'give' ), |
|
| 840 | - 'TR34' => __( 'İstanbul', 'give' ), |
|
| 841 | - 'TR35' => __( 'İzmir', 'give' ), |
|
| 842 | - 'TR36' => __( 'Kars', 'give' ), |
|
| 843 | - 'TR37' => __( 'Kastamonu', 'give' ), |
|
| 844 | - 'TR38' => __( 'Kayseri', 'give' ), |
|
| 845 | - 'TR39' => __( 'Kırklareli', 'give' ), |
|
| 846 | - 'TR40' => __( 'Kırşehir', 'give' ), |
|
| 847 | - 'TR41' => __( 'Kocaeli', 'give' ), |
|
| 848 | - 'TR42' => __( 'Konya', 'give' ), |
|
| 849 | - 'TR43' => __( 'Kütahya', 'give' ), |
|
| 850 | - 'TR44' => __( 'Malatya', 'give' ), |
|
| 851 | - 'TR45' => __( 'Manisa', 'give' ), |
|
| 852 | - 'TR46' => __( 'Kahramanmaraş', 'give' ), |
|
| 853 | - 'TR47' => __( 'Mardin', 'give' ), |
|
| 854 | - 'TR48' => __( 'Muğla', 'give' ), |
|
| 855 | - 'TR49' => __( 'Muş', 'give' ), |
|
| 856 | - 'TR50' => __( 'Nevşehir', 'give' ), |
|
| 857 | - 'TR51' => __( 'Niğde', 'give' ), |
|
| 858 | - 'TR52' => __( 'Ordu', 'give' ), |
|
| 859 | - 'TR53' => __( 'Rize', 'give' ), |
|
| 860 | - 'TR54' => __( 'Sakarya', 'give' ), |
|
| 861 | - 'TR55' => __( 'Samsun', 'give' ), |
|
| 862 | - 'TR56' => __( 'Siirt', 'give' ), |
|
| 863 | - 'TR57' => __( 'Sinop', 'give' ), |
|
| 864 | - 'TR58' => __( 'Sivas', 'give' ), |
|
| 865 | - 'TR59' => __( 'Tekirdağ', 'give' ), |
|
| 866 | - 'TR60' => __( 'Tokat', 'give' ), |
|
| 867 | - 'TR61' => __( 'Trabzon', 'give' ), |
|
| 868 | - 'TR62' => __( 'Tunceli', 'give' ), |
|
| 869 | - 'TR63' => __( 'Şanlıurfa', 'give' ), |
|
| 870 | - 'TR64' => __( 'Uşak', 'give' ), |
|
| 871 | - 'TR65' => __( 'Van', 'give' ), |
|
| 872 | - 'TR66' => __( 'Yozgat', 'give' ), |
|
| 873 | - 'TR67' => __( 'Zonguldak', 'give' ), |
|
| 874 | - 'TR68' => __( 'Aksaray', 'give' ), |
|
| 875 | - 'TR69' => __( 'Bayburt', 'give' ), |
|
| 876 | - 'TR70' => __( 'Karaman', 'give' ), |
|
| 877 | - 'TR71' => __( 'Kırıkkale', 'give' ), |
|
| 878 | - 'TR72' => __( 'Batman', 'give' ), |
|
| 879 | - 'TR73' => __( 'Şırnak', 'give' ), |
|
| 880 | - 'TR74' => __( 'Bartın', 'give' ), |
|
| 881 | - 'TR75' => __( 'Ardahan', 'give' ), |
|
| 882 | - 'TR76' => __( 'Iğdır', 'give' ), |
|
| 883 | - 'TR77' => __( 'Yalova', 'give' ), |
|
| 884 | - 'TR78' => __( 'Karabük', 'give' ), |
|
| 885 | - 'TR79' => __( 'Kilis', 'give' ), |
|
| 886 | - 'TR80' => __( 'Osmaniye', 'give' ), |
|
| 887 | - 'TR81' => __( 'Düzce', 'give' ), |
|
| 807 | + 'TR01' => __('Adana', 'give'), |
|
| 808 | + 'TR02' => __('Adıyaman', 'give'), |
|
| 809 | + 'TR03' => __('Afyon', 'give'), |
|
| 810 | + 'TR04' => __('Ağrı', 'give'), |
|
| 811 | + 'TR05' => __('Amasya', 'give'), |
|
| 812 | + 'TR06' => __('Ankara', 'give'), |
|
| 813 | + 'TR07' => __('Antalya', 'give'), |
|
| 814 | + 'TR08' => __('Artvin', 'give'), |
|
| 815 | + 'TR09' => __('Aydın', 'give'), |
|
| 816 | + 'TR10' => __('Balıkesir', 'give'), |
|
| 817 | + 'TR11' => __('Bilecik', 'give'), |
|
| 818 | + 'TR12' => __('Bingöl', 'give'), |
|
| 819 | + 'TR13' => __('Bitlis', 'give'), |
|
| 820 | + 'TR14' => __('Bolu', 'give'), |
|
| 821 | + 'TR15' => __('Burdur', 'give'), |
|
| 822 | + 'TR16' => __('Bursa', 'give'), |
|
| 823 | + 'TR17' => __('Çanakkale', 'give'), |
|
| 824 | + 'TR18' => __('Çankırı', 'give'), |
|
| 825 | + 'TR19' => __('Çorum', 'give'), |
|
| 826 | + 'TR20' => __('Denizli', 'give'), |
|
| 827 | + 'TR21' => __('Diyarbakır', 'give'), |
|
| 828 | + 'TR22' => __('Edirne', 'give'), |
|
| 829 | + 'TR23' => __('Elazığ', 'give'), |
|
| 830 | + 'TR24' => __('Erzincan', 'give'), |
|
| 831 | + 'TR25' => __('Erzurum', 'give'), |
|
| 832 | + 'TR26' => __('Eskişehir', 'give'), |
|
| 833 | + 'TR27' => __('Gaziantep', 'give'), |
|
| 834 | + 'TR28' => __('Giresun', 'give'), |
|
| 835 | + 'TR29' => __('Gümüşhane', 'give'), |
|
| 836 | + 'TR30' => __('Hakkari', 'give'), |
|
| 837 | + 'TR31' => __('Hatay', 'give'), |
|
| 838 | + 'TR32' => __('Isparta', 'give'), |
|
| 839 | + 'TR33' => __('İçel', 'give'), |
|
| 840 | + 'TR34' => __('İstanbul', 'give'), |
|
| 841 | + 'TR35' => __('İzmir', 'give'), |
|
| 842 | + 'TR36' => __('Kars', 'give'), |
|
| 843 | + 'TR37' => __('Kastamonu', 'give'), |
|
| 844 | + 'TR38' => __('Kayseri', 'give'), |
|
| 845 | + 'TR39' => __('Kırklareli', 'give'), |
|
| 846 | + 'TR40' => __('Kırşehir', 'give'), |
|
| 847 | + 'TR41' => __('Kocaeli', 'give'), |
|
| 848 | + 'TR42' => __('Konya', 'give'), |
|
| 849 | + 'TR43' => __('Kütahya', 'give'), |
|
| 850 | + 'TR44' => __('Malatya', 'give'), |
|
| 851 | + 'TR45' => __('Manisa', 'give'), |
|
| 852 | + 'TR46' => __('Kahramanmaraş', 'give'), |
|
| 853 | + 'TR47' => __('Mardin', 'give'), |
|
| 854 | + 'TR48' => __('Muğla', 'give'), |
|
| 855 | + 'TR49' => __('Muş', 'give'), |
|
| 856 | + 'TR50' => __('Nevşehir', 'give'), |
|
| 857 | + 'TR51' => __('Niğde', 'give'), |
|
| 858 | + 'TR52' => __('Ordu', 'give'), |
|
| 859 | + 'TR53' => __('Rize', 'give'), |
|
| 860 | + 'TR54' => __('Sakarya', 'give'), |
|
| 861 | + 'TR55' => __('Samsun', 'give'), |
|
| 862 | + 'TR56' => __('Siirt', 'give'), |
|
| 863 | + 'TR57' => __('Sinop', 'give'), |
|
| 864 | + 'TR58' => __('Sivas', 'give'), |
|
| 865 | + 'TR59' => __('Tekirdağ', 'give'), |
|
| 866 | + 'TR60' => __('Tokat', 'give'), |
|
| 867 | + 'TR61' => __('Trabzon', 'give'), |
|
| 868 | + 'TR62' => __('Tunceli', 'give'), |
|
| 869 | + 'TR63' => __('Şanlıurfa', 'give'), |
|
| 870 | + 'TR64' => __('Uşak', 'give'), |
|
| 871 | + 'TR65' => __('Van', 'give'), |
|
| 872 | + 'TR66' => __('Yozgat', 'give'), |
|
| 873 | + 'TR67' => __('Zonguldak', 'give'), |
|
| 874 | + 'TR68' => __('Aksaray', 'give'), |
|
| 875 | + 'TR69' => __('Bayburt', 'give'), |
|
| 876 | + 'TR70' => __('Karaman', 'give'), |
|
| 877 | + 'TR71' => __('Kırıkkale', 'give'), |
|
| 878 | + 'TR72' => __('Batman', 'give'), |
|
| 879 | + 'TR73' => __('Şırnak', 'give'), |
|
| 880 | + 'TR74' => __('Bartın', 'give'), |
|
| 881 | + 'TR75' => __('Ardahan', 'give'), |
|
| 882 | + 'TR76' => __('Iğdır', 'give'), |
|
| 883 | + 'TR77' => __('Yalova', 'give'), |
|
| 884 | + 'TR78' => __('Karabük', 'give'), |
|
| 885 | + 'TR79' => __('Kilis', 'give'), |
|
| 886 | + 'TR80' => __('Osmaniye', 'give'), |
|
| 887 | + 'TR81' => __('Düzce', 'give'), |
|
| 888 | 888 | ); |
| 889 | 889 | |
| 890 | - return apply_filters( 'give_turkey_states', $states ); |
|
| 890 | + return apply_filters('give_turkey_states', $states); |
|
| 891 | 891 | } |
| 892 | 892 | |
| 893 | 893 | /** |
@@ -899,51 +899,51 @@ discard block |
||
| 899 | 899 | function give_get_romania_states_list() { |
| 900 | 900 | $states = array( |
| 901 | 901 | '' => '', |
| 902 | - 'AB' => __( 'Alba', 'give' ), |
|
| 903 | - 'AR' => __( 'Arad', 'give' ), |
|
| 904 | - 'AG' => __( 'Arges', 'give' ), |
|
| 905 | - 'BC' => __( 'Bacau', 'give' ), |
|
| 906 | - 'BH' => __( 'Bihor', 'give' ), |
|
| 907 | - 'BN' => __( 'Bistrita-Nasaud', 'give' ), |
|
| 908 | - 'BT' => __( 'Botosani', 'give' ), |
|
| 909 | - 'BR' => __( 'Braila', 'give' ), |
|
| 910 | - 'BV' => __( 'Brasov', 'give' ), |
|
| 911 | - 'B' => __( 'Bucuresti', 'give' ), |
|
| 912 | - 'BZ' => __( 'Buzau', 'give' ), |
|
| 913 | - 'CL' => __( 'Calarasi', 'give' ), |
|
| 914 | - 'CS' => __( 'Caras-Severin', 'give' ), |
|
| 915 | - 'CJ' => __( 'Cluj', 'give' ), |
|
| 916 | - 'CT' => __( 'Constanta', 'give' ), |
|
| 917 | - 'CV' => __( 'Covasna', 'give' ), |
|
| 918 | - 'DB' => __( 'Dambovita', 'give' ), |
|
| 919 | - 'DJ' => __( 'Dolj', 'give' ), |
|
| 920 | - 'GL' => __( 'Galati', 'give' ), |
|
| 921 | - 'GR' => __( 'Giurgiu', 'give' ), |
|
| 922 | - 'GJ' => __( 'Gorj', 'give' ), |
|
| 923 | - 'HR' => __( 'Harghita', 'give' ), |
|
| 924 | - 'HD' => __( 'Hunedoara', 'give' ), |
|
| 925 | - 'IL' => __( 'Ialomita', 'give' ), |
|
| 926 | - 'IS' => __( 'Iasi', 'give' ), |
|
| 927 | - 'IF' => __( 'Ilfov', 'give' ), |
|
| 928 | - 'MM' => __( 'Maramures', 'give' ), |
|
| 929 | - 'MH' => __( 'Mehedinti', 'give' ), |
|
| 930 | - 'MS' => __( 'Mures', 'give' ), |
|
| 931 | - 'NT' => __( 'Neamt', 'give' ), |
|
| 932 | - 'OT' => __( 'Olt', 'give' ), |
|
| 933 | - 'PH' => __( 'Prahova', 'give' ), |
|
| 934 | - 'SJ' => __( 'Salaj', 'give' ), |
|
| 935 | - 'SM' => __( 'Satu Mare', 'give' ), |
|
| 936 | - 'SB' => __( 'Sibiu', 'give' ), |
|
| 937 | - 'SV' => __( 'Suceava', 'give' ), |
|
| 938 | - 'TR' => __( 'Teleorman', 'give' ), |
|
| 939 | - 'TM' => __( 'Timis', 'give' ), |
|
| 940 | - 'TL' => __( 'Tulcea', 'give' ), |
|
| 941 | - 'VL' => __( 'Valcea', 'give' ), |
|
| 942 | - 'VS' => __( 'Vaslui', 'give' ), |
|
| 943 | - 'VN' => __( 'Vrancea', 'give' ), |
|
| 902 | + 'AB' => __('Alba', 'give'), |
|
| 903 | + 'AR' => __('Arad', 'give'), |
|
| 904 | + 'AG' => __('Arges', 'give'), |
|
| 905 | + 'BC' => __('Bacau', 'give'), |
|
| 906 | + 'BH' => __('Bihor', 'give'), |
|
| 907 | + 'BN' => __('Bistrita-Nasaud', 'give'), |
|
| 908 | + 'BT' => __('Botosani', 'give'), |
|
| 909 | + 'BR' => __('Braila', 'give'), |
|
| 910 | + 'BV' => __('Brasov', 'give'), |
|
| 911 | + 'B' => __('Bucuresti', 'give'), |
|
| 912 | + 'BZ' => __('Buzau', 'give'), |
|
| 913 | + 'CL' => __('Calarasi', 'give'), |
|
| 914 | + 'CS' => __('Caras-Severin', 'give'), |
|
| 915 | + 'CJ' => __('Cluj', 'give'), |
|
| 916 | + 'CT' => __('Constanta', 'give'), |
|
| 917 | + 'CV' => __('Covasna', 'give'), |
|
| 918 | + 'DB' => __('Dambovita', 'give'), |
|
| 919 | + 'DJ' => __('Dolj', 'give'), |
|
| 920 | + 'GL' => __('Galati', 'give'), |
|
| 921 | + 'GR' => __('Giurgiu', 'give'), |
|
| 922 | + 'GJ' => __('Gorj', 'give'), |
|
| 923 | + 'HR' => __('Harghita', 'give'), |
|
| 924 | + 'HD' => __('Hunedoara', 'give'), |
|
| 925 | + 'IL' => __('Ialomita', 'give'), |
|
| 926 | + 'IS' => __('Iasi', 'give'), |
|
| 927 | + 'IF' => __('Ilfov', 'give'), |
|
| 928 | + 'MM' => __('Maramures', 'give'), |
|
| 929 | + 'MH' => __('Mehedinti', 'give'), |
|
| 930 | + 'MS' => __('Mures', 'give'), |
|
| 931 | + 'NT' => __('Neamt', 'give'), |
|
| 932 | + 'OT' => __('Olt', 'give'), |
|
| 933 | + 'PH' => __('Prahova', 'give'), |
|
| 934 | + 'SJ' => __('Salaj', 'give'), |
|
| 935 | + 'SM' => __('Satu Mare', 'give'), |
|
| 936 | + 'SB' => __('Sibiu', 'give'), |
|
| 937 | + 'SV' => __('Suceava', 'give'), |
|
| 938 | + 'TR' => __('Teleorman', 'give'), |
|
| 939 | + 'TM' => __('Timis', 'give'), |
|
| 940 | + 'TL' => __('Tulcea', 'give'), |
|
| 941 | + 'VL' => __('Valcea', 'give'), |
|
| 942 | + 'VS' => __('Vaslui', 'give'), |
|
| 943 | + 'VN' => __('Vrancea', 'give'), |
|
| 944 | 944 | ); |
| 945 | 945 | |
| 946 | - return apply_filters( 'give_romania_states', $states ); |
|
| 946 | + return apply_filters('give_romania_states', $states); |
|
| 947 | 947 | } |
| 948 | 948 | |
| 949 | 949 | /** |
@@ -955,17 +955,17 @@ discard block |
||
| 955 | 955 | function give_get_pakistan_states_list() { |
| 956 | 956 | $states = array( |
| 957 | 957 | '' => '', |
| 958 | - 'JK' => __( 'Azad Kashmir', 'give' ), |
|
| 959 | - 'BA' => __( 'Balochistan', 'give' ), |
|
| 960 | - 'TA' => __( 'FATA', 'give' ), |
|
| 961 | - 'GB' => __( 'Gilgit Baltistan', 'give' ), |
|
| 962 | - 'IS' => __( 'Islamabad Capital Territory', 'give' ), |
|
| 963 | - 'KP' => __( 'Khyber Pakhtunkhwa', 'give' ), |
|
| 964 | - 'PB' => __( 'Punjab', 'give' ), |
|
| 965 | - 'SD' => __( 'Sindh', 'give' ), |
|
| 958 | + 'JK' => __('Azad Kashmir', 'give'), |
|
| 959 | + 'BA' => __('Balochistan', 'give'), |
|
| 960 | + 'TA' => __('FATA', 'give'), |
|
| 961 | + 'GB' => __('Gilgit Baltistan', 'give'), |
|
| 962 | + 'IS' => __('Islamabad Capital Territory', 'give'), |
|
| 963 | + 'KP' => __('Khyber Pakhtunkhwa', 'give'), |
|
| 964 | + 'PB' => __('Punjab', 'give'), |
|
| 965 | + 'SD' => __('Sindh', 'give'), |
|
| 966 | 966 | ); |
| 967 | 967 | |
| 968 | - return apply_filters( 'give_pakistan_states', $states ); |
|
| 968 | + return apply_filters('give_pakistan_states', $states); |
|
| 969 | 969 | } |
| 970 | 970 | |
| 971 | 971 | /** |
@@ -977,91 +977,91 @@ discard block |
||
| 977 | 977 | function give_get_philippines_states_list() { |
| 978 | 978 | $states = array( |
| 979 | 979 | '' => '', |
| 980 | - 'ABR' => __( 'Abra', 'give' ), |
|
| 981 | - 'AGN' => __( 'Agusan del Norte', 'give' ), |
|
| 982 | - 'AGS' => __( 'Agusan del Sur', 'give' ), |
|
| 983 | - 'AKL' => __( 'Aklan', 'give' ), |
|
| 984 | - 'ALB' => __( 'Albay', 'give' ), |
|
| 985 | - 'ANT' => __( 'Antique', 'give' ), |
|
| 986 | - 'APA' => __( 'Apayao', 'give' ), |
|
| 987 | - 'AUR' => __( 'Aurora', 'give' ), |
|
| 988 | - 'BAS' => __( 'Basilan', 'give' ), |
|
| 989 | - 'BAN' => __( 'Bataan', 'give' ), |
|
| 990 | - 'BTN' => __( 'Batanes', 'give' ), |
|
| 991 | - 'BTG' => __( 'Batangas', 'give' ), |
|
| 992 | - 'BEN' => __( 'Benguet', 'give' ), |
|
| 993 | - 'BIL' => __( 'Biliran', 'give' ), |
|
| 994 | - 'BOH' => __( 'Bohol', 'give' ), |
|
| 995 | - 'BUK' => __( 'Bukidnon', 'give' ), |
|
| 996 | - 'BUL' => __( 'Bulacan', 'give' ), |
|
| 997 | - 'CAG' => __( 'Cagayan', 'give' ), |
|
| 998 | - 'CAN' => __( 'Camarines Norte', 'give' ), |
|
| 999 | - 'CAS' => __( 'Camarines Sur', 'give' ), |
|
| 1000 | - 'CAM' => __( 'Camiguin', 'give' ), |
|
| 1001 | - 'CAP' => __( 'Capiz', 'give' ), |
|
| 1002 | - 'CAT' => __( 'Catanduanes', 'give' ), |
|
| 1003 | - 'CAV' => __( 'Cavite', 'give' ), |
|
| 1004 | - 'CEB' => __( 'Cebu', 'give' ), |
|
| 1005 | - 'COM' => __( 'Compostela Valley', 'give' ), |
|
| 1006 | - 'NCO' => __( 'Cotabato', 'give' ), |
|
| 1007 | - 'DAV' => __( 'Davao del Norte', 'give' ), |
|
| 1008 | - 'DAS' => __( 'Davao del Sur', 'give' ), |
|
| 1009 | - 'DAC' => __( 'Davao Occidental', 'give' ), // TODO: Needs to be updated when ISO code is assigned |
|
| 1010 | - 'DAO' => __( 'Davao Oriental', 'give' ), |
|
| 1011 | - 'DIN' => __( 'Dinagat Islands', 'give' ), |
|
| 1012 | - 'EAS' => __( 'Eastern Samar', 'give' ), |
|
| 1013 | - 'GUI' => __( 'Guimaras', 'give' ), |
|
| 1014 | - 'IFU' => __( 'Ifugao', 'give' ), |
|
| 1015 | - 'ILN' => __( 'Ilocos Norte', 'give' ), |
|
| 1016 | - 'ILS' => __( 'Ilocos Sur', 'give' ), |
|
| 1017 | - 'ILI' => __( 'Iloilo', 'give' ), |
|
| 1018 | - 'ISA' => __( 'Isabela', 'give' ), |
|
| 1019 | - 'KAL' => __( 'Kalinga', 'give' ), |
|
| 1020 | - 'LUN' => __( 'La Union', 'give' ), |
|
| 1021 | - 'LAG' => __( 'Laguna', 'give' ), |
|
| 1022 | - 'LAN' => __( 'Lanao del Norte', 'give' ), |
|
| 1023 | - 'LAS' => __( 'Lanao del Sur', 'give' ), |
|
| 1024 | - 'LEY' => __( 'Leyte', 'give' ), |
|
| 1025 | - 'MAG' => __( 'Maguindanao', 'give' ), |
|
| 1026 | - 'MAD' => __( 'Marinduque', 'give' ), |
|
| 1027 | - 'MAS' => __( 'Masbate', 'give' ), |
|
| 1028 | - 'MSC' => __( 'Misamis Occidental', 'give' ), |
|
| 1029 | - 'MSR' => __( 'Misamis Oriental', 'give' ), |
|
| 1030 | - 'MOU' => __( 'Mountain Province', 'give' ), |
|
| 1031 | - 'NEC' => __( 'Negros Occidental', 'give' ), |
|
| 1032 | - 'NER' => __( 'Negros Oriental', 'give' ), |
|
| 1033 | - 'NSA' => __( 'Northern Samar', 'give' ), |
|
| 1034 | - 'NUE' => __( 'Nueva Ecija', 'give' ), |
|
| 1035 | - 'NUV' => __( 'Nueva Vizcaya', 'give' ), |
|
| 1036 | - 'MDC' => __( 'Occidental Mindoro', 'give' ), |
|
| 1037 | - 'MDR' => __( 'Oriental Mindoro', 'give' ), |
|
| 1038 | - 'PLW' => __( 'Palawan', 'give' ), |
|
| 1039 | - 'PAM' => __( 'Pampanga', 'give' ), |
|
| 1040 | - 'PAN' => __( 'Pangasinan', 'give' ), |
|
| 1041 | - 'QUE' => __( 'Quezon', 'give' ), |
|
| 1042 | - 'QUI' => __( 'Quirino', 'give' ), |
|
| 1043 | - 'RIZ' => __( 'Rizal', 'give' ), |
|
| 1044 | - 'ROM' => __( 'Romblon', 'give' ), |
|
| 1045 | - 'WSA' => __( 'Samar', 'give' ), |
|
| 1046 | - 'SAR' => __( 'Sarangani', 'give' ), |
|
| 1047 | - 'SIQ' => __( 'Siquijor', 'give' ), |
|
| 1048 | - 'SOR' => __( 'Sorsogon', 'give' ), |
|
| 1049 | - 'SCO' => __( 'South Cotabato', 'give' ), |
|
| 1050 | - 'SLE' => __( 'Southern Leyte', 'give' ), |
|
| 1051 | - 'SUK' => __( 'Sultan Kudarat', 'give' ), |
|
| 1052 | - 'SLU' => __( 'Sulu', 'give' ), |
|
| 1053 | - 'SUN' => __( 'Surigao del Norte', 'give' ), |
|
| 1054 | - 'SUR' => __( 'Surigao del Sur', 'give' ), |
|
| 1055 | - 'TAR' => __( 'Tarlac', 'give' ), |
|
| 1056 | - 'TAW' => __( 'Tawi-Tawi', 'give' ), |
|
| 1057 | - 'ZMB' => __( 'Zambales', 'give' ), |
|
| 1058 | - 'ZAN' => __( 'Zamboanga del Norte', 'give' ), |
|
| 1059 | - 'ZAS' => __( 'Zamboanga del Sur', 'give' ), |
|
| 1060 | - 'ZSI' => __( 'Zamboanga Sibugay', 'give' ), |
|
| 1061 | - '00' => __( 'Metro Manila', 'give' ), |
|
| 980 | + 'ABR' => __('Abra', 'give'), |
|
| 981 | + 'AGN' => __('Agusan del Norte', 'give'), |
|
| 982 | + 'AGS' => __('Agusan del Sur', 'give'), |
|
| 983 | + 'AKL' => __('Aklan', 'give'), |
|
| 984 | + 'ALB' => __('Albay', 'give'), |
|
| 985 | + 'ANT' => __('Antique', 'give'), |
|
| 986 | + 'APA' => __('Apayao', 'give'), |
|
| 987 | + 'AUR' => __('Aurora', 'give'), |
|
| 988 | + 'BAS' => __('Basilan', 'give'), |
|
| 989 | + 'BAN' => __('Bataan', 'give'), |
|
| 990 | + 'BTN' => __('Batanes', 'give'), |
|
| 991 | + 'BTG' => __('Batangas', 'give'), |
|
| 992 | + 'BEN' => __('Benguet', 'give'), |
|
| 993 | + 'BIL' => __('Biliran', 'give'), |
|
| 994 | + 'BOH' => __('Bohol', 'give'), |
|
| 995 | + 'BUK' => __('Bukidnon', 'give'), |
|
| 996 | + 'BUL' => __('Bulacan', 'give'), |
|
| 997 | + 'CAG' => __('Cagayan', 'give'), |
|
| 998 | + 'CAN' => __('Camarines Norte', 'give'), |
|
| 999 | + 'CAS' => __('Camarines Sur', 'give'), |
|
| 1000 | + 'CAM' => __('Camiguin', 'give'), |
|
| 1001 | + 'CAP' => __('Capiz', 'give'), |
|
| 1002 | + 'CAT' => __('Catanduanes', 'give'), |
|
| 1003 | + 'CAV' => __('Cavite', 'give'), |
|
| 1004 | + 'CEB' => __('Cebu', 'give'), |
|
| 1005 | + 'COM' => __('Compostela Valley', 'give'), |
|
| 1006 | + 'NCO' => __('Cotabato', 'give'), |
|
| 1007 | + 'DAV' => __('Davao del Norte', 'give'), |
|
| 1008 | + 'DAS' => __('Davao del Sur', 'give'), |
|
| 1009 | + 'DAC' => __('Davao Occidental', 'give'), // TODO: Needs to be updated when ISO code is assigned |
|
| 1010 | + 'DAO' => __('Davao Oriental', 'give'), |
|
| 1011 | + 'DIN' => __('Dinagat Islands', 'give'), |
|
| 1012 | + 'EAS' => __('Eastern Samar', 'give'), |
|
| 1013 | + 'GUI' => __('Guimaras', 'give'), |
|
| 1014 | + 'IFU' => __('Ifugao', 'give'), |
|
| 1015 | + 'ILN' => __('Ilocos Norte', 'give'), |
|
| 1016 | + 'ILS' => __('Ilocos Sur', 'give'), |
|
| 1017 | + 'ILI' => __('Iloilo', 'give'), |
|
| 1018 | + 'ISA' => __('Isabela', 'give'), |
|
| 1019 | + 'KAL' => __('Kalinga', 'give'), |
|
| 1020 | + 'LUN' => __('La Union', 'give'), |
|
| 1021 | + 'LAG' => __('Laguna', 'give'), |
|
| 1022 | + 'LAN' => __('Lanao del Norte', 'give'), |
|
| 1023 | + 'LAS' => __('Lanao del Sur', 'give'), |
|
| 1024 | + 'LEY' => __('Leyte', 'give'), |
|
| 1025 | + 'MAG' => __('Maguindanao', 'give'), |
|
| 1026 | + 'MAD' => __('Marinduque', 'give'), |
|
| 1027 | + 'MAS' => __('Masbate', 'give'), |
|
| 1028 | + 'MSC' => __('Misamis Occidental', 'give'), |
|
| 1029 | + 'MSR' => __('Misamis Oriental', 'give'), |
|
| 1030 | + 'MOU' => __('Mountain Province', 'give'), |
|
| 1031 | + 'NEC' => __('Negros Occidental', 'give'), |
|
| 1032 | + 'NER' => __('Negros Oriental', 'give'), |
|
| 1033 | + 'NSA' => __('Northern Samar', 'give'), |
|
| 1034 | + 'NUE' => __('Nueva Ecija', 'give'), |
|
| 1035 | + 'NUV' => __('Nueva Vizcaya', 'give'), |
|
| 1036 | + 'MDC' => __('Occidental Mindoro', 'give'), |
|
| 1037 | + 'MDR' => __('Oriental Mindoro', 'give'), |
|
| 1038 | + 'PLW' => __('Palawan', 'give'), |
|
| 1039 | + 'PAM' => __('Pampanga', 'give'), |
|
| 1040 | + 'PAN' => __('Pangasinan', 'give'), |
|
| 1041 | + 'QUE' => __('Quezon', 'give'), |
|
| 1042 | + 'QUI' => __('Quirino', 'give'), |
|
| 1043 | + 'RIZ' => __('Rizal', 'give'), |
|
| 1044 | + 'ROM' => __('Romblon', 'give'), |
|
| 1045 | + 'WSA' => __('Samar', 'give'), |
|
| 1046 | + 'SAR' => __('Sarangani', 'give'), |
|
| 1047 | + 'SIQ' => __('Siquijor', 'give'), |
|
| 1048 | + 'SOR' => __('Sorsogon', 'give'), |
|
| 1049 | + 'SCO' => __('South Cotabato', 'give'), |
|
| 1050 | + 'SLE' => __('Southern Leyte', 'give'), |
|
| 1051 | + 'SUK' => __('Sultan Kudarat', 'give'), |
|
| 1052 | + 'SLU' => __('Sulu', 'give'), |
|
| 1053 | + 'SUN' => __('Surigao del Norte', 'give'), |
|
| 1054 | + 'SUR' => __('Surigao del Sur', 'give'), |
|
| 1055 | + 'TAR' => __('Tarlac', 'give'), |
|
| 1056 | + 'TAW' => __('Tawi-Tawi', 'give'), |
|
| 1057 | + 'ZMB' => __('Zambales', 'give'), |
|
| 1058 | + 'ZAN' => __('Zamboanga del Norte', 'give'), |
|
| 1059 | + 'ZAS' => __('Zamboanga del Sur', 'give'), |
|
| 1060 | + 'ZSI' => __('Zamboanga Sibugay', 'give'), |
|
| 1061 | + '00' => __('Metro Manila', 'give'), |
|
| 1062 | 1062 | ); |
| 1063 | 1063 | |
| 1064 | - return apply_filters( 'give_philippines_states', $states ); |
|
| 1064 | + return apply_filters('give_philippines_states', $states); |
|
| 1065 | 1065 | } |
| 1066 | 1066 | |
| 1067 | 1067 | /** |
@@ -1073,35 +1073,35 @@ discard block |
||
| 1073 | 1073 | function give_get_peru_states_list() { |
| 1074 | 1074 | $states = array( |
| 1075 | 1075 | '' => '', |
| 1076 | - 'CAL' => __( 'El Callao', 'give' ), |
|
| 1077 | - 'LMA' => __( 'Municipalidad Metropolitana de Lima', 'give' ), |
|
| 1078 | - 'AMA' => __( 'Amazonas', 'give' ), |
|
| 1079 | - 'ANC' => __( 'Ancash', 'give' ), |
|
| 1080 | - 'APU' => __( 'Apurímac', 'give' ), |
|
| 1081 | - 'ARE' => __( 'Arequipa', 'give' ), |
|
| 1082 | - 'AYA' => __( 'Ayacucho', 'give' ), |
|
| 1083 | - 'CAJ' => __( 'Cajamarca', 'give' ), |
|
| 1084 | - 'CUS' => __( 'Cusco', 'give' ), |
|
| 1085 | - 'HUV' => __( 'Huancavelica', 'give' ), |
|
| 1086 | - 'HUC' => __( 'Huánuco', 'give' ), |
|
| 1087 | - 'ICA' => __( 'Ica', 'give' ), |
|
| 1088 | - 'JUN' => __( 'Junín', 'give' ), |
|
| 1089 | - 'LAL' => __( 'La Libertad', 'give' ), |
|
| 1090 | - 'LAM' => __( 'Lambayeque', 'give' ), |
|
| 1091 | - 'LIM' => __( 'Lima', 'give' ), |
|
| 1092 | - 'LOR' => __( 'Loreto', 'give' ), |
|
| 1093 | - 'MDD' => __( 'Madre de Dios', 'give' ), |
|
| 1094 | - 'MOQ' => __( 'Moquegua', 'give' ), |
|
| 1095 | - 'PAS' => __( 'Pasco', 'give' ), |
|
| 1096 | - 'PIU' => __( 'Piura', 'give' ), |
|
| 1097 | - 'PUN' => __( 'Puno', 'give' ), |
|
| 1098 | - 'SAM' => __( 'San Martín', 'give' ), |
|
| 1099 | - 'TAC' => __( 'Tacna', 'give' ), |
|
| 1100 | - 'TUM' => __( 'Tumbes', 'give' ), |
|
| 1101 | - 'UCA' => __( 'Ucayali', 'give' ), |
|
| 1076 | + 'CAL' => __('El Callao', 'give'), |
|
| 1077 | + 'LMA' => __('Municipalidad Metropolitana de Lima', 'give'), |
|
| 1078 | + 'AMA' => __('Amazonas', 'give'), |
|
| 1079 | + 'ANC' => __('Ancash', 'give'), |
|
| 1080 | + 'APU' => __('Apurímac', 'give'), |
|
| 1081 | + 'ARE' => __('Arequipa', 'give'), |
|
| 1082 | + 'AYA' => __('Ayacucho', 'give'), |
|
| 1083 | + 'CAJ' => __('Cajamarca', 'give'), |
|
| 1084 | + 'CUS' => __('Cusco', 'give'), |
|
| 1085 | + 'HUV' => __('Huancavelica', 'give'), |
|
| 1086 | + 'HUC' => __('Huánuco', 'give'), |
|
| 1087 | + 'ICA' => __('Ica', 'give'), |
|
| 1088 | + 'JUN' => __('Junín', 'give'), |
|
| 1089 | + 'LAL' => __('La Libertad', 'give'), |
|
| 1090 | + 'LAM' => __('Lambayeque', 'give'), |
|
| 1091 | + 'LIM' => __('Lima', 'give'), |
|
| 1092 | + 'LOR' => __('Loreto', 'give'), |
|
| 1093 | + 'MDD' => __('Madre de Dios', 'give'), |
|
| 1094 | + 'MOQ' => __('Moquegua', 'give'), |
|
| 1095 | + 'PAS' => __('Pasco', 'give'), |
|
| 1096 | + 'PIU' => __('Piura', 'give'), |
|
| 1097 | + 'PUN' => __('Puno', 'give'), |
|
| 1098 | + 'SAM' => __('San Martín', 'give'), |
|
| 1099 | + 'TAC' => __('Tacna', 'give'), |
|
| 1100 | + 'TUM' => __('Tumbes', 'give'), |
|
| 1101 | + 'UCA' => __('Ucayali', 'give'), |
|
| 1102 | 1102 | ); |
| 1103 | 1103 | |
| 1104 | - return apply_filters( 'give_peru_states', $states ); |
|
| 1104 | + return apply_filters('give_peru_states', $states); |
|
| 1105 | 1105 | } |
| 1106 | 1106 | |
| 1107 | 1107 | /** |
@@ -1113,23 +1113,23 @@ discard block |
||
| 1113 | 1113 | function give_get_nepal_states_list() { |
| 1114 | 1114 | $states = array( |
| 1115 | 1115 | '' => '', |
| 1116 | - 'BAG' => __( 'Bagmati', 'give' ), |
|
| 1117 | - 'BHE' => __( 'Bheri', 'give' ), |
|
| 1118 | - 'DHA' => __( 'Dhaulagiri', 'give' ), |
|
| 1119 | - 'GAN' => __( 'Gandaki', 'give' ), |
|
| 1120 | - 'JAN' => __( 'Janakpur', 'give' ), |
|
| 1121 | - 'KAR' => __( 'Karnali', 'give' ), |
|
| 1122 | - 'KOS' => __( 'Koshi', 'give' ), |
|
| 1123 | - 'LUM' => __( 'Lumbini', 'give' ), |
|
| 1124 | - 'MAH' => __( 'Mahakali', 'give' ), |
|
| 1125 | - 'MEC' => __( 'Mechi', 'give' ), |
|
| 1126 | - 'NAR' => __( 'Narayani', 'give' ), |
|
| 1127 | - 'RAP' => __( 'Rapti', 'give' ), |
|
| 1128 | - 'SAG' => __( 'Sagarmatha', 'give' ), |
|
| 1129 | - 'SET' => __( 'Seti', 'give' ), |
|
| 1116 | + 'BAG' => __('Bagmati', 'give'), |
|
| 1117 | + 'BHE' => __('Bheri', 'give'), |
|
| 1118 | + 'DHA' => __('Dhaulagiri', 'give'), |
|
| 1119 | + 'GAN' => __('Gandaki', 'give'), |
|
| 1120 | + 'JAN' => __('Janakpur', 'give'), |
|
| 1121 | + 'KAR' => __('Karnali', 'give'), |
|
| 1122 | + 'KOS' => __('Koshi', 'give'), |
|
| 1123 | + 'LUM' => __('Lumbini', 'give'), |
|
| 1124 | + 'MAH' => __('Mahakali', 'give'), |
|
| 1125 | + 'MEC' => __('Mechi', 'give'), |
|
| 1126 | + 'NAR' => __('Narayani', 'give'), |
|
| 1127 | + 'RAP' => __('Rapti', 'give'), |
|
| 1128 | + 'SAG' => __('Sagarmatha', 'give'), |
|
| 1129 | + 'SET' => __('Seti', 'give'), |
|
| 1130 | 1130 | ); |
| 1131 | 1131 | |
| 1132 | - return apply_filters( 'give_nepal_states', $states ); |
|
| 1132 | + return apply_filters('give_nepal_states', $states); |
|
| 1133 | 1133 | } |
| 1134 | 1134 | |
| 1135 | 1135 | /** |
@@ -1141,46 +1141,46 @@ discard block |
||
| 1141 | 1141 | function give_get_nigerian_states_list() { |
| 1142 | 1142 | $states = array( |
| 1143 | 1143 | '' => '', |
| 1144 | - 'AB' => __( 'Abia', 'give' ), |
|
| 1145 | - 'FC' => __( 'Abuja', 'give' ), |
|
| 1146 | - 'AD' => __( 'Adamawa', 'give' ), |
|
| 1147 | - 'AK' => __( 'Akwa Ibom', 'give' ), |
|
| 1148 | - 'AN' => __( 'Anambra', 'give' ), |
|
| 1149 | - 'BA' => __( 'Bauchi', 'give' ), |
|
| 1150 | - 'BY' => __( 'Bayelsa', 'give' ), |
|
| 1151 | - 'BE' => __( 'Benue', 'give' ), |
|
| 1152 | - 'BO' => __( 'Borno', 'give' ), |
|
| 1153 | - 'CR' => __( 'Cross River', 'give' ), |
|
| 1154 | - 'DE' => __( 'Delta', 'give' ), |
|
| 1155 | - 'EB' => __( 'Ebonyi', 'give' ), |
|
| 1156 | - 'ED' => __( 'Edo', 'give' ), |
|
| 1157 | - 'EK' => __( 'Ekiti', 'give' ), |
|
| 1158 | - 'EN' => __( 'Enugu', 'give' ), |
|
| 1159 | - 'GO' => __( 'Gombe', 'give' ), |
|
| 1160 | - 'IM' => __( 'Imo', 'give' ), |
|
| 1161 | - 'JI' => __( 'Jigawa', 'give' ), |
|
| 1162 | - 'KD' => __( 'Kaduna', 'give' ), |
|
| 1163 | - 'KN' => __( 'Kano', 'give' ), |
|
| 1164 | - 'KT' => __( 'Katsina', 'give' ), |
|
| 1165 | - 'KE' => __( 'Kebbi', 'give' ), |
|
| 1166 | - 'KO' => __( 'Kogi', 'give' ), |
|
| 1167 | - 'KW' => __( 'Kwara', 'give' ), |
|
| 1168 | - 'LA' => __( 'Lagos', 'give' ), |
|
| 1169 | - 'NA' => __( 'Nasarawa', 'give' ), |
|
| 1170 | - 'NI' => __( 'Niger', 'give' ), |
|
| 1171 | - 'OG' => __( 'Ogun', 'give' ), |
|
| 1172 | - 'ON' => __( 'Ondo', 'give' ), |
|
| 1173 | - 'OS' => __( 'Osun', 'give' ), |
|
| 1174 | - 'OY' => __( 'Oyo', 'give' ), |
|
| 1175 | - 'PL' => __( 'Plateau', 'give' ), |
|
| 1176 | - 'RI' => __( 'Rivers', 'give' ), |
|
| 1177 | - 'SO' => __( 'Sokoto', 'give' ), |
|
| 1178 | - 'TA' => __( 'Taraba', 'give' ), |
|
| 1179 | - 'YO' => __( 'Yobe', 'give' ), |
|
| 1180 | - 'ZA' => __( 'Zamfara', 'give' ), |
|
| 1144 | + 'AB' => __('Abia', 'give'), |
|
| 1145 | + 'FC' => __('Abuja', 'give'), |
|
| 1146 | + 'AD' => __('Adamawa', 'give'), |
|
| 1147 | + 'AK' => __('Akwa Ibom', 'give'), |
|
| 1148 | + 'AN' => __('Anambra', 'give'), |
|
| 1149 | + 'BA' => __('Bauchi', 'give'), |
|
| 1150 | + 'BY' => __('Bayelsa', 'give'), |
|
| 1151 | + 'BE' => __('Benue', 'give'), |
|
| 1152 | + 'BO' => __('Borno', 'give'), |
|
| 1153 | + 'CR' => __('Cross River', 'give'), |
|
| 1154 | + 'DE' => __('Delta', 'give'), |
|
| 1155 | + 'EB' => __('Ebonyi', 'give'), |
|
| 1156 | + 'ED' => __('Edo', 'give'), |
|
| 1157 | + 'EK' => __('Ekiti', 'give'), |
|
| 1158 | + 'EN' => __('Enugu', 'give'), |
|
| 1159 | + 'GO' => __('Gombe', 'give'), |
|
| 1160 | + 'IM' => __('Imo', 'give'), |
|
| 1161 | + 'JI' => __('Jigawa', 'give'), |
|
| 1162 | + 'KD' => __('Kaduna', 'give'), |
|
| 1163 | + 'KN' => __('Kano', 'give'), |
|
| 1164 | + 'KT' => __('Katsina', 'give'), |
|
| 1165 | + 'KE' => __('Kebbi', 'give'), |
|
| 1166 | + 'KO' => __('Kogi', 'give'), |
|
| 1167 | + 'KW' => __('Kwara', 'give'), |
|
| 1168 | + 'LA' => __('Lagos', 'give'), |
|
| 1169 | + 'NA' => __('Nasarawa', 'give'), |
|
| 1170 | + 'NI' => __('Niger', 'give'), |
|
| 1171 | + 'OG' => __('Ogun', 'give'), |
|
| 1172 | + 'ON' => __('Ondo', 'give'), |
|
| 1173 | + 'OS' => __('Osun', 'give'), |
|
| 1174 | + 'OY' => __('Oyo', 'give'), |
|
| 1175 | + 'PL' => __('Plateau', 'give'), |
|
| 1176 | + 'RI' => __('Rivers', 'give'), |
|
| 1177 | + 'SO' => __('Sokoto', 'give'), |
|
| 1178 | + 'TA' => __('Taraba', 'give'), |
|
| 1179 | + 'YO' => __('Yobe', 'give'), |
|
| 1180 | + 'ZA' => __('Zamfara', 'give'), |
|
| 1181 | 1181 | ); |
| 1182 | 1182 | |
| 1183 | - return apply_filters( 'give_nigerian_states', $states ); |
|
| 1183 | + return apply_filters('give_nigerian_states', $states); |
|
| 1184 | 1184 | } |
| 1185 | 1185 | |
| 1186 | 1186 | /** |
@@ -1192,41 +1192,41 @@ discard block |
||
| 1192 | 1192 | function give_get_mexico_states_list() { |
| 1193 | 1193 | $states = array( |
| 1194 | 1194 | '' => '', |
| 1195 | - 'Distrito Federal' => __( 'Distrito Federal', 'give' ), |
|
| 1196 | - 'Jalisco' => __( 'Jalisco', 'give' ), |
|
| 1197 | - 'Nuevo Leon' => __( 'Nuevo León', 'give' ), |
|
| 1198 | - 'Aguascalientes' => __( 'Aguascalientes', 'give' ), |
|
| 1199 | - 'Baja California' => __( 'Baja California', 'give' ), |
|
| 1200 | - 'Baja California Sur' => __( 'Baja California Sur', 'give' ), |
|
| 1201 | - 'Campeche' => __( 'Campeche', 'give' ), |
|
| 1202 | - 'Chiapas' => __( 'Chiapas', 'give' ), |
|
| 1203 | - 'Chihuahua' => __( 'Chihuahua', 'give' ), |
|
| 1204 | - 'Coahuila' => __( 'Coahuila', 'give' ), |
|
| 1205 | - 'Colima' => __( 'Colima', 'give' ), |
|
| 1206 | - 'Durango' => __( 'Durango', 'give' ), |
|
| 1207 | - 'Guanajuato' => __( 'Guanajuato', 'give' ), |
|
| 1208 | - 'Guerrero' => __( 'Guerrero', 'give' ), |
|
| 1209 | - 'Hidalgo' => __( 'Hidalgo', 'give' ), |
|
| 1210 | - 'Estado de Mexico' => __( 'Edo. de México', 'give' ), |
|
| 1211 | - 'Michoacan' => __( 'Michoacán', 'give' ), |
|
| 1212 | - 'Morelos' => __( 'Morelos', 'give' ), |
|
| 1213 | - 'Nayarit' => __( 'Nayarit', 'give' ), |
|
| 1214 | - 'Oaxaca' => __( 'Oaxaca', 'give' ), |
|
| 1215 | - 'Puebla' => __( 'Puebla', 'give' ), |
|
| 1216 | - 'Queretaro' => __( 'Querétaro', 'give' ), |
|
| 1217 | - 'Quintana Roo' => __( 'Quintana Roo', 'give' ), |
|
| 1218 | - 'San Luis Potosi' => __( 'San Luis Potosí', 'give' ), |
|
| 1219 | - 'Sinaloa' => __( 'Sinaloa', 'give' ), |
|
| 1220 | - 'Sonora' => __( 'Sonora', 'give' ), |
|
| 1221 | - 'Tabasco' => __( 'Tabasco', 'give' ), |
|
| 1222 | - 'Tamaulipas' => __( 'Tamaulipas', 'give' ), |
|
| 1223 | - 'Tlaxcala' => __( 'Tlaxcala', 'give' ), |
|
| 1224 | - 'Veracruz' => __( 'Veracruz', 'give' ), |
|
| 1225 | - 'Yucatan' => __( 'Yucatán', 'give' ), |
|
| 1226 | - 'Zacatecas' => __( 'Zacatecas', 'give' ), |
|
| 1195 | + 'Distrito Federal' => __('Distrito Federal', 'give'), |
|
| 1196 | + 'Jalisco' => __('Jalisco', 'give'), |
|
| 1197 | + 'Nuevo Leon' => __('Nuevo León', 'give'), |
|
| 1198 | + 'Aguascalientes' => __('Aguascalientes', 'give'), |
|
| 1199 | + 'Baja California' => __('Baja California', 'give'), |
|
| 1200 | + 'Baja California Sur' => __('Baja California Sur', 'give'), |
|
| 1201 | + 'Campeche' => __('Campeche', 'give'), |
|
| 1202 | + 'Chiapas' => __('Chiapas', 'give'), |
|
| 1203 | + 'Chihuahua' => __('Chihuahua', 'give'), |
|
| 1204 | + 'Coahuila' => __('Coahuila', 'give'), |
|
| 1205 | + 'Colima' => __('Colima', 'give'), |
|
| 1206 | + 'Durango' => __('Durango', 'give'), |
|
| 1207 | + 'Guanajuato' => __('Guanajuato', 'give'), |
|
| 1208 | + 'Guerrero' => __('Guerrero', 'give'), |
|
| 1209 | + 'Hidalgo' => __('Hidalgo', 'give'), |
|
| 1210 | + 'Estado de Mexico' => __('Edo. de México', 'give'), |
|
| 1211 | + 'Michoacan' => __('Michoacán', 'give'), |
|
| 1212 | + 'Morelos' => __('Morelos', 'give'), |
|
| 1213 | + 'Nayarit' => __('Nayarit', 'give'), |
|
| 1214 | + 'Oaxaca' => __('Oaxaca', 'give'), |
|
| 1215 | + 'Puebla' => __('Puebla', 'give'), |
|
| 1216 | + 'Queretaro' => __('Querétaro', 'give'), |
|
| 1217 | + 'Quintana Roo' => __('Quintana Roo', 'give'), |
|
| 1218 | + 'San Luis Potosi' => __('San Luis Potosí', 'give'), |
|
| 1219 | + 'Sinaloa' => __('Sinaloa', 'give'), |
|
| 1220 | + 'Sonora' => __('Sonora', 'give'), |
|
| 1221 | + 'Tabasco' => __('Tabasco', 'give'), |
|
| 1222 | + 'Tamaulipas' => __('Tamaulipas', 'give'), |
|
| 1223 | + 'Tlaxcala' => __('Tlaxcala', 'give'), |
|
| 1224 | + 'Veracruz' => __('Veracruz', 'give'), |
|
| 1225 | + 'Yucatan' => __('Yucatán', 'give'), |
|
| 1226 | + 'Zacatecas' => __('Zacatecas', 'give'), |
|
| 1227 | 1227 | ); |
| 1228 | 1228 | |
| 1229 | - return apply_filters( 'give_mexico_states', $states ); |
|
| 1229 | + return apply_filters('give_mexico_states', $states); |
|
| 1230 | 1230 | } |
| 1231 | 1231 | |
| 1232 | 1232 | /** |
@@ -1238,56 +1238,56 @@ discard block |
||
| 1238 | 1238 | function give_get_japan_states_list() { |
| 1239 | 1239 | $states = array( |
| 1240 | 1240 | '' => '', |
| 1241 | - 'JP01' => __( 'Hokkaido', 'give' ), |
|
| 1242 | - 'JP02' => __( 'Aomori', 'give' ), |
|
| 1243 | - 'JP03' => __( 'Iwate', 'give' ), |
|
| 1244 | - 'JP04' => __( 'Miyagi', 'give' ), |
|
| 1245 | - 'JP05' => __( 'Akita', 'give' ), |
|
| 1246 | - 'JP06' => __( 'Yamagata', 'give' ), |
|
| 1247 | - 'JP07' => __( 'Fukushima', 'give' ), |
|
| 1248 | - 'JP08' => __( 'Ibaraki', 'give' ), |
|
| 1249 | - 'JP09' => __( 'Tochigi', 'give' ), |
|
| 1250 | - 'JP10' => __( 'Gunma', 'give' ), |
|
| 1251 | - 'JP11' => __( 'Saitama', 'give' ), |
|
| 1252 | - 'JP12' => __( 'Chiba', 'give' ), |
|
| 1253 | - 'JP13' => __( 'Tokyo', 'give' ), |
|
| 1254 | - 'JP14' => __( 'Kanagawa', 'give' ), |
|
| 1255 | - 'JP15' => __( 'Niigata', 'give' ), |
|
| 1256 | - 'JP16' => __( 'Toyama', 'give' ), |
|
| 1257 | - 'JP17' => __( 'Ishikawa', 'give' ), |
|
| 1258 | - 'JP18' => __( 'Fukui', 'give' ), |
|
| 1259 | - 'JP19' => __( 'Yamanashi', 'give' ), |
|
| 1260 | - 'JP20' => __( 'Nagano', 'give' ), |
|
| 1261 | - 'JP21' => __( 'Gifu', 'give' ), |
|
| 1262 | - 'JP22' => __( 'Shizuoka', 'give' ), |
|
| 1263 | - 'JP23' => __( 'Aichi', 'give' ), |
|
| 1264 | - 'JP24' => __( 'Mie', 'give' ), |
|
| 1265 | - 'JP25' => __( 'Shiga', 'give' ), |
|
| 1266 | - 'JP26' => __( 'Kyoto', 'give' ), |
|
| 1267 | - 'JP27' => __( 'Osaka', 'give' ), |
|
| 1268 | - 'JP28' => __( 'Hyogo', 'give' ), |
|
| 1269 | - 'JP29' => __( 'Nara', 'give' ), |
|
| 1270 | - 'JP30' => __( 'Wakayama', 'give' ), |
|
| 1271 | - 'JP31' => __( 'Tottori', 'give' ), |
|
| 1272 | - 'JP32' => __( 'Shimane', 'give' ), |
|
| 1273 | - 'JP33' => __( 'Okayama', 'give' ), |
|
| 1274 | - 'JP34' => __( 'Hiroshima', 'give' ), |
|
| 1275 | - 'JP35' => __( 'Yamaguchi', 'give' ), |
|
| 1276 | - 'JP36' => __( 'Tokushima', 'give' ), |
|
| 1277 | - 'JP37' => __( 'Kagawa', 'give' ), |
|
| 1278 | - 'JP38' => __( 'Ehime', 'give' ), |
|
| 1279 | - 'JP39' => __( 'Kochi', 'give' ), |
|
| 1280 | - 'JP40' => __( 'Fukuoka', 'give' ), |
|
| 1281 | - 'JP41' => __( 'Saga', 'give' ), |
|
| 1282 | - 'JP42' => __( 'Nagasaki', 'give' ), |
|
| 1283 | - 'JP43' => __( 'Kumamoto', 'give' ), |
|
| 1284 | - 'JP44' => __( 'Oita', 'give' ), |
|
| 1285 | - 'JP45' => __( 'Miyazaki', 'give' ), |
|
| 1286 | - 'JP46' => __( 'Kagoshima', 'give' ), |
|
| 1287 | - 'JP47' => __( 'Okinawa', 'give' ), |
|
| 1241 | + 'JP01' => __('Hokkaido', 'give'), |
|
| 1242 | + 'JP02' => __('Aomori', 'give'), |
|
| 1243 | + 'JP03' => __('Iwate', 'give'), |
|
| 1244 | + 'JP04' => __('Miyagi', 'give'), |
|
| 1245 | + 'JP05' => __('Akita', 'give'), |
|
| 1246 | + 'JP06' => __('Yamagata', 'give'), |
|
| 1247 | + 'JP07' => __('Fukushima', 'give'), |
|
| 1248 | + 'JP08' => __('Ibaraki', 'give'), |
|
| 1249 | + 'JP09' => __('Tochigi', 'give'), |
|
| 1250 | + 'JP10' => __('Gunma', 'give'), |
|
| 1251 | + 'JP11' => __('Saitama', 'give'), |
|
| 1252 | + 'JP12' => __('Chiba', 'give'), |
|
| 1253 | + 'JP13' => __('Tokyo', 'give'), |
|
| 1254 | + 'JP14' => __('Kanagawa', 'give'), |
|
| 1255 | + 'JP15' => __('Niigata', 'give'), |
|
| 1256 | + 'JP16' => __('Toyama', 'give'), |
|
| 1257 | + 'JP17' => __('Ishikawa', 'give'), |
|
| 1258 | + 'JP18' => __('Fukui', 'give'), |
|
| 1259 | + 'JP19' => __('Yamanashi', 'give'), |
|
| 1260 | + 'JP20' => __('Nagano', 'give'), |
|
| 1261 | + 'JP21' => __('Gifu', 'give'), |
|
| 1262 | + 'JP22' => __('Shizuoka', 'give'), |
|
| 1263 | + 'JP23' => __('Aichi', 'give'), |
|
| 1264 | + 'JP24' => __('Mie', 'give'), |
|
| 1265 | + 'JP25' => __('Shiga', 'give'), |
|
| 1266 | + 'JP26' => __('Kyoto', 'give'), |
|
| 1267 | + 'JP27' => __('Osaka', 'give'), |
|
| 1268 | + 'JP28' => __('Hyogo', 'give'), |
|
| 1269 | + 'JP29' => __('Nara', 'give'), |
|
| 1270 | + 'JP30' => __('Wakayama', 'give'), |
|
| 1271 | + 'JP31' => __('Tottori', 'give'), |
|
| 1272 | + 'JP32' => __('Shimane', 'give'), |
|
| 1273 | + 'JP33' => __('Okayama', 'give'), |
|
| 1274 | + 'JP34' => __('Hiroshima', 'give'), |
|
| 1275 | + 'JP35' => __('Yamaguchi', 'give'), |
|
| 1276 | + 'JP36' => __('Tokushima', 'give'), |
|
| 1277 | + 'JP37' => __('Kagawa', 'give'), |
|
| 1278 | + 'JP38' => __('Ehime', 'give'), |
|
| 1279 | + 'JP39' => __('Kochi', 'give'), |
|
| 1280 | + 'JP40' => __('Fukuoka', 'give'), |
|
| 1281 | + 'JP41' => __('Saga', 'give'), |
|
| 1282 | + 'JP42' => __('Nagasaki', 'give'), |
|
| 1283 | + 'JP43' => __('Kumamoto', 'give'), |
|
| 1284 | + 'JP44' => __('Oita', 'give'), |
|
| 1285 | + 'JP45' => __('Miyazaki', 'give'), |
|
| 1286 | + 'JP46' => __('Kagoshima', 'give'), |
|
| 1287 | + 'JP47' => __('Okinawa', 'give'), |
|
| 1288 | 1288 | ); |
| 1289 | 1289 | |
| 1290 | - return apply_filters( 'give_japan_states', $states ); |
|
| 1290 | + return apply_filters('give_japan_states', $states); |
|
| 1291 | 1291 | } |
| 1292 | 1292 | |
| 1293 | 1293 | /** |
@@ -1299,119 +1299,119 @@ discard block |
||
| 1299 | 1299 | function give_get_italy_states_list() { |
| 1300 | 1300 | $states = array( |
| 1301 | 1301 | '' => '', |
| 1302 | - 'AG' => __( 'Agrigento', 'give' ), |
|
| 1303 | - 'AL' => __( 'Alessandria', 'give' ), |
|
| 1304 | - 'AN' => __( 'Ancona', 'give' ), |
|
| 1305 | - 'AO' => __( 'Aosta', 'give' ), |
|
| 1306 | - 'AR' => __( 'Arezzo', 'give' ), |
|
| 1307 | - 'AP' => __( 'Ascoli Piceno', 'give' ), |
|
| 1308 | - 'AT' => __( 'Asti', 'give' ), |
|
| 1309 | - 'AV' => __( 'Avellino', 'give' ), |
|
| 1310 | - 'BA' => __( 'Bari', 'give' ), |
|
| 1311 | - 'BT' => __( 'Barletta-Andria-Trani', 'give' ), |
|
| 1312 | - 'BL' => __( 'Belluno', 'give' ), |
|
| 1313 | - 'BN' => __( 'Benevento', 'give' ), |
|
| 1314 | - 'BG' => __( 'Bergamo', 'give' ), |
|
| 1315 | - 'BI' => __( 'Biella', 'give' ), |
|
| 1316 | - 'BO' => __( 'Bologna', 'give' ), |
|
| 1317 | - 'BZ' => __( 'Bolzano', 'give' ), |
|
| 1318 | - 'BS' => __( 'Brescia', 'give' ), |
|
| 1319 | - 'BR' => __( 'Brindisi', 'give' ), |
|
| 1320 | - 'CA' => __( 'Cagliari', 'give' ), |
|
| 1321 | - 'CL' => __( 'Caltanissetta', 'give' ), |
|
| 1322 | - 'CB' => __( 'Campobasso', 'give' ), |
|
| 1323 | - 'CI' => __( 'Carbonia-Iglesias', 'give' ), |
|
| 1324 | - 'CE' => __( 'Caserta', 'give' ), |
|
| 1325 | - 'CT' => __( 'Catania', 'give' ), |
|
| 1326 | - 'CZ' => __( 'Catanzaro', 'give' ), |
|
| 1327 | - 'CH' => __( 'Chieti', 'give' ), |
|
| 1328 | - 'CO' => __( 'Como', 'give' ), |
|
| 1329 | - 'CS' => __( 'Cosenza', 'give' ), |
|
| 1330 | - 'CR' => __( 'Cremona', 'give' ), |
|
| 1331 | - 'KR' => __( 'Crotone', 'give' ), |
|
| 1332 | - 'CN' => __( 'Cuneo', 'give' ), |
|
| 1333 | - 'EN' => __( 'Enna', 'give' ), |
|
| 1334 | - 'FM' => __( 'Fermo', 'give' ), |
|
| 1335 | - 'FE' => __( 'Ferrara', 'give' ), |
|
| 1336 | - 'FI' => __( 'Firenze', 'give' ), |
|
| 1337 | - 'FG' => __( 'Foggia', 'give' ), |
|
| 1338 | - 'FC' => __( 'Forlì-Cesena', 'give' ), |
|
| 1339 | - 'FR' => __( 'Frosinone', 'give' ), |
|
| 1340 | - 'GE' => __( 'Genova', 'give' ), |
|
| 1341 | - 'GO' => __( 'Gorizia', 'give' ), |
|
| 1342 | - 'GR' => __( 'Grosseto', 'give' ), |
|
| 1343 | - 'IM' => __( 'Imperia', 'give' ), |
|
| 1344 | - 'IS' => __( 'Isernia', 'give' ), |
|
| 1345 | - 'SP' => __( 'La Spezia', 'give' ), |
|
| 1346 | - 'AQ' => __( "L'Aquila", 'give' ), |
|
| 1347 | - 'LT' => __( 'Latina', 'give' ), |
|
| 1348 | - 'LE' => __( 'Lecce', 'give' ), |
|
| 1349 | - 'LC' => __( 'Lecco', 'give' ), |
|
| 1350 | - 'LI' => __( 'Livorno', 'give' ), |
|
| 1351 | - 'LO' => __( 'Lodi', 'give' ), |
|
| 1352 | - 'LU' => __( 'Lucca', 'give' ), |
|
| 1353 | - 'MC' => __( 'Macerata', 'give' ), |
|
| 1354 | - 'MN' => __( 'Mantova', 'give' ), |
|
| 1355 | - 'MS' => __( 'Massa-Carrara', 'give' ), |
|
| 1356 | - 'MT' => __( 'Matera', 'give' ), |
|
| 1357 | - 'ME' => __( 'Messina', 'give' ), |
|
| 1358 | - 'MI' => __( 'Milano', 'give' ), |
|
| 1359 | - 'MO' => __( 'Modena', 'give' ), |
|
| 1360 | - 'MB' => __( 'Monza e della Brianza', 'give' ), |
|
| 1361 | - 'NA' => __( 'Napoli', 'give' ), |
|
| 1362 | - 'NO' => __( 'Novara', 'give' ), |
|
| 1363 | - 'NU' => __( 'Nuoro', 'give' ), |
|
| 1364 | - 'OT' => __( 'Olbia-Tempio', 'give' ), |
|
| 1365 | - 'OR' => __( 'Oristano', 'give' ), |
|
| 1366 | - 'PD' => __( 'Padova', 'give' ), |
|
| 1367 | - 'PA' => __( 'Palermo', 'give' ), |
|
| 1368 | - 'PR' => __( 'Parma', 'give' ), |
|
| 1369 | - 'PV' => __( 'Pavia', 'give' ), |
|
| 1370 | - 'PG' => __( 'Perugia', 'give' ), |
|
| 1371 | - 'PU' => __( 'Pesaro e Urbino', 'give' ), |
|
| 1372 | - 'PE' => __( 'Pescara', 'give' ), |
|
| 1373 | - 'PC' => __( 'Piacenza', 'give' ), |
|
| 1374 | - 'PI' => __( 'Pisa', 'give' ), |
|
| 1375 | - 'PT' => __( 'Pistoia', 'give' ), |
|
| 1376 | - 'PN' => __( 'Pordenone', 'give' ), |
|
| 1377 | - 'PZ' => __( 'Potenza', 'give' ), |
|
| 1378 | - 'PO' => __( 'Prato', 'give' ), |
|
| 1379 | - 'RG' => __( 'Ragusa', 'give' ), |
|
| 1380 | - 'RA' => __( 'Ravenna', 'give' ), |
|
| 1381 | - 'RC' => __( 'Reggio Calabria', 'give' ), |
|
| 1382 | - 'RE' => __( 'Reggio Emilia', 'give' ), |
|
| 1383 | - 'RI' => __( 'Rieti', 'give' ), |
|
| 1384 | - 'RN' => __( 'Rimini', 'give' ), |
|
| 1385 | - 'RM' => __( 'Roma', 'give' ), |
|
| 1386 | - 'RO' => __( 'Rovigo', 'give' ), |
|
| 1387 | - 'SA' => __( 'Salerno', 'give' ), |
|
| 1388 | - 'VS' => __( 'Medio Campidano', 'give' ), |
|
| 1389 | - 'SS' => __( 'Sassari', 'give' ), |
|
| 1390 | - 'SV' => __( 'Savona', 'give' ), |
|
| 1391 | - 'SI' => __( 'Siena', 'give' ), |
|
| 1392 | - 'SR' => __( 'Siracusa', 'give' ), |
|
| 1393 | - 'SO' => __( 'Sondrio', 'give' ), |
|
| 1394 | - 'TA' => __( 'Taranto', 'give' ), |
|
| 1395 | - 'TE' => __( 'Teramo', 'give' ), |
|
| 1396 | - 'TR' => __( 'Terni', 'give' ), |
|
| 1397 | - 'TO' => __( 'Torino', 'give' ), |
|
| 1398 | - 'OG' => __( 'Ogliastra', 'give' ), |
|
| 1399 | - 'TP' => __( 'Trapani', 'give' ), |
|
| 1400 | - 'TN' => __( 'Trento', 'give' ), |
|
| 1401 | - 'TV' => __( 'Treviso', 'give' ), |
|
| 1402 | - 'TS' => __( 'Trieste', 'give' ), |
|
| 1403 | - 'UD' => __( 'Udine', 'give' ), |
|
| 1404 | - 'VA' => __( 'Varese', 'give' ), |
|
| 1405 | - 'VE' => __( 'Venezia', 'give' ), |
|
| 1406 | - 'VB' => __( 'Verbano-Cusio-Ossola', 'give' ), |
|
| 1407 | - 'VC' => __( 'Vercelli', 'give' ), |
|
| 1408 | - 'VR' => __( 'Verona', 'give' ), |
|
| 1409 | - 'VV' => __( 'Vibo Valentia', 'give' ), |
|
| 1410 | - 'VI' => __( 'Vicenza', 'give' ), |
|
| 1411 | - 'VT' => __( 'Viterbo', 'give' ), |
|
| 1302 | + 'AG' => __('Agrigento', 'give'), |
|
| 1303 | + 'AL' => __('Alessandria', 'give'), |
|
| 1304 | + 'AN' => __('Ancona', 'give'), |
|
| 1305 | + 'AO' => __('Aosta', 'give'), |
|
| 1306 | + 'AR' => __('Arezzo', 'give'), |
|
| 1307 | + 'AP' => __('Ascoli Piceno', 'give'), |
|
| 1308 | + 'AT' => __('Asti', 'give'), |
|
| 1309 | + 'AV' => __('Avellino', 'give'), |
|
| 1310 | + 'BA' => __('Bari', 'give'), |
|
| 1311 | + 'BT' => __('Barletta-Andria-Trani', 'give'), |
|
| 1312 | + 'BL' => __('Belluno', 'give'), |
|
| 1313 | + 'BN' => __('Benevento', 'give'), |
|
| 1314 | + 'BG' => __('Bergamo', 'give'), |
|
| 1315 | + 'BI' => __('Biella', 'give'), |
|
| 1316 | + 'BO' => __('Bologna', 'give'), |
|
| 1317 | + 'BZ' => __('Bolzano', 'give'), |
|
| 1318 | + 'BS' => __('Brescia', 'give'), |
|
| 1319 | + 'BR' => __('Brindisi', 'give'), |
|
| 1320 | + 'CA' => __('Cagliari', 'give'), |
|
| 1321 | + 'CL' => __('Caltanissetta', 'give'), |
|
| 1322 | + 'CB' => __('Campobasso', 'give'), |
|
| 1323 | + 'CI' => __('Carbonia-Iglesias', 'give'), |
|
| 1324 | + 'CE' => __('Caserta', 'give'), |
|
| 1325 | + 'CT' => __('Catania', 'give'), |
|
| 1326 | + 'CZ' => __('Catanzaro', 'give'), |
|
| 1327 | + 'CH' => __('Chieti', 'give'), |
|
| 1328 | + 'CO' => __('Como', 'give'), |
|
| 1329 | + 'CS' => __('Cosenza', 'give'), |
|
| 1330 | + 'CR' => __('Cremona', 'give'), |
|
| 1331 | + 'KR' => __('Crotone', 'give'), |
|
| 1332 | + 'CN' => __('Cuneo', 'give'), |
|
| 1333 | + 'EN' => __('Enna', 'give'), |
|
| 1334 | + 'FM' => __('Fermo', 'give'), |
|
| 1335 | + 'FE' => __('Ferrara', 'give'), |
|
| 1336 | + 'FI' => __('Firenze', 'give'), |
|
| 1337 | + 'FG' => __('Foggia', 'give'), |
|
| 1338 | + 'FC' => __('Forlì-Cesena', 'give'), |
|
| 1339 | + 'FR' => __('Frosinone', 'give'), |
|
| 1340 | + 'GE' => __('Genova', 'give'), |
|
| 1341 | + 'GO' => __('Gorizia', 'give'), |
|
| 1342 | + 'GR' => __('Grosseto', 'give'), |
|
| 1343 | + 'IM' => __('Imperia', 'give'), |
|
| 1344 | + 'IS' => __('Isernia', 'give'), |
|
| 1345 | + 'SP' => __('La Spezia', 'give'), |
|
| 1346 | + 'AQ' => __("L'Aquila", 'give'), |
|
| 1347 | + 'LT' => __('Latina', 'give'), |
|
| 1348 | + 'LE' => __('Lecce', 'give'), |
|
| 1349 | + 'LC' => __('Lecco', 'give'), |
|
| 1350 | + 'LI' => __('Livorno', 'give'), |
|
| 1351 | + 'LO' => __('Lodi', 'give'), |
|
| 1352 | + 'LU' => __('Lucca', 'give'), |
|
| 1353 | + 'MC' => __('Macerata', 'give'), |
|
| 1354 | + 'MN' => __('Mantova', 'give'), |
|
| 1355 | + 'MS' => __('Massa-Carrara', 'give'), |
|
| 1356 | + 'MT' => __('Matera', 'give'), |
|
| 1357 | + 'ME' => __('Messina', 'give'), |
|
| 1358 | + 'MI' => __('Milano', 'give'), |
|
| 1359 | + 'MO' => __('Modena', 'give'), |
|
| 1360 | + 'MB' => __('Monza e della Brianza', 'give'), |
|
| 1361 | + 'NA' => __('Napoli', 'give'), |
|
| 1362 | + 'NO' => __('Novara', 'give'), |
|
| 1363 | + 'NU' => __('Nuoro', 'give'), |
|
| 1364 | + 'OT' => __('Olbia-Tempio', 'give'), |
|
| 1365 | + 'OR' => __('Oristano', 'give'), |
|
| 1366 | + 'PD' => __('Padova', 'give'), |
|
| 1367 | + 'PA' => __('Palermo', 'give'), |
|
| 1368 | + 'PR' => __('Parma', 'give'), |
|
| 1369 | + 'PV' => __('Pavia', 'give'), |
|
| 1370 | + 'PG' => __('Perugia', 'give'), |
|
| 1371 | + 'PU' => __('Pesaro e Urbino', 'give'), |
|
| 1372 | + 'PE' => __('Pescara', 'give'), |
|
| 1373 | + 'PC' => __('Piacenza', 'give'), |
|
| 1374 | + 'PI' => __('Pisa', 'give'), |
|
| 1375 | + 'PT' => __('Pistoia', 'give'), |
|
| 1376 | + 'PN' => __('Pordenone', 'give'), |
|
| 1377 | + 'PZ' => __('Potenza', 'give'), |
|
| 1378 | + 'PO' => __('Prato', 'give'), |
|
| 1379 | + 'RG' => __('Ragusa', 'give'), |
|
| 1380 | + 'RA' => __('Ravenna', 'give'), |
|
| 1381 | + 'RC' => __('Reggio Calabria', 'give'), |
|
| 1382 | + 'RE' => __('Reggio Emilia', 'give'), |
|
| 1383 | + 'RI' => __('Rieti', 'give'), |
|
| 1384 | + 'RN' => __('Rimini', 'give'), |
|
| 1385 | + 'RM' => __('Roma', 'give'), |
|
| 1386 | + 'RO' => __('Rovigo', 'give'), |
|
| 1387 | + 'SA' => __('Salerno', 'give'), |
|
| 1388 | + 'VS' => __('Medio Campidano', 'give'), |
|
| 1389 | + 'SS' => __('Sassari', 'give'), |
|
| 1390 | + 'SV' => __('Savona', 'give'), |
|
| 1391 | + 'SI' => __('Siena', 'give'), |
|
| 1392 | + 'SR' => __('Siracusa', 'give'), |
|
| 1393 | + 'SO' => __('Sondrio', 'give'), |
|
| 1394 | + 'TA' => __('Taranto', 'give'), |
|
| 1395 | + 'TE' => __('Teramo', 'give'), |
|
| 1396 | + 'TR' => __('Terni', 'give'), |
|
| 1397 | + 'TO' => __('Torino', 'give'), |
|
| 1398 | + 'OG' => __('Ogliastra', 'give'), |
|
| 1399 | + 'TP' => __('Trapani', 'give'), |
|
| 1400 | + 'TN' => __('Trento', 'give'), |
|
| 1401 | + 'TV' => __('Treviso', 'give'), |
|
| 1402 | + 'TS' => __('Trieste', 'give'), |
|
| 1403 | + 'UD' => __('Udine', 'give'), |
|
| 1404 | + 'VA' => __('Varese', 'give'), |
|
| 1405 | + 'VE' => __('Venezia', 'give'), |
|
| 1406 | + 'VB' => __('Verbano-Cusio-Ossola', 'give'), |
|
| 1407 | + 'VC' => __('Vercelli', 'give'), |
|
| 1408 | + 'VR' => __('Verona', 'give'), |
|
| 1409 | + 'VV' => __('Vibo Valentia', 'give'), |
|
| 1410 | + 'VI' => __('Vicenza', 'give'), |
|
| 1411 | + 'VT' => __('Viterbo', 'give'), |
|
| 1412 | 1412 | ); |
| 1413 | 1413 | |
| 1414 | - return apply_filters( 'give_italy_states', $states ); |
|
| 1414 | + return apply_filters('give_italy_states', $states); |
|
| 1415 | 1415 | } |
| 1416 | 1416 | |
| 1417 | 1417 | /** |
@@ -1423,40 +1423,40 @@ discard block |
||
| 1423 | 1423 | function give_get_iran_states_list() { |
| 1424 | 1424 | $states = array( |
| 1425 | 1425 | '' => '', |
| 1426 | - 'KHZ' => __( 'Khuzestan (خوزستان)', 'give' ), |
|
| 1427 | - 'THR' => __( 'Tehran (تهران)', 'give' ), |
|
| 1428 | - 'ILM' => __( 'Ilaam (ایلام)', 'give' ), |
|
| 1429 | - 'BHR' => __( 'Bushehr (بوشهر)', 'give' ), |
|
| 1430 | - 'ADL' => __( 'Ardabil (اردبیل)', 'give' ), |
|
| 1431 | - 'ESF' => __( 'Isfahan (اصفهان)', 'give' ), |
|
| 1432 | - 'YZD' => __( 'Yazd (یزد)', 'give' ), |
|
| 1433 | - 'KRH' => __( 'Kermanshah (کرمانشاه)', 'give' ), |
|
| 1434 | - 'KRN' => __( 'Kerman (کرمان)', 'give' ), |
|
| 1435 | - 'HDN' => __( 'Hamadan (همدان)', 'give' ), |
|
| 1436 | - 'GZN' => __( 'Ghazvin (قزوین)', 'give' ), |
|
| 1437 | - 'ZJN' => __( 'Zanjan (زنجان)', 'give' ), |
|
| 1438 | - 'LRS' => __( 'Luristan (لرستان)', 'give' ), |
|
| 1439 | - 'ABZ' => __( 'Alborz (البرز)', 'give' ), |
|
| 1440 | - 'EAZ' => __( 'East Azarbaijan (آذربایجان شرقی)', 'give' ), |
|
| 1441 | - 'WAZ' => __( 'West Azarbaijan (آذربایجان غربی)', 'give' ), |
|
| 1442 | - 'CHB' => __( 'Chaharmahal and Bakhtiari (چهارمحال و بختیاری)', 'give' ), |
|
| 1443 | - 'SKH' => __( 'South Khorasan (خراسان جنوبی)', 'give' ), |
|
| 1444 | - 'RKH' => __( 'Razavi Khorasan (خراسان رضوی)', 'give' ), |
|
| 1445 | - 'NKH' => __( 'North Khorasan (خراسان جنوبی)', 'give' ), |
|
| 1446 | - 'SMN' => __( 'Semnan (سمنان)', 'give' ), |
|
| 1447 | - 'FRS' => __( 'Fars (فارس)', 'give' ), |
|
| 1448 | - 'QHM' => __( 'Qom (قم)', 'give' ), |
|
| 1449 | - 'KRD' => __( 'Kurdistan / کردستان)', 'give' ), |
|
| 1450 | - 'KBD' => __( 'Kohgiluyeh and BoyerAhmad (کهگیلوییه و بویراحمد)', 'give' ), |
|
| 1451 | - 'GLS' => __( 'Golestan (گلستان)', 'give' ), |
|
| 1452 | - 'GIL' => __( 'Gilan (گیلان)', 'give' ), |
|
| 1453 | - 'MZN' => __( 'Mazandaran (مازندران)', 'give' ), |
|
| 1454 | - 'MKZ' => __( 'Markazi (مرکزی)', 'give' ), |
|
| 1455 | - 'HRZ' => __( 'Hormozgan (هرمزگان)', 'give' ), |
|
| 1456 | - 'SBN' => __( 'Sistan and Baluchestan (سیستان و بلوچستان)', 'give' ), |
|
| 1426 | + 'KHZ' => __('Khuzestan (خوزستان)', 'give'), |
|
| 1427 | + 'THR' => __('Tehran (تهران)', 'give'), |
|
| 1428 | + 'ILM' => __('Ilaam (ایلام)', 'give'), |
|
| 1429 | + 'BHR' => __('Bushehr (بوشهر)', 'give'), |
|
| 1430 | + 'ADL' => __('Ardabil (اردبیل)', 'give'), |
|
| 1431 | + 'ESF' => __('Isfahan (اصفهان)', 'give'), |
|
| 1432 | + 'YZD' => __('Yazd (یزد)', 'give'), |
|
| 1433 | + 'KRH' => __('Kermanshah (کرمانشاه)', 'give'), |
|
| 1434 | + 'KRN' => __('Kerman (کرمان)', 'give'), |
|
| 1435 | + 'HDN' => __('Hamadan (همدان)', 'give'), |
|
| 1436 | + 'GZN' => __('Ghazvin (قزوین)', 'give'), |
|
| 1437 | + 'ZJN' => __('Zanjan (زنجان)', 'give'), |
|
| 1438 | + 'LRS' => __('Luristan (لرستان)', 'give'), |
|
| 1439 | + 'ABZ' => __('Alborz (البرز)', 'give'), |
|
| 1440 | + 'EAZ' => __('East Azarbaijan (آذربایجان شرقی)', 'give'), |
|
| 1441 | + 'WAZ' => __('West Azarbaijan (آذربایجان غربی)', 'give'), |
|
| 1442 | + 'CHB' => __('Chaharmahal and Bakhtiari (چهارمحال و بختیاری)', 'give'), |
|
| 1443 | + 'SKH' => __('South Khorasan (خراسان جنوبی)', 'give'), |
|
| 1444 | + 'RKH' => __('Razavi Khorasan (خراسان رضوی)', 'give'), |
|
| 1445 | + 'NKH' => __('North Khorasan (خراسان جنوبی)', 'give'), |
|
| 1446 | + 'SMN' => __('Semnan (سمنان)', 'give'), |
|
| 1447 | + 'FRS' => __('Fars (فارس)', 'give'), |
|
| 1448 | + 'QHM' => __('Qom (قم)', 'give'), |
|
| 1449 | + 'KRD' => __('Kurdistan / کردستان)', 'give'), |
|
| 1450 | + 'KBD' => __('Kohgiluyeh and BoyerAhmad (کهگیلوییه و بویراحمد)', 'give'), |
|
| 1451 | + 'GLS' => __('Golestan (گلستان)', 'give'), |
|
| 1452 | + 'GIL' => __('Gilan (گیلان)', 'give'), |
|
| 1453 | + 'MZN' => __('Mazandaran (مازندران)', 'give'), |
|
| 1454 | + 'MKZ' => __('Markazi (مرکزی)', 'give'), |
|
| 1455 | + 'HRZ' => __('Hormozgan (هرمزگان)', 'give'), |
|
| 1456 | + 'SBN' => __('Sistan and Baluchestan (سیستان و بلوچستان)', 'give'), |
|
| 1457 | 1457 | ); |
| 1458 | 1458 | |
| 1459 | - return apply_filters( 'give_iran_states', $states ); |
|
| 1459 | + return apply_filters('give_iran_states', $states); |
|
| 1460 | 1460 | } |
| 1461 | 1461 | |
| 1462 | 1462 | /** |
@@ -1468,35 +1468,35 @@ discard block |
||
| 1468 | 1468 | function give_get_ireland_states_list() { |
| 1469 | 1469 | $states = array( |
| 1470 | 1470 | '' => '', |
| 1471 | - 'CE' => __( 'Clare', 'give' ), |
|
| 1472 | - 'CK' => __( 'Cork', 'give' ), |
|
| 1473 | - 'CN' => __( 'Cavan', 'give' ), |
|
| 1474 | - 'CW' => __( 'Carlow', 'give' ), |
|
| 1475 | - 'DL' => __( 'Donegal', 'give' ), |
|
| 1476 | - 'DN' => __( 'Dublin', 'give' ), |
|
| 1477 | - 'GY' => __( 'Galway', 'give' ), |
|
| 1478 | - 'KE' => __( 'Kildare', 'give' ), |
|
| 1479 | - 'KK' => __( 'Kilkenny', 'give' ), |
|
| 1480 | - 'KY' => __( 'Kerry', 'give' ), |
|
| 1481 | - 'LD' => __( 'Longford', 'give' ), |
|
| 1482 | - 'LH' => __( 'Louth', 'give' ), |
|
| 1483 | - 'LK' => __( 'Limerick', 'give' ), |
|
| 1484 | - 'LM' => __( 'Leitrim', 'give' ), |
|
| 1485 | - 'LS' => __( 'Laois', 'give' ), |
|
| 1486 | - 'MH' => __( 'Meath', 'give' ), |
|
| 1487 | - 'MN' => __( 'Monaghan', 'give' ), |
|
| 1488 | - 'MO' => __( 'Mayo', 'give' ), |
|
| 1489 | - 'OY' => __( 'Offaly', 'give' ), |
|
| 1490 | - 'RN' => __( 'Roscommon', 'give' ), |
|
| 1491 | - 'SO' => __( 'Sligo', 'give' ), |
|
| 1492 | - 'TY' => __( 'Tipperary', 'give' ), |
|
| 1493 | - 'WD' => __( 'Waterford', 'give' ), |
|
| 1494 | - 'WH' => __( 'Westmeath', 'give' ), |
|
| 1495 | - 'WW' => __( 'Wicklow', 'give' ), |
|
| 1496 | - 'WX' => __( 'Wexford', 'give' ), |
|
| 1471 | + 'CE' => __('Clare', 'give'), |
|
| 1472 | + 'CK' => __('Cork', 'give'), |
|
| 1473 | + 'CN' => __('Cavan', 'give'), |
|
| 1474 | + 'CW' => __('Carlow', 'give'), |
|
| 1475 | + 'DL' => __('Donegal', 'give'), |
|
| 1476 | + 'DN' => __('Dublin', 'give'), |
|
| 1477 | + 'GY' => __('Galway', 'give'), |
|
| 1478 | + 'KE' => __('Kildare', 'give'), |
|
| 1479 | + 'KK' => __('Kilkenny', 'give'), |
|
| 1480 | + 'KY' => __('Kerry', 'give'), |
|
| 1481 | + 'LD' => __('Longford', 'give'), |
|
| 1482 | + 'LH' => __('Louth', 'give'), |
|
| 1483 | + 'LK' => __('Limerick', 'give'), |
|
| 1484 | + 'LM' => __('Leitrim', 'give'), |
|
| 1485 | + 'LS' => __('Laois', 'give'), |
|
| 1486 | + 'MH' => __('Meath', 'give'), |
|
| 1487 | + 'MN' => __('Monaghan', 'give'), |
|
| 1488 | + 'MO' => __('Mayo', 'give'), |
|
| 1489 | + 'OY' => __('Offaly', 'give'), |
|
| 1490 | + 'RN' => __('Roscommon', 'give'), |
|
| 1491 | + 'SO' => __('Sligo', 'give'), |
|
| 1492 | + 'TY' => __('Tipperary', 'give'), |
|
| 1493 | + 'WD' => __('Waterford', 'give'), |
|
| 1494 | + 'WH' => __('Westmeath', 'give'), |
|
| 1495 | + 'WW' => __('Wicklow', 'give'), |
|
| 1496 | + 'WX' => __('Wexford', 'give'), |
|
| 1497 | 1497 | ); |
| 1498 | 1498 | |
| 1499 | - return apply_filters( 'give_ireland_states', $states ); |
|
| 1499 | + return apply_filters('give_ireland_states', $states); |
|
| 1500 | 1500 | } |
| 1501 | 1501 | |
| 1502 | 1502 | /** |
@@ -1508,22 +1508,22 @@ discard block |
||
| 1508 | 1508 | function give_get_greek_states_list() { |
| 1509 | 1509 | $states = array( |
| 1510 | 1510 | '' => '', |
| 1511 | - 'I' => __( 'Αττική', 'give' ), |
|
| 1512 | - 'A' => __( 'Ανατολική Μακεδονία και Θράκη', 'give' ), |
|
| 1513 | - 'B' => __( 'Κεντρική Μακεδονία', 'give' ), |
|
| 1514 | - 'C' => __( 'Δυτική Μακεδονία', 'give' ), |
|
| 1515 | - 'D' => __( 'Ήπειρος', 'give' ), |
|
| 1516 | - 'E' => __( 'Θεσσαλία', 'give' ), |
|
| 1517 | - 'F' => __( 'Ιόνιοι Νήσοι', 'give' ), |
|
| 1518 | - 'G' => __( 'Δυτική Ελλάδα', 'give' ), |
|
| 1519 | - 'H' => __( 'Στερεά Ελλάδα', 'give' ), |
|
| 1520 | - 'J' => __( 'Πελοπόννησος', 'give' ), |
|
| 1521 | - 'K' => __( 'Βόρειο Αιγαίο', 'give' ), |
|
| 1522 | - 'L' => __( 'Νότιο Αιγαίο', 'give' ), |
|
| 1523 | - 'M' => __( 'Κρήτη', 'give' ), |
|
| 1511 | + 'I' => __('Αττική', 'give'), |
|
| 1512 | + 'A' => __('Ανατολική Μακεδονία και Θράκη', 'give'), |
|
| 1513 | + 'B' => __('Κεντρική Μακεδονία', 'give'), |
|
| 1514 | + 'C' => __('Δυτική Μακεδονία', 'give'), |
|
| 1515 | + 'D' => __('Ήπειρος', 'give'), |
|
| 1516 | + 'E' => __('Θεσσαλία', 'give'), |
|
| 1517 | + 'F' => __('Ιόνιοι Νήσοι', 'give'), |
|
| 1518 | + 'G' => __('Δυτική Ελλάδα', 'give'), |
|
| 1519 | + 'H' => __('Στερεά Ελλάδα', 'give'), |
|
| 1520 | + 'J' => __('Πελοπόννησος', 'give'), |
|
| 1521 | + 'K' => __('Βόρειο Αιγαίο', 'give'), |
|
| 1522 | + 'L' => __('Νότιο Αιγαίο', 'give'), |
|
| 1523 | + 'M' => __('Κρήτη', 'give'), |
|
| 1524 | 1524 | ); |
| 1525 | 1525 | |
| 1526 | - return apply_filters( 'give_greek_states', $states ); |
|
| 1526 | + return apply_filters('give_greek_states', $states); |
|
| 1527 | 1527 | } |
| 1528 | 1528 | |
| 1529 | 1529 | /** |
@@ -1535,18 +1535,18 @@ discard block |
||
| 1535 | 1535 | function give_get_bolivian_states_list() { |
| 1536 | 1536 | $states = array( |
| 1537 | 1537 | '' => '', |
| 1538 | - 'B' => __( 'Chuquisaca', 'give' ), |
|
| 1539 | - 'H' => __( 'Beni', 'give' ), |
|
| 1540 | - 'C' => __( 'Cochabamba', 'give' ), |
|
| 1541 | - 'L' => __( 'La Paz', 'give' ), |
|
| 1542 | - 'O' => __( 'Oruro', 'give' ), |
|
| 1543 | - 'N' => __( 'Pando', 'give' ), |
|
| 1544 | - 'P' => __( 'Potosí', 'give' ), |
|
| 1545 | - 'S' => __( 'Santa Cruz', 'give' ), |
|
| 1546 | - 'T' => __( 'Tarija', 'give' ), |
|
| 1538 | + 'B' => __('Chuquisaca', 'give'), |
|
| 1539 | + 'H' => __('Beni', 'give'), |
|
| 1540 | + 'C' => __('Cochabamba', 'give'), |
|
| 1541 | + 'L' => __('La Paz', 'give'), |
|
| 1542 | + 'O' => __('Oruro', 'give'), |
|
| 1543 | + 'N' => __('Pando', 'give'), |
|
| 1544 | + 'P' => __('Potosí', 'give'), |
|
| 1545 | + 'S' => __('Santa Cruz', 'give'), |
|
| 1546 | + 'T' => __('Tarija', 'give'), |
|
| 1547 | 1547 | ); |
| 1548 | 1548 | |
| 1549 | - return apply_filters( 'give_bolivian_states', $states ); |
|
| 1549 | + return apply_filters('give_bolivian_states', $states); |
|
| 1550 | 1550 | } |
| 1551 | 1551 | |
| 1552 | 1552 | /** |
@@ -1558,37 +1558,37 @@ discard block |
||
| 1558 | 1558 | function give_get_bulgarian_states_list() { |
| 1559 | 1559 | $states = array( |
| 1560 | 1560 | '' => '', |
| 1561 | - 'BG-01' => __( 'Blagoevgrad', 'give' ), |
|
| 1562 | - 'BG-02' => __( 'Burgas', 'give' ), |
|
| 1563 | - 'BG-08' => __( 'Dobrich', 'give' ), |
|
| 1564 | - 'BG-07' => __( 'Gabrovo', 'give' ), |
|
| 1565 | - 'BG-26' => __( 'Haskovo', 'give' ), |
|
| 1566 | - 'BG-09' => __( 'Kardzhali', 'give' ), |
|
| 1567 | - 'BG-10' => __( 'Kyustendil', 'give' ), |
|
| 1568 | - 'BG-11' => __( 'Lovech', 'give' ), |
|
| 1569 | - 'BG-12' => __( 'Montana', 'give' ), |
|
| 1570 | - 'BG-13' => __( 'Pazardzhik', 'give' ), |
|
| 1571 | - 'BG-14' => __( 'Pernik', 'give' ), |
|
| 1572 | - 'BG-15' => __( 'Pleven', 'give' ), |
|
| 1573 | - 'BG-16' => __( 'Plovdiv', 'give' ), |
|
| 1574 | - 'BG-17' => __( 'Razgrad', 'give' ), |
|
| 1575 | - 'BG-18' => __( 'Ruse', 'give' ), |
|
| 1576 | - 'BG-27' => __( 'Shumen', 'give' ), |
|
| 1577 | - 'BG-19' => __( 'Silistra', 'give' ), |
|
| 1578 | - 'BG-20' => __( 'Sliven', 'give' ), |
|
| 1579 | - 'BG-21' => __( 'Smolyan', 'give' ), |
|
| 1580 | - 'BG-23' => __( 'Sofia', 'give' ), |
|
| 1581 | - 'BG-22' => __( 'Sofia-Grad', 'give' ), |
|
| 1582 | - 'BG-24' => __( 'Stara Zagora', 'give' ), |
|
| 1583 | - 'BG-25' => __( 'Targovishte', 'give' ), |
|
| 1584 | - 'BG-03' => __( 'Varna', 'give' ), |
|
| 1585 | - 'BG-04' => __( 'Veliko Tarnovo', 'give' ), |
|
| 1586 | - 'BG-05' => __( 'Vidin', 'give' ), |
|
| 1587 | - 'BG-06' => __( 'Vratsa', 'give' ), |
|
| 1588 | - 'BG-28' => __( 'Yambol', 'give' ), |
|
| 1561 | + 'BG-01' => __('Blagoevgrad', 'give'), |
|
| 1562 | + 'BG-02' => __('Burgas', 'give'), |
|
| 1563 | + 'BG-08' => __('Dobrich', 'give'), |
|
| 1564 | + 'BG-07' => __('Gabrovo', 'give'), |
|
| 1565 | + 'BG-26' => __('Haskovo', 'give'), |
|
| 1566 | + 'BG-09' => __('Kardzhali', 'give'), |
|
| 1567 | + 'BG-10' => __('Kyustendil', 'give'), |
|
| 1568 | + 'BG-11' => __('Lovech', 'give'), |
|
| 1569 | + 'BG-12' => __('Montana', 'give'), |
|
| 1570 | + 'BG-13' => __('Pazardzhik', 'give'), |
|
| 1571 | + 'BG-14' => __('Pernik', 'give'), |
|
| 1572 | + 'BG-15' => __('Pleven', 'give'), |
|
| 1573 | + 'BG-16' => __('Plovdiv', 'give'), |
|
| 1574 | + 'BG-17' => __('Razgrad', 'give'), |
|
| 1575 | + 'BG-18' => __('Ruse', 'give'), |
|
| 1576 | + 'BG-27' => __('Shumen', 'give'), |
|
| 1577 | + 'BG-19' => __('Silistra', 'give'), |
|
| 1578 | + 'BG-20' => __('Sliven', 'give'), |
|
| 1579 | + 'BG-21' => __('Smolyan', 'give'), |
|
| 1580 | + 'BG-23' => __('Sofia', 'give'), |
|
| 1581 | + 'BG-22' => __('Sofia-Grad', 'give'), |
|
| 1582 | + 'BG-24' => __('Stara Zagora', 'give'), |
|
| 1583 | + 'BG-25' => __('Targovishte', 'give'), |
|
| 1584 | + 'BG-03' => __('Varna', 'give'), |
|
| 1585 | + 'BG-04' => __('Veliko Tarnovo', 'give'), |
|
| 1586 | + 'BG-05' => __('Vidin', 'give'), |
|
| 1587 | + 'BG-06' => __('Vratsa', 'give'), |
|
| 1588 | + 'BG-28' => __('Yambol', 'give'), |
|
| 1589 | 1589 | ); |
| 1590 | 1590 | |
| 1591 | - return apply_filters( 'give_bulgarian_states', $states ); |
|
| 1591 | + return apply_filters('give_bulgarian_states', $states); |
|
| 1592 | 1592 | } |
| 1593 | 1593 | |
| 1594 | 1594 | /** |
@@ -1600,73 +1600,73 @@ discard block |
||
| 1600 | 1600 | function give_get_bangladeshi_states_list() { |
| 1601 | 1601 | $states = array( |
| 1602 | 1602 | '' => '', |
| 1603 | - 'BAG' => __( 'Bagerhat', 'give' ), |
|
| 1604 | - 'BAN' => __( 'Bandarban', 'give' ), |
|
| 1605 | - 'BAR' => __( 'Barguna', 'give' ), |
|
| 1606 | - 'BARI' => __( 'Barisal', 'give' ), |
|
| 1607 | - 'BHO' => __( 'Bhola', 'give' ), |
|
| 1608 | - 'BOG' => __( 'Bogra', 'give' ), |
|
| 1609 | - 'BRA' => __( 'Brahmanbaria', 'give' ), |
|
| 1610 | - 'CHA' => __( 'Chandpur', 'give' ), |
|
| 1611 | - 'CHI' => __( 'Chittagong', 'give' ), |
|
| 1612 | - 'CHU' => __( 'Chuadanga', 'give' ), |
|
| 1613 | - 'COM' => __( 'Comilla', 'give' ), |
|
| 1614 | - 'COX' => __( "Cox's Bazar", 'give' ), |
|
| 1615 | - 'DHA' => __( 'Dhaka', 'give' ), |
|
| 1616 | - 'DIN' => __( 'Dinajpur', 'give' ), |
|
| 1617 | - 'FAR' => __( 'Faridpur ', 'give' ), |
|
| 1618 | - 'FEN' => __( 'Feni', 'give' ), |
|
| 1619 | - 'GAI' => __( 'Gaibandha', 'give' ), |
|
| 1620 | - 'GAZI' => __( 'Gazipur', 'give' ), |
|
| 1621 | - 'GOP' => __( 'Gopalganj', 'give' ), |
|
| 1622 | - 'HAB' => __( 'Habiganj', 'give' ), |
|
| 1623 | - 'JAM' => __( 'Jamalpur', 'give' ), |
|
| 1624 | - 'JES' => __( 'Jessore', 'give' ), |
|
| 1625 | - 'JHA' => __( 'Jhalokati', 'give' ), |
|
| 1626 | - 'JHE' => __( 'Jhenaidah', 'give' ), |
|
| 1627 | - 'JOY' => __( 'Joypurhat', 'give' ), |
|
| 1628 | - 'KHA' => __( 'Khagrachhari', 'give' ), |
|
| 1629 | - 'KHU' => __( 'Khulna', 'give' ), |
|
| 1630 | - 'KIS' => __( 'Kishoreganj', 'give' ), |
|
| 1631 | - 'KUR' => __( 'Kurigram', 'give' ), |
|
| 1632 | - 'KUS' => __( 'Kushtia', 'give' ), |
|
| 1633 | - 'LAK' => __( 'Lakshmipur', 'give' ), |
|
| 1634 | - 'LAL' => __( 'Lalmonirhat', 'give' ), |
|
| 1635 | - 'MAD' => __( 'Madaripur', 'give' ), |
|
| 1636 | - 'MAG' => __( 'Magura', 'give' ), |
|
| 1637 | - 'MAN' => __( 'Manikganj ', 'give' ), |
|
| 1638 | - 'MEH' => __( 'Meherpur', 'give' ), |
|
| 1639 | - 'MOU' => __( 'Moulvibazar', 'give' ), |
|
| 1640 | - 'MUN' => __( 'Munshiganj', 'give' ), |
|
| 1641 | - 'MYM' => __( 'Mymensingh', 'give' ), |
|
| 1642 | - 'NAO' => __( 'Naogaon', 'give' ), |
|
| 1643 | - 'NAR' => __( 'Narail', 'give' ), |
|
| 1644 | - 'NARG' => __( 'Narayanganj', 'give' ), |
|
| 1645 | - 'NARD' => __( 'Narsingdi', 'give' ), |
|
| 1646 | - 'NAT' => __( 'Natore', 'give' ), |
|
| 1647 | - 'NAW' => __( 'Nawabganj', 'give' ), |
|
| 1648 | - 'NET' => __( 'Netrakona', 'give' ), |
|
| 1649 | - 'NIL' => __( 'Nilphamari', 'give' ), |
|
| 1650 | - 'NOA' => __( 'Noakhali', 'give' ), |
|
| 1651 | - 'PAB' => __( 'Pabna', 'give' ), |
|
| 1652 | - 'PAN' => __( 'Panchagarh', 'give' ), |
|
| 1653 | - 'PAT' => __( 'Patuakhali', 'give' ), |
|
| 1654 | - 'PIR' => __( 'Pirojpur', 'give' ), |
|
| 1655 | - 'RAJB' => __( 'Rajbari', 'give' ), |
|
| 1656 | - 'RAJ' => __( 'Rajshahi', 'give' ), |
|
| 1657 | - 'RAN' => __( 'Rangamati', 'give' ), |
|
| 1658 | - 'RANP' => __( 'Rangpur', 'give' ), |
|
| 1659 | - 'SAT' => __( 'Satkhira', 'give' ), |
|
| 1660 | - 'SHA' => __( 'Shariatpur', 'give' ), |
|
| 1661 | - 'SHE' => __( 'Sherpur', 'give' ), |
|
| 1662 | - 'SIR' => __( 'Sirajganj', 'give' ), |
|
| 1663 | - 'SUN' => __( 'Sunamganj', 'give' ), |
|
| 1664 | - 'SYL' => __( 'Sylhet', 'give' ), |
|
| 1665 | - 'TAN' => __( 'Tangail', 'give' ), |
|
| 1666 | - 'THA' => __( 'Thakurgaon', 'give' ), |
|
| 1603 | + 'BAG' => __('Bagerhat', 'give'), |
|
| 1604 | + 'BAN' => __('Bandarban', 'give'), |
|
| 1605 | + 'BAR' => __('Barguna', 'give'), |
|
| 1606 | + 'BARI' => __('Barisal', 'give'), |
|
| 1607 | + 'BHO' => __('Bhola', 'give'), |
|
| 1608 | + 'BOG' => __('Bogra', 'give'), |
|
| 1609 | + 'BRA' => __('Brahmanbaria', 'give'), |
|
| 1610 | + 'CHA' => __('Chandpur', 'give'), |
|
| 1611 | + 'CHI' => __('Chittagong', 'give'), |
|
| 1612 | + 'CHU' => __('Chuadanga', 'give'), |
|
| 1613 | + 'COM' => __('Comilla', 'give'), |
|
| 1614 | + 'COX' => __("Cox's Bazar", 'give'), |
|
| 1615 | + 'DHA' => __('Dhaka', 'give'), |
|
| 1616 | + 'DIN' => __('Dinajpur', 'give'), |
|
| 1617 | + 'FAR' => __('Faridpur ', 'give'), |
|
| 1618 | + 'FEN' => __('Feni', 'give'), |
|
| 1619 | + 'GAI' => __('Gaibandha', 'give'), |
|
| 1620 | + 'GAZI' => __('Gazipur', 'give'), |
|
| 1621 | + 'GOP' => __('Gopalganj', 'give'), |
|
| 1622 | + 'HAB' => __('Habiganj', 'give'), |
|
| 1623 | + 'JAM' => __('Jamalpur', 'give'), |
|
| 1624 | + 'JES' => __('Jessore', 'give'), |
|
| 1625 | + 'JHA' => __('Jhalokati', 'give'), |
|
| 1626 | + 'JHE' => __('Jhenaidah', 'give'), |
|
| 1627 | + 'JOY' => __('Joypurhat', 'give'), |
|
| 1628 | + 'KHA' => __('Khagrachhari', 'give'), |
|
| 1629 | + 'KHU' => __('Khulna', 'give'), |
|
| 1630 | + 'KIS' => __('Kishoreganj', 'give'), |
|
| 1631 | + 'KUR' => __('Kurigram', 'give'), |
|
| 1632 | + 'KUS' => __('Kushtia', 'give'), |
|
| 1633 | + 'LAK' => __('Lakshmipur', 'give'), |
|
| 1634 | + 'LAL' => __('Lalmonirhat', 'give'), |
|
| 1635 | + 'MAD' => __('Madaripur', 'give'), |
|
| 1636 | + 'MAG' => __('Magura', 'give'), |
|
| 1637 | + 'MAN' => __('Manikganj ', 'give'), |
|
| 1638 | + 'MEH' => __('Meherpur', 'give'), |
|
| 1639 | + 'MOU' => __('Moulvibazar', 'give'), |
|
| 1640 | + 'MUN' => __('Munshiganj', 'give'), |
|
| 1641 | + 'MYM' => __('Mymensingh', 'give'), |
|
| 1642 | + 'NAO' => __('Naogaon', 'give'), |
|
| 1643 | + 'NAR' => __('Narail', 'give'), |
|
| 1644 | + 'NARG' => __('Narayanganj', 'give'), |
|
| 1645 | + 'NARD' => __('Narsingdi', 'give'), |
|
| 1646 | + 'NAT' => __('Natore', 'give'), |
|
| 1647 | + 'NAW' => __('Nawabganj', 'give'), |
|
| 1648 | + 'NET' => __('Netrakona', 'give'), |
|
| 1649 | + 'NIL' => __('Nilphamari', 'give'), |
|
| 1650 | + 'NOA' => __('Noakhali', 'give'), |
|
| 1651 | + 'PAB' => __('Pabna', 'give'), |
|
| 1652 | + 'PAN' => __('Panchagarh', 'give'), |
|
| 1653 | + 'PAT' => __('Patuakhali', 'give'), |
|
| 1654 | + 'PIR' => __('Pirojpur', 'give'), |
|
| 1655 | + 'RAJB' => __('Rajbari', 'give'), |
|
| 1656 | + 'RAJ' => __('Rajshahi', 'give'), |
|
| 1657 | + 'RAN' => __('Rangamati', 'give'), |
|
| 1658 | + 'RANP' => __('Rangpur', 'give'), |
|
| 1659 | + 'SAT' => __('Satkhira', 'give'), |
|
| 1660 | + 'SHA' => __('Shariatpur', 'give'), |
|
| 1661 | + 'SHE' => __('Sherpur', 'give'), |
|
| 1662 | + 'SIR' => __('Sirajganj', 'give'), |
|
| 1663 | + 'SUN' => __('Sunamganj', 'give'), |
|
| 1664 | + 'SYL' => __('Sylhet', 'give'), |
|
| 1665 | + 'TAN' => __('Tangail', 'give'), |
|
| 1666 | + 'THA' => __('Thakurgaon', 'give'), |
|
| 1667 | 1667 | ); |
| 1668 | 1668 | |
| 1669 | - return apply_filters( 'give_bangladeshi_states', $states ); |
|
| 1669 | + return apply_filters('give_bangladeshi_states', $states); |
|
| 1670 | 1670 | } |
| 1671 | 1671 | |
| 1672 | 1672 | /** |
@@ -1678,33 +1678,33 @@ discard block |
||
| 1678 | 1678 | function give_get_argentina_states_list() { |
| 1679 | 1679 | $states = array( |
| 1680 | 1680 | '' => '', |
| 1681 | - 'C' => __( 'Ciudad Autónoma de Buenos Aires', 'give' ), |
|
| 1682 | - 'B' => __( 'Buenos Aires', 'give' ), |
|
| 1683 | - 'K' => __( 'Catamarca', 'give' ), |
|
| 1684 | - 'H' => __( 'Chaco', 'give' ), |
|
| 1685 | - 'U' => __( 'Chubut', 'give' ), |
|
| 1686 | - 'X' => __( 'Córdoba', 'give' ), |
|
| 1687 | - 'W' => __( 'Corrientes', 'give' ), |
|
| 1688 | - 'E' => __( 'Entre Ríos', 'give' ), |
|
| 1689 | - 'P' => __( 'Formosa', 'give' ), |
|
| 1690 | - 'Y' => __( 'Jujuy', 'give' ), |
|
| 1691 | - 'L' => __( 'La Pampa', 'give' ), |
|
| 1692 | - 'F' => __( 'La Rioja', 'give' ), |
|
| 1693 | - 'M' => __( 'Mendoza', 'give' ), |
|
| 1694 | - 'N' => __( 'Misiones', 'give' ), |
|
| 1695 | - 'Q' => __( 'Neuquén', 'give' ), |
|
| 1696 | - 'R' => __( 'Río Negro', 'give' ), |
|
| 1697 | - 'A' => __( 'Salta', 'give' ), |
|
| 1698 | - 'J' => __( 'San Juan', 'give' ), |
|
| 1699 | - 'D' => __( 'San Luis', 'give' ), |
|
| 1700 | - 'Z' => __( 'Santa Cruz', 'give' ), |
|
| 1701 | - 'S' => __( 'Santa Fe', 'give' ), |
|
| 1702 | - 'G' => __( 'Santiago del Estero', 'give' ), |
|
| 1703 | - 'V' => __( 'Tierra del Fuego', 'give' ), |
|
| 1704 | - 'T' => __( 'Tucumán', 'give' ), |
|
| 1681 | + 'C' => __('Ciudad Autónoma de Buenos Aires', 'give'), |
|
| 1682 | + 'B' => __('Buenos Aires', 'give'), |
|
| 1683 | + 'K' => __('Catamarca', 'give'), |
|
| 1684 | + 'H' => __('Chaco', 'give'), |
|
| 1685 | + 'U' => __('Chubut', 'give'), |
|
| 1686 | + 'X' => __('Córdoba', 'give'), |
|
| 1687 | + 'W' => __('Corrientes', 'give'), |
|
| 1688 | + 'E' => __('Entre Ríos', 'give'), |
|
| 1689 | + 'P' => __('Formosa', 'give'), |
|
| 1690 | + 'Y' => __('Jujuy', 'give'), |
|
| 1691 | + 'L' => __('La Pampa', 'give'), |
|
| 1692 | + 'F' => __('La Rioja', 'give'), |
|
| 1693 | + 'M' => __('Mendoza', 'give'), |
|
| 1694 | + 'N' => __('Misiones', 'give'), |
|
| 1695 | + 'Q' => __('Neuquén', 'give'), |
|
| 1696 | + 'R' => __('Río Negro', 'give'), |
|
| 1697 | + 'A' => __('Salta', 'give'), |
|
| 1698 | + 'J' => __('San Juan', 'give'), |
|
| 1699 | + 'D' => __('San Luis', 'give'), |
|
| 1700 | + 'Z' => __('Santa Cruz', 'give'), |
|
| 1701 | + 'S' => __('Santa Fe', 'give'), |
|
| 1702 | + 'G' => __('Santiago del Estero', 'give'), |
|
| 1703 | + 'V' => __('Tierra del Fuego', 'give'), |
|
| 1704 | + 'T' => __('Tucumán', 'give'), |
|
| 1705 | 1705 | ); |
| 1706 | 1706 | |
| 1707 | - return apply_filters( 'give_argentina_states', $states ); |
|
| 1707 | + return apply_filters('give_argentina_states', $states); |
|
| 1708 | 1708 | } |
| 1709 | 1709 | |
| 1710 | 1710 | /** |
@@ -1785,7 +1785,7 @@ discard block |
||
| 1785 | 1785 | 'AP' => 'Armed Forces - Pacific', |
| 1786 | 1786 | ); |
| 1787 | 1787 | |
| 1788 | - return apply_filters( 'give_us_states', $states ); |
|
| 1788 | + return apply_filters('give_us_states', $states); |
|
| 1789 | 1789 | } |
| 1790 | 1790 | |
| 1791 | 1791 | /** |
@@ -1798,22 +1798,22 @@ discard block |
||
| 1798 | 1798 | function give_get_provinces_list() { |
| 1799 | 1799 | $provinces = array( |
| 1800 | 1800 | '' => '', |
| 1801 | - 'AB' => esc_html__( 'Alberta', 'give' ), |
|
| 1802 | - 'BC' => esc_html__( 'British Columbia', 'give' ), |
|
| 1803 | - 'MB' => esc_html__( 'Manitoba', 'give' ), |
|
| 1804 | - 'NB' => esc_html__( 'New Brunswick', 'give' ), |
|
| 1805 | - 'NL' => esc_html__( 'Newfoundland and Labrador', 'give' ), |
|
| 1806 | - 'NS' => esc_html__( 'Nova Scotia', 'give' ), |
|
| 1807 | - 'NT' => esc_html__( 'Northwest Territories', 'give' ), |
|
| 1808 | - 'NU' => esc_html__( 'Nunavut', 'give' ), |
|
| 1809 | - 'ON' => esc_html__( 'Ontario', 'give' ), |
|
| 1810 | - 'PE' => esc_html__( 'Prince Edward Island', 'give' ), |
|
| 1811 | - 'QC' => esc_html__( 'Quebec', 'give' ), |
|
| 1812 | - 'SK' => esc_html__( 'Saskatchewan', 'give' ), |
|
| 1813 | - 'YT' => esc_html__( 'Yukon', 'give' ), |
|
| 1801 | + 'AB' => esc_html__('Alberta', 'give'), |
|
| 1802 | + 'BC' => esc_html__('British Columbia', 'give'), |
|
| 1803 | + 'MB' => esc_html__('Manitoba', 'give'), |
|
| 1804 | + 'NB' => esc_html__('New Brunswick', 'give'), |
|
| 1805 | + 'NL' => esc_html__('Newfoundland and Labrador', 'give'), |
|
| 1806 | + 'NS' => esc_html__('Nova Scotia', 'give'), |
|
| 1807 | + 'NT' => esc_html__('Northwest Territories', 'give'), |
|
| 1808 | + 'NU' => esc_html__('Nunavut', 'give'), |
|
| 1809 | + 'ON' => esc_html__('Ontario', 'give'), |
|
| 1810 | + 'PE' => esc_html__('Prince Edward Island', 'give'), |
|
| 1811 | + 'QC' => esc_html__('Quebec', 'give'), |
|
| 1812 | + 'SK' => esc_html__('Saskatchewan', 'give'), |
|
| 1813 | + 'YT' => esc_html__('Yukon', 'give'), |
|
| 1814 | 1814 | ); |
| 1815 | 1815 | |
| 1816 | - return apply_filters( 'give_canada_provinces', $provinces ); |
|
| 1816 | + return apply_filters('give_canada_provinces', $provinces); |
|
| 1817 | 1817 | } |
| 1818 | 1818 | |
| 1819 | 1819 | /** |
@@ -1835,7 +1835,7 @@ discard block |
||
| 1835 | 1835 | 'WA' => 'Western Australia', |
| 1836 | 1836 | ); |
| 1837 | 1837 | |
| 1838 | - return apply_filters( 'give_australian_states', $states ); |
|
| 1838 | + return apply_filters('give_australian_states', $states); |
|
| 1839 | 1839 | } |
| 1840 | 1840 | |
| 1841 | 1841 | /** |
@@ -1876,7 +1876,7 @@ discard block |
||
| 1876 | 1876 | 'TO' => 'Tocantins', |
| 1877 | 1877 | ); |
| 1878 | 1878 | |
| 1879 | - return apply_filters( 'give_brazil_states', $states ); |
|
| 1879 | + return apply_filters('give_brazil_states', $states); |
|
| 1880 | 1880 | } |
| 1881 | 1881 | |
| 1882 | 1882 | /** |
@@ -1893,7 +1893,7 @@ discard block |
||
| 1893 | 1893 | 'NEW TERRITORIES' => 'New Territories', |
| 1894 | 1894 | ); |
| 1895 | 1895 | |
| 1896 | - return apply_filters( 'give_hong_kong_states', $states ); |
|
| 1896 | + return apply_filters('give_hong_kong_states', $states); |
|
| 1897 | 1897 | } |
| 1898 | 1898 | |
| 1899 | 1899 | /** |
@@ -1927,7 +1927,7 @@ discard block |
||
| 1927 | 1927 | 'ZA' => 'Zala', |
| 1928 | 1928 | ); |
| 1929 | 1929 | |
| 1930 | - return apply_filters( 'give_hungary_states', $states ); |
|
| 1930 | + return apply_filters('give_hungary_states', $states); |
|
| 1931 | 1931 | } |
| 1932 | 1932 | |
| 1933 | 1933 | /** |
@@ -1973,7 +1973,7 @@ discard block |
||
| 1973 | 1973 | 'CN32' => 'Xinjiang / 新疆', |
| 1974 | 1974 | ); |
| 1975 | 1975 | |
| 1976 | - return apply_filters( 'give_chinese_states', $states ); |
|
| 1976 | + return apply_filters('give_chinese_states', $states); |
|
| 1977 | 1977 | } |
| 1978 | 1978 | |
| 1979 | 1979 | /** |
@@ -2002,7 +2002,7 @@ discard block |
||
| 2002 | 2002 | 'WC' => 'West Coast', |
| 2003 | 2003 | ); |
| 2004 | 2004 | |
| 2005 | - return apply_filters( 'give_new_zealand_states', $states ); |
|
| 2005 | + return apply_filters('give_new_zealand_states', $states); |
|
| 2006 | 2006 | } |
| 2007 | 2007 | |
| 2008 | 2008 | /** |
@@ -2050,7 +2050,7 @@ discard block |
||
| 2050 | 2050 | 'PB' => 'Papua Barat', |
| 2051 | 2051 | ); |
| 2052 | 2052 | |
| 2053 | - return apply_filters( 'give_indonesia_states', $states ); |
|
| 2053 | + return apply_filters('give_indonesia_states', $states); |
|
| 2054 | 2054 | } |
| 2055 | 2055 | |
| 2056 | 2056 | /** |
@@ -2100,7 +2100,7 @@ discard block |
||
| 2100 | 2100 | 'PY' => 'Pondicherry (Puducherry)', |
| 2101 | 2101 | ); |
| 2102 | 2102 | |
| 2103 | - return apply_filters( 'give_indian_states', $states ); |
|
| 2103 | + return apply_filters('give_indian_states', $states); |
|
| 2104 | 2104 | } |
| 2105 | 2105 | |
| 2106 | 2106 | /** |
@@ -2130,7 +2130,7 @@ discard block |
||
| 2130 | 2130 | 'PJY' => 'W.P. Putrajaya', |
| 2131 | 2131 | ); |
| 2132 | 2132 | |
| 2133 | - return apply_filters( 'give_malaysian_states', $states ); |
|
| 2133 | + return apply_filters('give_malaysian_states', $states); |
|
| 2134 | 2134 | } |
| 2135 | 2135 | |
| 2136 | 2136 | /** |
@@ -2153,7 +2153,7 @@ discard block |
||
| 2153 | 2153 | 'WC' => 'Western Cape', |
| 2154 | 2154 | ); |
| 2155 | 2155 | |
| 2156 | - return apply_filters( 'give_south_african_states', $states ); |
|
| 2156 | + return apply_filters('give_south_african_states', $states); |
|
| 2157 | 2157 | } |
| 2158 | 2158 | |
| 2159 | 2159 | /** |
@@ -2244,7 +2244,7 @@ discard block |
||
| 2244 | 2244 | 'TH-35' => 'Yasothon (ยโสธร)', |
| 2245 | 2245 | ); |
| 2246 | 2246 | |
| 2247 | - return apply_filters( 'give_thailand_states', $states ); |
|
| 2247 | + return apply_filters('give_thailand_states', $states); |
|
| 2248 | 2248 | } |
| 2249 | 2249 | |
| 2250 | 2250 | /** |
@@ -2256,59 +2256,59 @@ discard block |
||
| 2256 | 2256 | function give_get_spain_states_list() { |
| 2257 | 2257 | $states = array( |
| 2258 | 2258 | '' => '', |
| 2259 | - 'C' => esc_html__( 'A Coruña', 'give' ), |
|
| 2260 | - 'VI' => esc_html__( 'Álava', 'give' ), |
|
| 2261 | - 'AB' => esc_html__( 'Albacete', 'give' ), |
|
| 2262 | - 'A' => esc_html__( 'Alicante', 'give' ), |
|
| 2263 | - 'AL' => esc_html__( 'Almería', 'give' ), |
|
| 2264 | - 'O' => esc_html__( 'Asturias', 'give' ), |
|
| 2265 | - 'AV' => esc_html__( 'Ávila', 'give' ), |
|
| 2266 | - 'BA' => esc_html__( 'Badajoz', 'give' ), |
|
| 2267 | - 'PM' => esc_html__( 'Baleares', 'give' ), |
|
| 2268 | - 'B' => esc_html__( 'Barcelona', 'give' ), |
|
| 2269 | - 'BU' => esc_html__( 'Burgos', 'give' ), |
|
| 2270 | - 'CC' => esc_html__( 'Cáceres', 'give' ), |
|
| 2271 | - 'CA' => esc_html__( 'Cádiz', 'give' ), |
|
| 2272 | - 'S' => esc_html__( 'Cantabria', 'give' ), |
|
| 2273 | - 'CS' => esc_html__( 'Castellón', 'give' ), |
|
| 2274 | - 'CE' => esc_html__( 'Ceuta', 'give' ), |
|
| 2275 | - 'CR' => esc_html__( 'Ciudad Real', 'give' ), |
|
| 2276 | - 'CO' => esc_html__( 'Córdoba', 'give' ), |
|
| 2277 | - 'CU' => esc_html__( 'Cuenca', 'give' ), |
|
| 2278 | - 'GI' => esc_html__( 'Girona', 'give' ), |
|
| 2279 | - 'GR' => esc_html__( 'Granada', 'give' ), |
|
| 2280 | - 'GU' => esc_html__( 'Guadalajara', 'give' ), |
|
| 2281 | - 'SS' => esc_html__( 'Gipuzkoa', 'give' ), |
|
| 2282 | - 'H' => esc_html__( 'Huelva', 'give' ), |
|
| 2283 | - 'HU' => esc_html__( 'Huesca', 'give' ), |
|
| 2284 | - 'J' => esc_html__( 'Jaén', 'give' ), |
|
| 2285 | - 'LO' => esc_html__( 'La Rioja', 'give' ), |
|
| 2286 | - 'GC' => esc_html__( 'Las Palmas', 'give' ), |
|
| 2287 | - 'LE' => esc_html__( 'León', 'give' ), |
|
| 2288 | - 'L' => esc_html__( 'Lleida', 'give' ), |
|
| 2289 | - 'LU' => esc_html__( 'Lugo', 'give' ), |
|
| 2290 | - 'M' => esc_html__( 'Madrid', 'give' ), |
|
| 2291 | - 'MA' => esc_html__( 'Málaga', 'give' ), |
|
| 2292 | - 'ML' => esc_html__( 'Melilla', 'give' ), |
|
| 2293 | - 'MU' => esc_html__( 'Murcia', 'give' ), |
|
| 2294 | - 'NA' => esc_html__( 'Navarra', 'give' ), |
|
| 2295 | - 'OR' => esc_html__( 'Ourense', 'give' ), |
|
| 2296 | - 'P' => esc_html__( 'Palencia', 'give' ), |
|
| 2297 | - 'PO' => esc_html__( 'Pontevedra', 'give' ), |
|
| 2298 | - 'SA' => esc_html__( 'Salamanca', 'give' ), |
|
| 2299 | - 'TF' => esc_html__( 'Santa Cruz de Tenerife', 'give' ), |
|
| 2300 | - 'SG' => esc_html__( 'Segovia', 'give' ), |
|
| 2301 | - 'SE' => esc_html__( 'Sevilla', 'give' ), |
|
| 2302 | - 'SO' => esc_html__( 'Soria', 'give' ), |
|
| 2303 | - 'T' => esc_html__( 'Tarragona', 'give' ), |
|
| 2304 | - 'TE' => esc_html__( 'Teruel', 'give' ), |
|
| 2305 | - 'TO' => esc_html__( 'Toledo', 'give' ), |
|
| 2306 | - 'V' => esc_html__( 'Valencia', 'give' ), |
|
| 2307 | - 'VA' => esc_html__( 'Valladolid', 'give' ), |
|
| 2308 | - 'BI' => esc_html__( 'Bizkaia', 'give' ), |
|
| 2309 | - 'ZA' => esc_html__( 'Zamora', 'give' ), |
|
| 2310 | - 'Z' => esc_html__( 'Zaragoza', 'give' ), |
|
| 2259 | + 'C' => esc_html__('A Coruña', 'give'), |
|
| 2260 | + 'VI' => esc_html__('Álava', 'give'), |
|
| 2261 | + 'AB' => esc_html__('Albacete', 'give'), |
|
| 2262 | + 'A' => esc_html__('Alicante', 'give'), |
|
| 2263 | + 'AL' => esc_html__('Almería', 'give'), |
|
| 2264 | + 'O' => esc_html__('Asturias', 'give'), |
|
| 2265 | + 'AV' => esc_html__('Ávila', 'give'), |
|
| 2266 | + 'BA' => esc_html__('Badajoz', 'give'), |
|
| 2267 | + 'PM' => esc_html__('Baleares', 'give'), |
|
| 2268 | + 'B' => esc_html__('Barcelona', 'give'), |
|
| 2269 | + 'BU' => esc_html__('Burgos', 'give'), |
|
| 2270 | + 'CC' => esc_html__('Cáceres', 'give'), |
|
| 2271 | + 'CA' => esc_html__('Cádiz', 'give'), |
|
| 2272 | + 'S' => esc_html__('Cantabria', 'give'), |
|
| 2273 | + 'CS' => esc_html__('Castellón', 'give'), |
|
| 2274 | + 'CE' => esc_html__('Ceuta', 'give'), |
|
| 2275 | + 'CR' => esc_html__('Ciudad Real', 'give'), |
|
| 2276 | + 'CO' => esc_html__('Córdoba', 'give'), |
|
| 2277 | + 'CU' => esc_html__('Cuenca', 'give'), |
|
| 2278 | + 'GI' => esc_html__('Girona', 'give'), |
|
| 2279 | + 'GR' => esc_html__('Granada', 'give'), |
|
| 2280 | + 'GU' => esc_html__('Guadalajara', 'give'), |
|
| 2281 | + 'SS' => esc_html__('Gipuzkoa', 'give'), |
|
| 2282 | + 'H' => esc_html__('Huelva', 'give'), |
|
| 2283 | + 'HU' => esc_html__('Huesca', 'give'), |
|
| 2284 | + 'J' => esc_html__('Jaén', 'give'), |
|
| 2285 | + 'LO' => esc_html__('La Rioja', 'give'), |
|
| 2286 | + 'GC' => esc_html__('Las Palmas', 'give'), |
|
| 2287 | + 'LE' => esc_html__('León', 'give'), |
|
| 2288 | + 'L' => esc_html__('Lleida', 'give'), |
|
| 2289 | + 'LU' => esc_html__('Lugo', 'give'), |
|
| 2290 | + 'M' => esc_html__('Madrid', 'give'), |
|
| 2291 | + 'MA' => esc_html__('Málaga', 'give'), |
|
| 2292 | + 'ML' => esc_html__('Melilla', 'give'), |
|
| 2293 | + 'MU' => esc_html__('Murcia', 'give'), |
|
| 2294 | + 'NA' => esc_html__('Navarra', 'give'), |
|
| 2295 | + 'OR' => esc_html__('Ourense', 'give'), |
|
| 2296 | + 'P' => esc_html__('Palencia', 'give'), |
|
| 2297 | + 'PO' => esc_html__('Pontevedra', 'give'), |
|
| 2298 | + 'SA' => esc_html__('Salamanca', 'give'), |
|
| 2299 | + 'TF' => esc_html__('Santa Cruz de Tenerife', 'give'), |
|
| 2300 | + 'SG' => esc_html__('Segovia', 'give'), |
|
| 2301 | + 'SE' => esc_html__('Sevilla', 'give'), |
|
| 2302 | + 'SO' => esc_html__('Soria', 'give'), |
|
| 2303 | + 'T' => esc_html__('Tarragona', 'give'), |
|
| 2304 | + 'TE' => esc_html__('Teruel', 'give'), |
|
| 2305 | + 'TO' => esc_html__('Toledo', 'give'), |
|
| 2306 | + 'V' => esc_html__('Valencia', 'give'), |
|
| 2307 | + 'VA' => esc_html__('Valladolid', 'give'), |
|
| 2308 | + 'BI' => esc_html__('Bizkaia', 'give'), |
|
| 2309 | + 'ZA' => esc_html__('Zamora', 'give'), |
|
| 2310 | + 'Z' => esc_html__('Zaragoza', 'give'), |
|
| 2311 | 2311 | ); |
| 2312 | 2312 | |
| 2313 | - return apply_filters( 'give_spain_states', $states ); |
|
| 2313 | + return apply_filters('give_spain_states', $states); |
|
| 2314 | 2314 | } |
@@ -521,7 +521,7 @@ |
||
| 521 | 521 | * |
| 522 | 522 | * @since 1.8.17 |
| 523 | 523 | * |
| 524 | - * @return bool |
|
| 524 | + * @return false|null |
|
| 525 | 525 | */ |
| 526 | 526 | function give_confirm_email_for_donation_access() { |
| 527 | 527 | |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | 14 | // Exit if accessed directly. |
| 15 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 15 | +if ( ! defined('ABSPATH')) { |
|
| 16 | 16 | exit; |
| 17 | 17 | } |
| 18 | 18 | |
@@ -26,31 +26,31 @@ discard block |
||
| 26 | 26 | */ |
| 27 | 27 | function give_test_ajax_works() { |
| 28 | 28 | // Handle ajax. |
| 29 | - if ( doing_action( 'wp_ajax_nopriv_give_test_ajax' ) ) { |
|
| 30 | - wp_die( 0, 200 ); |
|
| 29 | + if (doing_action('wp_ajax_nopriv_give_test_ajax')) { |
|
| 30 | + wp_die(0, 200); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | // Check if the Airplane Mode plugin is installed. |
| 34 | - if ( class_exists( 'Airplane_Mode_Core' ) ) { |
|
| 34 | + if (class_exists('Airplane_Mode_Core')) { |
|
| 35 | 35 | |
| 36 | 36 | $airplane = Airplane_Mode_Core::getInstance(); |
| 37 | 37 | |
| 38 | - if ( method_exists( $airplane, 'enabled' ) ) { |
|
| 38 | + if (method_exists($airplane, 'enabled')) { |
|
| 39 | 39 | |
| 40 | - if ( $airplane->enabled() ) { |
|
| 40 | + if ($airplane->enabled()) { |
|
| 41 | 41 | return true; |
| 42 | 42 | } |
| 43 | 43 | } else { |
| 44 | 44 | |
| 45 | - if ( 'on' === $airplane->check_status() ) { |
|
| 45 | + if ('on' === $airplane->check_status()) { |
|
| 46 | 46 | return true; |
| 47 | 47 | } |
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - add_filter( 'block_local_requests', '__return_false' ); |
|
| 51 | + add_filter('block_local_requests', '__return_false'); |
|
| 52 | 52 | |
| 53 | - if ( Give_Cache::get( '_give_ajax_works', true ) ) { |
|
| 53 | + if (Give_Cache::get('_give_ajax_works', true)) { |
|
| 54 | 54 | return true; |
| 55 | 55 | } |
| 56 | 56 | |
@@ -62,41 +62,41 @@ discard block |
||
| 62 | 62 | ), |
| 63 | 63 | ); |
| 64 | 64 | |
| 65 | - $ajax = wp_remote_post( give_get_ajax_url(), $params ); |
|
| 65 | + $ajax = wp_remote_post(give_get_ajax_url(), $params); |
|
| 66 | 66 | |
| 67 | 67 | $works = true; |
| 68 | 68 | |
| 69 | - if ( is_wp_error( $ajax ) ) { |
|
| 69 | + if (is_wp_error($ajax)) { |
|
| 70 | 70 | |
| 71 | 71 | $works = false; |
| 72 | 72 | |
| 73 | 73 | } else { |
| 74 | 74 | |
| 75 | - if ( empty( $ajax['response'] ) ) { |
|
| 75 | + if (empty($ajax['response'])) { |
|
| 76 | 76 | $works = false; |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | - if ( empty( $ajax['response']['code'] ) || 200 !== (int) $ajax['response']['code'] ) { |
|
| 79 | + if (empty($ajax['response']['code']) || 200 !== (int) $ajax['response']['code']) { |
|
| 80 | 80 | $works = false; |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - if ( empty( $ajax['response']['message'] ) || 'OK' !== $ajax['response']['message'] ) { |
|
| 83 | + if (empty($ajax['response']['message']) || 'OK' !== $ajax['response']['message']) { |
|
| 84 | 84 | $works = false; |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - if ( ! isset( $ajax['body'] ) || 0 !== (int) $ajax['body'] ) { |
|
| 87 | + if ( ! isset($ajax['body']) || 0 !== (int) $ajax['body']) { |
|
| 88 | 88 | $works = false; |
| 89 | 89 | } |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | - if ( $works ) { |
|
| 93 | - Give_Cache::set( '_give_ajax_works', '1', DAY_IN_SECONDS, true ); |
|
| 92 | + if ($works) { |
|
| 93 | + Give_Cache::set('_give_ajax_works', '1', DAY_IN_SECONDS, true); |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | - return apply_filters( 'give_test_ajax_works', $works ); |
|
| 96 | + return apply_filters('give_test_ajax_works', $works); |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | -add_action( 'wp_ajax_nopriv_give_test_ajax', 'give_test_ajax_works' ); |
|
| 99 | +add_action('wp_ajax_nopriv_give_test_ajax', 'give_test_ajax_works'); |
|
| 100 | 100 | |
| 101 | 101 | /** |
| 102 | 102 | * Get AJAX URL |
@@ -107,21 +107,21 @@ discard block |
||
| 107 | 107 | * |
| 108 | 108 | * @return string |
| 109 | 109 | */ |
| 110 | -function give_get_ajax_url( $query = array() ) { |
|
| 111 | - $scheme = defined( 'FORCE_SSL_ADMIN' ) && FORCE_SSL_ADMIN ? 'https' : 'admin'; |
|
| 110 | +function give_get_ajax_url($query = array()) { |
|
| 111 | + $scheme = defined('FORCE_SSL_ADMIN') && FORCE_SSL_ADMIN ? 'https' : 'admin'; |
|
| 112 | 112 | |
| 113 | 113 | $current_url = give_get_current_page_url(); |
| 114 | - $ajax_url = admin_url( 'admin-ajax.php', $scheme ); |
|
| 114 | + $ajax_url = admin_url('admin-ajax.php', $scheme); |
|
| 115 | 115 | |
| 116 | - if ( preg_match( '/^https/', $current_url ) && ! preg_match( '/^https/', $ajax_url ) ) { |
|
| 117 | - $ajax_url = preg_replace( '/^http/', 'https', $ajax_url ); |
|
| 116 | + if (preg_match('/^https/', $current_url) && ! preg_match('/^https/', $ajax_url)) { |
|
| 117 | + $ajax_url = preg_replace('/^http/', 'https', $ajax_url); |
|
| 118 | 118 | } |
| 119 | 119 | |
| 120 | - if ( ! empty( $query ) ) { |
|
| 121 | - $ajax_url = add_query_arg( $query, $ajax_url ); |
|
| 120 | + if ( ! empty($query)) { |
|
| 121 | + $ajax_url = add_query_arg($query, $ajax_url); |
|
| 122 | 122 | } |
| 123 | 123 | |
| 124 | - return apply_filters( 'give_ajax_url', $ajax_url ); |
|
| 124 | + return apply_filters('give_ajax_url', $ajax_url); |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | /** |
@@ -137,12 +137,12 @@ discard block |
||
| 137 | 137 | * |
| 138 | 138 | * @since 1.7 |
| 139 | 139 | */ |
| 140 | - do_action( 'give_donation_form_login_fields' ); |
|
| 140 | + do_action('give_donation_form_login_fields'); |
|
| 141 | 141 | |
| 142 | 142 | give_die(); |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | -add_action( 'wp_ajax_nopriv_give_checkout_login', 'give_load_checkout_login_fields' ); |
|
| 145 | +add_action('wp_ajax_nopriv_give_checkout_login', 'give_load_checkout_login_fields'); |
|
| 146 | 146 | |
| 147 | 147 | /** |
| 148 | 148 | * Load Checkout Fields |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | * @return void |
| 153 | 153 | */ |
| 154 | 154 | function give_load_checkout_fields() { |
| 155 | - $form_id = isset( $_POST['form_id'] ) ? $_POST['form_id'] : ''; |
|
| 155 | + $form_id = isset($_POST['form_id']) ? $_POST['form_id'] : ''; |
|
| 156 | 156 | |
| 157 | 157 | ob_start(); |
| 158 | 158 | |
@@ -161,18 +161,18 @@ discard block |
||
| 161 | 161 | * |
| 162 | 162 | * @since 1.7 |
| 163 | 163 | */ |
| 164 | - do_action( 'give_donation_form_register_login_fields', $form_id ); |
|
| 164 | + do_action('give_donation_form_register_login_fields', $form_id); |
|
| 165 | 165 | |
| 166 | 166 | $fields = ob_get_clean(); |
| 167 | 167 | |
| 168 | - wp_send_json( array( |
|
| 169 | - 'fields' => wp_json_encode( $fields ), |
|
| 170 | - 'submit' => wp_json_encode( give_get_donation_form_submit_button( $form_id ) ), |
|
| 171 | - ) ); |
|
| 168 | + wp_send_json(array( |
|
| 169 | + 'fields' => wp_json_encode($fields), |
|
| 170 | + 'submit' => wp_json_encode(give_get_donation_form_submit_button($form_id)), |
|
| 171 | + )); |
|
| 172 | 172 | } |
| 173 | 173 | |
| 174 | -add_action( 'wp_ajax_nopriv_give_cancel_login', 'give_load_checkout_fields' ); |
|
| 175 | -add_action( 'wp_ajax_nopriv_give_checkout_register', 'give_load_checkout_fields' ); |
|
| 174 | +add_action('wp_ajax_nopriv_give_cancel_login', 'give_load_checkout_fields'); |
|
| 175 | +add_action('wp_ajax_nopriv_give_checkout_register', 'give_load_checkout_fields'); |
|
| 176 | 176 | |
| 177 | 177 | /** |
| 178 | 178 | * Get Form Title via AJAX (used only in WordPress Admin) |
@@ -182,9 +182,9 @@ discard block |
||
| 182 | 182 | * @return void |
| 183 | 183 | */ |
| 184 | 184 | function give_ajax_get_form_title() { |
| 185 | - if ( isset( $_POST['form_id'] ) ) { |
|
| 186 | - $title = get_the_title( $_POST['form_id'] ); |
|
| 187 | - if ( $title ) { |
|
| 185 | + if (isset($_POST['form_id'])) { |
|
| 186 | + $title = get_the_title($_POST['form_id']); |
|
| 187 | + if ($title) { |
|
| 188 | 188 | echo $title; |
| 189 | 189 | } else { |
| 190 | 190 | echo 'fail'; |
@@ -193,8 +193,8 @@ discard block |
||
| 193 | 193 | give_die(); |
| 194 | 194 | } |
| 195 | 195 | |
| 196 | -add_action( 'wp_ajax_give_get_form_title', 'give_ajax_get_form_title' ); |
|
| 197 | -add_action( 'wp_ajax_nopriv_give_get_form_title', 'give_ajax_get_form_title' ); |
|
| 196 | +add_action('wp_ajax_give_get_form_title', 'give_ajax_get_form_title'); |
|
| 197 | +add_action('wp_ajax_nopriv_give_get_form_title', 'give_ajax_get_form_title'); |
|
| 198 | 198 | |
| 199 | 199 | /** |
| 200 | 200 | * Retrieve a states drop down |
@@ -208,41 +208,41 @@ discard block |
||
| 208 | 208 | $show_field = true; |
| 209 | 209 | $states_require = true; |
| 210 | 210 | // Get the Country code from the $_POST. |
| 211 | - $country = sanitize_text_field( $_POST['country'] ); |
|
| 211 | + $country = sanitize_text_field($_POST['country']); |
|
| 212 | 212 | |
| 213 | 213 | // Get the field name from the $_POST. |
| 214 | - $field_name = sanitize_text_field( $_POST['field_name'] ); |
|
| 214 | + $field_name = sanitize_text_field($_POST['field_name']); |
|
| 215 | 215 | |
| 216 | - $label = __( 'State', 'give' ); |
|
| 216 | + $label = __('State', 'give'); |
|
| 217 | 217 | $states_label = give_get_states_label(); |
| 218 | 218 | |
| 219 | 219 | $default_state = ''; |
| 220 | - if ( $country === give_get_country() ) { |
|
| 220 | + if ($country === give_get_country()) { |
|
| 221 | 221 | $default_state = give_get_state(); |
| 222 | 222 | } |
| 223 | 223 | |
| 224 | 224 | // Check if $country code exists in the array key for states label. |
| 225 | - if ( array_key_exists( $country, $states_label ) ) { |
|
| 226 | - $label = $states_label[ $country ]; |
|
| 225 | + if (array_key_exists($country, $states_label)) { |
|
| 226 | + $label = $states_label[$country]; |
|
| 227 | 227 | } |
| 228 | 228 | |
| 229 | - if ( empty( $country ) ) { |
|
| 229 | + if (empty($country)) { |
|
| 230 | 230 | $country = give_get_country(); |
| 231 | 231 | } |
| 232 | 232 | |
| 233 | - $states = give_get_states( $country ); |
|
| 234 | - if ( ! empty( $states ) ) { |
|
| 235 | - $args = array( |
|
| 233 | + $states = give_get_states($country); |
|
| 234 | + if ( ! empty($states)) { |
|
| 235 | + $args = array( |
|
| 236 | 236 | 'name' => $field_name, |
| 237 | 237 | 'id' => $field_name, |
| 238 | - 'class' => $field_name . ' give-select', |
|
| 238 | + 'class' => $field_name.' give-select', |
|
| 239 | 239 | 'options' => $states, |
| 240 | 240 | 'show_option_all' => false, |
| 241 | 241 | 'show_option_none' => false, |
| 242 | 242 | 'placeholder' => $label, |
| 243 | 243 | 'selected' => $default_state, |
| 244 | 244 | ); |
| 245 | - $data = Give()->html->select( $args ); |
|
| 245 | + $data = Give()->html->select($args); |
|
| 246 | 246 | $states_found = true; |
| 247 | 247 | } else { |
| 248 | 248 | $data = 'nostates'; |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | $no_states_country = give_no_states_country_list(); |
| 252 | 252 | |
| 253 | 253 | // Check if $country code exists in the array key. |
| 254 | - if ( array_key_exists( $country, $no_states_country ) ) { |
|
| 254 | + if (array_key_exists($country, $no_states_country)) { |
|
| 255 | 255 | $show_field = false; |
| 256 | 256 | } |
| 257 | 257 | |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | $states_not_required_country_list = give_states_not_required_country_list(); |
| 260 | 260 | |
| 261 | 261 | // Check if $country code exists in the array key. |
| 262 | - if ( array_key_exists( $country, $states_not_required_country_list ) ) { |
|
| 262 | + if (array_key_exists($country, $states_not_required_country_list)) { |
|
| 263 | 263 | $states_require = false; |
| 264 | 264 | } |
| 265 | 265 | } |
@@ -272,11 +272,11 @@ discard block |
||
| 272 | 272 | 'data' => $data, |
| 273 | 273 | 'default_state' => $default_state, |
| 274 | 274 | ); |
| 275 | - wp_send_json( $response ); |
|
| 275 | + wp_send_json($response); |
|
| 276 | 276 | } |
| 277 | 277 | |
| 278 | -add_action( 'wp_ajax_give_get_states', 'give_ajax_get_states_field' ); |
|
| 279 | -add_action( 'wp_ajax_nopriv_give_get_states', 'give_ajax_get_states_field' ); |
|
| 278 | +add_action('wp_ajax_give_get_states', 'give_ajax_get_states_field'); |
|
| 279 | +add_action('wp_ajax_nopriv_give_get_states', 'give_ajax_get_states_field'); |
|
| 280 | 280 | |
| 281 | 281 | /** |
| 282 | 282 | * Retrieve donation forms via AJAX for chosen dropdown search field. |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | */ |
| 288 | 288 | function give_ajax_form_search() { |
| 289 | 289 | $results = array(); |
| 290 | - $search = esc_sql( sanitize_text_field( $_POST['s'] ) ); |
|
| 290 | + $search = esc_sql(sanitize_text_field($_POST['s'])); |
|
| 291 | 291 | |
| 292 | 292 | $args = array( |
| 293 | 293 | 'post_type' => 'give_forms', |
@@ -308,12 +308,12 @@ discard block |
||
| 308 | 308 | * |
| 309 | 309 | * @return array $args Query argument for WP_query |
| 310 | 310 | */ |
| 311 | - $args = (array) apply_filters( 'give_ajax_form_search_args', $args ); |
|
| 311 | + $args = (array) apply_filters('give_ajax_form_search_args', $args); |
|
| 312 | 312 | |
| 313 | 313 | // get all the donation form. |
| 314 | - $query = new WP_Query( $args ); |
|
| 315 | - if ( $query->have_posts() ) { |
|
| 316 | - while ( $query->have_posts() ) { |
|
| 314 | + $query = new WP_Query($args); |
|
| 315 | + if ($query->have_posts()) { |
|
| 316 | + while ($query->have_posts()) { |
|
| 317 | 317 | $query->the_post(); |
| 318 | 318 | global $post; |
| 319 | 319 | |
@@ -334,13 +334,13 @@ discard block |
||
| 334 | 334 | * |
| 335 | 335 | * @return array $results Contain the Donation Form id |
| 336 | 336 | */ |
| 337 | - $results = (array) apply_filters( 'give_ajax_form_search_responce', $results ); |
|
| 337 | + $results = (array) apply_filters('give_ajax_form_search_responce', $results); |
|
| 338 | 338 | |
| 339 | - wp_send_json( $results ); |
|
| 339 | + wp_send_json($results); |
|
| 340 | 340 | } |
| 341 | 341 | |
| 342 | -add_action( 'wp_ajax_give_form_search', 'give_ajax_form_search' ); |
|
| 343 | -add_action( 'wp_ajax_nopriv_give_form_search', 'give_ajax_form_search' ); |
|
| 342 | +add_action('wp_ajax_give_form_search', 'give_ajax_form_search'); |
|
| 343 | +add_action('wp_ajax_nopriv_give_form_search', 'give_ajax_form_search'); |
|
| 344 | 344 | |
| 345 | 345 | /** |
| 346 | 346 | * Search the donors database via Ajax |
@@ -352,28 +352,28 @@ discard block |
||
| 352 | 352 | function give_ajax_donor_search() { |
| 353 | 353 | global $wpdb; |
| 354 | 354 | |
| 355 | - $search = esc_sql( sanitize_text_field( $_POST['s'] ) ); |
|
| 355 | + $search = esc_sql(sanitize_text_field($_POST['s'])); |
|
| 356 | 356 | $results = array(); |
| 357 | - if ( ! current_user_can( 'view_give_reports' ) ) { |
|
| 357 | + if ( ! current_user_can('view_give_reports')) { |
|
| 358 | 358 | $donors = array(); |
| 359 | 359 | } else { |
| 360 | - $donors = $wpdb->get_results( "SELECT id,name,email FROM $wpdb->donors WHERE `name` LIKE '%$search%' OR `email` LIKE '%$search%' LIMIT 50" ); |
|
| 360 | + $donors = $wpdb->get_results("SELECT id,name,email FROM $wpdb->donors WHERE `name` LIKE '%$search%' OR `email` LIKE '%$search%' LIMIT 50"); |
|
| 361 | 361 | } |
| 362 | 362 | |
| 363 | - if ( $donors ) { |
|
| 364 | - foreach ( $donors as $donor ) { |
|
| 363 | + if ($donors) { |
|
| 364 | + foreach ($donors as $donor) { |
|
| 365 | 365 | |
| 366 | 366 | $results[] = array( |
| 367 | 367 | 'id' => $donor->id, |
| 368 | - 'name' => $donor->name . ' (' . $donor->email . ')', |
|
| 368 | + 'name' => $donor->name.' ('.$donor->email.')', |
|
| 369 | 369 | ); |
| 370 | 370 | } |
| 371 | 371 | } |
| 372 | 372 | |
| 373 | - wp_send_json( $results ); |
|
| 373 | + wp_send_json($results); |
|
| 374 | 374 | } |
| 375 | 375 | |
| 376 | -add_action( 'wp_ajax_give_donor_search', 'give_ajax_donor_search' ); |
|
| 376 | +add_action('wp_ajax_give_donor_search', 'give_ajax_donor_search'); |
|
| 377 | 377 | |
| 378 | 378 | |
| 379 | 379 | /** |
@@ -386,37 +386,37 @@ discard block |
||
| 386 | 386 | function give_ajax_search_users() { |
| 387 | 387 | $results = array(); |
| 388 | 388 | |
| 389 | - if ( current_user_can( 'manage_give_settings' ) ) { |
|
| 389 | + if (current_user_can('manage_give_settings')) { |
|
| 390 | 390 | |
| 391 | - $search = esc_sql( sanitize_text_field( $_POST['s'] ) ); |
|
| 391 | + $search = esc_sql(sanitize_text_field($_POST['s'])); |
|
| 392 | 392 | |
| 393 | 393 | $get_users_args = array( |
| 394 | 394 | 'number' => 9999, |
| 395 | - 'search' => $search . '*', |
|
| 395 | + 'search' => $search.'*', |
|
| 396 | 396 | ); |
| 397 | 397 | |
| 398 | - $get_users_args = apply_filters( 'give_search_users_args', $get_users_args ); |
|
| 398 | + $get_users_args = apply_filters('give_search_users_args', $get_users_args); |
|
| 399 | 399 | |
| 400 | - $found_users = apply_filters( 'give_ajax_found_users', get_users( $get_users_args ), $search ); |
|
| 400 | + $found_users = apply_filters('give_ajax_found_users', get_users($get_users_args), $search); |
|
| 401 | 401 | $results = array(); |
| 402 | 402 | |
| 403 | - if ( $found_users ) { |
|
| 403 | + if ($found_users) { |
|
| 404 | 404 | |
| 405 | - foreach ( $found_users as $user ) { |
|
| 405 | + foreach ($found_users as $user) { |
|
| 406 | 406 | |
| 407 | 407 | $results[] = array( |
| 408 | 408 | 'id' => $user->ID, |
| 409 | - 'name' => esc_html( $user->user_login . ' (' . $user->user_email . ')' ), |
|
| 409 | + 'name' => esc_html($user->user_login.' ('.$user->user_email.')'), |
|
| 410 | 410 | ); |
| 411 | 411 | } |
| 412 | 412 | } |
| 413 | 413 | }// End if(). |
| 414 | 414 | |
| 415 | - wp_send_json( $results ); |
|
| 415 | + wp_send_json($results); |
|
| 416 | 416 | |
| 417 | 417 | } |
| 418 | 418 | |
| 419 | -add_action( 'wp_ajax_give_user_search', 'give_ajax_search_users' ); |
|
| 419 | +add_action('wp_ajax_give_user_search', 'give_ajax_search_users'); |
|
| 420 | 420 | |
| 421 | 421 | |
| 422 | 422 | /** |
@@ -432,14 +432,14 @@ discard block |
||
| 432 | 432 | $data = array(); |
| 433 | 433 | $args = array( |
| 434 | 434 | 'post_type' => 'page', |
| 435 | - 's' => give_clean( $_POST['s'] ), |
|
| 435 | + 's' => give_clean($_POST['s']), |
|
| 436 | 436 | ); |
| 437 | 437 | |
| 438 | - $query = new WP_Query( $args ); |
|
| 438 | + $query = new WP_Query($args); |
|
| 439 | 439 | |
| 440 | 440 | // Query posts by title. |
| 441 | - if ( $query->have_posts() ) { |
|
| 442 | - while ( $query->have_posts() ) { |
|
| 441 | + if ($query->have_posts()) { |
|
| 442 | + while ($query->have_posts()) { |
|
| 443 | 443 | $query->the_post(); |
| 444 | 444 | |
| 445 | 445 | $data[] = array( |
@@ -449,10 +449,10 @@ discard block |
||
| 449 | 449 | } |
| 450 | 450 | } |
| 451 | 451 | |
| 452 | - wp_send_json( $data ); |
|
| 452 | + wp_send_json($data); |
|
| 453 | 453 | } |
| 454 | 454 | |
| 455 | -add_action( 'wp_ajax_give_pages_search', 'give_ajax_pages_search' ); |
|
| 455 | +add_action('wp_ajax_give_pages_search', 'give_ajax_pages_search'); |
|
| 456 | 456 | |
| 457 | 457 | /** |
| 458 | 458 | * Retrieve Categories via AJAX for chosen dropdown search field. |
@@ -473,14 +473,14 @@ discard block |
||
| 473 | 473 | * |
| 474 | 474 | * @return array $args argument for get_terms |
| 475 | 475 | */ |
| 476 | - $args = (array) apply_filters( 'give_forms_categories_dropdown_args', array( |
|
| 476 | + $args = (array) apply_filters('give_forms_categories_dropdown_args', array( |
|
| 477 | 477 | 'number' => 30, |
| 478 | - 'name__like' => esc_sql( sanitize_text_field( $_POST['s'] ) ) |
|
| 479 | - ) ); |
|
| 478 | + 'name__like' => esc_sql(sanitize_text_field($_POST['s'])) |
|
| 479 | + )); |
|
| 480 | 480 | |
| 481 | - $categories = get_terms( 'give_forms_category', $args ); |
|
| 481 | + $categories = get_terms('give_forms_category', $args); |
|
| 482 | 482 | |
| 483 | - foreach ( $categories as $category ) { |
|
| 483 | + foreach ($categories as $category) { |
|
| 484 | 484 | $results[] = array( |
| 485 | 485 | 'id' => $category->term_id, |
| 486 | 486 | 'name' => $category->name, |
@@ -496,12 +496,12 @@ discard block |
||
| 496 | 496 | * |
| 497 | 497 | * @return array $results Contain the categories id and name |
| 498 | 498 | */ |
| 499 | - $results = (array) apply_filters( 'give_forms_categories_dropdown_responce', $results ); |
|
| 499 | + $results = (array) apply_filters('give_forms_categories_dropdown_responce', $results); |
|
| 500 | 500 | |
| 501 | - wp_send_json( $results ); |
|
| 501 | + wp_send_json($results); |
|
| 502 | 502 | } |
| 503 | 503 | |
| 504 | -add_action( 'wp_ajax_give_categories_search', 'give_ajax_categories_search' ); |
|
| 504 | +add_action('wp_ajax_give_categories_search', 'give_ajax_categories_search'); |
|
| 505 | 505 | |
| 506 | 506 | /** |
| 507 | 507 | * Retrieve Tags via AJAX for chosen dropdown search field. |
@@ -522,14 +522,14 @@ discard block |
||
| 522 | 522 | * |
| 523 | 523 | * @return array $args argument for get_terms |
| 524 | 524 | */ |
| 525 | - $args = (array) apply_filters( 'give_forms_tags_dropdown_args', array( |
|
| 525 | + $args = (array) apply_filters('give_forms_tags_dropdown_args', array( |
|
| 526 | 526 | 'number' => 30, |
| 527 | - 'name__like' => esc_sql( sanitize_text_field( $_POST['s'] ) ) |
|
| 528 | - ) ); |
|
| 527 | + 'name__like' => esc_sql(sanitize_text_field($_POST['s'])) |
|
| 528 | + )); |
|
| 529 | 529 | |
| 530 | - $categories = get_terms( 'give_forms_tag', $args ); |
|
| 530 | + $categories = get_terms('give_forms_tag', $args); |
|
| 531 | 531 | |
| 532 | - foreach ( $categories as $category ) { |
|
| 532 | + foreach ($categories as $category) { |
|
| 533 | 533 | $results[] = array( |
| 534 | 534 | 'id' => $category->term_id, |
| 535 | 535 | 'name' => $category->name, |
@@ -545,12 +545,12 @@ discard block |
||
| 545 | 545 | * |
| 546 | 546 | * @return array $results Contain the tags id and name |
| 547 | 547 | */ |
| 548 | - $results = (array) apply_filters( 'give_forms_tags_dropdown_responce', $results ); |
|
| 548 | + $results = (array) apply_filters('give_forms_tags_dropdown_responce', $results); |
|
| 549 | 549 | |
| 550 | - wp_send_json( $results ); |
|
| 550 | + wp_send_json($results); |
|
| 551 | 551 | } |
| 552 | 552 | |
| 553 | -add_action( 'wp_ajax_give_tags_search', 'give_ajax_tags_search' ); |
|
| 553 | +add_action('wp_ajax_give_tags_search', 'give_ajax_tags_search'); |
|
| 554 | 554 | |
| 555 | 555 | /** |
| 556 | 556 | * Check for Price Variations (Multi-level donation forms) |
@@ -561,32 +561,32 @@ discard block |
||
| 561 | 561 | */ |
| 562 | 562 | function give_check_for_form_price_variations() { |
| 563 | 563 | |
| 564 | - if ( ! current_user_can( 'edit_give_forms', get_current_user_id() ) ) { |
|
| 565 | - die( '-1' ); |
|
| 564 | + if ( ! current_user_can('edit_give_forms', get_current_user_id())) { |
|
| 565 | + die('-1'); |
|
| 566 | 566 | } |
| 567 | 567 | |
| 568 | - $form_id = intval( $_POST['form_id'] ); |
|
| 569 | - $form = get_post( $form_id ); |
|
| 568 | + $form_id = intval($_POST['form_id']); |
|
| 569 | + $form = get_post($form_id); |
|
| 570 | 570 | |
| 571 | - if ( 'give_forms' !== $form->post_type ) { |
|
| 572 | - die( '-2' ); |
|
| 571 | + if ('give_forms' !== $form->post_type) { |
|
| 572 | + die('-2'); |
|
| 573 | 573 | } |
| 574 | 574 | |
| 575 | - if ( give_has_variable_prices( $form_id ) ) { |
|
| 576 | - $variable_prices = give_get_variable_prices( $form_id ); |
|
| 575 | + if (give_has_variable_prices($form_id)) { |
|
| 576 | + $variable_prices = give_get_variable_prices($form_id); |
|
| 577 | 577 | |
| 578 | - if ( $variable_prices ) { |
|
| 578 | + if ($variable_prices) { |
|
| 579 | 579 | $ajax_response = '<select class="give_price_options_select give-select give-select" name="give_price_option">'; |
| 580 | 580 | |
| 581 | - if ( isset( $_POST['all_prices'] ) ) { |
|
| 582 | - $ajax_response .= '<option value="all">' . esc_html__( 'All Levels', 'give' ) . '</option>'; |
|
| 581 | + if (isset($_POST['all_prices'])) { |
|
| 582 | + $ajax_response .= '<option value="all">'.esc_html__('All Levels', 'give').'</option>'; |
|
| 583 | 583 | } |
| 584 | 584 | |
| 585 | - foreach ( $variable_prices as $key => $price ) { |
|
| 585 | + foreach ($variable_prices as $key => $price) { |
|
| 586 | 586 | |
| 587 | - $level_text = ! empty( $price['_give_text'] ) ? esc_html( $price['_give_text'] ) : give_currency_filter( give_format_amount( $price['_give_amount'], array( 'sanitize' => false ) ) ); |
|
| 587 | + $level_text = ! empty($price['_give_text']) ? esc_html($price['_give_text']) : give_currency_filter(give_format_amount($price['_give_amount'], array('sanitize' => false))); |
|
| 588 | 588 | |
| 589 | - $ajax_response .= '<option value="' . esc_attr( $price['_give_id']['level_id'] ) . '">' . $level_text . '</option>'; |
|
| 589 | + $ajax_response .= '<option value="'.esc_attr($price['_give_id']['level_id']).'">'.$level_text.'</option>'; |
|
| 590 | 590 | } |
| 591 | 591 | $ajax_response .= '</select>'; |
| 592 | 592 | echo $ajax_response; |
@@ -596,7 +596,7 @@ discard block |
||
| 596 | 596 | give_die(); |
| 597 | 597 | } |
| 598 | 598 | |
| 599 | -add_action( 'wp_ajax_give_check_for_form_price_variations', 'give_check_for_form_price_variations' ); |
|
| 599 | +add_action('wp_ajax_give_check_for_form_price_variations', 'give_check_for_form_price_variations'); |
|
| 600 | 600 | |
| 601 | 601 | |
| 602 | 602 | /** |
@@ -607,28 +607,28 @@ discard block |
||
| 607 | 607 | * @return void |
| 608 | 608 | */ |
| 609 | 609 | function give_check_for_form_price_variations_html() { |
| 610 | - if ( ! current_user_can( 'edit_give_payments', get_current_user_id() ) ) { |
|
| 610 | + if ( ! current_user_can('edit_give_payments', get_current_user_id())) { |
|
| 611 | 611 | wp_die(); |
| 612 | 612 | } |
| 613 | 613 | |
| 614 | - $form_id = ! empty( $_POST['form_id'] ) ? intval( $_POST['form_id'] ) : false; |
|
| 615 | - $payment_id = ! empty( $_POST['payment_id'] ) ? intval( $_POST['payment_id'] ) : false; |
|
| 616 | - if ( empty( $form_id ) || empty( $payment_id ) ) { |
|
| 614 | + $form_id = ! empty($_POST['form_id']) ? intval($_POST['form_id']) : false; |
|
| 615 | + $payment_id = ! empty($_POST['payment_id']) ? intval($_POST['payment_id']) : false; |
|
| 616 | + if (empty($form_id) || empty($payment_id)) { |
|
| 617 | 617 | wp_die(); |
| 618 | 618 | } |
| 619 | 619 | |
| 620 | - $form = get_post( $form_id ); |
|
| 621 | - if ( ! empty( $form->post_type ) && 'give_forms' !== $form->post_type ) { |
|
| 620 | + $form = get_post($form_id); |
|
| 621 | + if ( ! empty($form->post_type) && 'give_forms' !== $form->post_type) { |
|
| 622 | 622 | wp_die(); |
| 623 | 623 | } |
| 624 | 624 | |
| 625 | - if ( ! give_has_variable_prices( $form_id ) || ! $form_id ) { |
|
| 626 | - esc_html_e( 'n/a', 'give' ); |
|
| 625 | + if ( ! give_has_variable_prices($form_id) || ! $form_id) { |
|
| 626 | + esc_html_e('n/a', 'give'); |
|
| 627 | 627 | } else { |
| 628 | 628 | $prices_atts = array(); |
| 629 | - if ( $variable_prices = give_get_variable_prices( $form_id ) ) { |
|
| 630 | - foreach ( $variable_prices as $variable_price ) { |
|
| 631 | - $prices_atts[ $variable_price['_give_id']['level_id'] ] = give_format_amount( $variable_price['_give_amount'], array( 'sanitize' => false ) ); |
|
| 629 | + if ($variable_prices = give_get_variable_prices($form_id)) { |
|
| 630 | + foreach ($variable_prices as $variable_price) { |
|
| 631 | + $prices_atts[$variable_price['_give_id']['level_id']] = give_format_amount($variable_price['_give_amount'], array('sanitize' => false)); |
|
| 632 | 632 | } |
| 633 | 633 | } |
| 634 | 634 | |
@@ -639,12 +639,12 @@ discard block |
||
| 639 | 639 | 'chosen' => true, |
| 640 | 640 | 'show_option_all' => '', |
| 641 | 641 | 'show_option_none' => '', |
| 642 | - 'select_atts' => 'data-prices=' . esc_attr( json_encode( $prices_atts ) ), |
|
| 642 | + 'select_atts' => 'data-prices='.esc_attr(json_encode($prices_atts)), |
|
| 643 | 643 | ); |
| 644 | 644 | |
| 645 | - if ( $payment_id ) { |
|
| 645 | + if ($payment_id) { |
|
| 646 | 646 | // Payment object. |
| 647 | - $payment = new Give_Payment( $payment_id ); |
|
| 647 | + $payment = new Give_Payment($payment_id); |
|
| 648 | 648 | |
| 649 | 649 | // Payment meta. |
| 650 | 650 | $payment_meta = $payment->get_meta(); |
@@ -652,13 +652,13 @@ discard block |
||
| 652 | 652 | } |
| 653 | 653 | |
| 654 | 654 | // Render variable prices select tag html. |
| 655 | - give_get_form_variable_price_dropdown( $variable_price_dropdown_option, true ); |
|
| 655 | + give_get_form_variable_price_dropdown($variable_price_dropdown_option, true); |
|
| 656 | 656 | } |
| 657 | 657 | |
| 658 | 658 | give_die(); |
| 659 | 659 | } |
| 660 | 660 | |
| 661 | -add_action( 'wp_ajax_give_check_for_form_price_variations_html', 'give_check_for_form_price_variations_html' ); |
|
| 661 | +add_action('wp_ajax_give_check_for_form_price_variations_html', 'give_check_for_form_price_variations_html'); |
|
| 662 | 662 | |
| 663 | 663 | /** |
| 664 | 664 | * Send Confirmation Email For Complete Donation History Access. |
@@ -670,30 +670,30 @@ discard block |
||
| 670 | 670 | function give_confirm_email_for_donation_access() { |
| 671 | 671 | |
| 672 | 672 | // Verify Security using Nonce. |
| 673 | - if ( ! check_ajax_referer( 'give_ajax_nonce', 'nonce' ) ) { |
|
| 673 | + if ( ! check_ajax_referer('give_ajax_nonce', 'nonce')) { |
|
| 674 | 674 | return false; |
| 675 | 675 | } |
| 676 | 676 | |
| 677 | 677 | // Bail Out, if email is empty. |
| 678 | - if ( empty( $_POST['email'] ) ) { |
|
| 678 | + if (empty($_POST['email'])) { |
|
| 679 | 679 | return false; |
| 680 | 680 | } |
| 681 | 681 | |
| 682 | - $donor = Give()->donors->get_donor_by( 'email', give_clean( $_POST['email'] ) ); |
|
| 683 | - if ( Give()->email_access->can_send_email( $donor->id ) ) { |
|
| 682 | + $donor = Give()->donors->get_donor_by('email', give_clean($_POST['email'])); |
|
| 683 | + if (Give()->email_access->can_send_email($donor->id)) { |
|
| 684 | 684 | $return = array(); |
| 685 | - $email_sent = Give()->email_access->send_email( $donor->id, $donor->email ); |
|
| 685 | + $email_sent = Give()->email_access->send_email($donor->id, $donor->email); |
|
| 686 | 686 | |
| 687 | - if ( ! $email_sent ) { |
|
| 687 | + if ( ! $email_sent) { |
|
| 688 | 688 | $return['status'] = 'error'; |
| 689 | 689 | $return['message'] = Give()->notices->print_frontend_notice( |
| 690 | - __( 'Unable to send email. Please try again.', 'give' ), |
|
| 690 | + __('Unable to send email. Please try again.', 'give'), |
|
| 691 | 691 | false, |
| 692 | 692 | 'error' |
| 693 | 693 | ); |
| 694 | 694 | } |
| 695 | 695 | |
| 696 | - $return['status'] = 'success'; |
|
| 696 | + $return['status'] = 'success'; |
|
| 697 | 697 | |
| 698 | 698 | /** |
| 699 | 699 | * Filter to modify access mail send notice |
@@ -704,7 +704,7 @@ discard block |
||
| 704 | 704 | * |
| 705 | 705 | * @return string $message Send notice message for email access. |
| 706 | 706 | */ |
| 707 | - $message = (string) apply_filters( 'give_email_access_mail_send_notice', __( 'Please check your email and click on the link to access your complete donation history.', 'give' ) ); |
|
| 707 | + $message = (string) apply_filters('give_email_access_mail_send_notice', __('Please check your email and click on the link to access your complete donation history.', 'give')); |
|
| 708 | 708 | |
| 709 | 709 | $return['message'] = Give()->notices->print_frontend_notice( |
| 710 | 710 | $message, |
@@ -730,8 +730,8 @@ discard block |
||
| 730 | 730 | $message = (string) apply_filters( |
| 731 | 731 | 'give_email_access_requests_exceed_notice', |
| 732 | 732 | sprintf( |
| 733 | - __( 'Too many access email requests detected. Please wait %s before requesting a new donation history access link.', 'give' ), |
|
| 734 | - sprintf( _n( '%s minute', '%s minutes', $value, 'give' ), $value ) |
|
| 733 | + __('Too many access email requests detected. Please wait %s before requesting a new donation history access link.', 'give'), |
|
| 734 | + sprintf(_n('%s minute', '%s minutes', $value, 'give'), $value) |
|
| 735 | 735 | ), |
| 736 | 736 | $value |
| 737 | 737 | ); |
@@ -743,11 +743,11 @@ discard block |
||
| 743 | 743 | ); |
| 744 | 744 | } |
| 745 | 745 | |
| 746 | - echo json_encode( $return ); |
|
| 746 | + echo json_encode($return); |
|
| 747 | 747 | give_die(); |
| 748 | 748 | } |
| 749 | 749 | |
| 750 | -add_action( 'wp_ajax_nopriv_give_confirm_email_for_donations_access', 'give_confirm_email_for_donation_access' ); |
|
| 750 | +add_action('wp_ajax_nopriv_give_confirm_email_for_donations_access', 'give_confirm_email_for_donation_access'); |
|
| 751 | 751 | |
| 752 | 752 | /** |
| 753 | 753 | * Render receipt by ajax |
@@ -755,15 +755,15 @@ discard block |
||
| 755 | 755 | * |
| 756 | 756 | * @since 2.2.0 |
| 757 | 757 | */ |
| 758 | -function __give_get_receipt(){ |
|
| 759 | - if( ! isset( $_POST['shortcode_atts'] ) ) { |
|
| 758 | +function __give_get_receipt() { |
|
| 759 | + if ( ! isset($_POST['shortcode_atts'])) { |
|
| 760 | 760 | give_die(); |
| 761 | 761 | } |
| 762 | 762 | |
| 763 | - $atts = urldecode_deep( give_clean( $_POST['shortcode_atts'] ) ); |
|
| 764 | - $data = give_receipt_shortcode( $atts ); |
|
| 763 | + $atts = urldecode_deep(give_clean($_POST['shortcode_atts'])); |
|
| 764 | + $data = give_receipt_shortcode($atts); |
|
| 765 | 765 | |
| 766 | - wp_send_json( $data ); |
|
| 766 | + wp_send_json($data); |
|
| 767 | 767 | } |
| 768 | -add_action( 'wp_ajax_get_receipt', '__give_get_receipt' ); |
|
| 769 | -add_action( 'wp_ajax_nopriv_get_receipt', '__give_get_receipt' ); |
|
| 768 | +add_action('wp_ajax_get_receipt', '__give_get_receipt'); |
|
| 769 | +add_action('wp_ajax_nopriv_get_receipt', '__give_get_receipt'); |
|
@@ -242,7 +242,7 @@ |
||
| 242 | 242 | * @since 1.0 |
| 243 | 243 | * @access public |
| 244 | 244 | * |
| 245 | - * @return bool |
|
| 245 | + * @return boolean|null |
|
| 246 | 246 | */ |
| 247 | 247 | public function check_for_token() { |
| 248 | 248 | |
@@ -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 | |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | public function __construct() { |
| 107 | 107 | |
| 108 | 108 | // get it started |
| 109 | - add_action( 'init', array( $this, 'init' ) ); |
|
| 109 | + add_action('init', array($this, 'init')); |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | /** |
@@ -122,28 +122,28 @@ discard block |
||
| 122 | 122 | public function init() { |
| 123 | 123 | |
| 124 | 124 | // Bail Out, if user is logged in. |
| 125 | - if ( is_user_logged_in() ) { |
|
| 125 | + if (is_user_logged_in()) { |
|
| 126 | 126 | return; |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | // Are db columns setup? |
| 130 | - $column_exists = Give()->donors->does_column_exist( 'token' ); |
|
| 131 | - if ( ! $column_exists ) { |
|
| 130 | + $column_exists = Give()->donors->does_column_exist('token'); |
|
| 131 | + if ( ! $column_exists) { |
|
| 132 | 132 | $this->create_columns(); |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | // Timeouts. |
| 136 | - $this->verify_throttle = apply_filters( 'give_nl_verify_throttle', 300 ); |
|
| 137 | - $this->limit_throttle = apply_filters( 'give_nl_limit_throttle', 3 ); |
|
| 138 | - $this->token_expiration = apply_filters( 'give_nl_token_expiration', 7200 ); |
|
| 136 | + $this->verify_throttle = apply_filters('give_nl_verify_throttle', 300); |
|
| 137 | + $this->limit_throttle = apply_filters('give_nl_limit_throttle', 3); |
|
| 138 | + $this->token_expiration = apply_filters('give_nl_token_expiration', 7200); |
|
| 139 | 139 | |
| 140 | 140 | // Setup login. |
| 141 | 141 | $this->check_for_token(); |
| 142 | 142 | |
| 143 | - if ( $this->token_exists ) { |
|
| 144 | - add_filter( 'give_can_view_receipt', '__return_true' ); |
|
| 145 | - add_filter( 'give_user_pending_verification', '__return_false' ); |
|
| 146 | - add_filter( 'give_get_users_donations_args', array( $this, 'users_donations_args' ) ); |
|
| 143 | + if ($this->token_exists) { |
|
| 144 | + add_filter('give_can_view_receipt', '__return_true'); |
|
| 145 | + add_filter('give_user_pending_verification', '__return_false'); |
|
| 146 | + add_filter('give_get_users_donations_args', array($this, 'users_donations_args')); |
|
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | } |
@@ -158,23 +158,23 @@ discard block |
||
| 158 | 158 | * |
| 159 | 159 | * @return bool |
| 160 | 160 | */ |
| 161 | - public function can_send_email( $donor_id ) { |
|
| 161 | + public function can_send_email($donor_id) { |
|
| 162 | 162 | |
| 163 | - $donor = Give()->donors->get_donor_by( 'id', $donor_id ); |
|
| 163 | + $donor = Give()->donors->get_donor_by('id', $donor_id); |
|
| 164 | 164 | |
| 165 | - if ( is_object( $donor ) && count( $donor ) > 0 ) { |
|
| 165 | + if (is_object($donor) && count($donor) > 0) { |
|
| 166 | 166 | |
| 167 | - $email_throttle_count = (int) give_get_meta( $donor_id, '_give_email_throttle_count', true ); |
|
| 167 | + $email_throttle_count = (int) give_get_meta($donor_id, '_give_email_throttle_count', true); |
|
| 168 | 168 | |
| 169 | 169 | $cache_key = "give_cache_email_throttle_limit_exhausted_{$donor_id}"; |
| 170 | 170 | if ( |
| 171 | 171 | $email_throttle_count < $this->limit_throttle && |
| 172 | - true !== Give_Cache::get( $cache_key ) |
|
| 172 | + true !== Give_Cache::get($cache_key) |
|
| 173 | 173 | ) { |
| 174 | - give_update_meta( $donor_id, '_give_email_throttle_count', $email_throttle_count + 1 ); |
|
| 174 | + give_update_meta($donor_id, '_give_email_throttle_count', $email_throttle_count + 1); |
|
| 175 | 175 | } else { |
| 176 | - give_update_meta( $donor_id, '_give_email_throttle_count', 0 ); |
|
| 177 | - Give_Cache::set( $cache_key, true, $this->verify_throttle ); |
|
| 176 | + give_update_meta($donor_id, '_give_email_throttle_count', 0); |
|
| 177 | + Give_Cache::set($cache_key, true, $this->verify_throttle); |
|
| 178 | 178 | return false; |
| 179 | 179 | } |
| 180 | 180 | |
@@ -194,8 +194,8 @@ discard block |
||
| 194 | 194 | * |
| 195 | 195 | * @return bool |
| 196 | 196 | */ |
| 197 | - public function send_email( $donor_id, $email ) { |
|
| 198 | - return apply_filters( 'give_email-access_email_notification', $donor_id, $email ); |
|
| 197 | + public function send_email($donor_id, $email) { |
|
| 198 | + return apply_filters('give_email-access_email_notification', $donor_id, $email); |
|
| 199 | 199 | } |
| 200 | 200 | |
| 201 | 201 | /** |
@@ -208,28 +208,28 @@ discard block |
||
| 208 | 208 | */ |
| 209 | 209 | public function check_for_token() { |
| 210 | 210 | |
| 211 | - $token = isset( $_GET['give_nl'] ) ? give_clean( $_GET['give_nl'] ) : ''; |
|
| 211 | + $token = isset($_GET['give_nl']) ? give_clean($_GET['give_nl']) : ''; |
|
| 212 | 212 | |
| 213 | 213 | // Check for cookie. |
| 214 | - if ( empty( $token ) ) { |
|
| 215 | - $token = isset( $_COOKIE['give_nl'] ) ? give_clean( $_COOKIE['give_nl'] ) : ''; |
|
| 214 | + if (empty($token)) { |
|
| 215 | + $token = isset($_COOKIE['give_nl']) ? give_clean($_COOKIE['give_nl']) : ''; |
|
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | // Must have a token. |
| 219 | - if ( ! empty( $token ) ) { |
|
| 219 | + if ( ! empty($token)) { |
|
| 220 | 220 | |
| 221 | - if ( ! $this->is_valid_token( $token ) ) { |
|
| 222 | - if ( ! $this->is_valid_verify_key( $token ) ) { |
|
| 221 | + if ( ! $this->is_valid_token($token)) { |
|
| 222 | + if ( ! $this->is_valid_verify_key($token)) { |
|
| 223 | 223 | return false; |
| 224 | 224 | } |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | // Set Receipt Access Session. |
| 228 | - Give()->session->set( 'receipt_access', true ); |
|
| 228 | + Give()->session->set('receipt_access', true); |
|
| 229 | 229 | $this->token_exists = true; |
| 230 | 230 | // Set cookie. |
| 231 | - $lifetime = current_time( 'timestamp' ) + Give()->session->set_expiration_time(); |
|
| 232 | - @setcookie( 'give_nl', $token, $lifetime, COOKIEPATH, COOKIE_DOMAIN, false ); |
|
| 231 | + $lifetime = current_time('timestamp') + Give()->session->set_expiration_time(); |
|
| 232 | + @setcookie('give_nl', $token, $lifetime, COOKIEPATH, COOKIE_DOMAIN, false); |
|
| 233 | 233 | |
| 234 | 234 | return true; |
| 235 | 235 | } |
@@ -245,26 +245,26 @@ discard block |
||
| 245 | 245 | * |
| 246 | 246 | * @return bool |
| 247 | 247 | */ |
| 248 | - public function is_valid_token( $token ) { |
|
| 248 | + public function is_valid_token($token) { |
|
| 249 | 249 | |
| 250 | 250 | global $wpdb; |
| 251 | 251 | |
| 252 | 252 | // Make sure token isn't expired. |
| 253 | - $expires = date( 'Y-m-d H:i:s', time() - $this->token_expiration ); |
|
| 253 | + $expires = date('Y-m-d H:i:s', time() - $this->token_expiration); |
|
| 254 | 254 | |
| 255 | 255 | $email = $wpdb->get_var( |
| 256 | - $wpdb->prepare( "SELECT email FROM {$wpdb->donors} WHERE verify_key = %s AND verify_throttle >= %s LIMIT 1", $token, $expires ) |
|
| 256 | + $wpdb->prepare("SELECT email FROM {$wpdb->donors} WHERE verify_key = %s AND verify_throttle >= %s LIMIT 1", $token, $expires) |
|
| 257 | 257 | ); |
| 258 | 258 | |
| 259 | - if ( ! empty( $email ) ) { |
|
| 259 | + if ( ! empty($email)) { |
|
| 260 | 260 | $this->token_email = $email; |
| 261 | 261 | $this->token = $token; |
| 262 | 262 | return true; |
| 263 | 263 | } |
| 264 | 264 | |
| 265 | 265 | // Set error only if email access form isn't being submitted. |
| 266 | - if ( ! isset( $_POST['give_email'] ) && ! isset( $_POST['_wpnonce'] ) ) { |
|
| 267 | - give_set_error( 'give_email_token_expired', apply_filters( 'give_email_token_expired_message', __( 'Your access token has expired. Please request a new one below:', 'give' ) ) ); |
|
| 266 | + if ( ! isset($_POST['give_email']) && ! isset($_POST['_wpnonce'])) { |
|
| 267 | + give_set_error('give_email_token_expired', apply_filters('give_email_token_expired_message', __('Your access token has expired. Please request a new one below:', 'give'))); |
|
| 268 | 268 | } |
| 269 | 269 | |
| 270 | 270 | return false; |
@@ -283,25 +283,25 @@ discard block |
||
| 283 | 283 | * |
| 284 | 284 | * @return void |
| 285 | 285 | */ |
| 286 | - public function set_verify_key( $donor_id, $email, $verify_key ) { |
|
| 286 | + public function set_verify_key($donor_id, $email, $verify_key) { |
|
| 287 | 287 | global $wpdb; |
| 288 | 288 | |
| 289 | - $now = date( 'Y-m-d H:i:s' ); |
|
| 289 | + $now = date('Y-m-d H:i:s'); |
|
| 290 | 290 | |
| 291 | 291 | // Insert or update? |
| 292 | 292 | $row_id = (int) $wpdb->get_var( |
| 293 | - $wpdb->prepare( "SELECT id FROM {$wpdb->donors} WHERE id = %d LIMIT 1", $donor_id ) |
|
| 293 | + $wpdb->prepare("SELECT id FROM {$wpdb->donors} WHERE id = %d LIMIT 1", $donor_id) |
|
| 294 | 294 | ); |
| 295 | 295 | |
| 296 | 296 | // Update. |
| 297 | - if ( ! empty( $row_id ) ) { |
|
| 297 | + if ( ! empty($row_id)) { |
|
| 298 | 298 | $wpdb->query( |
| 299 | - $wpdb->prepare( "UPDATE {$wpdb->donors} SET verify_key = %s, verify_throttle = %s WHERE id = %d LIMIT 1", $verify_key, $now, $row_id ) |
|
| 299 | + $wpdb->prepare("UPDATE {$wpdb->donors} SET verify_key = %s, verify_throttle = %s WHERE id = %d LIMIT 1", $verify_key, $now, $row_id) |
|
| 300 | 300 | ); |
| 301 | 301 | } // Insert. |
| 302 | 302 | else { |
| 303 | 303 | $wpdb->query( |
| 304 | - $wpdb->prepare( "INSERT INTO {$wpdb->donors} ( verify_key, verify_throttle) VALUES (%s, %s)", $verify_key, $now ) |
|
| 304 | + $wpdb->prepare("INSERT INTO {$wpdb->donors} ( verify_key, verify_throttle) VALUES (%s, %s)", $verify_key, $now) |
|
| 305 | 305 | ); |
| 306 | 306 | } |
| 307 | 307 | } |
@@ -316,21 +316,21 @@ discard block |
||
| 316 | 316 | * |
| 317 | 317 | * @return bool |
| 318 | 318 | */ |
| 319 | - public function is_valid_verify_key( $token ) { |
|
| 319 | + public function is_valid_verify_key($token) { |
|
| 320 | 320 | /* @var WPDB $wpdb */ |
| 321 | 321 | global $wpdb; |
| 322 | 322 | |
| 323 | 323 | // See if the verify_key exists. |
| 324 | 324 | $row = $wpdb->get_row( |
| 325 | - $wpdb->prepare( "SELECT id, email FROM {$wpdb->donors} WHERE verify_key = %s LIMIT 1", $token ) |
|
| 325 | + $wpdb->prepare("SELECT id, email FROM {$wpdb->donors} WHERE verify_key = %s LIMIT 1", $token) |
|
| 326 | 326 | ); |
| 327 | 327 | |
| 328 | - $now = date( 'Y-m-d H:i:s' ); |
|
| 328 | + $now = date('Y-m-d H:i:s'); |
|
| 329 | 329 | |
| 330 | 330 | // Set token and remove verify key. |
| 331 | - if ( ! empty( $row ) ) { |
|
| 331 | + if ( ! empty($row)) { |
|
| 332 | 332 | $wpdb->query( |
| 333 | - $wpdb->prepare( "UPDATE {$wpdb->donors} SET verify_key = '', token = %s, verify_throttle = %s WHERE id = %d LIMIT 1", $token, $now, $row->id ) |
|
| 333 | + $wpdb->prepare("UPDATE {$wpdb->donors} SET verify_key = '', token = %s, verify_throttle = %s WHERE id = %d LIMIT 1", $token, $now, $row->id) |
|
| 334 | 334 | ); |
| 335 | 335 | |
| 336 | 336 | $this->token_email = $row->email; |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | * |
| 355 | 355 | * @return mixed |
| 356 | 356 | */ |
| 357 | - public function users_donations_args( $args ) { |
|
| 357 | + public function users_donations_args($args) { |
|
| 358 | 358 | $args['user'] = $this->token_email; |
| 359 | 359 | |
| 360 | 360 | return $args; |
@@ -375,7 +375,7 @@ discard block |
||
| 375 | 375 | global $wpdb; |
| 376 | 376 | |
| 377 | 377 | // Create columns in donors table. |
| 378 | - $wpdb->query( "ALTER TABLE {$wpdb->donors} ADD `token` VARCHAR(255) CHARACTER SET utf8 NOT NULL, ADD `verify_key` VARCHAR(255) CHARACTER SET utf8 NOT NULL AFTER `token`, ADD `verify_throttle` DATETIME NOT NULL AFTER `verify_key`" ); |
|
| 378 | + $wpdb->query("ALTER TABLE {$wpdb->donors} ADD `token` VARCHAR(255) CHARACTER SET utf8 NOT NULL, ADD `verify_key` VARCHAR(255) CHARACTER SET utf8 NOT NULL AFTER `token`, ADD `verify_throttle` DATETIME NOT NULL AFTER `verify_key`"); |
|
| 379 | 379 | } |
| 380 | 380 | |
| 381 | 381 | } |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | * @param string $user_login Username |
| 181 | 181 | * @param string $user_pass Password |
| 182 | 182 | * |
| 183 | - * @return bool |
|
| 183 | + * @return false|null |
|
| 184 | 184 | */ |
| 185 | 185 | function give_log_user_in( $user_id, $user_login, $user_pass ) { |
| 186 | 186 | |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | * |
| 222 | 222 | * @param array $data Data sent from the register form |
| 223 | 223 | * |
| 224 | - * @return bool |
|
| 224 | + * @return false|null |
|
| 225 | 225 | */ |
| 226 | 226 | function give_process_register_form( $data ) { |
| 227 | 227 | |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | * |
| 308 | 308 | * @since 1.8.17 |
| 309 | 309 | * |
| 310 | - * @return bool |
|
| 310 | + * @return boolean|null |
|
| 311 | 311 | */ |
| 312 | 312 | function give_email_access_login() { |
| 313 | 313 | |
@@ -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 | |
@@ -26,24 +26,24 @@ discard block |
||
| 26 | 26 | * |
| 27 | 27 | * @return string Login form |
| 28 | 28 | */ |
| 29 | -function give_login_form( $login_redirect = '', $logout_redirect = '' ) { |
|
| 29 | +function give_login_form($login_redirect = '', $logout_redirect = '') { |
|
| 30 | 30 | |
| 31 | - if ( empty( $login_redirect ) ) { |
|
| 32 | - $login_redirect = add_query_arg( 'give-login-success', 'true', give_get_history_page_uri() ); |
|
| 31 | + if (empty($login_redirect)) { |
|
| 32 | + $login_redirect = add_query_arg('give-login-success', 'true', give_get_history_page_uri()); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | - if ( empty( $logout_redirect ) ) { |
|
| 36 | - $logout_redirect = add_query_arg( 'give-logout-success', 'true', give_get_current_page_url() ); |
|
| 35 | + if (empty($logout_redirect)) { |
|
| 36 | + $logout_redirect = add_query_arg('give-logout-success', 'true', give_get_current_page_url()); |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | // Add user_logout action to logout url. |
| 40 | 40 | $logout_redirect = add_query_arg( |
| 41 | 41 | array( |
| 42 | 42 | 'give_action' => 'user_logout', |
| 43 | - 'give_logout_nonce' => wp_create_nonce( 'give-logout-nonce' ), |
|
| 44 | - 'give_logout_redirect' => urlencode( $logout_redirect ), |
|
| 43 | + 'give_logout_nonce' => wp_create_nonce('give-logout-nonce'), |
|
| 44 | + 'give_logout_redirect' => urlencode($logout_redirect), |
|
| 45 | 45 | ), |
| 46 | - home_url( '/' ) |
|
| 46 | + home_url('/') |
|
| 47 | 47 | ); |
| 48 | 48 | |
| 49 | 49 | ob_start(); |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | ) |
| 57 | 57 | ); |
| 58 | 58 | |
| 59 | - return apply_filters( 'give_login_form', ob_get_clean() ); |
|
| 59 | + return apply_filters('give_login_form', ob_get_clean()); |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | /** |
@@ -69,14 +69,14 @@ discard block |
||
| 69 | 69 | * |
| 70 | 70 | * @return string Register form |
| 71 | 71 | */ |
| 72 | -function give_register_form( $redirect = '' ) { |
|
| 73 | - if ( empty( $redirect ) ) { |
|
| 72 | +function give_register_form($redirect = '') { |
|
| 73 | + if (empty($redirect)) { |
|
| 74 | 74 | $redirect = give_get_current_page_url(); |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | ob_start(); |
| 78 | 78 | |
| 79 | - if ( ! is_user_logged_in() ) { |
|
| 79 | + if ( ! is_user_logged_in()) { |
|
| 80 | 80 | give_get_template( |
| 81 | 81 | 'shortcode-register', |
| 82 | 82 | array( |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | ); |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | - return apply_filters( 'give_register_form', ob_get_clean() ); |
|
| 88 | + return apply_filters('give_register_form', ob_get_clean()); |
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | /** |
@@ -97,40 +97,40 @@ discard block |
||
| 97 | 97 | * |
| 98 | 98 | * @return void |
| 99 | 99 | */ |
| 100 | -function give_process_login_form( $data ) { |
|
| 101 | - if ( wp_verify_nonce( $data['give_login_nonce'], 'give-login-nonce' ) ) { |
|
| 100 | +function give_process_login_form($data) { |
|
| 101 | + if (wp_verify_nonce($data['give_login_nonce'], 'give-login-nonce')) { |
|
| 102 | 102 | |
| 103 | 103 | // Set Receipt Access Session. |
| 104 | - if ( ! empty( $_GET['payment_key'] ) ) { |
|
| 105 | - Give()->session->set( 'receipt_access', true ); |
|
| 104 | + if ( ! empty($_GET['payment_key'])) { |
|
| 105 | + Give()->session->set('receipt_access', true); |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | - $user_data = get_user_by( 'login', $data['give_user_login'] ); |
|
| 109 | - if ( ! $user_data ) { |
|
| 110 | - $user_data = get_user_by( 'email', $data['give_user_login'] ); |
|
| 108 | + $user_data = get_user_by('login', $data['give_user_login']); |
|
| 109 | + if ( ! $user_data) { |
|
| 110 | + $user_data = get_user_by('email', $data['give_user_login']); |
|
| 111 | 111 | } |
| 112 | - if ( $user_data ) { |
|
| 112 | + if ($user_data) { |
|
| 113 | 113 | $user_ID = $user_data->ID; |
| 114 | 114 | $user_email = $user_data->user_email; |
| 115 | - if ( wp_check_password( $data['give_user_pass'], $user_data->user_pass, $user_ID ) ) { |
|
| 116 | - give_log_user_in( $user_data->ID, $data['give_user_login'], $data['give_user_pass'] ); |
|
| 115 | + if (wp_check_password($data['give_user_pass'], $user_data->user_pass, $user_ID)) { |
|
| 116 | + give_log_user_in($user_data->ID, $data['give_user_login'], $data['give_user_pass']); |
|
| 117 | 117 | } else { |
| 118 | - give_set_error( 'password_incorrect', __( 'The password you entered is incorrect.', 'give' ) ); |
|
| 118 | + give_set_error('password_incorrect', __('The password you entered is incorrect.', 'give')); |
|
| 119 | 119 | } |
| 120 | 120 | } else { |
| 121 | - give_set_error( 'username_incorrect', __( 'The username you entered does not exist.', 'give' ) ); |
|
| 121 | + give_set_error('username_incorrect', __('The username you entered does not exist.', 'give')); |
|
| 122 | 122 | } |
| 123 | 123 | // Check for errors and redirect if none present |
| 124 | 124 | $errors = give_get_errors(); |
| 125 | - if ( ! $errors ) { |
|
| 126 | - $redirect = apply_filters( 'give_login_redirect', $data['give_login_redirect'], $user_ID ); |
|
| 127 | - wp_redirect( $redirect ); |
|
| 125 | + if ( ! $errors) { |
|
| 126 | + $redirect = apply_filters('give_login_redirect', $data['give_login_redirect'], $user_ID); |
|
| 127 | + wp_redirect($redirect); |
|
| 128 | 128 | give_die(); |
| 129 | 129 | } |
| 130 | 130 | } |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | -add_action( 'give_user_login', 'give_process_login_form' ); |
|
| 133 | +add_action('give_user_login', 'give_process_login_form'); |
|
| 134 | 134 | |
| 135 | 135 | |
| 136 | 136 | /** |
@@ -142,18 +142,18 @@ discard block |
||
| 142 | 142 | * |
| 143 | 143 | * @return void |
| 144 | 144 | */ |
| 145 | -function give_process_user_logout( $data ) { |
|
| 146 | - if ( wp_verify_nonce( $data['give_logout_nonce'], 'give-logout-nonce' ) && is_user_logged_in() ) { |
|
| 145 | +function give_process_user_logout($data) { |
|
| 146 | + if (wp_verify_nonce($data['give_logout_nonce'], 'give-logout-nonce') && is_user_logged_in()) { |
|
| 147 | 147 | |
| 148 | 148 | // Prevent occurring of any custom action on wp_logout. |
| 149 | - remove_all_actions( 'wp_logout' ); |
|
| 149 | + remove_all_actions('wp_logout'); |
|
| 150 | 150 | |
| 151 | 151 | /** |
| 152 | 152 | * Fires before processing user logout. |
| 153 | 153 | * |
| 154 | 154 | * @since 1.0 |
| 155 | 155 | */ |
| 156 | - do_action( 'give_before_user_logout' ); |
|
| 156 | + do_action('give_before_user_logout'); |
|
| 157 | 157 | |
| 158 | 158 | // Logout user. |
| 159 | 159 | wp_logout(); |
@@ -163,14 +163,14 @@ discard block |
||
| 163 | 163 | * |
| 164 | 164 | * @since 1.0 |
| 165 | 165 | */ |
| 166 | - do_action( 'give_after_user_logout' ); |
|
| 166 | + do_action('give_after_user_logout'); |
|
| 167 | 167 | |
| 168 | - wp_redirect( $data['give_logout_redirect'] ); |
|
| 168 | + wp_redirect($data['give_logout_redirect']); |
|
| 169 | 169 | give_die(); |
| 170 | 170 | } |
| 171 | 171 | } |
| 172 | 172 | |
| 173 | -add_action( 'give_user_logout', 'give_process_user_logout' ); |
|
| 173 | +add_action('give_user_logout', 'give_process_user_logout'); |
|
| 174 | 174 | |
| 175 | 175 | /** |
| 176 | 176 | * Log User In |
@@ -183,14 +183,14 @@ discard block |
||
| 183 | 183 | * |
| 184 | 184 | * @return bool |
| 185 | 185 | */ |
| 186 | -function give_log_user_in( $user_id, $user_login, $user_pass ) { |
|
| 186 | +function give_log_user_in($user_id, $user_login, $user_pass) { |
|
| 187 | 187 | |
| 188 | - if ( $user_id < 1 ) { |
|
| 188 | + if ($user_id < 1) { |
|
| 189 | 189 | return false; |
| 190 | 190 | } |
| 191 | 191 | |
| 192 | - wp_set_auth_cookie( $user_id ); |
|
| 193 | - wp_set_current_user( $user_id, $user_login ); |
|
| 192 | + wp_set_auth_cookie($user_id); |
|
| 193 | + wp_set_current_user($user_id, $user_login); |
|
| 194 | 194 | |
| 195 | 195 | /** |
| 196 | 196 | * Fires after the user has successfully logged in. |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | * @param string $user_login Username. |
| 201 | 201 | * @param WP_User $$user WP_User object of the logged-in user. |
| 202 | 202 | */ |
| 203 | - do_action( 'wp_login', $user_login, get_userdata( $user_id ) ); |
|
| 203 | + do_action('wp_login', $user_login, get_userdata($user_id)); |
|
| 204 | 204 | |
| 205 | 205 | /** |
| 206 | 206 | * Fires after give user has successfully logged in. |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | * @param string $user_login Username. |
| 212 | 212 | * @param string $user_pass User password. |
| 213 | 213 | */ |
| 214 | - do_action( 'give_log_user_in', $user_id, $user_login, $user_pass ); |
|
| 214 | + do_action('give_log_user_in', $user_id, $user_login, $user_pass); |
|
| 215 | 215 | } |
| 216 | 216 | |
| 217 | 217 | |
@@ -224,13 +224,13 @@ discard block |
||
| 224 | 224 | * |
| 225 | 225 | * @return bool |
| 226 | 226 | */ |
| 227 | -function give_process_register_form( $data ) { |
|
| 227 | +function give_process_register_form($data) { |
|
| 228 | 228 | |
| 229 | - if ( is_user_logged_in() ) { |
|
| 229 | + if (is_user_logged_in()) { |
|
| 230 | 230 | return false; |
| 231 | 231 | } |
| 232 | 232 | |
| 233 | - if ( empty( $_POST['give_register_submit'] ) ) { |
|
| 233 | + if (empty($_POST['give_register_submit'])) { |
|
| 234 | 234 | return false; |
| 235 | 235 | } |
| 236 | 236 | |
@@ -239,38 +239,38 @@ discard block |
||
| 239 | 239 | * |
| 240 | 240 | * @since 1.0 |
| 241 | 241 | */ |
| 242 | - do_action( 'give_pre_process_register_form' ); |
|
| 242 | + do_action('give_pre_process_register_form'); |
|
| 243 | 243 | |
| 244 | - if ( empty( $data['give_user_login'] ) ) { |
|
| 245 | - give_set_error( 'empty_username', esc_html__( 'Invalid username.', 'give' ) ); |
|
| 244 | + if (empty($data['give_user_login'])) { |
|
| 245 | + give_set_error('empty_username', esc_html__('Invalid username.', 'give')); |
|
| 246 | 246 | } |
| 247 | 247 | |
| 248 | - if ( username_exists( $data['give_user_login'] ) ) { |
|
| 249 | - give_set_error( 'username_unavailable', esc_html__( 'Username already taken.', 'give' ) ); |
|
| 248 | + if (username_exists($data['give_user_login'])) { |
|
| 249 | + give_set_error('username_unavailable', esc_html__('Username already taken.', 'give')); |
|
| 250 | 250 | } |
| 251 | 251 | |
| 252 | - if ( ! validate_username( $data['give_user_login'] ) ) { |
|
| 253 | - give_set_error( 'username_invalid', esc_html__( 'Invalid username.', 'give' ) ); |
|
| 252 | + if ( ! validate_username($data['give_user_login'])) { |
|
| 253 | + give_set_error('username_invalid', esc_html__('Invalid username.', 'give')); |
|
| 254 | 254 | } |
| 255 | 255 | |
| 256 | - if ( email_exists( $data['give_user_email'] ) ) { |
|
| 257 | - give_set_error( 'email_unavailable', esc_html__( 'Email address already taken.', 'give' ) ); |
|
| 256 | + if (email_exists($data['give_user_email'])) { |
|
| 257 | + give_set_error('email_unavailable', esc_html__('Email address already taken.', 'give')); |
|
| 258 | 258 | } |
| 259 | 259 | |
| 260 | - if ( empty( $data['give_user_email'] ) || ! is_email( $data['give_user_email'] ) ) { |
|
| 261 | - give_set_error( 'email_invalid', esc_html__( 'Invalid email.', 'give' ) ); |
|
| 260 | + if (empty($data['give_user_email']) || ! is_email($data['give_user_email'])) { |
|
| 261 | + give_set_error('email_invalid', esc_html__('Invalid email.', 'give')); |
|
| 262 | 262 | } |
| 263 | 263 | |
| 264 | - if ( ! empty( $data['give_payment_email'] ) && $data['give_payment_email'] != $data['give_user_email'] && ! is_email( $data['give_payment_email'] ) ) { |
|
| 265 | - give_set_error( 'payment_email_invalid', esc_html__( 'Invalid payment email.', 'give' ) ); |
|
| 264 | + if ( ! empty($data['give_payment_email']) && $data['give_payment_email'] != $data['give_user_email'] && ! is_email($data['give_payment_email'])) { |
|
| 265 | + give_set_error('payment_email_invalid', esc_html__('Invalid payment email.', 'give')); |
|
| 266 | 266 | } |
| 267 | 267 | |
| 268 | - if ( empty( $_POST['give_user_pass'] ) ) { |
|
| 269 | - give_set_error( 'empty_password', esc_html__( 'Please enter a password.', 'give' ) ); |
|
| 268 | + if (empty($_POST['give_user_pass'])) { |
|
| 269 | + give_set_error('empty_password', esc_html__('Please enter a password.', 'give')); |
|
| 270 | 270 | } |
| 271 | 271 | |
| 272 | - if ( ( ! empty( $_POST['give_user_pass'] ) && empty( $_POST['give_user_pass2'] ) ) || ( $_POST['give_user_pass'] !== $_POST['give_user_pass2'] ) ) { |
|
| 273 | - give_set_error( 'password_mismatch', esc_html__( 'Passwords don\'t match.', 'give' ) ); |
|
| 272 | + if (( ! empty($_POST['give_user_pass']) && empty($_POST['give_user_pass2'])) || ($_POST['give_user_pass'] !== $_POST['give_user_pass2'])) { |
|
| 273 | + give_set_error('password_mismatch', esc_html__('Passwords don\'t match.', 'give')); |
|
| 274 | 274 | } |
| 275 | 275 | |
| 276 | 276 | /** |
@@ -278,29 +278,29 @@ discard block |
||
| 278 | 278 | * |
| 279 | 279 | * @since 1.0 |
| 280 | 280 | */ |
| 281 | - do_action( 'give_process_register_form' ); |
|
| 281 | + do_action('give_process_register_form'); |
|
| 282 | 282 | |
| 283 | 283 | // Check for errors and redirect if none present |
| 284 | 284 | $errors = give_get_errors(); |
| 285 | 285 | |
| 286 | - if ( empty( $errors ) ) { |
|
| 286 | + if (empty($errors)) { |
|
| 287 | 287 | |
| 288 | - $redirect = apply_filters( 'give_register_redirect', $data['give_redirect'] ); |
|
| 288 | + $redirect = apply_filters('give_register_redirect', $data['give_redirect']); |
|
| 289 | 289 | |
| 290 | - give_register_and_login_new_user( array( |
|
| 290 | + give_register_and_login_new_user(array( |
|
| 291 | 291 | 'user_login' => $data['give_user_login'], |
| 292 | 292 | 'user_pass' => $data['give_user_pass'], |
| 293 | 293 | 'user_email' => $data['give_user_email'], |
| 294 | - 'user_registered' => date( 'Y-m-d H:i:s' ), |
|
| 295 | - 'role' => get_option( 'default_role' ), |
|
| 296 | - ) ); |
|
| 294 | + 'user_registered' => date('Y-m-d H:i:s'), |
|
| 295 | + 'role' => get_option('default_role'), |
|
| 296 | + )); |
|
| 297 | 297 | |
| 298 | - wp_redirect( $redirect ); |
|
| 298 | + wp_redirect($redirect); |
|
| 299 | 299 | give_die(); |
| 300 | 300 | } |
| 301 | 301 | } |
| 302 | 302 | |
| 303 | -add_action( 'give_user_register', 'give_process_register_form' ); |
|
| 303 | +add_action('give_user_register', 'give_process_register_form'); |
|
| 304 | 304 | |
| 305 | 305 | |
| 306 | 306 | /** |
@@ -313,24 +313,24 @@ discard block |
||
| 313 | 313 | function give_email_access_login() { |
| 314 | 314 | |
| 315 | 315 | // Verify nonce. |
| 316 | - if ( ! isset( $_POST['_wpnonce'] ) || ! wp_verify_nonce( $_POST['_wpnonce'], 'give' ) ) { |
|
| 316 | + if ( ! isset($_POST['_wpnonce']) || ! wp_verify_nonce($_POST['_wpnonce'], 'give')) { |
|
| 317 | 317 | return false; |
| 318 | 318 | } |
| 319 | 319 | |
| 320 | 320 | // Need email to proceed. |
| 321 | - $email = isset( $_POST['give_email'] ) ? give_clean( $_POST['give_email'] ) : ''; |
|
| 322 | - if ( empty( $email ) ) { |
|
| 323 | - give_set_error( 'give_empty_email', __( 'Please enter the email address you used for your donation.', 'give' ) ); |
|
| 321 | + $email = isset($_POST['give_email']) ? give_clean($_POST['give_email']) : ''; |
|
| 322 | + if (empty($email)) { |
|
| 323 | + give_set_error('give_empty_email', __('Please enter the email address you used for your donation.', 'give')); |
|
| 324 | 324 | } |
| 325 | 325 | |
| 326 | - $recaptcha_key = give_get_option( 'recaptcha_key' ); |
|
| 327 | - $recaptcha_secret = give_get_option( 'recaptcha_secret' ); |
|
| 326 | + $recaptcha_key = give_get_option('recaptcha_key'); |
|
| 327 | + $recaptcha_secret = give_get_option('recaptcha_secret'); |
|
| 328 | 328 | |
| 329 | - $enable_recaptcha = ( give_is_setting_enabled( give_get_option( 'enable_recaptcha' ) ) ) && ! empty( $recaptcha_key ) && ! empty( $recaptcha_secret ) ? true : false; |
|
| 330 | - $access_token = ! empty( $_GET['payment_key'] ) ? $_GET['payment_key'] : ''; |
|
| 329 | + $enable_recaptcha = (give_is_setting_enabled(give_get_option('enable_recaptcha'))) && ! empty($recaptcha_key) && ! empty($recaptcha_secret) ? true : false; |
|
| 330 | + $access_token = ! empty($_GET['payment_key']) ? $_GET['payment_key'] : ''; |
|
| 331 | 331 | |
| 332 | 332 | // Use reCAPTCHA. |
| 333 | - if ( $enable_recaptcha ) { |
|
| 333 | + if ($enable_recaptcha) { |
|
| 334 | 334 | |
| 335 | 335 | $args = array( |
| 336 | 336 | 'secret' => $recaptcha_secret, |
@@ -338,43 +338,43 @@ discard block |
||
| 338 | 338 | 'remoteip' => $_POST['give_ip'], |
| 339 | 339 | ); |
| 340 | 340 | |
| 341 | - if ( ! empty( $args['response'] ) ) { |
|
| 342 | - $request = wp_remote_post( 'https://www.google.com/recaptcha/api/siteverify', array( |
|
| 341 | + if ( ! empty($args['response'])) { |
|
| 342 | + $request = wp_remote_post('https://www.google.com/recaptcha/api/siteverify', array( |
|
| 343 | 343 | 'body' => $args, |
| 344 | - ) ); |
|
| 345 | - if ( ! is_wp_error( $request ) || 200 == wp_remote_retrieve_response_code( $request ) ) { |
|
| 344 | + )); |
|
| 345 | + if ( ! is_wp_error($request) || 200 == wp_remote_retrieve_response_code($request)) { |
|
| 346 | 346 | |
| 347 | - $response = json_decode( $request['body'], true ); |
|
| 347 | + $response = json_decode($request['body'], true); |
|
| 348 | 348 | |
| 349 | 349 | // reCAPTCHA fail. |
| 350 | - if ( ! $response['success'] ) { |
|
| 351 | - give_set_error( 'give_recaptcha_test_failed', apply_filters( 'give_recaptcha_test_failed_message', __( 'reCAPTCHA test failed.', 'give' ) ) ); |
|
| 350 | + if ( ! $response['success']) { |
|
| 351 | + give_set_error('give_recaptcha_test_failed', apply_filters('give_recaptcha_test_failed_message', __('reCAPTCHA test failed.', 'give'))); |
|
| 352 | 352 | } |
| 353 | 353 | } else { |
| 354 | 354 | |
| 355 | 355 | // Connection issue. |
| 356 | - give_set_error( 'give_recaptcha_connection_issue', apply_filters( 'give_recaptcha_connection_issue_message', __( 'Unable to connect to reCAPTCHA server.', 'give' ) ) ); |
|
| 356 | + give_set_error('give_recaptcha_connection_issue', apply_filters('give_recaptcha_connection_issue_message', __('Unable to connect to reCAPTCHA server.', 'give'))); |
|
| 357 | 357 | |
| 358 | 358 | } // End if(). |
| 359 | 359 | } else { |
| 360 | 360 | |
| 361 | - give_set_error( 'give_recaptcha_failed', apply_filters( 'give_recaptcha_failed_message', __( 'It looks like the reCAPTCHA test has failed.', 'give' ) ) ); |
|
| 361 | + give_set_error('give_recaptcha_failed', apply_filters('give_recaptcha_failed_message', __('It looks like the reCAPTCHA test has failed.', 'give'))); |
|
| 362 | 362 | |
| 363 | 363 | } // End if(). |
| 364 | 364 | } // End if(). |
| 365 | 365 | |
| 366 | 366 | // If no errors or only expired token key error - then send email. |
| 367 | - if ( ! give_get_errors() ) { |
|
| 367 | + if ( ! give_get_errors()) { |
|
| 368 | 368 | |
| 369 | - $donor = Give()->donors->get_donor_by( 'email', $email ); |
|
| 369 | + $donor = Give()->donors->get_donor_by('email', $email); |
|
| 370 | 370 | |
| 371 | 371 | Give()->email_access->init(); |
| 372 | 372 | |
| 373 | 373 | // Verify that donor object is present and donor is connected with its user profile or not. |
| 374 | - if ( is_object( $donor ) ) { |
|
| 374 | + if (is_object($donor)) { |
|
| 375 | 375 | |
| 376 | 376 | // Verify that email can be sent. |
| 377 | - if ( ! Give()->email_access->can_send_email( $donor->id ) ) { |
|
| 377 | + if ( ! Give()->email_access->can_send_email($donor->id)) { |
|
| 378 | 378 | |
| 379 | 379 | $_POST['email-access-exhausted'] = true; |
| 380 | 380 | |
@@ -382,10 +382,10 @@ discard block |
||
| 382 | 382 | |
| 383 | 383 | } else { |
| 384 | 384 | // Send the email. Requests not |
| 385 | - $email_sent = Give()->email_access->send_email( $donor->id, $donor->email ); |
|
| 385 | + $email_sent = Give()->email_access->send_email($donor->id, $donor->email); |
|
| 386 | 386 | |
| 387 | - if ( ! $email_sent ) { |
|
| 388 | - give_set_error( 'give_email_access_send_issue', __( 'Unable to send email. Please try again.', 'give' ) ); |
|
| 387 | + if ( ! $email_sent) { |
|
| 388 | + give_set_error('give_email_access_send_issue', __('Unable to send email. Please try again.', 'give')); |
|
| 389 | 389 | return false; |
| 390 | 390 | } |
| 391 | 391 | |
@@ -395,11 +395,11 @@ discard block |
||
| 395 | 395 | } |
| 396 | 396 | } else { |
| 397 | 397 | |
| 398 | - give_set_error( 'give-no-donations', __( 'We were unable to find any donations associated with the email address provided. Please try again using another email.', 'give' ) ); |
|
| 398 | + give_set_error('give-no-donations', __('We were unable to find any donations associated with the email address provided. Please try again using another email.', 'give')); |
|
| 399 | 399 | |
| 400 | 400 | } |
| 401 | 401 | } // End if(). |
| 402 | 402 | |
| 403 | 403 | } |
| 404 | 404 | |
| 405 | -add_action( 'give_email_access_form_login', 'give_email_access_login' ); |
|
| 405 | +add_action('give_email_access_form_login', 'give_email_access_login'); |
|
@@ -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,49 +23,49 @@ discard block |
||
| 23 | 23 | function give_setup_post_types() { |
| 24 | 24 | |
| 25 | 25 | // Give Forms single post and archive options. |
| 26 | - $give_forms_singular = give_is_setting_enabled( give_get_option( 'forms_singular' ) ); |
|
| 27 | - $give_forms_archives = give_is_setting_enabled( give_get_option( 'forms_archives' ) ); |
|
| 26 | + $give_forms_singular = give_is_setting_enabled(give_get_option('forms_singular')); |
|
| 27 | + $give_forms_archives = give_is_setting_enabled(give_get_option('forms_archives')); |
|
| 28 | 28 | |
| 29 | 29 | // Enable/Disable give_forms links if form is saving. |
| 30 | - if ( Give_Admin_Settings::is_saving_settings() ) { |
|
| 31 | - if ( isset( $_POST['forms_singular'] ) ) { |
|
| 32 | - $give_forms_singular = give_is_setting_enabled( give_clean( $_POST['forms_singular'] ) ); |
|
| 30 | + if (Give_Admin_Settings::is_saving_settings()) { |
|
| 31 | + if (isset($_POST['forms_singular'])) { |
|
| 32 | + $give_forms_singular = give_is_setting_enabled(give_clean($_POST['forms_singular'])); |
|
| 33 | 33 | flush_rewrite_rules(); |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | - if ( isset( $_POST['forms_archives'] ) ) { |
|
| 37 | - $give_forms_archives = give_is_setting_enabled( give_clean( $_POST['forms_archives'] ) ); |
|
| 36 | + if (isset($_POST['forms_archives'])) { |
|
| 37 | + $give_forms_archives = give_is_setting_enabled(give_clean($_POST['forms_archives'])); |
|
| 38 | 38 | flush_rewrite_rules(); |
| 39 | 39 | } |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | - $give_forms_slug = defined( 'GIVE_SLUG' ) ? GIVE_SLUG : 'donations'; |
|
| 42 | + $give_forms_slug = defined('GIVE_SLUG') ? GIVE_SLUG : 'donations'; |
|
| 43 | 43 | // Support for old 'GIVE_FORMS_SLUG' constant |
| 44 | - if ( defined( 'GIVE_FORMS_SLUG' ) ) { |
|
| 44 | + if (defined('GIVE_FORMS_SLUG')) { |
|
| 45 | 45 | $give_forms_slug = GIVE_FORMS_SLUG; |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - $give_forms_rewrite = defined( 'GIVE_DISABLE_FORMS_REWRITE' ) && GIVE_DISABLE_FORMS_REWRITE ? false : array( |
|
| 48 | + $give_forms_rewrite = defined('GIVE_DISABLE_FORMS_REWRITE') && GIVE_DISABLE_FORMS_REWRITE ? false : array( |
|
| 49 | 49 | 'slug' => $give_forms_slug, |
| 50 | 50 | 'with_front' => false, |
| 51 | 51 | ); |
| 52 | 52 | |
| 53 | - $give_forms_labels = apply_filters( 'give_forms_labels', array( |
|
| 54 | - 'name' => __( 'Donation Forms', 'give' ), |
|
| 55 | - 'singular_name' => __( 'Form', 'give' ), |
|
| 56 | - 'add_new' => __( 'Add Form', 'give' ), |
|
| 57 | - 'add_new_item' => __( 'Add New Donation Form', 'give' ), |
|
| 58 | - 'edit_item' => __( 'Edit Donation Form', 'give' ), |
|
| 59 | - 'new_item' => __( 'New Form', 'give' ), |
|
| 60 | - 'all_items' => __( 'All Forms', 'give' ), |
|
| 61 | - 'view_item' => __( 'View Form', 'give' ), |
|
| 62 | - 'search_items' => __( 'Search Forms', 'give' ), |
|
| 63 | - 'not_found' => __( 'No forms found.', 'give' ), |
|
| 64 | - 'not_found_in_trash' => __( 'No forms found in Trash.', 'give' ), |
|
| 53 | + $give_forms_labels = apply_filters('give_forms_labels', array( |
|
| 54 | + 'name' => __('Donation Forms', 'give'), |
|
| 55 | + 'singular_name' => __('Form', 'give'), |
|
| 56 | + 'add_new' => __('Add Form', 'give'), |
|
| 57 | + 'add_new_item' => __('Add New Donation Form', 'give'), |
|
| 58 | + 'edit_item' => __('Edit Donation Form', 'give'), |
|
| 59 | + 'new_item' => __('New Form', 'give'), |
|
| 60 | + 'all_items' => __('All Forms', 'give'), |
|
| 61 | + 'view_item' => __('View Form', 'give'), |
|
| 62 | + 'search_items' => __('Search Forms', 'give'), |
|
| 63 | + 'not_found' => __('No forms found.', 'give'), |
|
| 64 | + 'not_found_in_trash' => __('No forms found in Trash.', 'give'), |
|
| 65 | 65 | 'parent_item_colon' => '', |
| 66 | - 'menu_name' => apply_filters( 'give_menu_name', __( 'Donations', 'give' ) ), |
|
| 67 | - 'name_admin_bar' => apply_filters( 'give_name_admin_bar_name', __( 'Donation Form', 'give' ) ), |
|
| 68 | - ) ); |
|
| 66 | + 'menu_name' => apply_filters('give_menu_name', __('Donations', 'give')), |
|
| 67 | + 'name_admin_bar' => apply_filters('give_name_admin_bar_name', __('Donation Form', 'give')), |
|
| 68 | + )); |
|
| 69 | 69 | |
| 70 | 70 | // Default give_forms supports. |
| 71 | 71 | $give_form_supports = array( |
@@ -77,14 +77,14 @@ discard block |
||
| 77 | 77 | ); |
| 78 | 78 | |
| 79 | 79 | // Has the user disabled the excerpt? |
| 80 | - if ( ! give_is_setting_enabled( give_get_option( 'forms_excerpt' ) ) ) { |
|
| 81 | - unset( $give_form_supports[2] ); |
|
| 80 | + if ( ! give_is_setting_enabled(give_get_option('forms_excerpt'))) { |
|
| 81 | + unset($give_form_supports[2]); |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | // Has user disabled the featured image? |
| 85 | - if ( ! give_is_setting_enabled( give_get_option( 'form_featured_img' ) ) ) { |
|
| 86 | - unset( $give_form_supports[1] ); |
|
| 87 | - remove_action( 'give_before_single_form_summary', 'give_show_form_images' ); |
|
| 85 | + if ( ! give_is_setting_enabled(give_get_option('form_featured_img'))) { |
|
| 86 | + unset($give_form_supports[1]); |
|
| 87 | + remove_action('give_before_single_form_summary', 'give_show_form_images'); |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | $give_forms_args = array( |
@@ -99,42 +99,42 @@ discard block |
||
| 99 | 99 | 'has_archive' => $give_forms_archives, |
| 100 | 100 | 'menu_icon' => 'dashicons-give', |
| 101 | 101 | 'hierarchical' => false, |
| 102 | - 'supports' => apply_filters( 'give_forms_supports', $give_form_supports ), |
|
| 102 | + 'supports' => apply_filters('give_forms_supports', $give_form_supports), |
|
| 103 | 103 | ); |
| 104 | - register_post_type( 'give_forms', apply_filters( 'give_forms_post_type_args', $give_forms_args ) ); |
|
| 104 | + register_post_type('give_forms', apply_filters('give_forms_post_type_args', $give_forms_args)); |
|
| 105 | 105 | |
| 106 | 106 | /** Donation Post Type */ |
| 107 | 107 | $payment_labels = array( |
| 108 | - 'name' => _x( 'Donations', 'post type general name', 'give' ), |
|
| 109 | - 'singular_name' => _x( 'Donation', 'post type singular name', 'give' ), |
|
| 110 | - 'add_new' => __( 'Add New', 'give' ), |
|
| 111 | - 'add_new_item' => __( 'Add New Donation', 'give' ), |
|
| 112 | - 'edit_item' => __( 'Edit Donation', 'give' ), |
|
| 113 | - 'new_item' => __( 'New Donation', 'give' ), |
|
| 114 | - 'all_items' => __( 'All Donations', 'give' ), |
|
| 115 | - 'view_item' => __( 'View Donation', 'give' ), |
|
| 116 | - 'search_items' => __( 'Search Donations', 'give' ), |
|
| 117 | - 'not_found' => __( 'No donations found.', 'give' ), |
|
| 118 | - 'not_found_in_trash' => __( 'No donations found in Trash.', 'give' ), |
|
| 108 | + 'name' => _x('Donations', 'post type general name', 'give'), |
|
| 109 | + 'singular_name' => _x('Donation', 'post type singular name', 'give'), |
|
| 110 | + 'add_new' => __('Add New', 'give'), |
|
| 111 | + 'add_new_item' => __('Add New Donation', 'give'), |
|
| 112 | + 'edit_item' => __('Edit Donation', 'give'), |
|
| 113 | + 'new_item' => __('New Donation', 'give'), |
|
| 114 | + 'all_items' => __('All Donations', 'give'), |
|
| 115 | + 'view_item' => __('View Donation', 'give'), |
|
| 116 | + 'search_items' => __('Search Donations', 'give'), |
|
| 117 | + 'not_found' => __('No donations found.', 'give'), |
|
| 118 | + 'not_found_in_trash' => __('No donations found in Trash.', 'give'), |
|
| 119 | 119 | 'parent_item_colon' => '', |
| 120 | - 'menu_name' => __( 'Donations', 'give' ), |
|
| 120 | + 'menu_name' => __('Donations', 'give'), |
|
| 121 | 121 | ); |
| 122 | 122 | |
| 123 | 123 | $payment_args = array( |
| 124 | - 'labels' => apply_filters( 'give_payment_labels', $payment_labels ), |
|
| 124 | + 'labels' => apply_filters('give_payment_labels', $payment_labels), |
|
| 125 | 125 | 'public' => false, |
| 126 | 126 | 'query_var' => false, |
| 127 | 127 | 'rewrite' => false, |
| 128 | 128 | 'map_meta_cap' => true, |
| 129 | 129 | 'capability_type' => 'give_payment', |
| 130 | - 'supports' => array( 'title' ), |
|
| 130 | + 'supports' => array('title'), |
|
| 131 | 131 | 'can_export' => true, |
| 132 | 132 | ); |
| 133 | - register_post_type( 'give_payment', $payment_args ); |
|
| 133 | + register_post_type('give_payment', $payment_args); |
|
| 134 | 134 | |
| 135 | 135 | } |
| 136 | 136 | |
| 137 | -add_action( 'init', 'give_setup_post_types', 1 ); |
|
| 137 | +add_action('init', 'give_setup_post_types', 1); |
|
| 138 | 138 | |
| 139 | 139 | |
| 140 | 140 | /** |
@@ -147,30 +147,30 @@ discard block |
||
| 147 | 147 | */ |
| 148 | 148 | function give_setup_taxonomies() { |
| 149 | 149 | |
| 150 | - $slug = defined( 'GIVE_FORMS_SLUG' ) ? GIVE_FORMS_SLUG : 'donations'; |
|
| 150 | + $slug = defined('GIVE_FORMS_SLUG') ? GIVE_FORMS_SLUG : 'donations'; |
|
| 151 | 151 | |
| 152 | 152 | /** Categories */ |
| 153 | 153 | $category_labels = array( |
| 154 | - 'name' => _x( 'Form Categories', 'taxonomy general name', 'give' ), |
|
| 155 | - 'singular_name' => _x( 'Category', 'taxonomy singular name', 'give' ), |
|
| 156 | - 'search_items' => __( 'Search Categories', 'give' ), |
|
| 157 | - 'all_items' => __( 'All Categories', 'give' ), |
|
| 158 | - 'parent_item' => __( 'Parent Category', 'give' ), |
|
| 159 | - 'parent_item_colon' => __( 'Parent Category:', 'give' ), |
|
| 160 | - 'edit_item' => __( 'Edit Category', 'give' ), |
|
| 161 | - 'update_item' => __( 'Update Category', 'give' ), |
|
| 162 | - 'add_new_item' => __( 'Add New Category', 'give' ), |
|
| 163 | - 'new_item_name' => __( 'New Category Name', 'give' ), |
|
| 164 | - 'menu_name' => __( 'Categories', 'give' ), |
|
| 154 | + 'name' => _x('Form Categories', 'taxonomy general name', 'give'), |
|
| 155 | + 'singular_name' => _x('Category', 'taxonomy singular name', 'give'), |
|
| 156 | + 'search_items' => __('Search Categories', 'give'), |
|
| 157 | + 'all_items' => __('All Categories', 'give'), |
|
| 158 | + 'parent_item' => __('Parent Category', 'give'), |
|
| 159 | + 'parent_item_colon' => __('Parent Category:', 'give'), |
|
| 160 | + 'edit_item' => __('Edit Category', 'give'), |
|
| 161 | + 'update_item' => __('Update Category', 'give'), |
|
| 162 | + 'add_new_item' => __('Add New Category', 'give'), |
|
| 163 | + 'new_item_name' => __('New Category Name', 'give'), |
|
| 164 | + 'menu_name' => __('Categories', 'give'), |
|
| 165 | 165 | ); |
| 166 | 166 | |
| 167 | - $category_args = apply_filters( 'give_forms_category_args', array( |
|
| 167 | + $category_args = apply_filters('give_forms_category_args', array( |
|
| 168 | 168 | 'hierarchical' => true, |
| 169 | - 'labels' => apply_filters( 'give_forms_category_labels', $category_labels ), |
|
| 169 | + 'labels' => apply_filters('give_forms_category_labels', $category_labels), |
|
| 170 | 170 | 'show_ui' => true, |
| 171 | 171 | 'query_var' => 'give_forms_category', |
| 172 | 172 | 'rewrite' => array( |
| 173 | - 'slug' => $slug . '/category', |
|
| 173 | + 'slug' => $slug.'/category', |
|
| 174 | 174 | 'with_front' => false, |
| 175 | 175 | 'hierarchical' => true, |
| 176 | 176 | ), |
@@ -185,26 +185,26 @@ discard block |
||
| 185 | 185 | |
| 186 | 186 | /** Tags */ |
| 187 | 187 | $tag_labels = array( |
| 188 | - 'name' => _x( 'Form Tags', 'taxonomy general name', 'give' ), |
|
| 189 | - 'singular_name' => _x( 'Tag', 'taxonomy singular name', 'give' ), |
|
| 190 | - 'search_items' => __( 'Search Tags', 'give' ), |
|
| 191 | - 'all_items' => __( 'All Tags', 'give' ), |
|
| 192 | - 'parent_item' => __( 'Parent Tag', 'give' ), |
|
| 193 | - 'parent_item_colon' => __( 'Parent Tag:', 'give' ), |
|
| 194 | - 'edit_item' => __( 'Edit Tag', 'give' ), |
|
| 195 | - 'update_item' => __( 'Update Tag', 'give' ), |
|
| 196 | - 'add_new_item' => __( 'Add New Tag', 'give' ), |
|
| 197 | - 'new_item_name' => __( 'New Tag Name', 'give' ), |
|
| 198 | - 'menu_name' => __( 'Tags', 'give' ), |
|
| 199 | - 'choose_from_most_used' => __( 'Choose from most used tags.', 'give' ), |
|
| 188 | + 'name' => _x('Form Tags', 'taxonomy general name', 'give'), |
|
| 189 | + 'singular_name' => _x('Tag', 'taxonomy singular name', 'give'), |
|
| 190 | + 'search_items' => __('Search Tags', 'give'), |
|
| 191 | + 'all_items' => __('All Tags', 'give'), |
|
| 192 | + 'parent_item' => __('Parent Tag', 'give'), |
|
| 193 | + 'parent_item_colon' => __('Parent Tag:', 'give'), |
|
| 194 | + 'edit_item' => __('Edit Tag', 'give'), |
|
| 195 | + 'update_item' => __('Update Tag', 'give'), |
|
| 196 | + 'add_new_item' => __('Add New Tag', 'give'), |
|
| 197 | + 'new_item_name' => __('New Tag Name', 'give'), |
|
| 198 | + 'menu_name' => __('Tags', 'give'), |
|
| 199 | + 'choose_from_most_used' => __('Choose from most used tags.', 'give'), |
|
| 200 | 200 | ); |
| 201 | 201 | |
| 202 | - $tag_args = apply_filters( 'give_forms_tag_args', array( |
|
| 202 | + $tag_args = apply_filters('give_forms_tag_args', array( |
|
| 203 | 203 | 'hierarchical' => false, |
| 204 | - 'labels' => apply_filters( 'give_forms_tag_labels', $tag_labels ), |
|
| 204 | + 'labels' => apply_filters('give_forms_tag_labels', $tag_labels), |
|
| 205 | 205 | 'show_ui' => true, |
| 206 | 206 | 'query_var' => 'give_forms_tag', |
| 207 | - 'rewrite' => array( 'slug' => $slug . '/tag', 'with_front' => false, 'hierarchical' => true ), |
|
| 207 | + 'rewrite' => array('slug' => $slug.'/tag', 'with_front' => false, 'hierarchical' => true), |
|
| 208 | 208 | 'capabilities' => array( |
| 209 | 209 | 'manage_terms' => 'manage_give_form_terms', |
| 210 | 210 | 'edit_terms' => 'edit_give_form_terms', |
@@ -215,36 +215,36 @@ discard block |
||
| 215 | 215 | ); |
| 216 | 216 | |
| 217 | 217 | // Does the user want category? |
| 218 | - $enable_category = give_is_setting_enabled( give_get_option( 'categories', 'disabled' ) ); |
|
| 218 | + $enable_category = give_is_setting_enabled(give_get_option('categories', 'disabled')); |
|
| 219 | 219 | |
| 220 | 220 | // Does the user want tag? |
| 221 | - $enable_tag = give_is_setting_enabled( give_get_option( 'tags', 'disabled' ) ); |
|
| 221 | + $enable_tag = give_is_setting_enabled(give_get_option('tags', 'disabled')); |
|
| 222 | 222 | |
| 223 | 223 | // Enable/Disable category and tag if form is saving. |
| 224 | - if ( Give_Admin_Settings::is_saving_settings() ) { |
|
| 225 | - if ( isset( $_POST['categories'] ) ) { |
|
| 226 | - $enable_category = give_is_setting_enabled( give_clean( $_POST['categories'] ) ); |
|
| 224 | + if (Give_Admin_Settings::is_saving_settings()) { |
|
| 225 | + if (isset($_POST['categories'])) { |
|
| 226 | + $enable_category = give_is_setting_enabled(give_clean($_POST['categories'])); |
|
| 227 | 227 | flush_rewrite_rules(); |
| 228 | 228 | } |
| 229 | 229 | |
| 230 | - if ( isset( $_POST['tags'] ) ) { |
|
| 231 | - $enable_tag = give_is_setting_enabled( give_clean( $_POST['tags'] ) ); |
|
| 230 | + if (isset($_POST['tags'])) { |
|
| 231 | + $enable_tag = give_is_setting_enabled(give_clean($_POST['tags'])); |
|
| 232 | 232 | flush_rewrite_rules(); |
| 233 | 233 | } |
| 234 | 234 | } |
| 235 | 235 | |
| 236 | - if ( $enable_category ) { |
|
| 237 | - register_taxonomy( 'give_forms_category', array( 'give_forms' ), $category_args ); |
|
| 238 | - register_taxonomy_for_object_type( 'give_forms_category', 'give_forms' ); |
|
| 236 | + if ($enable_category) { |
|
| 237 | + register_taxonomy('give_forms_category', array('give_forms'), $category_args); |
|
| 238 | + register_taxonomy_for_object_type('give_forms_category', 'give_forms'); |
|
| 239 | 239 | } |
| 240 | 240 | |
| 241 | - if ( $enable_tag ) { |
|
| 242 | - register_taxonomy( 'give_forms_tag', array( 'give_forms' ), $tag_args ); |
|
| 243 | - register_taxonomy_for_object_type( 'give_forms_tag', 'give_forms' ); |
|
| 241 | + if ($enable_tag) { |
|
| 242 | + register_taxonomy('give_forms_tag', array('give_forms'), $tag_args); |
|
| 243 | + register_taxonomy_for_object_type('give_forms_tag', 'give_forms'); |
|
| 244 | 244 | } |
| 245 | 245 | } |
| 246 | 246 | |
| 247 | -add_action( 'init', 'give_setup_taxonomies', 0 ); |
|
| 247 | +add_action('init', 'give_setup_taxonomies', 0); |
|
| 248 | 248 | |
| 249 | 249 | |
| 250 | 250 | /** |
@@ -255,11 +255,11 @@ discard block |
||
| 255 | 255 | */ |
| 256 | 256 | function give_get_default_form_labels() { |
| 257 | 257 | $defaults = array( |
| 258 | - 'singular' => __( 'Form', 'give' ), |
|
| 259 | - 'plural' => __( 'Forms', 'give' ), |
|
| 258 | + 'singular' => __('Form', 'give'), |
|
| 259 | + 'plural' => __('Forms', 'give'), |
|
| 260 | 260 | ); |
| 261 | 261 | |
| 262 | - return apply_filters( 'give_default_form_name', $defaults ); |
|
| 262 | + return apply_filters('give_default_form_name', $defaults); |
|
| 263 | 263 | } |
| 264 | 264 | |
| 265 | 265 | /** |
@@ -271,10 +271,10 @@ discard block |
||
| 271 | 271 | * |
| 272 | 272 | * @return string $defaults['singular'] Singular label |
| 273 | 273 | */ |
| 274 | -function give_get_forms_label_singular( $lowercase = false ) { |
|
| 274 | +function give_get_forms_label_singular($lowercase = false) { |
|
| 275 | 275 | $defaults = give_get_default_form_labels(); |
| 276 | 276 | |
| 277 | - return ( $lowercase ) ? strtolower( $defaults['singular'] ) : $defaults['singular']; |
|
| 277 | + return ($lowercase) ? strtolower($defaults['singular']) : $defaults['singular']; |
|
| 278 | 278 | } |
| 279 | 279 | |
| 280 | 280 | /** |
@@ -283,10 +283,10 @@ discard block |
||
| 283 | 283 | * @since 1.0 |
| 284 | 284 | * @return string $defaults['plural'] Plural label |
| 285 | 285 | */ |
| 286 | -function give_get_forms_label_plural( $lowercase = false ) { |
|
| 286 | +function give_get_forms_label_plural($lowercase = false) { |
|
| 287 | 287 | $defaults = give_get_default_form_labels(); |
| 288 | 288 | |
| 289 | - return ( $lowercase ) ? strtolower( $defaults['plural'] ) : $defaults['plural']; |
|
| 289 | + return ($lowercase) ? strtolower($defaults['plural']) : $defaults['plural']; |
|
| 290 | 290 | } |
| 291 | 291 | |
| 292 | 292 | /** |
@@ -298,24 +298,24 @@ discard block |
||
| 298 | 298 | * |
| 299 | 299 | * @return string $title New placeholder text |
| 300 | 300 | */ |
| 301 | -function give_change_default_title( $title ) { |
|
| 301 | +function give_change_default_title($title) { |
|
| 302 | 302 | // If a frontend plugin uses this filter (check extensions before changing this function) |
| 303 | - if ( ! is_admin() ) { |
|
| 304 | - $title = __( 'Enter form title here', 'give' ); |
|
| 303 | + if ( ! is_admin()) { |
|
| 304 | + $title = __('Enter form title here', 'give'); |
|
| 305 | 305 | |
| 306 | 306 | return $title; |
| 307 | 307 | } |
| 308 | 308 | |
| 309 | 309 | $screen = get_current_screen(); |
| 310 | 310 | |
| 311 | - if ( 'give_forms' == $screen->post_type ) { |
|
| 312 | - $title = __( 'Enter form title here', 'give' ); |
|
| 311 | + if ('give_forms' == $screen->post_type) { |
|
| 312 | + $title = __('Enter form title here', 'give'); |
|
| 313 | 313 | } |
| 314 | 314 | |
| 315 | 315 | return $title; |
| 316 | 316 | } |
| 317 | 317 | |
| 318 | -add_filter( 'enter_title_here', 'give_change_default_title' ); |
|
| 318 | +add_filter('enter_title_here', 'give_change_default_title'); |
|
| 319 | 319 | |
| 320 | 320 | /** |
| 321 | 321 | * Registers Custom Post Statuses which are used by the Payments |
@@ -325,67 +325,67 @@ discard block |
||
| 325 | 325 | */ |
| 326 | 326 | function give_register_post_type_statuses() { |
| 327 | 327 | // Payment Statuses |
| 328 | - register_post_status( 'refunded', array( |
|
| 329 | - 'label' => __( 'Refunded', 'give' ), |
|
| 328 | + register_post_status('refunded', array( |
|
| 329 | + 'label' => __('Refunded', 'give'), |
|
| 330 | 330 | 'public' => true, |
| 331 | 331 | 'exclude_from_search' => false, |
| 332 | 332 | 'show_in_admin_all_list' => true, |
| 333 | 333 | 'show_in_admin_status_list' => true, |
| 334 | - 'label_count' => _n_noop( 'Refunded <span class="count">(%s)</span>', 'Refunded <span class="count">(%s)</span>', 'give' ), |
|
| 335 | - ) ); |
|
| 336 | - register_post_status( 'failed', array( |
|
| 337 | - 'label' => __( 'Failed', 'give' ), |
|
| 334 | + 'label_count' => _n_noop('Refunded <span class="count">(%s)</span>', 'Refunded <span class="count">(%s)</span>', 'give'), |
|
| 335 | + )); |
|
| 336 | + register_post_status('failed', array( |
|
| 337 | + 'label' => __('Failed', 'give'), |
|
| 338 | 338 | 'public' => true, |
| 339 | 339 | 'exclude_from_search' => false, |
| 340 | 340 | 'show_in_admin_all_list' => true, |
| 341 | 341 | 'show_in_admin_status_list' => true, |
| 342 | - 'label_count' => _n_noop( 'Failed <span class="count">(%s)</span>', 'Failed <span class="count">(%s)</span>', 'give' ), |
|
| 343 | - ) ); |
|
| 344 | - register_post_status( 'revoked', array( |
|
| 345 | - 'label' => __( 'Revoked', 'give' ), |
|
| 342 | + 'label_count' => _n_noop('Failed <span class="count">(%s)</span>', 'Failed <span class="count">(%s)</span>', 'give'), |
|
| 343 | + )); |
|
| 344 | + register_post_status('revoked', array( |
|
| 345 | + 'label' => __('Revoked', 'give'), |
|
| 346 | 346 | 'public' => true, |
| 347 | 347 | 'exclude_from_search' => false, |
| 348 | 348 | 'show_in_admin_all_list' => true, |
| 349 | 349 | 'show_in_admin_status_list' => true, |
| 350 | - 'label_count' => _n_noop( 'Revoked <span class="count">(%s)</span>', 'Revoked <span class="count">(%s)</span>', 'give' ), |
|
| 351 | - ) ); |
|
| 352 | - register_post_status( 'cancelled', array( |
|
| 353 | - 'label' => __( 'Cancelled', 'give' ), |
|
| 350 | + 'label_count' => _n_noop('Revoked <span class="count">(%s)</span>', 'Revoked <span class="count">(%s)</span>', 'give'), |
|
| 351 | + )); |
|
| 352 | + register_post_status('cancelled', array( |
|
| 353 | + 'label' => __('Cancelled', 'give'), |
|
| 354 | 354 | 'public' => true, |
| 355 | 355 | 'exclude_from_search' => false, |
| 356 | 356 | 'show_in_admin_all_list' => true, |
| 357 | 357 | 'show_in_admin_status_list' => true, |
| 358 | - 'label_count' => _n_noop( 'Cancelled <span class="count">(%s)</span>', 'Cancelled <span class="count">(%s)</span>', 'give' ), |
|
| 359 | - ) ); |
|
| 360 | - register_post_status( 'abandoned', array( |
|
| 361 | - 'label' => __( 'Abandoned', 'give' ), |
|
| 358 | + 'label_count' => _n_noop('Cancelled <span class="count">(%s)</span>', 'Cancelled <span class="count">(%s)</span>', 'give'), |
|
| 359 | + )); |
|
| 360 | + register_post_status('abandoned', array( |
|
| 361 | + 'label' => __('Abandoned', 'give'), |
|
| 362 | 362 | 'public' => true, |
| 363 | 363 | 'exclude_from_search' => false, |
| 364 | 364 | 'show_in_admin_all_list' => true, |
| 365 | 365 | 'show_in_admin_status_list' => true, |
| 366 | - 'label_count' => _n_noop( 'Abandoned <span class="count">(%s)</span>', 'Abandoned <span class="count">(%s)</span>', 'give' ), |
|
| 367 | - ) ); |
|
| 368 | - register_post_status( 'processing', array( |
|
| 369 | - 'label' => _x( 'Processing', 'Processing payment status', 'give' ), |
|
| 366 | + 'label_count' => _n_noop('Abandoned <span class="count">(%s)</span>', 'Abandoned <span class="count">(%s)</span>', 'give'), |
|
| 367 | + )); |
|
| 368 | + register_post_status('processing', array( |
|
| 369 | + 'label' => _x('Processing', 'Processing payment status', 'give'), |
|
| 370 | 370 | 'public' => true, |
| 371 | 371 | 'exclude_from_search' => false, |
| 372 | 372 | 'show_in_admin_all_list' => true, |
| 373 | 373 | 'show_in_admin_status_list' => true, |
| 374 | - 'label_count' => _n_noop( 'Processing <span class="count">(%s)</span>', 'Processing <span class="count">(%s)</span>', 'give' ) |
|
| 375 | - ) ); |
|
| 374 | + 'label_count' => _n_noop('Processing <span class="count">(%s)</span>', 'Processing <span class="count">(%s)</span>', 'give') |
|
| 375 | + )); |
|
| 376 | 376 | |
| 377 | - register_post_status( 'preapproval', array( |
|
| 378 | - 'label' => _x( 'Preapproval', 'Preapproval payment status', 'give' ), |
|
| 377 | + register_post_status('preapproval', array( |
|
| 378 | + 'label' => _x('Preapproval', 'Preapproval payment status', 'give'), |
|
| 379 | 379 | 'public' => true, |
| 380 | 380 | 'exclude_from_search' => false, |
| 381 | 381 | 'show_in_admin_all_list' => true, |
| 382 | 382 | 'show_in_admin_status_list' => true, |
| 383 | - 'label_count' => _n_noop( 'Preapproval <span class="count">(%s)</span>', 'Preapproval <span class="count">(%s)</span>', 'give' ), |
|
| 384 | - ) ); |
|
| 383 | + 'label_count' => _n_noop('Preapproval <span class="count">(%s)</span>', 'Preapproval <span class="count">(%s)</span>', 'give'), |
|
| 384 | + )); |
|
| 385 | 385 | |
| 386 | 386 | } |
| 387 | 387 | |
| 388 | -add_action( 'init', 'give_register_post_type_statuses' ); |
|
| 388 | +add_action('init', 'give_register_post_type_statuses'); |
|
| 389 | 389 | |
| 390 | 390 | /** |
| 391 | 391 | * Updated Messages |
@@ -398,27 +398,27 @@ discard block |
||
| 398 | 398 | * |
| 399 | 399 | * @return array $messages New post updated messages |
| 400 | 400 | */ |
| 401 | -function give_updated_messages( $messages ) { |
|
| 401 | +function give_updated_messages($messages) { |
|
| 402 | 402 | global $post, $post_ID; |
| 403 | 403 | |
| 404 | - if ( ! give_is_setting_enabled( give_get_option( 'forms_singular' ) ) ) { |
|
| 404 | + if ( ! give_is_setting_enabled(give_get_option('forms_singular'))) { |
|
| 405 | 405 | |
| 406 | 406 | $messages['give_forms'] = array( |
| 407 | - 1 => __( 'Form updated.', 'give' ), |
|
| 408 | - 4 => __( 'Form updated.', 'give' ), |
|
| 409 | - 6 => __( 'Form published.', 'give' ), |
|
| 410 | - 7 => __( 'Form saved.', 'give' ), |
|
| 411 | - 8 => __( 'Form submitted.', 'give' ), |
|
| 407 | + 1 => __('Form updated.', 'give'), |
|
| 408 | + 4 => __('Form updated.', 'give'), |
|
| 409 | + 6 => __('Form published.', 'give'), |
|
| 410 | + 7 => __('Form saved.', 'give'), |
|
| 411 | + 8 => __('Form submitted.', 'give'), |
|
| 412 | 412 | ); |
| 413 | 413 | |
| 414 | 414 | } else { |
| 415 | 415 | |
| 416 | 416 | $messages['give_forms'] = array( |
| 417 | - 1 => sprintf( '%1$s <a href="%2$s">%3$s</a>', __( 'Form updated.', 'give' ), get_permalink( $post_ID ), __( 'View Form', 'give' ) ), |
|
| 418 | - 4 => sprintf( '%1$s <a href="%2$s">%3$s</a>', __( 'Form updated.', 'give' ), get_permalink( $post_ID ), __( 'View Form', 'give' ) ), |
|
| 419 | - 6 => sprintf( '%1$s <a href="%2$s">%3$s</a>', __( 'Form published.', 'give' ), get_permalink( $post_ID ), __( 'View Form', 'give' ) ), |
|
| 420 | - 7 => sprintf( '%1$s <a href="%2$s">%3$s</a>', __( 'Form saved.', 'give' ), get_permalink( $post_ID ), __( 'View Form', 'give' ) ), |
|
| 421 | - 8 => sprintf( '%1$s <a href="%2$s">%3$s</a>', __( 'Form submitted.', 'give' ), get_permalink( $post_ID ), __( 'View Form', 'give' ) ), |
|
| 417 | + 1 => sprintf('%1$s <a href="%2$s">%3$s</a>', __('Form updated.', 'give'), get_permalink($post_ID), __('View Form', 'give')), |
|
| 418 | + 4 => sprintf('%1$s <a href="%2$s">%3$s</a>', __('Form updated.', 'give'), get_permalink($post_ID), __('View Form', 'give')), |
|
| 419 | + 6 => sprintf('%1$s <a href="%2$s">%3$s</a>', __('Form published.', 'give'), get_permalink($post_ID), __('View Form', 'give')), |
|
| 420 | + 7 => sprintf('%1$s <a href="%2$s">%3$s</a>', __('Form saved.', 'give'), get_permalink($post_ID), __('View Form', 'give')), |
|
| 421 | + 8 => sprintf('%1$s <a href="%2$s">%3$s</a>', __('Form submitted.', 'give'), get_permalink($post_ID), __('View Form', 'give')), |
|
| 422 | 422 | ); |
| 423 | 423 | |
| 424 | 424 | } |
@@ -426,24 +426,24 @@ discard block |
||
| 426 | 426 | return $messages; |
| 427 | 427 | } |
| 428 | 428 | |
| 429 | -add_filter( 'post_updated_messages', 'give_updated_messages' ); |
|
| 429 | +add_filter('post_updated_messages', 'give_updated_messages'); |
|
| 430 | 430 | |
| 431 | 431 | /** |
| 432 | 432 | * Ensure post thumbnail support is turned on |
| 433 | 433 | */ |
| 434 | 434 | function give_add_thumbnail_support() { |
| 435 | - if ( ! give_is_setting_enabled( give_get_option( 'form_featured_img' ) ) ) { |
|
| 435 | + if ( ! give_is_setting_enabled(give_get_option('form_featured_img'))) { |
|
| 436 | 436 | return; |
| 437 | 437 | } |
| 438 | 438 | |
| 439 | - if ( ! current_theme_supports( 'post-thumbnails' ) ) { |
|
| 440 | - add_theme_support( 'post-thumbnails' ); |
|
| 439 | + if ( ! current_theme_supports('post-thumbnails')) { |
|
| 440 | + add_theme_support('post-thumbnails'); |
|
| 441 | 441 | } |
| 442 | 442 | |
| 443 | - add_post_type_support( 'give_forms', 'thumbnail' ); |
|
| 443 | + add_post_type_support('give_forms', 'thumbnail'); |
|
| 444 | 444 | } |
| 445 | 445 | |
| 446 | -add_action( 'after_setup_theme', 'give_add_thumbnail_support', 10 ); |
|
| 446 | +add_action('after_setup_theme', 'give_add_thumbnail_support', 10); |
|
| 447 | 447 | |
| 448 | 448 | /** |
| 449 | 449 | * Give Sidebars |
@@ -454,21 +454,21 @@ discard block |
||
| 454 | 454 | |
| 455 | 455 | // Single Give Forms (disabled if single turned off in settings) |
| 456 | 456 | if ( |
| 457 | - give_is_setting_enabled( give_get_option( 'forms_singular' ) ) |
|
| 458 | - && give_is_setting_enabled( give_get_option( 'form_sidebar' ) ) |
|
| 457 | + give_is_setting_enabled(give_get_option('forms_singular')) |
|
| 458 | + && give_is_setting_enabled(give_get_option('form_sidebar')) |
|
| 459 | 459 | ) { |
| 460 | 460 | |
| 461 | - register_sidebar( apply_filters( 'give_forms_single_sidebar', array( |
|
| 462 | - 'name' => __( 'Give Single Form Sidebar', 'give' ), |
|
| 461 | + register_sidebar(apply_filters('give_forms_single_sidebar', array( |
|
| 462 | + 'name' => __('Give Single Form Sidebar', 'give'), |
|
| 463 | 463 | 'id' => 'give-forms-sidebar', |
| 464 | - 'description' => __( 'Widgets in this area will be shown on the single Give forms aside area. This sidebar will not display for embedded forms.', 'give' ), |
|
| 464 | + 'description' => __('Widgets in this area will be shown on the single Give forms aside area. This sidebar will not display for embedded forms.', 'give'), |
|
| 465 | 465 | 'before_widget' => '<div id="%1$s" class="widget %2$s">', |
| 466 | 466 | 'after_widget' => '</div>', |
| 467 | 467 | 'before_title' => '<h3 class="widgettitle widget-title">', |
| 468 | 468 | 'after_title' => '</h3>', |
| 469 | - ) ) ); |
|
| 469 | + ))); |
|
| 470 | 470 | |
| 471 | 471 | } |
| 472 | 472 | } |
| 473 | 473 | |
| 474 | -add_action( 'widgets_init', 'give_widgets_init', 999 ); |
|
| 474 | +add_action('widgets_init', 'give_widgets_init', 999); |
|
@@ -9,11 +9,11 @@ discard block |
||
| 9 | 9 | * @since 1.8 |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 12 | +if ( ! defined('ABSPATH')) { |
|
| 13 | 13 | exit; // Exit if accessed directly |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | -if ( ! class_exists( 'Give_Earnings_Report' ) ) : |
|
| 16 | +if ( ! class_exists('Give_Earnings_Report')) : |
|
| 17 | 17 | |
| 18 | 18 | /** |
| 19 | 19 | * Give_Earnings_Report. |
@@ -35,16 +35,16 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | public function __construct() { |
| 37 | 37 | $this->id = 'earnings'; |
| 38 | - $this->label = esc_html__( 'Income', 'give' ); |
|
| 38 | + $this->label = esc_html__('Income', 'give'); |
|
| 39 | 39 | |
| 40 | 40 | parent::__construct(); |
| 41 | 41 | |
| 42 | - add_action( 'give_admin_field_report_earnings', array( $this, 'render_report_earnings_field' ), 10, 2 ); |
|
| 42 | + add_action('give_admin_field_report_earnings', array($this, 'render_report_earnings_field'), 10, 2); |
|
| 43 | 43 | |
| 44 | 44 | // Do not use main form for this tab. |
| 45 | - if ( give_get_current_setting_tab() === $this->id ) { |
|
| 46 | - add_action( 'give-reports_open_form', '__return_empty_string' ); |
|
| 47 | - add_action( 'give-reports_close_form', '__return_empty_string' ); |
|
| 45 | + if (give_get_current_setting_tab() === $this->id) { |
|
| 46 | + add_action('give-reports_open_form', '__return_empty_string'); |
|
| 47 | + add_action('give-reports_close_form', '__return_empty_string'); |
|
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | 50 | |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | * @param array $settings |
| 65 | 65 | */ |
| 66 | 66 | $settings = apply_filters( |
| 67 | - 'give_get_settings_' . $this->id, |
|
| 67 | + 'give_get_settings_'.$this->id, |
|
| 68 | 68 | array( |
| 69 | 69 | array( |
| 70 | 70 | 'id' => 'give_tools_earnings', |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | ), |
| 74 | 74 | array( |
| 75 | 75 | 'id' => 'earnings', |
| 76 | - 'name' => esc_html__( 'Income', 'give' ), |
|
| 76 | + 'name' => esc_html__('Income', 'give'), |
|
| 77 | 77 | 'type' => 'report_earnings', |
| 78 | 78 | ), |
| 79 | 79 | array( |
@@ -97,8 +97,8 @@ discard block |
||
| 97 | 97 | * @param $field |
| 98 | 98 | * @param $option_value |
| 99 | 99 | */ |
| 100 | - public function render_report_earnings_field( $field, $option_value ) { |
|
| 101 | - do_action( 'give_reports_view_earnings' ); |
|
| 100 | + public function render_report_earnings_field($field, $option_value) { |
|
| 101 | + do_action('give_reports_view_earnings'); |
|
| 102 | 102 | } |
| 103 | 103 | } |
| 104 | 104 | |
@@ -9,11 +9,11 @@ discard block |
||
| 9 | 9 | * @since 1.8 |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 12 | +if ( ! defined('ABSPATH')) { |
|
| 13 | 13 | exit; // Exit if accessed directly |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | -if ( ! class_exists( 'Give_Forms_Report' ) ) : |
|
| 16 | +if ( ! class_exists('Give_Forms_Report')) : |
|
| 17 | 17 | |
| 18 | 18 | /** |
| 19 | 19 | * Give_Forms_Report. |
@@ -34,16 +34,16 @@ discard block |
||
| 34 | 34 | */ |
| 35 | 35 | public function __construct() { |
| 36 | 36 | $this->id = 'forms'; |
| 37 | - $this->label = esc_html__( 'Forms', 'give' ); |
|
| 37 | + $this->label = esc_html__('Forms', 'give'); |
|
| 38 | 38 | |
| 39 | 39 | parent::__construct(); |
| 40 | 40 | |
| 41 | - add_action( 'give_admin_field_report_forms', array( $this, 'render_report_forms_field' ), 10, 2 ); |
|
| 41 | + add_action('give_admin_field_report_forms', array($this, 'render_report_forms_field'), 10, 2); |
|
| 42 | 42 | |
| 43 | 43 | // Do not use main form for this tab. |
| 44 | - if ( give_get_current_setting_tab() === $this->id ) { |
|
| 45 | - add_action( 'give-reports_open_form', '__return_empty_string' ); |
|
| 46 | - add_action( 'give-reports_close_form', '__return_empty_string' ); |
|
| 44 | + if (give_get_current_setting_tab() === $this->id) { |
|
| 45 | + add_action('give-reports_open_form', '__return_empty_string'); |
|
| 46 | + add_action('give-reports_close_form', '__return_empty_string'); |
|
| 47 | 47 | } |
| 48 | 48 | } |
| 49 | 49 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | * @param array $settings |
| 64 | 64 | */ |
| 65 | 65 | $settings = apply_filters( |
| 66 | - 'give_get_settings_' . $this->id, |
|
| 66 | + 'give_get_settings_'.$this->id, |
|
| 67 | 67 | array( |
| 68 | 68 | array( |
| 69 | 69 | 'id' => 'give_reports_forms', |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | ), |
| 73 | 73 | array( |
| 74 | 74 | 'id' => 'forms', |
| 75 | - 'name' => esc_html__( 'Forms', 'give' ), |
|
| 75 | + 'name' => esc_html__('Forms', 'give'), |
|
| 76 | 76 | 'type' => 'report_forms', |
| 77 | 77 | ), |
| 78 | 78 | array( |
@@ -96,8 +96,8 @@ discard block |
||
| 96 | 96 | * @param $field |
| 97 | 97 | * @param $option_value |
| 98 | 98 | */ |
| 99 | - public function render_report_forms_field( $field, $option_value ) { |
|
| 100 | - do_action( 'give_reports_view_forms' ); |
|
| 99 | + public function render_report_forms_field($field, $option_value) { |
|
| 100 | + do_action('give_reports_view_forms'); |
|
| 101 | 101 | } |
| 102 | 102 | } |
| 103 | 103 | |
@@ -9,11 +9,11 @@ discard block |
||
| 9 | 9 | * @since 1.8 |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 12 | +if ( ! defined('ABSPATH')) { |
|
| 13 | 13 | exit; // Exit if accessed directly |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | -if ( ! class_exists( 'Give_Gateways_Report' ) ) : |
|
| 16 | +if ( ! class_exists('Give_Gateways_Report')) : |
|
| 17 | 17 | |
| 18 | 18 | /** |
| 19 | 19 | * Give_Gateways_Report. |
@@ -34,16 +34,16 @@ discard block |
||
| 34 | 34 | */ |
| 35 | 35 | public function __construct() { |
| 36 | 36 | $this->id = 'gateways'; |
| 37 | - $this->label = esc_html__( 'Donation Methods', 'give' ); |
|
| 37 | + $this->label = esc_html__('Donation Methods', 'give'); |
|
| 38 | 38 | |
| 39 | 39 | parent::__construct(); |
| 40 | 40 | |
| 41 | - add_action( 'give_admin_field_report_gateways', array( $this, 'render_report_gateways_field' ), 10, 2 ); |
|
| 41 | + add_action('give_admin_field_report_gateways', array($this, 'render_report_gateways_field'), 10, 2); |
|
| 42 | 42 | |
| 43 | 43 | // Do not use main form for this tab. |
| 44 | - if ( give_get_current_setting_tab() === $this->id ) { |
|
| 45 | - add_action( 'give-reports_open_form', '__return_empty_string' ); |
|
| 46 | - add_action( 'give-reports_close_form', '__return_empty_string' ); |
|
| 44 | + if (give_get_current_setting_tab() === $this->id) { |
|
| 45 | + add_action('give-reports_open_form', '__return_empty_string'); |
|
| 46 | + add_action('give-reports_close_form', '__return_empty_string'); |
|
| 47 | 47 | } |
| 48 | 48 | } |
| 49 | 49 | |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | * @param array $settings |
| 76 | 76 | */ |
| 77 | 77 | $settings = apply_filters( |
| 78 | - 'give_get_settings_' . $this->id, |
|
| 78 | + 'give_get_settings_'.$this->id, |
|
| 79 | 79 | array( |
| 80 | 80 | array( |
| 81 | 81 | 'id' => 'give_reports_gateways', |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | ), |
| 85 | 85 | array( |
| 86 | 86 | 'id' => 'gateways', |
| 87 | - 'name' => esc_html__( 'Gateways', 'give' ), |
|
| 87 | + 'name' => esc_html__('Gateways', 'give'), |
|
| 88 | 88 | 'type' => 'report_gateways', |
| 89 | 89 | ), |
| 90 | 90 | array( |
@@ -108,8 +108,8 @@ discard block |
||
| 108 | 108 | * @param $field |
| 109 | 109 | * @param $option_value |
| 110 | 110 | */ |
| 111 | - public function render_report_gateways_field( $field, $option_value ) { |
|
| 112 | - do_action( 'give_reports_view_gateways' ); |
|
| 111 | + public function render_report_gateways_field($field, $option_value) { |
|
| 112 | + do_action('give_reports_view_gateways'); |
|
| 113 | 113 | } |
| 114 | 114 | } |
| 115 | 115 | |
@@ -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 | /** |
@@ -56,13 +56,13 @@ discard block |
||
| 56 | 56 | global $status, $page; |
| 57 | 57 | |
| 58 | 58 | // Set parent defaults |
| 59 | - parent::__construct( array( |
|
| 60 | - 'singular' => give_get_forms_label_singular(), // Singular name of the listed records. |
|
| 61 | - 'plural' => give_get_forms_label_plural(), // Plural name of the listed records. |
|
| 59 | + parent::__construct(array( |
|
| 60 | + 'singular' => give_get_forms_label_singular(), // Singular name of the listed records. |
|
| 61 | + 'plural' => give_get_forms_label_plural(), // Plural name of the listed records. |
|
| 62 | 62 | 'ajax' => false // Does this table support ajax? |
| 63 | - ) ); |
|
| 63 | + )); |
|
| 64 | 64 | |
| 65 | - add_action( 'give_report_view_actions', array( $this, 'category_filter' ) ); |
|
| 65 | + add_action('give_report_view_actions', array($this, 'category_filter')); |
|
| 66 | 66 | $this->query(); |
| 67 | 67 | |
| 68 | 68 | } |
@@ -78,32 +78,32 @@ discard block |
||
| 78 | 78 | * |
| 79 | 79 | * @return string Column Name |
| 80 | 80 | */ |
| 81 | - public function column_default( $item, $column_name ) { |
|
| 82 | - switch ( $column_name ) { |
|
| 81 | + public function column_default($item, $column_name) { |
|
| 82 | + switch ($column_name) { |
|
| 83 | 83 | case 'title': |
| 84 | - $title = empty( $item['title'] ) ? sprintf( __( 'Untitled (#%s)', 'give' ), $item['ID'] ) : $item['title']; |
|
| 84 | + $title = empty($item['title']) ? sprintf(__('Untitled (#%s)', 'give'), $item['ID']) : $item['title']; |
|
| 85 | 85 | |
| 86 | 86 | return sprintf( |
| 87 | 87 | '<a href="%s">%s</a>', |
| 88 | - get_edit_post_link( $item['ID'] ), |
|
| 88 | + get_edit_post_link($item['ID']), |
|
| 89 | 89 | $title |
| 90 | 90 | ); |
| 91 | 91 | case 'sales': |
| 92 | 92 | return sprintf( |
| 93 | 93 | '<a href="%s">%s</a>', |
| 94 | - admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&form_id=' . urlencode( $item['ID'] ) ), |
|
| 94 | + admin_url('edit.php?post_type=give_forms&page=give-payment-history&form_id='.urlencode($item['ID'])), |
|
| 95 | 95 | $item['sales'] |
| 96 | 96 | ); |
| 97 | 97 | case 'earnings' : |
| 98 | - return give_currency_filter( give_format_amount( $item[ $column_name ], array( 'sanitize' => false ) ) ); |
|
| 98 | + return give_currency_filter(give_format_amount($item[$column_name], array('sanitize' => false))); |
|
| 99 | 99 | case 'average_sales' : |
| 100 | - return round( $item[ $column_name ] ); |
|
| 100 | + return round($item[$column_name]); |
|
| 101 | 101 | case 'average_earnings' : |
| 102 | - return give_currency_filter( give_format_amount( $item[ $column_name ], array( 'sanitize' => false ) ) ); |
|
| 102 | + return give_currency_filter(give_format_amount($item[$column_name], array('sanitize' => false))); |
|
| 103 | 103 | case 'details' : |
| 104 | - return '<a href="' . admin_url( 'edit.php?post_type=give_forms&page=give-reports&tab=forms&form-id=' . $item['ID'] ) . '">' . esc_html__( 'View Detailed Report', 'give' ) . '</a>'; |
|
| 104 | + return '<a href="'.admin_url('edit.php?post_type=give_forms&page=give-reports&tab=forms&form-id='.$item['ID']).'">'.esc_html__('View Detailed Report', 'give').'</a>'; |
|
| 105 | 105 | default: |
| 106 | - return $item[ $column_name ]; |
|
| 106 | + return $item[$column_name]; |
|
| 107 | 107 | } |
| 108 | 108 | } |
| 109 | 109 | |
@@ -117,12 +117,12 @@ discard block |
||
| 117 | 117 | */ |
| 118 | 118 | public function get_columns() { |
| 119 | 119 | $columns = array( |
| 120 | - 'title' => esc_html__( 'Form', 'give' ), |
|
| 121 | - 'sales' => esc_html__( 'Donations', 'give' ), |
|
| 122 | - 'earnings' => esc_html__( 'Income', 'give' ), |
|
| 123 | - 'average_sales' => esc_html__( 'Monthly Average Donations', 'give' ), |
|
| 124 | - 'average_earnings' => esc_html__( 'Monthly Average Income', 'give' ), |
|
| 125 | - 'details' => esc_html__( 'Detailed Report', 'give' ) |
|
| 120 | + 'title' => esc_html__('Form', 'give'), |
|
| 121 | + 'sales' => esc_html__('Donations', 'give'), |
|
| 122 | + 'earnings' => esc_html__('Income', 'give'), |
|
| 123 | + 'average_sales' => esc_html__('Monthly Average Donations', 'give'), |
|
| 124 | + 'average_earnings' => esc_html__('Monthly Average Income', 'give'), |
|
| 125 | + 'details' => esc_html__('Detailed Report', 'give') |
|
| 126 | 126 | ); |
| 127 | 127 | |
| 128 | 128 | return $columns; |
@@ -138,9 +138,9 @@ discard block |
||
| 138 | 138 | */ |
| 139 | 139 | public function get_sortable_columns() { |
| 140 | 140 | return array( |
| 141 | - 'title' => array( 'title', true ), |
|
| 142 | - 'sales' => array( 'sales', false ), |
|
| 143 | - 'earnings' => array( 'earnings', false ), |
|
| 141 | + 'title' => array('title', true), |
|
| 142 | + 'sales' => array('sales', false), |
|
| 143 | + 'earnings' => array('earnings', false), |
|
| 144 | 144 | ); |
| 145 | 145 | } |
| 146 | 146 | |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | * @return int Current page number |
| 154 | 154 | */ |
| 155 | 155 | public function get_paged() { |
| 156 | - return isset( $_GET['paged'] ) ? absint( $_GET['paged'] ) : 1; |
|
| 156 | + return isset($_GET['paged']) ? absint($_GET['paged']) : 1; |
|
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | /** |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | * @return int Category ID |
| 166 | 166 | */ |
| 167 | 167 | public function get_category() { |
| 168 | - return isset( $_GET['category'] ) ? absint( $_GET['category'] ) : 0; |
|
| 168 | + return isset($_GET['category']) ? absint($_GET['category']) : 0; |
|
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | /** |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | * |
| 177 | 177 | * @return void |
| 178 | 178 | */ |
| 179 | - public function bulk_actions( $which = '' ) { |
|
| 179 | + public function bulk_actions($which = '') { |
|
| 180 | 180 | |
| 181 | 181 | } |
| 182 | 182 | |
@@ -188,27 +188,27 @@ discard block |
||
| 188 | 188 | * |
| 189 | 189 | * @param string $which |
| 190 | 190 | */ |
| 191 | - protected function display_tablenav( $which ) { |
|
| 191 | + protected function display_tablenav($which) { |
|
| 192 | 192 | |
| 193 | - if ( 'top' === $which ) { |
|
| 194 | - wp_nonce_field( 'bulk-' . $this->_args['plural'] ); |
|
| 193 | + if ('top' === $which) { |
|
| 194 | + wp_nonce_field('bulk-'.$this->_args['plural']); |
|
| 195 | 195 | } |
| 196 | 196 | ?> |
| 197 | - <div class="tablenav give-clearfix <?php echo esc_attr( $which ); ?>"> |
|
| 197 | + <div class="tablenav give-clearfix <?php echo esc_attr($which); ?>"> |
|
| 198 | 198 | |
| 199 | - <?php if ( 'top' === $which ) { ?> |
|
| 199 | + <?php if ('top' === $which) { ?> |
|
| 200 | 200 | <h2 class="alignleft reports-earnings-title screen-reader-text"> |
| 201 | - <?php _e( 'Donation Forms Report', 'give' ); ?> |
|
| 201 | + <?php _e('Donation Forms Report', 'give'); ?> |
|
| 202 | 202 | </h2> |
| 203 | 203 | <?php } ?> |
| 204 | 204 | |
| 205 | 205 | <div class="alignright tablenav-right"> |
| 206 | 206 | <div class="actions bulkactions"> |
| 207 | - <?php $this->bulk_actions( $which ); ?> |
|
| 207 | + <?php $this->bulk_actions($which); ?> |
|
| 208 | 208 | </div> |
| 209 | 209 | <?php |
| 210 | - $this->extra_tablenav( $which ); |
|
| 211 | - $this->pagination( $which ); |
|
| 210 | + $this->extra_tablenav($which); |
|
| 211 | + $this->pagination($which); |
|
| 212 | 212 | ?> |
| 213 | 213 | </div> |
| 214 | 214 | |
@@ -228,9 +228,9 @@ discard block |
||
| 228 | 228 | */ |
| 229 | 229 | public function category_filter() { |
| 230 | 230 | |
| 231 | - $categories = get_terms( 'form_category' ); |
|
| 232 | - if ( $categories && ! is_wp_error( $categories ) ) { |
|
| 233 | - echo Give()->html->category_dropdown( 'category', $this->get_category() ); |
|
| 231 | + $categories = get_terms('form_category'); |
|
| 232 | + if ($categories && ! is_wp_error($categories)) { |
|
| 233 | + echo Give()->html->category_dropdown('category', $this->get_category()); |
|
| 234 | 234 | } |
| 235 | 235 | } |
| 236 | 236 | |
@@ -244,8 +244,8 @@ discard block |
||
| 244 | 244 | */ |
| 245 | 245 | public function query() { |
| 246 | 246 | |
| 247 | - $orderby = isset( $_GET['orderby'] ) ? $_GET['orderby'] : 'title'; |
|
| 248 | - $order = isset( $_GET['order'] ) ? $_GET['order'] : 'DESC'; |
|
| 247 | + $orderby = isset($_GET['orderby']) ? $_GET['orderby'] : 'title'; |
|
| 248 | + $order = isset($_GET['order']) ? $_GET['order'] : 'DESC'; |
|
| 249 | 249 | $category = $this->get_category(); |
| 250 | 250 | |
| 251 | 251 | $args = array( |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | 'suppress_filters' => true |
| 259 | 259 | ); |
| 260 | 260 | |
| 261 | - if ( ! empty( $category ) ) { |
|
| 261 | + if ( ! empty($category)) { |
|
| 262 | 262 | $args['tax_query'] = array( |
| 263 | 263 | array( |
| 264 | 264 | 'taxonomy' => 'form_category', |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | ); |
| 268 | 268 | } |
| 269 | 269 | |
| 270 | - switch ( $orderby ) : |
|
| 270 | + switch ($orderby) : |
|
| 271 | 271 | case 'title' : |
| 272 | 272 | $args['orderby'] = 'title'; |
| 273 | 273 | break; |
@@ -283,9 +283,9 @@ discard block |
||
| 283 | 283 | break; |
| 284 | 284 | endswitch; |
| 285 | 285 | |
| 286 | - $args = apply_filters( 'give_form_reports_prepare_items_args', $args, $this ); |
|
| 286 | + $args = apply_filters('give_form_reports_prepare_items_args', $args, $this); |
|
| 287 | 287 | |
| 288 | - $this->donation_forms = new WP_Query( $args ); |
|
| 288 | + $this->donation_forms = new WP_Query($args); |
|
| 289 | 289 | |
| 290 | 290 | // Store total number of donation forms count. |
| 291 | 291 | $this->count = $this->donation_forms->found_posts; |
@@ -305,15 +305,15 @@ discard block |
||
| 305 | 305 | |
| 306 | 306 | $give_forms = $this->donation_forms->posts; |
| 307 | 307 | |
| 308 | - if ( $give_forms ) { |
|
| 309 | - foreach ( $give_forms as $form ) { |
|
| 308 | + if ($give_forms) { |
|
| 309 | + foreach ($give_forms as $form) { |
|
| 310 | 310 | $reports_data[] = array( |
| 311 | 311 | 'ID' => $form, |
| 312 | - 'title' => get_the_title( $form ), |
|
| 313 | - 'sales' => give_get_form_sales_stats( $form ), |
|
| 314 | - 'earnings' => give_get_form_earnings_stats( $form ), |
|
| 315 | - 'average_sales' => give_get_average_monthly_form_sales( $form ), |
|
| 316 | - 'average_earnings' => give_get_average_monthly_form_earnings( $form ) |
|
| 312 | + 'title' => get_the_title($form), |
|
| 313 | + 'sales' => give_get_form_sales_stats($form), |
|
| 314 | + 'earnings' => give_get_form_earnings_stats($form), |
|
| 315 | + 'average_sales' => give_get_average_monthly_form_sales($form), |
|
| 316 | + 'average_earnings' => give_get_average_monthly_form_earnings($form) |
|
| 317 | 317 | ); |
| 318 | 318 | } |
| 319 | 319 | } |
@@ -338,14 +338,14 @@ discard block |
||
| 338 | 338 | $columns = $this->get_columns(); |
| 339 | 339 | $hidden = array(); // No hidden columns |
| 340 | 340 | $sortable = $this->get_sortable_columns(); |
| 341 | - $this->_column_headers = array( $columns, $hidden, $sortable ); |
|
| 341 | + $this->_column_headers = array($columns, $hidden, $sortable); |
|
| 342 | 342 | $this->items = $this->reports_data(); |
| 343 | 343 | $total_items = $this->count; |
| 344 | 344 | |
| 345 | - $this->set_pagination_args( array( |
|
| 345 | + $this->set_pagination_args(array( |
|
| 346 | 346 | 'total_items' => $total_items, |
| 347 | 347 | 'per_page' => $this->per_page, |
| 348 | - 'total_pages' => ceil( $total_items / $this->per_page ) |
|
| 348 | + 'total_pages' => ceil($total_items / $this->per_page) |
|
| 349 | 349 | ) |
| 350 | 350 | ); |
| 351 | 351 | } |