Completed
Push — master ( 47e416...82a250 )
by Devin
12s
created
includes/post-types.php 1 patch
Spacing   +135 added lines, -135 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
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,40 +23,40 @@  discard block
 block discarded – undo
23 23
 function give_setup_post_types() {
24 24
 
25 25
 	/** Give Forms Post Type */
26
-	$give_forms_singular = give_get_option( 'disable_forms_singular' ) !== 'on' ? true : false;
26
+	$give_forms_singular = give_get_option('disable_forms_singular') !== 'on' ? true : false;
27 27
 
28
-	$give_forms_archives = give_get_option( 'disable_forms_archives' ) !== 'on' ? true : false;
28
+	$give_forms_archives = give_get_option('disable_forms_archives') !== 'on' ? true : false;
29 29
 
30
-	$give_forms_slug = defined( 'GIVE_SLUG' ) ? GIVE_SLUG : 'donations';
30
+	$give_forms_slug = defined('GIVE_SLUG') ? GIVE_SLUG : 'donations';
31 31
 	//support for old 'GIVE_FORMS_SLUG' constant
32
-	if ( defined( 'GIVE_FORMS_SLUG' ) ) {
32
+	if (defined('GIVE_FORMS_SLUG')) {
33 33
 		$give_forms_slug = GIVE_FORMS_SLUG;
34 34
 	}
35 35
 
36
-	$give_forms_rewrite = defined( 'GIVE_DISABLE_FORMS_REWRITE' ) && GIVE_DISABLE_FORMS_REWRITE ? false : array(
36
+	$give_forms_rewrite = defined('GIVE_DISABLE_FORMS_REWRITE') && GIVE_DISABLE_FORMS_REWRITE ? false : array(
37 37
 		'slug'       => $give_forms_slug,
38 38
 		'with_front' => false
39 39
 	);
40 40
 
41
-	$give_forms_labels = apply_filters( 'give_forms_labels', array(
42
-		'name'               => esc_html( 'Donation %2$s', 'give' ),
41
+	$give_forms_labels = apply_filters('give_forms_labels', array(
42
+		'name'               => esc_html('Donation %2$s', 'give'),
43 43
 		'singular_name'      => '%1$s',
44
-		'add_new'            => esc_html( 'Add %1$s', 'give' ),
45
-		'add_new_item'       => esc_html( 'Add New Donation %1$s', 'give' ),
46
-		'edit_item'          => esc_html( 'Edit Donation %1$s', 'give' ),
47
-		'new_item'           => esc_html( 'New %1$s', 'give' ),
48
-		'all_items'          => esc_html( 'All %2$s', 'give' ),
49
-		'view_item'          => esc_html( 'View %1$s', 'give' ),
50
-		'search_items'       => esc_html( 'Search %2$s', 'give' ),
51
-		'not_found'          => esc_html( 'No %2$s found', 'give' ),
52
-		'not_found_in_trash' => esc_html( 'No %2$s found in Trash', 'give' ),
44
+		'add_new'            => esc_html('Add %1$s', 'give'),
45
+		'add_new_item'       => esc_html('Add New Donation %1$s', 'give'),
46
+		'edit_item'          => esc_html('Edit Donation %1$s', 'give'),
47
+		'new_item'           => esc_html('New %1$s', 'give'),
48
+		'all_items'          => esc_html('All %2$s', 'give'),
49
+		'view_item'          => esc_html('View %1$s', 'give'),
50
+		'search_items'       => esc_html('Search %2$s', 'give'),
51
+		'not_found'          => esc_html('No %2$s found', 'give'),
52
+		'not_found_in_trash' => esc_html('No %2$s found in Trash', 'give'),
53 53
 		'parent_item_colon'  => '',
54
-		'menu_name'          => apply_filters( 'give_menu_name', esc_html( 'Donations', 'give' ) ),
55
-		'name_admin_bar'     => apply_filters( 'give_name_admin_bar_name', esc_html( 'Donation Form', 'give' ) )
56
-	) );
54
+		'menu_name'          => apply_filters('give_menu_name', esc_html('Donations', 'give')),
55
+		'name_admin_bar'     => apply_filters('give_name_admin_bar_name', esc_html('Donation Form', 'give'))
56
+	));
57 57
 
58
-	foreach ( $give_forms_labels as $key => $value ) {
59
-		$give_forms_labels[ $key ] = sprintf( $value, give_get_forms_label_singular(), give_get_forms_label_plural() );
58
+	foreach ($give_forms_labels as $key => $value) {
59
+		$give_forms_labels[$key] = sprintf($value, give_get_forms_label_singular(), give_get_forms_label_plural());
60 60
 	}
61 61
 
62 62
 	//Default give_forms supports
@@ -69,14 +69,14 @@  discard block
 block discarded – undo
69 69
 	);
70 70
 
71 71
 	//Has the user disabled the excerpt
72
-	if ( give_get_option( 'disable_forms_excerpt' ) === 'on' ) {
73
-		unset( $give_form_supports[2] );
72
+	if (give_get_option('disable_forms_excerpt') === 'on') {
73
+		unset($give_form_supports[2]);
74 74
 	}
75 75
 
76 76
 	//Has user disabled the featured image?
77
-	if ( give_get_option( 'disable_form_featured_img' ) === 'on' ) {
78
-		unset( $give_form_supports[1] );
79
-		remove_action( 'give_before_single_form_summary', 'give_show_form_images' );
77
+	if (give_get_option('disable_form_featured_img') === 'on') {
78
+		unset($give_form_supports[1]);
79
+		remove_action('give_before_single_form_summary', 'give_show_form_images');
80 80
 	}
81 81
 
82 82
 	$give_forms_args = array(
@@ -92,42 +92,42 @@  discard block
 block discarded – undo
92 92
 		'has_archive'        => $give_forms_archives,
93 93
 		'menu_icon'          => 'dashicons-give',
94 94
 		'hierarchical'       => false,
95
-		'supports'           => apply_filters( 'give_forms_supports', $give_form_supports ),
95
+		'supports'           => apply_filters('give_forms_supports', $give_form_supports),
96 96
 	);
97
-	register_post_type( 'give_forms', apply_filters( 'give_forms_post_type_args', $give_forms_args ) );
97
+	register_post_type('give_forms', apply_filters('give_forms_post_type_args', $give_forms_args));
98 98
 	
99 99
 	/** Payment Post Type */
100 100
 	$payment_labels = array(
101
-		'name'               => _x( 'Donations', 'post type general name', 'give' ),
102
-		'singular_name'      => _x( 'Donation', 'post type singular name', 'give' ),
103
-		'add_new'            => esc_html( 'Add New', 'give' ),
104
-		'add_new_item'       => esc_html( 'Add New Donation', 'give' ),
105
-		'edit_item'          => esc_html( 'Edit Donation', 'give' ),
106
-		'new_item'           => esc_html( 'New Donation', 'give' ),
107
-		'all_items'          => esc_html( 'All Donations', 'give' ),
108
-		'view_item'          => esc_html( 'View Donation', 'give' ),
109
-		'search_items'       => esc_html( 'Search Donations', 'give' ),
110
-		'not_found'          => esc_html( 'No Donations found', 'give' ),
111
-		'not_found_in_trash' => esc_html( 'No Donations found in Trash', 'give' ),
101
+		'name'               => _x('Donations', 'post type general name', 'give'),
102
+		'singular_name'      => _x('Donation', 'post type singular name', 'give'),
103
+		'add_new'            => esc_html('Add New', 'give'),
104
+		'add_new_item'       => esc_html('Add New Donation', 'give'),
105
+		'edit_item'          => esc_html('Edit Donation', 'give'),
106
+		'new_item'           => esc_html('New Donation', 'give'),
107
+		'all_items'          => esc_html('All Donations', 'give'),
108
+		'view_item'          => esc_html('View Donation', 'give'),
109
+		'search_items'       => esc_html('Search Donations', 'give'),
110
+		'not_found'          => esc_html('No Donations found', 'give'),
111
+		'not_found_in_trash' => esc_html('No Donations found in Trash', 'give'),
112 112
 		'parent_item_colon'  => '',
113
-		'menu_name'          => esc_html( 'Transactions', 'give' )
113
+		'menu_name'          => esc_html('Transactions', 'give')
114 114
 	);
115 115
 
116 116
 	$payment_args = array(
117
-		'labels'          => apply_filters( 'give_payment_labels', $payment_labels ),
117
+		'labels'          => apply_filters('give_payment_labels', $payment_labels),
118 118
 		'public'          => false,
119 119
 		'query_var'       => false,
120 120
 		'rewrite'         => false,
121 121
 		'map_meta_cap'    => true,
122 122
 		'capability_type' => 'give_payment',
123
-		'supports'        => array( 'title' ),
123
+		'supports'        => array('title'),
124 124
 		'can_export'      => true
125 125
 	);
126
-	register_post_type( 'give_payment', $payment_args );
126
+	register_post_type('give_payment', $payment_args);
127 127
 
128 128
 }
129 129
 
130
-add_action( 'init', 'give_setup_post_types', 1 );
130
+add_action('init', 'give_setup_post_types', 1);
131 131
 
132 132
 
133 133
 /**
@@ -140,32 +140,32 @@  discard block
 block discarded – undo
140 140
  */
141 141
 function give_setup_taxonomies() {
142 142
 
143
-	$slug = defined( 'GIVE_FORMS_SLUG' ) ? GIVE_FORMS_SLUG : 'donations';
143
+	$slug = defined('GIVE_FORMS_SLUG') ? GIVE_FORMS_SLUG : 'donations';
144 144
 
145 145
 	/** Categories */
146 146
 	$category_labels = array(
147 147
 		/* translators: %s: form singular label */
148
-		'name'              => sprintf( _x( '%s Categories', 'taxonomy general name', 'give' ), give_get_forms_label_singular() ),
149
-		'singular_name'     => _x( 'Category', 'taxonomy singular name', 'give' ),
150
-		'search_items'      => esc_html( 'Search Categories', 'give' ),
151
-		'all_items'         => esc_html( 'All Categories', 'give' ),
152
-		'parent_item'       => esc_html( 'Parent Category', 'give' ),
153
-		'parent_item_colon' => esc_html( 'Parent Category:', 'give' ),
154
-		'edit_item'         => esc_html( 'Edit Category', 'give' ),
155
-		'update_item'       => esc_html( 'Update Category', 'give' ),
148
+		'name'              => sprintf(_x('%s Categories', 'taxonomy general name', 'give'), give_get_forms_label_singular()),
149
+		'singular_name'     => _x('Category', 'taxonomy singular name', 'give'),
150
+		'search_items'      => esc_html('Search Categories', 'give'),
151
+		'all_items'         => esc_html('All Categories', 'give'),
152
+		'parent_item'       => esc_html('Parent Category', 'give'),
153
+		'parent_item_colon' => esc_html('Parent Category:', 'give'),
154
+		'edit_item'         => esc_html('Edit Category', 'give'),
155
+		'update_item'       => esc_html('Update Category', 'give'),
156 156
 		/* translators: %s: form singular label */
157
-		'add_new_item'      => sprintf( esc_html( 'Add New %s Category', 'give' ), give_get_forms_label_singular() ),
158
-		'new_item_name'     => esc_html( 'New Category Name', 'give' ),
159
-		'menu_name'         => esc_html( 'Categories', 'give' ),
157
+		'add_new_item'      => sprintf(esc_html('Add New %s Category', 'give'), give_get_forms_label_singular()),
158
+		'new_item_name'     => esc_html('New Category Name', 'give'),
159
+		'menu_name'         => esc_html('Categories', 'give'),
160 160
 	);
161 161
 
162
-	$category_args = apply_filters( 'give_forms_category_args', array(
162
+	$category_args = apply_filters('give_forms_category_args', array(
163 163
 			'hierarchical' => true,
164
-			'labels'       => apply_filters( 'give_forms_category_labels', $category_labels ),
164
+			'labels'       => apply_filters('give_forms_category_labels', $category_labels),
165 165
 			'show_ui'      => true,
166 166
 			'query_var'    => 'give_forms_category',
167 167
 			'rewrite'      => array(
168
-				'slug'         => $slug . '/category',
168
+				'slug'         => $slug.'/category',
169 169
 				'with_front'   => false,
170 170
 				'hierarchical' => true
171 171
 			),
@@ -179,36 +179,36 @@  discard block
 block discarded – undo
179 179
 	);
180 180
 
181 181
 	//Does the user want categories?
182
-	if ( give_get_option( 'enable_categories' ) == 'on' ) {
183
-		register_taxonomy( 'give_forms_category', array( 'give_forms' ), $category_args );
184
-		register_taxonomy_for_object_type( 'give_forms_category', 'give_forms' );
182
+	if (give_get_option('enable_categories') == 'on') {
183
+		register_taxonomy('give_forms_category', array('give_forms'), $category_args);
184
+		register_taxonomy_for_object_type('give_forms_category', 'give_forms');
185 185
 	}
186 186
 
187 187
 
188 188
 	/** Tags */
189 189
 	$tag_labels = array(
190 190
 		/* translators: %s: form singular label */
191
-		'name'                  => sprintf( _x( '%s Tags', 'taxonomy general name', 'give' ), give_get_forms_label_singular() ),
192
-		'singular_name'         => _x( 'Tag', 'taxonomy singular name', 'give' ),
193
-		'search_items'          => esc_html( 'Search Tags', 'give' ),
194
-		'all_items'             => esc_html( 'All Tags', 'give' ),
195
-		'parent_item'           => esc_html( 'Parent Tag', 'give' ),
196
-		'parent_item_colon'     => esc_html( 'Parent Tag:', 'give' ),
197
-		'edit_item'             => esc_html( 'Edit Tag', 'give' ),
198
-		'update_item'           => esc_html( 'Update Tag', 'give' ),
199
-		'add_new_item'          => esc_html( 'Add New Tag', 'give' ),
200
-		'new_item_name'         => esc_html( 'New Tag Name', 'give' ),
201
-		'menu_name'             => esc_html( 'Tags', 'give' ),
191
+		'name'                  => sprintf(_x('%s Tags', 'taxonomy general name', 'give'), give_get_forms_label_singular()),
192
+		'singular_name'         => _x('Tag', 'taxonomy singular name', 'give'),
193
+		'search_items'          => esc_html('Search Tags', 'give'),
194
+		'all_items'             => esc_html('All Tags', 'give'),
195
+		'parent_item'           => esc_html('Parent Tag', 'give'),
196
+		'parent_item_colon'     => esc_html('Parent Tag:', 'give'),
197
+		'edit_item'             => esc_html('Edit Tag', 'give'),
198
+		'update_item'           => esc_html('Update Tag', 'give'),
199
+		'add_new_item'          => esc_html('Add New Tag', 'give'),
200
+		'new_item_name'         => esc_html('New Tag Name', 'give'),
201
+		'menu_name'             => esc_html('Tags', 'give'),
202 202
 		/* translators: %s: form singular label */
203
-		'choose_from_most_used' => sprintf( esc_html( 'Choose from most used %s tags.', 'give' ), give_get_forms_label_singular() ),
203
+		'choose_from_most_used' => sprintf(esc_html('Choose from most used %s tags.', 'give'), give_get_forms_label_singular()),
204 204
 	);
205 205
 
206
-	$tag_args = apply_filters( 'give_forms_tag_args', array(
206
+	$tag_args = apply_filters('give_forms_tag_args', array(
207 207
 			'hierarchical' => false,
208
-			'labels'       => apply_filters( 'give_forms_tag_labels', $tag_labels ),
208
+			'labels'       => apply_filters('give_forms_tag_labels', $tag_labels),
209 209
 			'show_ui'      => true,
210 210
 			'query_var'    => 'give_forms_tag',
211
-			'rewrite'      => array( 'slug' => $slug . '/tag', 'with_front' => false, 'hierarchical' => true ),
211
+			'rewrite'      => array('slug' => $slug.'/tag', 'with_front' => false, 'hierarchical' => true),
212 212
 			'capabilities' => array(
213 213
 				'manage_terms' => 'manage_give_forms_terms',
214 214
 				'edit_terms'   => 'edit_give_forms_terms',
@@ -219,15 +219,15 @@  discard block
 block discarded – undo
219 219
 		)
220 220
 	);
221 221
 
222
-	if ( give_get_option( 'enable_tags' ) == 'on' ) {
223
-		register_taxonomy( 'give_forms_tag', array( 'give_forms' ), $tag_args );
224
-		register_taxonomy_for_object_type( 'give_forms_tag', 'give_forms' );
222
+	if (give_get_option('enable_tags') == 'on') {
223
+		register_taxonomy('give_forms_tag', array('give_forms'), $tag_args);
224
+		register_taxonomy_for_object_type('give_forms_tag', 'give_forms');
225 225
 	}
226 226
 
227 227
 
228 228
 }
229 229
 
230
-add_action( 'init', 'give_setup_taxonomies', 0 );
230
+add_action('init', 'give_setup_taxonomies', 0);
231 231
 
232 232
 
233 233
 /**
@@ -238,11 +238,11 @@  discard block
 block discarded – undo
238 238
  */
239 239
 function give_get_default_form_labels() {
240 240
 	$defaults = array(
241
-		'singular' => esc_html( 'Form', 'give' ),
242
-		'plural'   => esc_html( 'Forms', 'give' )
241
+		'singular' => esc_html('Form', 'give'),
242
+		'plural'   => esc_html('Forms', 'give')
243 243
 	);
244 244
 
245
-	return apply_filters( 'give_default_form_name', $defaults );
245
+	return apply_filters('give_default_form_name', $defaults);
246 246
 }
247 247
 
248 248
 /**
@@ -254,10 +254,10 @@  discard block
 block discarded – undo
254 254
  *
255 255
  * @return string $defaults['singular'] Singular label
256 256
  */
257
-function give_get_forms_label_singular( $lowercase = false ) {
257
+function give_get_forms_label_singular($lowercase = false) {
258 258
 	$defaults = give_get_default_form_labels();
259 259
 
260
-	return ( $lowercase ) ? strtolower( $defaults['singular'] ) : $defaults['singular'];
260
+	return ($lowercase) ? strtolower($defaults['singular']) : $defaults['singular'];
261 261
 }
262 262
 
263 263
 /**
@@ -266,10 +266,10 @@  discard block
 block discarded – undo
266 266
  * @since 1.0
267 267
  * @return string $defaults['plural'] Plural label
268 268
  */
269
-function give_get_forms_label_plural( $lowercase = false ) {
269
+function give_get_forms_label_plural($lowercase = false) {
270 270
 	$defaults = give_get_default_form_labels();
271 271
 
272
-	return ( $lowercase ) ? strtolower( $defaults['plural'] ) : $defaults['plural'];
272
+	return ($lowercase) ? strtolower($defaults['plural']) : $defaults['plural'];
273 273
 }
274 274
 
275 275
 /**
@@ -281,12 +281,12 @@  discard block
 block discarded – undo
281 281
  *
282 282
  * @return string $title New placeholder text
283 283
  */
284
-function give_change_default_title( $title ) {
284
+function give_change_default_title($title) {
285 285
 	// If a frontend plugin uses this filter (check extensions before changing this function)
286
-	if ( ! is_admin() ) {
286
+	if ( ! is_admin()) {
287 287
 		$title = sprintf(
288 288
 			/* translators: %s: form singular label */
289
-			esc_html( 'Enter %s title here', 'give' ),
289
+			esc_html('Enter %s title here', 'give'),
290 290
 			give_get_forms_label_singular()
291 291
 		);
292 292
 
@@ -295,10 +295,10 @@  discard block
 block discarded – undo
295 295
 
296 296
 	$screen = get_current_screen();
297 297
 
298
-	if ( 'give_forms' == $screen->post_type ) {
298
+	if ('give_forms' == $screen->post_type) {
299 299
 		$title = sprintf(
300 300
 			/* translators: %s: form singular label */
301
-			esc_html( 'Enter %s title here', 'give' ),
301
+			esc_html('Enter %s title here', 'give'),
302 302
 			give_get_forms_label_singular()
303 303
 		);
304 304
 	}
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 	return $title;
307 307
 }
308 308
 
309
-add_filter( 'enter_title_here', 'give_change_default_title' );
309
+add_filter('enter_title_here', 'give_change_default_title');
310 310
 
311 311
 /**
312 312
  * Registers Custom Post Statuses which are used by the Payments
@@ -316,50 +316,50 @@  discard block
 block discarded – undo
316 316
  */
317 317
 function give_register_post_type_statuses() {
318 318
 	// Payment Statuses
319
-	register_post_status( 'refunded', array(
320
-		'label'                     => _x( 'Refunded', 'Refunded payment status', 'give' ),
319
+	register_post_status('refunded', array(
320
+		'label'                     => _x('Refunded', 'Refunded payment status', 'give'),
321 321
 		'public'                    => true,
322 322
 		'exclude_from_search'       => false,
323 323
 		'show_in_admin_all_list'    => true,
324 324
 		'show_in_admin_status_list' => true,
325
-		'label_count'               => _n_noop( 'Refunded <span class="count">(%s)</span>', 'Refunded <span class="count">(%s)</span>', 'give' )
326
-	) );
327
-	register_post_status( 'failed', array(
328
-		'label'                     => _x( 'Failed', 'Failed payment status', 'give' ),
325
+		'label_count'               => _n_noop('Refunded <span class="count">(%s)</span>', 'Refunded <span class="count">(%s)</span>', 'give')
326
+	));
327
+	register_post_status('failed', array(
328
+		'label'                     => _x('Failed', 'Failed payment status', 'give'),
329 329
 		'public'                    => true,
330 330
 		'exclude_from_search'       => false,
331 331
 		'show_in_admin_all_list'    => true,
332 332
 		'show_in_admin_status_list' => true,
333
-		'label_count'               => _n_noop( 'Failed <span class="count">(%s)</span>', 'Failed <span class="count">(%s)</span>', 'give' )
334
-	) );
335
-	register_post_status( 'revoked', array(
336
-		'label'                     => _x( 'Revoked', 'Revoked payment status', 'give' ),
333
+		'label_count'               => _n_noop('Failed <span class="count">(%s)</span>', 'Failed <span class="count">(%s)</span>', 'give')
334
+	));
335
+	register_post_status('revoked', array(
336
+		'label'                     => _x('Revoked', 'Revoked payment status', 'give'),
337 337
 		'public'                    => true,
338 338
 		'exclude_from_search'       => false,
339 339
 		'show_in_admin_all_list'    => true,
340 340
 		'show_in_admin_status_list' => true,
341
-		'label_count'               => _n_noop( 'Revoked <span class="count">(%s)</span>', 'Revoked <span class="count">(%s)</span>', 'give' )
342
-	) );
343
-	register_post_status( 'cancelled', array(
344
-		'label'                     => _x( 'Cancelled', 'Cancelled payment status', 'give' ),
341
+		'label_count'               => _n_noop('Revoked <span class="count">(%s)</span>', 'Revoked <span class="count">(%s)</span>', 'give')
342
+	));
343
+	register_post_status('cancelled', array(
344
+		'label'                     => _x('Cancelled', 'Cancelled payment status', 'give'),
345 345
 		'public'                    => true,
346 346
 		'exclude_from_search'       => false,
347 347
 		'show_in_admin_all_list'    => true,
348 348
 		'show_in_admin_status_list' => true,
349
-		'label_count'               => _n_noop( 'Cancelled <span class="count">(%s)</span>', 'Cancelled <span class="count">(%s)</span>', 'give' )
350
-	) );
351
-	register_post_status( 'abandoned', array(
352
-		'label'                     => _x( 'Abandoned', 'Abandoned payment status', 'give' ),
349
+		'label_count'               => _n_noop('Cancelled <span class="count">(%s)</span>', 'Cancelled <span class="count">(%s)</span>', 'give')
350
+	));
351
+	register_post_status('abandoned', array(
352
+		'label'                     => _x('Abandoned', 'Abandoned payment status', 'give'),
353 353
 		'public'                    => true,
354 354
 		'exclude_from_search'       => false,
355 355
 		'show_in_admin_all_list'    => true,
356 356
 		'show_in_admin_status_list' => true,
357
-		'label_count'               => _n_noop( 'Abandoned <span class="count">(%s)</span>', 'Abandoned <span class="count">(%s)</span>', 'give' )
358
-	) );
357
+		'label_count'               => _n_noop('Abandoned <span class="count">(%s)</span>', 'Abandoned <span class="count">(%s)</span>', 'give')
358
+	));
359 359
 
360 360
 }
361 361
 
362
-add_action( 'init', 'give_register_post_type_statuses' );
362
+add_action('init', 'give_register_post_type_statuses');
363 363
 
364 364
 /**
365 365
  * Updated Messages
@@ -372,43 +372,43 @@  discard block
 block discarded – undo
372 372
  *
373 373
  * @return array $messages New post updated messages
374 374
  */
375
-function give_updated_messages( $messages ) {
375
+function give_updated_messages($messages) {
376 376
 	global $post, $post_ID;
377 377
 
378
-	$url1 = '<a href="' . get_permalink( $post_ID ) . '">';
378
+	$url1 = '<a href="'.get_permalink($post_ID).'">';
379 379
 	$url2 = give_get_forms_label_singular();
380 380
 	$url3 = '</a>';
381 381
 
382 382
 	$messages['give_forms'] = array(
383
-		1 => sprintf( __( '%2$s updated. %1$sView %2$s%3$s.', 'give' ), $url1, $url2, $url3 ),
384
-		4 => sprintf( __( '%2$s updated. %1$sView %2$s%3$s.', 'give' ), $url1, $url2, $url3 ),
385
-		6 => sprintf( __( '%2$s published. %1$sView %2$s%3$s.', 'give' ), $url1, $url2, $url3 ),
386
-		7 => sprintf( __( '%2$s saved. %1$sView %2$s%3$s.', 'give' ), $url1, $url2, $url3 ),
387
-		8 => sprintf( __( '%2$s submitted. %1$sView %2$s%3$s.', 'give' ), $url1, $url2, $url3 )
383
+		1 => sprintf(__('%2$s updated. %1$sView %2$s%3$s.', 'give'), $url1, $url2, $url3),
384
+		4 => sprintf(__('%2$s updated. %1$sView %2$s%3$s.', 'give'), $url1, $url2, $url3),
385
+		6 => sprintf(__('%2$s published. %1$sView %2$s%3$s.', 'give'), $url1, $url2, $url3),
386
+		7 => sprintf(__('%2$s saved. %1$sView %2$s%3$s.', 'give'), $url1, $url2, $url3),
387
+		8 => sprintf(__('%2$s submitted. %1$sView %2$s%3$s.', 'give'), $url1, $url2, $url3)
388 388
 	);
389 389
 
390 390
 	return $messages;
391 391
 }
392 392
 
393
-add_filter( 'post_updated_messages', 'give_updated_messages' );
393
+add_filter('post_updated_messages', 'give_updated_messages');
394 394
 
395 395
 
396 396
 /**
397 397
  * Setup Post Type Images
398 398
  */
399
-add_action( 'after_setup_theme', 'give_add_thumbnail_support', 10 );
399
+add_action('after_setup_theme', 'give_add_thumbnail_support', 10);
400 400
 
401 401
 /**
402 402
  * Ensure post thumbnail support is turned on
403 403
  */
404 404
 function give_add_thumbnail_support() {
405
-	if ( give_get_option( 'disable_form_featured_img' ) === 'on' ) {
405
+	if (give_get_option('disable_form_featured_img') === 'on') {
406 406
 		return;
407 407
 	}
408
-	if ( ! current_theme_supports( 'post-thumbnails' ) ) {
409
-		add_theme_support( 'post-thumbnails' );
408
+	if ( ! current_theme_supports('post-thumbnails')) {
409
+		add_theme_support('post-thumbnails');
410 410
 	}
411
-	add_post_type_support( 'give_forms', 'thumbnail' );
411
+	add_post_type_support('give_forms', 'thumbnail');
412 412
 }
413 413
 
414 414
 /**
@@ -420,19 +420,19 @@  discard block
 block discarded – undo
420 420
 function give_widgets_init() {
421 421
 
422 422
 	//Single Give Forms (disabled if single turned off in settings)
423
-	if ( give_get_option( 'disable_forms_singular' ) !== 'on' && give_get_option( 'disable_form_sidebar' ) !== 'on' ) {
423
+	if (give_get_option('disable_forms_singular') !== 'on' && give_get_option('disable_form_sidebar') !== 'on') {
424 424
 
425
-		register_sidebar( apply_filters( 'give_forms_single_sidebar', array(
426
-			'name'          => esc_html( 'Give Single Form Sidebar', 'give' ),
425
+		register_sidebar(apply_filters('give_forms_single_sidebar', array(
426
+			'name'          => esc_html('Give Single Form Sidebar', 'give'),
427 427
 			'id'            => 'give-forms-sidebar',
428
-			'description'   => esc_html( 'Widgets in this area will be shown on the single Give forms aside area. This sidebar will not display for embedded forms.', 'give' ),
428
+			'description'   => esc_html('Widgets in this area will be shown on the single Give forms aside area. This sidebar will not display for embedded forms.', 'give'),
429 429
 			'before_widget' => '<div id="%1$s" class="widget %2$s">',
430 430
 			'after_widget'  => '</div>',
431 431
 			'before_title'  => '<h3 class="widgettitle widget-title">',
432 432
 			'after_title'   => '</h3>',
433
-		) ) );
433
+		)));
434 434
 
435 435
 	}
436 436
 }
437 437
 
438
-add_action( 'widgets_init', 'give_widgets_init', 999 );
438
+add_action('widgets_init', 'give_widgets_init', 999);
Please login to merge, or discard this patch.
includes/scripts.php 1 patch
Spacing   +137 added lines, -137 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
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
 
@@ -28,94 +28,94 @@  discard block
 block discarded – undo
28 28
 
29 29
 	global $give_options;
30 30
 
31
-	$js_dir         = GIVE_PLUGIN_URL . 'assets/js/frontend/';
32
-	$js_plugins     = GIVE_PLUGIN_URL . 'assets/js/plugins/';
33
-	$scripts_footer = ( give_get_option( 'scripts_footer' ) == 'on' ) ? true : false;
31
+	$js_dir         = GIVE_PLUGIN_URL.'assets/js/frontend/';
32
+	$js_plugins     = GIVE_PLUGIN_URL.'assets/js/plugins/';
33
+	$scripts_footer = (give_get_option('scripts_footer') == 'on') ? true : false;
34 34
 
35 35
 	// Use minified libraries if SCRIPT_DEBUG is turned off
36
-	$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
36
+	$suffix = (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) ? '' : '.min';
37 37
 
38 38
 	//Localize / PHP to AJAX vars
39
-	$localize_give_checkout = apply_filters( 'give_global_script_vars', array(
39
+	$localize_give_checkout = apply_filters('give_global_script_vars', array(
40 40
 		'ajaxurl'             => give_get_ajax_url(),
41
-		'checkout_nonce'      => wp_create_nonce( 'give_checkout_nonce' ),
42
-		'currency_sign'       => give_currency_filter( '' ),
41
+		'checkout_nonce'      => wp_create_nonce('give_checkout_nonce'),
42
+		'currency_sign'       => give_currency_filter(''),
43 43
 		'currency_pos'        => give_get_currency_position(),
44
-		'thousands_separator' => isset( $give_options['thousands_separator'] ) ? $give_options['thousands_separator'] : ',',
45
-		'decimal_separator'   => isset( $give_options['decimal_separator'] ) ? $give_options['decimal_separator'] : '.',
46
-		'no_gateway'          => esc_html( 'Please select a payment method.', 'give' ),
47
-		'bad_minimum'         => esc_html( 'The minimum donation amount for this form is', 'give' ),
48
-		'general_loading'     => esc_html( 'Loading...', 'give' ),
49
-		'purchase_loading'    => esc_html( 'Please Wait...', 'give' ),
50
-		'number_decimals'  => apply_filters( 'give_format_amount_decimals', 2 ),
44
+		'thousands_separator' => isset($give_options['thousands_separator']) ? $give_options['thousands_separator'] : ',',
45
+		'decimal_separator'   => isset($give_options['decimal_separator']) ? $give_options['decimal_separator'] : '.',
46
+		'no_gateway'          => esc_html('Please select a payment method.', 'give'),
47
+		'bad_minimum'         => esc_html('The minimum donation amount for this form is', 'give'),
48
+		'general_loading'     => esc_html('Loading...', 'give'),
49
+		'purchase_loading'    => esc_html('Please Wait...', 'give'),
50
+		'number_decimals'  => apply_filters('give_format_amount_decimals', 2),
51 51
 		'give_version'        => GIVE_VERSION
52
-	) );
53
-	$localize_give_ajax     = apply_filters( 'give_global_ajax_vars', array(
52
+	));
53
+	$localize_give_ajax = apply_filters('give_global_ajax_vars', array(
54 54
 		'ajaxurl'          => give_get_ajax_url(),
55
-		'loading'          => esc_html( 'Loading', 'give' ),
55
+		'loading'          => esc_html('Loading', 'give'),
56 56
 		// General loading message
57
-		'select_option'    => esc_html( 'Please select an option', 'give' ),
57
+		'select_option'    => esc_html('Please select an option', 'give'),
58 58
 		// Variable pricing error with multi-purchase option enabled
59
-		'default_gateway'  => give_get_default_gateway( null ),
60
-		'permalinks'       => get_option( 'permalink_structure' ) ? '1' : '0',
61
-		'number_decimals'  => apply_filters( 'give_format_amount_decimals', 2 )
62
-	) );
59
+		'default_gateway'  => give_get_default_gateway(null),
60
+		'permalinks'       => get_option('permalink_structure') ? '1' : '0',
61
+		'number_decimals'  => apply_filters('give_format_amount_decimals', 2)
62
+	));
63 63
 
64 64
 	//DEBUG is On
65
-	if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
65
+	if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) {
66 66
 
67
-		if ( give_is_cc_verify_enabled() ) {
68
-			wp_register_script( 'give-cc-validator', $js_plugins . 'jquery.payment' . $suffix . '.js', array( 'jquery' ), GIVE_VERSION, $scripts_footer );
69
-			wp_enqueue_script( 'give-cc-validator' );
67
+		if (give_is_cc_verify_enabled()) {
68
+			wp_register_script('give-cc-validator', $js_plugins.'jquery.payment'.$suffix.'.js', array('jquery'), GIVE_VERSION, $scripts_footer);
69
+			wp_enqueue_script('give-cc-validator');
70 70
 		}
71 71
 
72
-		wp_register_script( 'give-float-labels', $js_plugins . 'float-labels' . $suffix . '.js', array( 'jquery' ), GIVE_VERSION, $scripts_footer );
73
-		wp_enqueue_script( 'give-float-labels' );
72
+		wp_register_script('give-float-labels', $js_plugins.'float-labels'.$suffix.'.js', array('jquery'), GIVE_VERSION, $scripts_footer);
73
+		wp_enqueue_script('give-float-labels');
74 74
 
75
-		wp_register_script( 'give-blockui', $js_plugins . 'jquery.blockUI' . $suffix . '.js', array( 'jquery' ), GIVE_VERSION, $scripts_footer );
76
-		wp_enqueue_script( 'give-blockui' );
75
+		wp_register_script('give-blockui', $js_plugins.'jquery.blockUI'.$suffix.'.js', array('jquery'), GIVE_VERSION, $scripts_footer);
76
+		wp_enqueue_script('give-blockui');
77 77
 
78
-		wp_register_script( 'give-qtip', $js_plugins . 'jquery.qtip' . $suffix . '.js', array( 'jquery' ), GIVE_VERSION, $scripts_footer );
79
-		wp_enqueue_script( 'give-qtip' );
78
+		wp_register_script('give-qtip', $js_plugins.'jquery.qtip'.$suffix.'.js', array('jquery'), GIVE_VERSION, $scripts_footer);
79
+		wp_enqueue_script('give-qtip');
80 80
 
81
-		wp_register_script( 'give-accounting', $js_plugins . 'accounting' . $suffix . '.js', array( 'jquery' ), GIVE_VERSION, $scripts_footer );
82
-		wp_enqueue_script( 'give-accounting' );
81
+		wp_register_script('give-accounting', $js_plugins.'accounting'.$suffix.'.js', array('jquery'), GIVE_VERSION, $scripts_footer);
82
+		wp_enqueue_script('give-accounting');
83 83
 
84
-		wp_register_script( 'give-magnific', $js_plugins . 'jquery.magnific-popup' . $suffix . '.js', array( 'jquery' ), GIVE_VERSION, $scripts_footer );
85
-		wp_enqueue_script( 'give-magnific' );
84
+		wp_register_script('give-magnific', $js_plugins.'jquery.magnific-popup'.$suffix.'.js', array('jquery'), GIVE_VERSION, $scripts_footer);
85
+		wp_enqueue_script('give-magnific');
86 86
 
87
-		wp_register_script( 'give-checkout-global', $js_dir . 'give-checkout-global' . $suffix . '.js', array( 'jquery' ), GIVE_VERSION, $scripts_footer );
88
-		wp_enqueue_script( 'give-checkout-global' );
87
+		wp_register_script('give-checkout-global', $js_dir.'give-checkout-global'.$suffix.'.js', array('jquery'), GIVE_VERSION, $scripts_footer);
88
+		wp_enqueue_script('give-checkout-global');
89 89
 
90 90
 		//General scripts
91
-		wp_register_script( 'give-scripts', $js_dir . 'give' . $suffix . '.js', array( 'jquery' ), GIVE_VERSION, $scripts_footer );
92
-		wp_enqueue_script( 'give-scripts' );
91
+		wp_register_script('give-scripts', $js_dir.'give'.$suffix.'.js', array('jquery'), GIVE_VERSION, $scripts_footer);
92
+		wp_enqueue_script('give-scripts');
93 93
 
94 94
 		// Load AJAX scripts, if enabled
95
-		wp_register_script( 'give-ajax', $js_dir . 'give-ajax' . $suffix . '.js', array( 'jquery' ), GIVE_VERSION, $scripts_footer );
96
-		wp_enqueue_script( 'give-ajax' );
95
+		wp_register_script('give-ajax', $js_dir.'give-ajax'.$suffix.'.js', array('jquery'), GIVE_VERSION, $scripts_footer);
96
+		wp_enqueue_script('give-ajax');
97 97
 
98 98
 		//Localize / Pass AJAX vars from PHP
99
-		wp_localize_script( 'give-checkout-global', 'give_global_vars', $localize_give_checkout );
100
-		wp_localize_script( 'give-ajax', 'give_scripts', $localize_give_ajax );
99
+		wp_localize_script('give-checkout-global', 'give_global_vars', $localize_give_checkout);
100
+		wp_localize_script('give-ajax', 'give_scripts', $localize_give_ajax);
101 101
 
102 102
 
103 103
 	} else {
104 104
 
105 105
 		//DEBUG is OFF (one JS file to rule them all!)
106
-		wp_register_script( 'give', $js_dir . 'give.all.min.js', array( 'jquery' ), GIVE_VERSION, $scripts_footer );
107
-		wp_enqueue_script( 'give' );
106
+		wp_register_script('give', $js_dir.'give.all.min.js', array('jquery'), GIVE_VERSION, $scripts_footer);
107
+		wp_enqueue_script('give');
108 108
 
109 109
 		//Localize / Pass AJAX vars from PHP
110
-		wp_localize_script( 'give', 'give_global_vars', $localize_give_checkout );
111
-		wp_localize_script( 'give', 'give_scripts', $localize_give_ajax );
110
+		wp_localize_script('give', 'give_global_vars', $localize_give_checkout);
111
+		wp_localize_script('give', 'give_scripts', $localize_give_ajax);
112 112
 
113 113
 	}
114 114
 
115 115
 
116 116
 }
117 117
 
118
-add_action( 'wp_enqueue_scripts', 'give_load_scripts' );
118
+add_action('wp_enqueue_scripts', 'give_load_scripts');
119 119
 
120 120
 /**
121 121
  * Register Styles
@@ -127,47 +127,47 @@  discard block
 block discarded – undo
127 127
  */
128 128
 function give_register_styles() {
129 129
 
130
-	if ( give_get_option( 'disable_css', false ) ) {
130
+	if (give_get_option('disable_css', false)) {
131 131
 		return;
132 132
 	}
133 133
 
134 134
 	// Use minified libraries if SCRIPT_DEBUG is turned off
135
-	$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
135
+	$suffix = (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) ? '' : '.min';
136 136
 
137
-	$file          = 'give' . $suffix . '.css';
137
+	$file          = 'give'.$suffix.'.css';
138 138
 	$templates_dir = give_get_theme_template_dir_name();
139 139
 
140
-	$child_theme_style_sheet    = trailingslashit( get_stylesheet_directory() ) . $templates_dir . $file;
141
-	$child_theme_style_sheet_2  = trailingslashit( get_stylesheet_directory() ) . $templates_dir . 'give.css';
142
-	$parent_theme_style_sheet   = trailingslashit( get_template_directory() ) . $templates_dir . $file;
143
-	$parent_theme_style_sheet_2 = trailingslashit( get_template_directory() ) . $templates_dir . 'give.css';
144
-	$give_plugin_style_sheet    = trailingslashit( give_get_templates_dir() ) . $file;
140
+	$child_theme_style_sheet    = trailingslashit(get_stylesheet_directory()).$templates_dir.$file;
141
+	$child_theme_style_sheet_2  = trailingslashit(get_stylesheet_directory()).$templates_dir.'give.css';
142
+	$parent_theme_style_sheet   = trailingslashit(get_template_directory()).$templates_dir.$file;
143
+	$parent_theme_style_sheet_2 = trailingslashit(get_template_directory()).$templates_dir.'give.css';
144
+	$give_plugin_style_sheet    = trailingslashit(give_get_templates_dir()).$file;
145 145
 
146 146
 	// Look in the child theme directory first, followed by the parent theme, followed by the Give core templates directory
147 147
 	// Also look for the min version first, followed by non minified version, even if SCRIPT_DEBUG is not enabled.
148 148
 	// This allows users to copy just give.css to their theme
149
-	if ( file_exists( $child_theme_style_sheet ) || ( ! empty( $suffix ) && ( $nonmin = file_exists( $child_theme_style_sheet_2 ) ) ) ) {
150
-		if ( ! empty( $nonmin ) ) {
151
-			$url = trailingslashit( get_stylesheet_directory_uri() ) . $templates_dir . 'give.css';
149
+	if (file_exists($child_theme_style_sheet) || ( ! empty($suffix) && ($nonmin = file_exists($child_theme_style_sheet_2)))) {
150
+		if ( ! empty($nonmin)) {
151
+			$url = trailingslashit(get_stylesheet_directory_uri()).$templates_dir.'give.css';
152 152
 		} else {
153
-			$url = trailingslashit( get_stylesheet_directory_uri() ) . $templates_dir . $file;
153
+			$url = trailingslashit(get_stylesheet_directory_uri()).$templates_dir.$file;
154 154
 		}
155
-	} elseif ( file_exists( $parent_theme_style_sheet ) || ( ! empty( $suffix ) && ( $nonmin = file_exists( $parent_theme_style_sheet_2 ) ) ) ) {
156
-		if ( ! empty( $nonmin ) ) {
157
-			$url = trailingslashit( get_template_directory_uri() ) . $templates_dir . 'give.css';
155
+	} elseif (file_exists($parent_theme_style_sheet) || ( ! empty($suffix) && ($nonmin = file_exists($parent_theme_style_sheet_2)))) {
156
+		if ( ! empty($nonmin)) {
157
+			$url = trailingslashit(get_template_directory_uri()).$templates_dir.'give.css';
158 158
 		} else {
159
-			$url = trailingslashit( get_template_directory_uri() ) . $templates_dir . $file;
159
+			$url = trailingslashit(get_template_directory_uri()).$templates_dir.$file;
160 160
 		}
161
-	} elseif ( file_exists( $give_plugin_style_sheet ) || file_exists( $give_plugin_style_sheet ) ) {
162
-		$url = trailingslashit( give_get_templates_url() ) . $file;
161
+	} elseif (file_exists($give_plugin_style_sheet) || file_exists($give_plugin_style_sheet)) {
162
+		$url = trailingslashit(give_get_templates_url()).$file;
163 163
 	}
164 164
 
165
-	wp_register_style( 'give-styles', $url, array(), GIVE_VERSION, 'all' );
166
-	wp_enqueue_style( 'give-styles' );
165
+	wp_register_style('give-styles', $url, array(), GIVE_VERSION, 'all');
166
+	wp_enqueue_style('give-styles');
167 167
 
168 168
 }
169 169
 
170
-add_action( 'wp_enqueue_scripts', 'give_register_styles' );
170
+add_action('wp_enqueue_scripts', 'give_register_styles');
171 171
 
172 172
 /**
173 173
  * Load Admin Scripts
@@ -181,107 +181,107 @@  discard block
 block discarded – undo
181 181
  *
182 182
  * @return void
183 183
  */
184
-function give_load_admin_scripts( $hook ) {
184
+function give_load_admin_scripts($hook) {
185 185
 
186 186
 	global $wp_version, $post, $post_type;
187 187
 
188 188
 	//Directories of assets
189
-	$js_dir     = GIVE_PLUGIN_URL . 'assets/js/admin/';
190
-	$js_plugins = GIVE_PLUGIN_URL . 'assets/js/plugins/';
191
-	$css_dir    = GIVE_PLUGIN_URL . 'assets/css/';
189
+	$js_dir     = GIVE_PLUGIN_URL.'assets/js/admin/';
190
+	$js_plugins = GIVE_PLUGIN_URL.'assets/js/plugins/';
191
+	$css_dir    = GIVE_PLUGIN_URL.'assets/css/';
192 192
 
193 193
 	// Use minified libraries if SCRIPT_DEBUG is turned off
194
-	$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
194
+	$suffix = (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) ? '' : '.min';
195 195
 
196 196
 	//Global Admin:
197
-	wp_register_style( 'give-admin-bar-notification', $css_dir . 'adminbar-style.css' );
198
-	wp_enqueue_style( 'give-admin-bar-notification' );
197
+	wp_register_style('give-admin-bar-notification', $css_dir.'adminbar-style.css');
198
+	wp_enqueue_style('give-admin-bar-notification');
199 199
 
200 200
 	//Give Admin Only:
201
-	if ( ! apply_filters( 'give_load_admin_scripts', give_is_admin_page(), $hook ) ) {
201
+	if ( ! apply_filters('give_load_admin_scripts', give_is_admin_page(), $hook)) {
202 202
 		return;
203 203
 	}
204 204
 
205 205
 	//CSS
206
-	wp_register_style( 'jquery-ui-css', $css_dir . 'jquery-ui-fresh' . $suffix . '.css' );
207
-	wp_enqueue_style( 'jquery-ui-css' );
208
-	wp_register_style( 'give-admin', $css_dir . 'give-admin' . $suffix . '.css', GIVE_VERSION );
209
-	wp_enqueue_style( 'give-admin' );
210
-	wp_register_style( 'jquery-chosen', $css_dir . 'chosen' . $suffix . '.css', array(), GIVE_VERSION );
211
-	wp_enqueue_style( 'jquery-chosen' );
212
-	wp_enqueue_style( 'thickbox' );
206
+	wp_register_style('jquery-ui-css', $css_dir.'jquery-ui-fresh'.$suffix.'.css');
207
+	wp_enqueue_style('jquery-ui-css');
208
+	wp_register_style('give-admin', $css_dir.'give-admin'.$suffix.'.css', GIVE_VERSION);
209
+	wp_enqueue_style('give-admin');
210
+	wp_register_style('jquery-chosen', $css_dir.'chosen'.$suffix.'.css', array(), GIVE_VERSION);
211
+	wp_enqueue_style('jquery-chosen');
212
+	wp_enqueue_style('thickbox');
213 213
 
214 214
 	//JS
215
-	wp_register_script( 'jquery-chosen', $js_plugins . 'chosen.jquery' . $suffix . '.js', array( 'jquery' ), GIVE_VERSION );
216
-	wp_enqueue_script( 'jquery-chosen' );
215
+	wp_register_script('jquery-chosen', $js_plugins.'chosen.jquery'.$suffix.'.js', array('jquery'), GIVE_VERSION);
216
+	wp_enqueue_script('jquery-chosen');
217 217
 
218
-	wp_register_script( 'give-admin-scripts', $js_dir . 'admin-scripts' . $suffix . '.js', array( 'jquery' ), GIVE_VERSION, false );
219
-	wp_enqueue_script( 'give-admin-scripts' );
218
+	wp_register_script('give-admin-scripts', $js_dir.'admin-scripts'.$suffix.'.js', array('jquery'), GIVE_VERSION, false);
219
+	wp_enqueue_script('give-admin-scripts');
220 220
 
221
-	wp_register_script( 'jquery-flot', $js_plugins . 'jquery.flot' . $suffix . '.js' );
222
-	wp_enqueue_script( 'jquery-flot' );
221
+	wp_register_script('jquery-flot', $js_plugins.'jquery.flot'.$suffix.'.js');
222
+	wp_enqueue_script('jquery-flot');
223 223
 
224
-	wp_register_script( 'give-qtip', $js_plugins . 'jquery.qtip' . $suffix . '.js', array( 'jquery' ), GIVE_VERSION, false );
225
-	wp_enqueue_script( 'give-qtip' );
224
+	wp_register_script('give-qtip', $js_plugins.'jquery.qtip'.$suffix.'.js', array('jquery'), GIVE_VERSION, false);
225
+	wp_enqueue_script('give-qtip');
226 226
 
227
-	wp_enqueue_script( 'jquery-ui-datepicker' );
228
-	wp_enqueue_script( 'thickbox' );
227
+	wp_enqueue_script('jquery-ui-datepicker');
228
+	wp_enqueue_script('thickbox');
229 229
 
230 230
 	//Forms CPT Script
231
-	if ( $post_type === 'give_forms' ) {
232
-		wp_register_script( 'give-admin-forms-scripts', $js_dir . 'admin-forms' . $suffix . '.js', array( 'jquery' ), GIVE_VERSION, false );
233
-		wp_enqueue_script( 'give-admin-forms-scripts' );
231
+	if ($post_type === 'give_forms') {
232
+		wp_register_script('give-admin-forms-scripts', $js_dir.'admin-forms'.$suffix.'.js', array('jquery'), GIVE_VERSION, false);
233
+		wp_enqueue_script('give-admin-forms-scripts');
234 234
 	}
235 235
 
236 236
 	//Settings Scripts
237
-	if (isset($_GET['page']) && $_GET['page'] == 'give-settings'  ) {
237
+	if (isset($_GET['page']) && $_GET['page'] == 'give-settings') {
238 238
 		wp_enqueue_script('jquery-ui-sortable');
239
-		wp_register_script( 'give-admin-settings-scripts', $js_dir . 'admin-settings' . $suffix . '.js', array( 'jquery' ), GIVE_VERSION, false );
240
-		wp_enqueue_script( 'give-admin-settings-scripts' );
239
+		wp_register_script('give-admin-settings-scripts', $js_dir.'admin-settings'.$suffix.'.js', array('jquery'), GIVE_VERSION, false);
240
+		wp_enqueue_script('give-admin-settings-scripts');
241 241
 	}
242 242
 
243 243
 	//Localize strings & variables for JS
244
-	wp_localize_script( 'give-admin-scripts', 'give_vars', array(
245
-		'post_id'                 => isset( $post->ID ) ? $post->ID : null,
244
+	wp_localize_script('give-admin-scripts', 'give_vars', array(
245
+		'post_id'                 => isset($post->ID) ? $post->ID : null,
246 246
 		'give_version'            => GIVE_VERSION,
247
-		'quick_edit_warning'      => esc_html( 'Sorry, not available for variable priced forms.', 'give' ),
248
-		'delete_payment'          => esc_html( 'Are you sure you wish to delete this payment?', 'give' ),
249
-		'delete_payment_note'     => esc_html( 'Are you sure you wish to delete this note?', 'give' ),
250
-		'revoke_api_key'          => esc_html( 'Are you sure you wish to revoke this API key?', 'give' ),
251
-		'regenerate_api_key'      => esc_html( 'Are you sure you wish to regenerate this API key?', 'give' ),
252
-		'resend_receipt'          => esc_html( 'Are you sure you wish to resend the donation receipt?', 'give' ),
253
-		'copy_download_link_text' => esc_html( 'Copy these links to your clipboard and give them to your donor.', 'give' ),
247
+		'quick_edit_warning'      => esc_html('Sorry, not available for variable priced forms.', 'give'),
248
+		'delete_payment'          => esc_html('Are you sure you wish to delete this payment?', 'give'),
249
+		'delete_payment_note'     => esc_html('Are you sure you wish to delete this note?', 'give'),
250
+		'revoke_api_key'          => esc_html('Are you sure you wish to revoke this API key?', 'give'),
251
+		'regenerate_api_key'      => esc_html('Are you sure you wish to regenerate this API key?', 'give'),
252
+		'resend_receipt'          => esc_html('Are you sure you wish to resend the donation receipt?', 'give'),
253
+		'copy_download_link_text' => esc_html('Copy these links to your clipboard and give them to your donor.', 'give'),
254 254
 		/* translators: %s: form singular label */
255
-		'delete_payment_download' => sprintf( esc_html( 'Are you sure you wish to delete this %s?', 'give' ), give_get_forms_label_singular() ),
256
-		'one_price_min'           => esc_html( 'You must have at least one price.', 'give' ),
257
-		'one_file_min'            => esc_html( 'You must have at least one file.', 'give' ),
258
-		'one_field_min'           => esc_html( 'You must have at least one field.', 'give' ),
255
+		'delete_payment_download' => sprintf(esc_html('Are you sure you wish to delete this %s?', 'give'), give_get_forms_label_singular()),
256
+		'one_price_min'           => esc_html('You must have at least one price.', 'give'),
257
+		'one_file_min'            => esc_html('You must have at least one file.', 'give'),
258
+		'one_field_min'           => esc_html('You must have at least one field.', 'give'),
259 259
 		/* translators: %s: form singular label */
260
-		'one_option'              => sprintf( esc_html( 'Choose a %s', 'give' ), give_get_forms_label_singular() ),
260
+		'one_option'              => sprintf(esc_html('Choose a %s', 'give'), give_get_forms_label_singular()),
261 261
 		/* translators: %s: form plural label */
262
-		'one_or_more_option'      => sprintf( esc_html( 'Choose one or more %s', 'give' ), give_get_forms_label_plural() ),
263
-		'numeric_item_price'      => esc_html( 'Item price must be numeric.', 'give' ),
264
-		'numeric_quantity'        => esc_html( 'Quantity must be numeric.', 'give' ),
265
-		'currency_sign'           => give_currency_filter( '' ),
266
-		'currency_pos'            => isset( $give_options['currency_position'] ) ? $give_options['currency_position'] : 'before',
262
+		'one_or_more_option'      => sprintf(esc_html('Choose one or more %s', 'give'), give_get_forms_label_plural()),
263
+		'numeric_item_price'      => esc_html('Item price must be numeric.', 'give'),
264
+		'numeric_quantity'        => esc_html('Quantity must be numeric.', 'give'),
265
+		'currency_sign'           => give_currency_filter(''),
266
+		'currency_pos'            => isset($give_options['currency_position']) ? $give_options['currency_position'] : 'before',
267 267
 		'currency_decimals'       => give_currency_decimal_filter(),
268
-		'new_media_ui'            => apply_filters( 'give_use_35_media_ui', 1 ),
269
-		'remove_text'             => esc_html( 'Remove', 'give' ),
268
+		'new_media_ui'            => apply_filters('give_use_35_media_ui', 1),
269
+		'remove_text'             => esc_html('Remove', 'give'),
270 270
 		/* translators: %s: form plural label */
271
-		'type_to_search'          => sprintf( esc_html( 'Type to search %s', 'give' ), give_get_forms_label_plural() ),
272
-		'batch_export_no_class'   => esc_html( 'You must choose a method.', 'give' ),
273
-		'batch_export_no_reqs'    => esc_html( 'Required fields not completed.', 'give' ),
274
-		'reset_stats_warn'        => __( 'Are you sure you want to reset Give? This process is <strong><em>not reversible</em></strong> and will delete all data regardless of test or live mode. Please be sure you have a recent backup before proceeding.', 'give' ),
275
-	) );
271
+		'type_to_search'          => sprintf(esc_html('Type to search %s', 'give'), give_get_forms_label_plural()),
272
+		'batch_export_no_class'   => esc_html('You must choose a method.', 'give'),
273
+		'batch_export_no_reqs'    => esc_html('Required fields not completed.', 'give'),
274
+		'reset_stats_warn'        => __('Are you sure you want to reset Give? This process is <strong><em>not reversible</em></strong> and will delete all data regardless of test or live mode. Please be sure you have a recent backup before proceeding.', 'give'),
275
+	));
276 276
 
277
-	if ( function_exists( 'wp_enqueue_media' ) && version_compare( $wp_version, '3.5', '>=' ) ) {
277
+	if (function_exists('wp_enqueue_media') && version_compare($wp_version, '3.5', '>=')) {
278 278
 		//call for new media manager
279 279
 		wp_enqueue_media();
280 280
 	}
281 281
 
282 282
 }
283 283
 
284
-add_action( 'admin_enqueue_scripts', 'give_load_admin_scripts', 100 );
284
+add_action('admin_enqueue_scripts', 'give_load_admin_scripts', 100);
285 285
 
286 286
 /**
287 287
  * Admin Give Icon
@@ -298,14 +298,14 @@  discard block
 block discarded – undo
298 298
 	?>
299 299
 	<style type="text/css" media="screen">
300 300
 
301
-		<?php if( version_compare( $wp_version, '3.8-RC', '>=' ) || version_compare( $wp_version, '3.8', '>=' ) ) { ?>
301
+		<?php if (version_compare($wp_version, '3.8-RC', '>=') || version_compare($wp_version, '3.8', '>=')) { ?>
302 302
 		@font-face {
303 303
 			font-family: 'give-icomoon';
304
-			src: url('<?php echo GIVE_PLUGIN_URL . '/assets/fonts/icomoon.eot?-ngjl88'; ?>');
305
-			src: url('<?php echo GIVE_PLUGIN_URL . '/assets/fonts/icomoon.eot?#iefix-ngjl88'?>') format('embedded-opentype'),
306
-			url('<?php echo GIVE_PLUGIN_URL . '/assets/fonts/icomoon.woff?-ngjl88'; ?>') format('woff'),
307
-			url('<?php echo GIVE_PLUGIN_URL . '/assets/fonts/icomoon.ttf?-ngjl88'; ?>') format('truetype'),
308
-			url('<?php echo GIVE_PLUGIN_URL . '/assets/fonts/icomoon.svg?-ngjl88#icomoon'; ?>') format('svg');
304
+			src: url('<?php echo GIVE_PLUGIN_URL.'/assets/fonts/icomoon.eot?-ngjl88'; ?>');
305
+			src: url('<?php echo GIVE_PLUGIN_URL.'/assets/fonts/icomoon.eot?#iefix-ngjl88'?>') format('embedded-opentype'),
306
+			url('<?php echo GIVE_PLUGIN_URL.'/assets/fonts/icomoon.woff?-ngjl88'; ?>') format('woff'),
307
+			url('<?php echo GIVE_PLUGIN_URL.'/assets/fonts/icomoon.ttf?-ngjl88'; ?>') format('truetype'),
308
+			url('<?php echo GIVE_PLUGIN_URL.'/assets/fonts/icomoon.svg?-ngjl88#icomoon'; ?>') format('svg');
309 309
 			font-weight: normal;
310 310
 			font-style: normal;
311 311
 		}
@@ -324,4 +324,4 @@  discard block
 block discarded – undo
324 324
 	<?php
325 325
 }
326 326
 
327
-add_action( 'admin_head', 'give_admin_icon' );
327
+add_action('admin_head', 'give_admin_icon');
Please login to merge, or discard this patch.
includes/admin/welcome.php 1 patch
Spacing   +107 added lines, -107 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  */
12 12
 
13 13
 // Exit if accessed directly
14
-if ( ! defined( 'ABSPATH' ) ) {
14
+if ( ! defined('ABSPATH')) {
15 15
 	exit;
16 16
 }
17 17
 
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
 	 * @since 1.0
36 36
 	 */
37 37
 	public function __construct() {
38
-		add_action( 'admin_menu', array( $this, 'admin_menus' ) );
39
-		add_action( 'admin_head', array( $this, 'admin_head' ) );
40
-		add_action( 'admin_init', array( $this, 'welcome' ) );
38
+		add_action('admin_menu', array($this, 'admin_menus'));
39
+		add_action('admin_head', array($this, 'admin_head'));
40
+		add_action('admin_init', array($this, 'welcome'));
41 41
 	}
42 42
 
43 43
 	/**
@@ -51,38 +51,38 @@  discard block
 block discarded – undo
51 51
 	public function admin_menus() {
52 52
 		// About Page
53 53
 		add_dashboard_page(
54
-			esc_html( 'Welcome to Give', 'give' ),
55
-			esc_html( 'Welcome to Give', 'give' ),
54
+			esc_html('Welcome to Give', 'give'),
55
+			esc_html('Welcome to Give', 'give'),
56 56
 			$this->minimum_capability,
57 57
 			'give-about',
58
-			array( $this, 'about_screen' )
58
+			array($this, 'about_screen')
59 59
 		);
60 60
 
61 61
 		// Changelog Page
62 62
 		add_dashboard_page(
63
-			esc_html( 'Give Changelog', 'give' ),
64
-			esc_html( 'Give Changelog', 'give' ),
63
+			esc_html('Give Changelog', 'give'),
64
+			esc_html('Give Changelog', 'give'),
65 65
 			$this->minimum_capability,
66 66
 			'give-changelog',
67
-			array( $this, 'changelog_screen' )
67
+			array($this, 'changelog_screen')
68 68
 		);
69 69
 
70 70
 		// Getting Started Page
71 71
 		add_dashboard_page(
72
-			esc_html( 'Getting started with Give', 'give' ),
73
-			esc_html( 'Getting started with Give', 'give' ),
72
+			esc_html('Getting started with Give', 'give'),
73
+			esc_html('Getting started with Give', 'give'),
74 74
 			$this->minimum_capability,
75 75
 			'give-getting-started',
76
-			array( $this, 'getting_started_screen' )
76
+			array($this, 'getting_started_screen')
77 77
 		);
78 78
 
79 79
 		// Credits Page
80 80
 		add_dashboard_page(
81
-			esc_html( 'The people that build Give', 'give' ),
82
-			esc_html( 'The people that build Give', 'give' ),
81
+			esc_html('The people that build Give', 'give'),
82
+			esc_html('The people that build Give', 'give'),
83 83
 			$this->minimum_capability,
84 84
 			'give-credits',
85
-			array( $this, 'credits_screen' )
85
+			array($this, 'credits_screen')
86 86
 		);
87 87
 	}
88 88
 
@@ -95,13 +95,13 @@  discard block
 block discarded – undo
95 95
 	 */
96 96
 	public function admin_head() {
97 97
 
98
-		remove_submenu_page( 'index.php', 'give-about' );
99
-		remove_submenu_page( 'index.php', 'give-changelog' );
100
-		remove_submenu_page( 'index.php', 'give-getting-started' );
101
-		remove_submenu_page( 'index.php', 'give-credits' );
98
+		remove_submenu_page('index.php', 'give-about');
99
+		remove_submenu_page('index.php', 'give-changelog');
100
+		remove_submenu_page('index.php', 'give-getting-started');
101
+		remove_submenu_page('index.php', 'give-credits');
102 102
 
103 103
 		// Badge for welcome page
104
-		$badge_url = GIVE_PLUGIN_URL . 'assets/images/give-badge.png';
104
+		$badge_url = GIVE_PLUGIN_URL.'assets/images/give-badge.png';
105 105
 
106 106
 		?>
107 107
 		<style type="text/css" media="screen">
@@ -215,20 +215,20 @@  discard block
 block discarded – undo
215 215
 	 * @return void
216 216
 	 */
217 217
 	public function tabs() {
218
-		$selected = isset( $_GET['page'] ) ? $_GET['page'] : 'give-about';
218
+		$selected = isset($_GET['page']) ? $_GET['page'] : 'give-about';
219 219
 		?>
220 220
 		<h1 class="nav-tab-wrapper">
221
-			<a class="nav-tab <?php echo $selected == 'give-about' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'give-about' ), 'index.php' ) ) ); ?>">
222
-				<?php esc_html_e( "About Give", 'give' ); ?>
221
+			<a class="nav-tab <?php echo $selected == 'give-about' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url(admin_url(add_query_arg(array('page' => 'give-about'), 'index.php'))); ?>">
222
+				<?php esc_html_e("About Give", 'give'); ?>
223 223
 			</a>
224
-			<a class="nav-tab <?php echo $selected == 'give-getting-started' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'give-getting-started' ), 'index.php' ) ) ); ?>">
225
-				<?php esc_html_e( 'Getting Started', 'give' ); ?>
224
+			<a class="nav-tab <?php echo $selected == 'give-getting-started' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url(admin_url(add_query_arg(array('page' => 'give-getting-started'), 'index.php'))); ?>">
225
+				<?php esc_html_e('Getting Started', 'give'); ?>
226 226
 			</a>
227
-			<a class="nav-tab <?php echo $selected == 'give-credits' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'give-credits' ), 'index.php' ) ) ); ?>">
228
-				<?php esc_html_e( 'Credits', 'give' ); ?>
227
+			<a class="nav-tab <?php echo $selected == 'give-credits' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url(admin_url(add_query_arg(array('page' => 'give-credits'), 'index.php'))); ?>">
228
+				<?php esc_html_e('Credits', 'give'); ?>
229 229
 			</a>
230
-			<a class="nav-tab <?php echo $selected == 'give-add-ons' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( null, 'index.php' ) ) . 'edit.php?post_type=give_forms&page=give-addons'; ?>">
231
-				<?php esc_html_e( 'Add-ons', 'give' ); ?>
230
+			<a class="nav-tab <?php echo $selected == 'give-add-ons' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url(admin_url(null, 'index.php')).'edit.php?post_type=give_forms&page=give-addons'; ?>">
231
+				<?php esc_html_e('Add-ons', 'give'); ?>
232 232
 			</a>
233 233
 		</h1>
234 234
 	<?php
@@ -242,13 +242,13 @@  discard block
 block discarded – undo
242 242
 	 * @return void
243 243
 	 */
244 244
 	public function about_screen() {
245
-		list( $display_version ) = explode( '-', GIVE_VERSION );
245
+		list($display_version) = explode('-', GIVE_VERSION);
246 246
 		?>
247 247
 		<div class="wrap about-wrap">
248 248
 			<h1 class="welcome-h1"><?php
249 249
 				printf(
250 250
 					/* translators: %s: Give version */
251
-					esc_html( 'Welcome to Give %s', 'give' ),
251
+					esc_html('Welcome to Give %s', 'give'),
252 252
 					$display_version
253 253
 				);
254 254
 			?></h1>
@@ -258,20 +258,20 @@  discard block
 block discarded – undo
258 258
 			<div class="about-text"><?php
259 259
 				printf(
260 260
 					/* translators: 1: https://givewp.com/documenation/ 2: title attribute text */
261
-					__( 'Thank you for activating or updating to the latest version of Give! If you\'re a first time user, welcome! You\'re well on your way to empowering your cause. </You>We encourage you to check out the <a href="%1$s" title="%2$s" target="_blank">plugin documentation</a> and getting started guide below.', 'give' ),
262
-					esc_url( 'https://givewp.com/documenation/' ),
263
-					esc_attr( 'View the Give plugin documentation online', 'give' )
261
+					__('Thank you for activating or updating to the latest version of Give! If you\'re a first time user, welcome! You\'re well on your way to empowering your cause. </You>We encourage you to check out the <a href="%1$s" title="%2$s" target="_blank">plugin documentation</a> and getting started guide below.', 'give'),
262
+					esc_url('https://givewp.com/documenation/'),
263
+					esc_attr('View the Give plugin documentation online', 'give')
264 264
 				);
265 265
 			?></div>
266 266
 
267
-			<p class="newsletter-intro"><?php esc_html_e( 'Be sure to sign up for the Give newsletter below to stay informed of important updates and news.', 'give' ); ?></p>
267
+			<p class="newsletter-intro"><?php esc_html_e('Be sure to sign up for the Give newsletter below to stay informed of important updates and news.', 'give'); ?></p>
268 268
 
269 269
 			<?php give_get_newsletter() ?>
270 270
 
271 271
 			<div class="give-badge"><?php
272 272
 				printf(
273 273
 					/* translators: %s: Give version */
274
-					esc_html( 'Version %s', 'give' ),
274
+					esc_html('Version %s', 'give'),
275 275
 					$display_version
276 276
 				);
277 277
 			?></div>
@@ -283,15 +283,15 @@  discard block
 block discarded – undo
283 283
 			<div class="feature-section clearfix introduction">
284 284
 
285 285
 				<div class="video feature-section-item">
286
-					<img src="<?php echo GIVE_PLUGIN_URL . '/assets/images/give-form-mockup.png' ?>" title="A Give donation form" alt="A Give donation form">
286
+					<img src="<?php echo GIVE_PLUGIN_URL.'/assets/images/give-form-mockup.png' ?>" title="A Give donation form" alt="A Give donation form">
287 287
 
288 288
 				</div>
289 289
 
290 290
 				<div class="content feature-section-item last-feature">
291 291
 
292
-					<h3><?php esc_html_e( 'Give - Democratizing Generosity', 'give' ); ?></h3>
292
+					<h3><?php esc_html_e('Give - Democratizing Generosity', 'give'); ?></h3>
293 293
 
294
-					<p><?php esc_html_e( 'Give empowers you to easily accept donations and setup fundraising campaigns, directly within WordPress. We created Give to provide a better donation experience for you and your users. Robust, flexible, and intuitive, the plugin is built from the ground up to be the goto donation solution for WordPress. Create powerful donation forms, embed them throughout your website, start a campaign, and exceed your fundraising goals with Give. This plugin is actively developed and proudly supported by folks who are dedicated to helping you and your cause.', 'give' ); ?></p>
294
+					<p><?php esc_html_e('Give empowers you to easily accept donations and setup fundraising campaigns, directly within WordPress. We created Give to provide a better donation experience for you and your users. Robust, flexible, and intuitive, the plugin is built from the ground up to be the goto donation solution for WordPress. Create powerful donation forms, embed them throughout your website, start a campaign, and exceed your fundraising goals with Give. This plugin is actively developed and proudly supported by folks who are dedicated to helping you and your cause.', 'give'); ?></p>
295 295
 					<a href="https://givewp.com" target="_blank" class="button-secondary" title="Visit the Give Website">Learn More
296 296
 						<span class="dashicons dashicons-external"></span></a>
297 297
 
@@ -304,9 +304,9 @@  discard block
 block discarded – undo
304 304
 
305 305
 				<div class="content feature-section-item">
306 306
 
307
-					<h3><?php esc_html_e( 'Getting to Know Give', 'give' ); ?></h3>
307
+					<h3><?php esc_html_e('Getting to Know Give', 'give'); ?></h3>
308 308
 
309
-					<p><?php esc_html_e( 'Before you get started with Give we suggest you take a look at the online documentation. There you will find the getting started guide which will help you get up and running quickly. If you have an question, issue or bug with the Core plugin please submit an issue on the Give website. We also welcome your feedback and feature requests. Welcome to Give. We hope you much success with your cause.', 'give' ); ?></p>
309
+					<p><?php esc_html_e('Before you get started with Give we suggest you take a look at the online documentation. There you will find the getting started guide which will help you get up and running quickly. If you have an question, issue or bug with the Core plugin please submit an issue on the Give website. We also welcome your feedback and feature requests. Welcome to Give. We hope you much success with your cause.', 'give'); ?></p>
310 310
 					<a href="https://givewp.com/documentation" target="_blank" class="button-secondary" title="Visit the Give Website">View Documentation
311 311
 						<span class="dashicons dashicons-external"></span></a>
312 312
 
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 
315 315
 				<div class="content  feature-section-item last-feature">
316 316
 
317
-					<img src="<?php echo GIVE_PLUGIN_URL . '/assets/images/give-logo-photo-mashup.png' ?>" title="Give" alt="Give">
317
+					<img src="<?php echo GIVE_PLUGIN_URL.'/assets/images/give-logo-photo-mashup.png' ?>" title="Give" alt="Give">
318 318
 
319 319
 				</div>
320 320
 
@@ -334,22 +334,22 @@  discard block
 block discarded – undo
334 334
 	 * @return void
335 335
 	 */
336 336
 	public function changelog_screen() {
337
-		list( $display_version ) = explode( '-', GIVE_VERSION );
337
+		list($display_version) = explode('-', GIVE_VERSION);
338 338
 		?>
339 339
 		<div class="wrap about-wrap">
340
-			<h1><?php esc_html_e( 'Give Changelog', 'give' ); ?></h1>
340
+			<h1><?php esc_html_e('Give Changelog', 'give'); ?></h1>
341 341
 
342 342
 			<div class="about-text"><?php
343 343
 				printf(
344 344
 					/* translators: %s: Give version */
345
-					esc_html( 'Thank you for updating to the latest version! Give %s is ready to make your online store faster, safer, and better!', 'give' ),
345
+					esc_html('Thank you for updating to the latest version! Give %s is ready to make your online store faster, safer, and better!', 'give'),
346 346
 					$display_version
347 347
 				);
348 348
 			?></div>
349 349
 			<div class="give-badge"><?php
350 350
 				printf(
351 351
 					/* translators: %s: Give version */
352
-					esc_html( 'Version %s', 'give' ),
352
+					esc_html('Version %s', 'give'),
353 353
 					$display_version
354 354
 				);
355 355
 			?></div>
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
 			<?php $this->tabs(); ?>
358 358
 
359 359
 			<div class="changelog">
360
-				<h3><?php esc_html_e( 'Full Changelog', 'give' ); ?></h3>
360
+				<h3><?php esc_html_e('Full Changelog', 'give'); ?></h3>
361 361
 
362 362
 				<div class="feature-section">
363 363
 					<?php echo $this->parse_readme(); ?>
@@ -365,10 +365,10 @@  discard block
 block discarded – undo
365 365
 			</div>
366 366
 
367 367
 			<div class="return-to-dashboard">
368
-				<a href="<?php echo esc_url( admin_url( add_query_arg( array(
368
+				<a href="<?php echo esc_url(admin_url(add_query_arg(array(
369 369
 					'post_type' => 'give_forms',
370 370
 					'page'      => 'give-settings'
371
-				), 'edit.php' ) ) ); ?>"><?php esc_html_e( 'Go to Give Settings', 'give' ); ?></a>
371
+				), 'edit.php'))); ?>"><?php esc_html_e('Go to Give Settings', 'give'); ?></a>
372 372
 			</div>
373 373
 		</div>
374 374
 	<?php
@@ -382,29 +382,29 @@  discard block
 block discarded – undo
382 382
 	 * @return void
383 383
 	 */
384 384
 	public function getting_started_screen() {
385
-		list( $display_version ) = explode( '-', GIVE_VERSION );
385
+		list($display_version) = explode('-', GIVE_VERSION);
386 386
 		?>
387 387
 		<div class="wrap about-wrap get-started">
388 388
 			<h1 class="welcome-h1"><?php
389 389
 				printf(
390 390
 					/* translators: %s: Give version */
391
-					esc_html( 'Give %s - Getting Started Guide', 'give' ),
391
+					esc_html('Give %s - Getting Started Guide', 'give'),
392 392
 					$display_version
393 393
 				);
394 394
 			?></h1>
395 395
 
396 396
 			<?php give_social_media_elements() ?>
397 397
 
398
-			<div class="about-text"><?php esc_html_e( 'Welcome to the getting started guide.', 'give' ); ?></div>
398
+			<div class="about-text"><?php esc_html_e('Welcome to the getting started guide.', 'give'); ?></div>
399 399
 
400
-			<p class="newsletter-intro"><?php esc_html_e( 'Don\'t forget to sign up for the newsletter!', 'give' ); ?>.</p>
400
+			<p class="newsletter-intro"><?php esc_html_e('Don\'t forget to sign up for the newsletter!', 'give'); ?>.</p>
401 401
 
402 402
 			<?php give_get_newsletter() ?>
403 403
 
404 404
 			<div class="give-badge"><?php
405 405
 				printf(
406 406
 					/* translators: %s: Give version */
407
-					esc_html( 'Version %s', 'give' ),
407
+					esc_html('Version %s', 'give'),
408 408
 					$display_version
409 409
 				);
410 410
 			?></div>
@@ -412,17 +412,17 @@  discard block
 block discarded – undo
412 412
 			<?php $this->tabs(); ?>
413 413
 
414 414
 
415
-			<div class="about-text"><?php printf( esc_html( 'Getting started with Give is easy! We put together this quick start guide to help first time users of the plugin. Our goal is to get you up and running in no time. Let\'s begin!', 'give' ), $display_version ); ?></div>
415
+			<div class="about-text"><?php printf(esc_html('Getting started with Give is easy! We put together this quick start guide to help first time users of the plugin. Our goal is to get you up and running in no time. Let\'s begin!', 'give'), $display_version); ?></div>
416 416
 
417 417
 
418 418
 			<div class="feature-section clearfix">
419 419
 
420 420
 				<div class="content feature-section-item">
421
-					<h3><?php esc_html_e( 'STEP 1: Create a New Form', 'give' ); ?></h3>
421
+					<h3><?php esc_html_e('STEP 1: Create a New Form', 'give'); ?></h3>
422 422
 
423
-					<p><?php esc_html_e( 'Give is driven by it\'s powerful form building features. But it is not simply a "form". From the "Add New Form" page you\'ll be able to choose how and where you want to receive your donations. You\'ll be able to set the donation amounts. You even get to choose whether you want to create a whole page for your form, or embed it on a different page of your site.', 'give' ); ?></p>
423
+					<p><?php esc_html_e('Give is driven by it\'s powerful form building features. But it is not simply a "form". From the "Add New Form" page you\'ll be able to choose how and where you want to receive your donations. You\'ll be able to set the donation amounts. You even get to choose whether you want to create a whole page for your form, or embed it on a different page of your site.', 'give'); ?></p>
424 424
 
425
-					<p><?php esc_html_e( 'But all of these features begin simply by going to the menu and choosing "Add New Form."', 'give' ); ?></p>
425
+					<p><?php esc_html_e('But all of these features begin simply by going to the menu and choosing "Add New Form."', 'give'); ?></p>
426 426
 				</div>
427 427
 
428 428
 				<div class="content feature-section-item last-feature">
@@ -439,9 +439,9 @@  discard block
 block discarded – undo
439 439
 				</div>
440 440
 
441 441
 				<div class="content feature-section-item last-feature">
442
-					<h3><?php esc_html_e( 'STEP 2: Choose Your Levels', 'give' ); ?></h3>
442
+					<h3><?php esc_html_e('STEP 2: Choose Your Levels', 'give'); ?></h3>
443 443
 
444
-					<p><?php esc_html_e( 'Each Form can be set to receive either a pre-determined amount or have multiple suggested levels of giving. Choosing "Multi-level Donation" opens up the levels section where you can add as many levels as you like with your own custom names and amounts.', 'give' ); ?></p>
444
+					<p><?php esc_html_e('Each Form can be set to receive either a pre-determined amount or have multiple suggested levels of giving. Choosing "Multi-level Donation" opens up the levels section where you can add as many levels as you like with your own custom names and amounts.', 'give'); ?></p>
445 445
 				</div>
446 446
 
447 447
 			</div>
@@ -450,11 +450,11 @@  discard block
 block discarded – undo
450 450
 			<div class="feature-section clearfix">
451 451
 
452 452
 				<div class="content feature-section-item add-content">
453
-					<h3><?php esc_html_e( 'STEP 3: Landing Page or Shortcode Mode?', 'give' ); ?></h3>
453
+					<h3><?php esc_html_e('STEP 3: Landing Page or Shortcode Mode?', 'give'); ?></h3>
454 454
 
455
-					<p><?php esc_html_e( 'Every form you create in Give can either become it\'s own stand-alone page, or it can be inserted into any other page or post throughout your site as a Shortcode.', 'give' ); ?></p>
455
+					<p><?php esc_html_e('Every form you create in Give can either become it\'s own stand-alone page, or it can be inserted into any other page or post throughout your site as a Shortcode.', 'give'); ?></p>
456 456
 
457
-					<p><?php esc_html_e( 'You can choose these different modes by going to the "Form Content" section. From there, you can choose to add content before or after the Donation form on a page, or if you choose "None" perhaps you want to instead use the shortcode. You can find the shortcode in the top right column directly under the Publish/Save button. This feature gives you the most amount of flexibility with controlling your content on your website all within the same page.', 'give' ); ?></p>
457
+					<p><?php esc_html_e('You can choose these different modes by going to the "Form Content" section. From there, you can choose to add content before or after the Donation form on a page, or if you choose "None" perhaps you want to instead use the shortcode. You can find the shortcode in the top right column directly under the Publish/Save button. This feature gives you the most amount of flexibility with controlling your content on your website all within the same page.', 'give'); ?></p>
458 458
 				</div>
459 459
 
460 460
 				<div class="content feature-section-item last-feature">
@@ -471,9 +471,9 @@  discard block
 block discarded – undo
471 471
 				</div>
472 472
 
473 473
 				<div class="content feature-section-item last-feature">
474
-					<h3><?php esc_html_e( 'STEP 4: Configure Your Display Options', 'give' ); ?></h3>
474
+					<h3><?php esc_html_e('STEP 4: Configure Your Display Options', 'give'); ?></h3>
475 475
 
476
-					<p><?php esc_html_e( 'Lastly, you can present the form in a lot of different ways. With the "Display Options" section you can configure how the credit card field appears, the submit button text, which Gateway you want to use, whether Guests (non-logged in users) can donate or not, and a log-in form.', 'give' ); ?></p>
476
+					<p><?php esc_html_e('Lastly, you can present the form in a lot of different ways. With the "Display Options" section you can configure how the credit card field appears, the submit button text, which Gateway you want to use, whether Guests (non-logged in users) can donate or not, and a log-in form.', 'give'); ?></p>
477 477
 				</div>
478 478
 
479 479
 
@@ -493,38 +493,38 @@  discard block
 block discarded – undo
493 493
 	 * @return void
494 494
 	 */
495 495
 	public function credits_screen() {
496
-		list( $display_version ) = explode( '-', GIVE_VERSION );
496
+		list($display_version) = explode('-', GIVE_VERSION);
497 497
 		?>
498 498
 		<div class="wrap about-wrap">
499 499
 			<h1 class="welcome-h1"><?php
500 500
 				printf(
501 501
 					/* translators: %s: Give version */
502
-					esc_html( 'Give %s - Credits', 'give' ),
502
+					esc_html('Give %s - Credits', 'give'),
503 503
 					$display_version
504 504
 				);
505 505
 			?></h1>
506 506
 
507 507
 			<?php give_social_media_elements() ?>
508 508
 
509
-			<div class="about-text"><?php esc_html_e( 'Thanks to all those who have contributed code directly or indirectly. ', 'give' ); ?></div>
509
+			<div class="about-text"><?php esc_html_e('Thanks to all those who have contributed code directly or indirectly. ', 'give'); ?></div>
510 510
 
511
-			<div class="about-text"><?php esc_html_e( 'Welcome to the getting started guide.', 'give' ); ?></div>
511
+			<div class="about-text"><?php esc_html_e('Welcome to the getting started guide.', 'give'); ?></div>
512 512
 
513
-			<p class="newsletter-intro"><?php esc_html_e( 'Be sure to sign up for the Give newsletter below to stay informed of important updates and news.', 'give' ); ?></p>
513
+			<p class="newsletter-intro"><?php esc_html_e('Be sure to sign up for the Give newsletter below to stay informed of important updates and news.', 'give'); ?></p>
514 514
 
515 515
 			<?php give_get_newsletter() ?>
516 516
 
517 517
 			<div class="give-badge"><?php
518 518
 				printf(
519 519
 					/* translators: %s: Give version */
520
-					esc_html( 'Version %s', 'give' ),
520
+					esc_html('Version %s', 'give'),
521 521
 					$display_version
522 522
 				);
523 523
 			?></div>
524 524
 
525 525
 			<?php $this->tabs(); ?>
526 526
 
527
-			<p class="about-description"><?php printf( __( 'Give is created by a dedicated team of developers. If you are interested in contributing please visit the <a href="%s" target="_blank">GitHub Repo</a>.', 'give' ), esc_url( 'https://github.com/WordImpress/give' ) ); ?></p>
527
+			<p class="about-description"><?php printf(__('Give is created by a dedicated team of developers. If you are interested in contributing please visit the <a href="%s" target="_blank">GitHub Repo</a>.', 'give'), esc_url('https://github.com/WordImpress/give')); ?></p>
528 528
 
529 529
 			<?php echo $this->contributors(); ?>
530 530
 		</div>
@@ -539,21 +539,21 @@  discard block
 block discarded – undo
539 539
 	 * @return string $readme HTML formatted readme file
540 540
 	 */
541 541
 	public function parse_readme() {
542
-		$file = file_exists( GIVE_PLUGIN_DIR . 'readme.txt' ) ? GIVE_PLUGIN_DIR . 'readme.txt' : null;
542
+		$file = file_exists(GIVE_PLUGIN_DIR.'readme.txt') ? GIVE_PLUGIN_DIR.'readme.txt' : null;
543 543
 
544
-		if ( ! $file ) {
545
-			$readme = '<p>' . esc_html( 'No valid changlog was found.', 'give' ) . '</p>';
544
+		if ( ! $file) {
545
+			$readme = '<p>'.esc_html('No valid changlog was found.', 'give').'</p>';
546 546
 		} else {
547
-			$readme = file_get_contents( $file );
548
-			$readme = nl2br( esc_html( $readme ) );
549
-			$readme = explode( '== Changelog ==', $readme );
550
-			$readme = end( $readme );
551
-
552
-			$readme = preg_replace( '/`(.*?)`/', '<code>\\1</code>', $readme );
553
-			$readme = preg_replace( '/[\040]\*\*(.*?)\*\*/', ' <strong>\\1</strong>', $readme );
554
-			$readme = preg_replace( '/[\040]\*(.*?)\*/', ' <em>\\1</em>', $readme );
555
-			$readme = preg_replace( '/= (.*?) =/', '<h4>\\1</h4>', $readme );
556
-			$readme = preg_replace( '/\[(.*?)\]\((.*?)\)/', '<a href="\\2">\\1</a>', $readme );
547
+			$readme = file_get_contents($file);
548
+			$readme = nl2br(esc_html($readme));
549
+			$readme = explode('== Changelog ==', $readme);
550
+			$readme = end($readme);
551
+
552
+			$readme = preg_replace('/`(.*?)`/', '<code>\\1</code>', $readme);
553
+			$readme = preg_replace('/[\040]\*\*(.*?)\*\*/', ' <strong>\\1</strong>', $readme);
554
+			$readme = preg_replace('/[\040]\*(.*?)\*/', ' <em>\\1</em>', $readme);
555
+			$readme = preg_replace('/= (.*?) =/', '<h4>\\1</h4>', $readme);
556
+			$readme = preg_replace('/\[(.*?)\]\((.*?)\)/', '<a href="\\2">\\1</a>', $readme);
557 557
 		}
558 558
 
559 559
 		return $readme;
@@ -570,27 +570,27 @@  discard block
 block discarded – undo
570 570
 	public function contributors() {
571 571
 		$contributors = $this->get_contributors();
572 572
 
573
-		if ( empty( $contributors ) ) {
573
+		if (empty($contributors)) {
574 574
 			return '';
575 575
 		}
576 576
 
577 577
 		$contributor_list = '<ul class="wp-people-group">';
578 578
 
579
-		foreach ( $contributors as $contributor ) {
579
+		foreach ($contributors as $contributor) {
580 580
 			$contributor_list .= '<li class="wp-person">';
581
-			$contributor_list .= sprintf( '<a href="%s" title="%s">',
582
-				esc_url( 'https://github.com/' . $contributor->login ),
581
+			$contributor_list .= sprintf('<a href="%s" title="%s">',
582
+				esc_url('https://github.com/'.$contributor->login),
583 583
 				esc_html(
584 584
 					sprintf(
585 585
 						/* translators: %s: github contributor */
586
-						esc_html( 'View %s', 'give' ),
586
+						esc_html('View %s', 'give'),
587 587
 						$contributor->login
588 588
 					)
589 589
 				)
590 590
 			);
591
-			$contributor_list .= sprintf( '<img src="%s" width="64" height="64" class="gravatar" alt="%s" />', esc_url( $contributor->avatar_url ), esc_html( $contributor->login ) );
591
+			$contributor_list .= sprintf('<img src="%s" width="64" height="64" class="gravatar" alt="%s" />', esc_url($contributor->avatar_url), esc_html($contributor->login));
592 592
 			$contributor_list .= '</a>';
593
-			$contributor_list .= sprintf( '<a class="web" href="%s">%s</a>', esc_url( 'https://github.com/' . $contributor->login ), esc_html( $contributor->login ) );
593
+			$contributor_list .= sprintf('<a class="web" href="%s">%s</a>', esc_url('https://github.com/'.$contributor->login), esc_html($contributor->login));
594 594
 			$contributor_list .= '</a>';
595 595
 			$contributor_list .= '</li>';
596 596
 		}
@@ -608,25 +608,25 @@  discard block
 block discarded – undo
608 608
 	 * @return array $contributors List of contributors
609 609
 	 */
610 610
 	public function get_contributors() {
611
-		$contributors = get_transient( 'give_contributors' );
611
+		$contributors = get_transient('give_contributors');
612 612
 
613
-		if ( false !== $contributors ) {
613
+		if (false !== $contributors) {
614 614
 			return $contributors;
615 615
 		}
616 616
 
617
-		$response = wp_remote_get( 'https://api.github.com/repos/WordImpress/Give/contributors', array( 'sslverify' => false ) );
617
+		$response = wp_remote_get('https://api.github.com/repos/WordImpress/Give/contributors', array('sslverify' => false));
618 618
 
619
-		if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
619
+		if (is_wp_error($response) || 200 != wp_remote_retrieve_response_code($response)) {
620 620
 			return array();
621 621
 		}
622 622
 
623
-		$contributors = json_decode( wp_remote_retrieve_body( $response ) );
623
+		$contributors = json_decode(wp_remote_retrieve_body($response));
624 624
 
625
-		if ( ! is_array( $contributors ) ) {
625
+		if ( ! is_array($contributors)) {
626 626
 			return array();
627 627
 		}
628 628
 
629
-		set_transient( 'give_contributors', $contributors, 3600 );
629
+		set_transient('give_contributors', $contributors, 3600);
630 630
 
631 631
 		return $contributors;
632 632
 	}
@@ -645,24 +645,24 @@  discard block
 block discarded – undo
645 645
 
646 646
 
647 647
 		// Bail if no activation redirect
648
-		if ( ! get_transient( '_give_activation_redirect' ) ) {
648
+		if ( ! get_transient('_give_activation_redirect')) {
649 649
 			return;
650 650
 		}
651 651
 
652 652
 		// Delete the redirect transient
653
-		delete_transient( '_give_activation_redirect' );
653
+		delete_transient('_give_activation_redirect');
654 654
 
655 655
 		// Bail if activating from network, or bulk
656
-		if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) {
656
+		if (is_network_admin() || isset($_GET['activate-multi'])) {
657 657
 			return;
658 658
 		}
659 659
 
660
-		$upgrade = get_option( 'give_version_upgraded_from' );
660
+		$upgrade = get_option('give_version_upgraded_from');
661 661
 
662
-		if ( ! $upgrade ) { // First time install
663
-			wp_safe_redirect( admin_url( 'index.php?page=give-about' ) );
662
+		if ( ! $upgrade) { // First time install
663
+			wp_safe_redirect(admin_url('index.php?page=give-about'));
664 664
 			exit;
665
-		} elseif( isset( $give_options['disable_welcome'] ) ) { // Welcome is disabled in settings
665
+		} elseif (isset($give_options['disable_welcome'])) { // Welcome is disabled in settings
666 666
 
667 667
 		} else { // Welcome is NOT disabled in settings
668 668
 			wp_safe_redirect(admin_url('index.php?page=give-about'));
Please login to merge, or discard this patch.
includes/admin/reporting/tools.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
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,80 +22,80 @@  discard block
 block discarded – undo
22 22
  */
23 23
 function give_tools_recount_stats_display() {
24 24
 
25
-	if ( ! current_user_can( 'manage_give_settings' ) ) {
25
+	if ( ! current_user_can('manage_give_settings')) {
26 26
 		return;
27 27
 	}
28 28
 
29
-	do_action( 'give_tools_recount_stats_before' );
29
+	do_action('give_tools_recount_stats_before');
30 30
 	?>
31 31
 	<div id="poststuff">
32 32
 		<div class="postbox">
33 33
 
34
-			<h2 class="hndle ui-sortable-handle"><span><?php esc_html_e( 'Recount Stats', 'give' ); ?></span></h2>
34
+			<h2 class="hndle ui-sortable-handle"><span><?php esc_html_e('Recount Stats', 'give'); ?></span></h2>
35 35
 
36 36
 			<div class="inside recount-stats-controls">
37
-				<p><?php esc_html_e( 'Use these tools to recount stats, delete test transactions, or reset stats.', 'give' ); ?></p>
37
+				<p><?php esc_html_e('Use these tools to recount stats, delete test transactions, or reset stats.', 'give'); ?></p>
38 38
 				<form method="post" id="give-tools-recount-form" class="give-export-form">
39 39
 
40
-					<?php wp_nonce_field( 'give_ajax_export', 'give_ajax_export' ); ?>
40
+					<?php wp_nonce_field('give_ajax_export', 'give_ajax_export'); ?>
41 41
 
42 42
 					<select name="give-export-class" id="recount-stats-type">
43
-						<option value="0" selected="selected" disabled="disabled"><?php esc_html_e( 'Please select an option', 'give' ); ?></option>
44
-						<option data-type="recount-stats" value="Give_Tools_Recount_Income"><?php esc_html_e( 'Recalculate Total Donation Income Amount', 'give' ); ?></option>
45
-						<option data-type="recount-form" value="Give_Tools_Recount_Form_Stats"><?php esc_html_e( 'Recalculate Income Amount and Donation Counts for a Form', 'give' ); ?></option>
46
-						<option data-type="recount-all" value="Give_Tools_Recount_All_Stats"><?php esc_html_e( 'Recalculate Income Amount and Donation Counts for All Forms', 'give' ); ?></option>
47
-						<option data-type="recount-customer-stats" value="Give_Tools_Recount_Customer_Stats"><?php esc_html_e( 'Recalculate Donor Statistics', 'give' ); ?></option>
48
-						<option data-type="delete-test-transactions" value="Give_Tools_Delete_Test_Transactions"><?php esc_html_e( 'Delete Test Transactions', 'give' ); ?></option>
49
-						<option data-type="reset-stats" value="Give_Tools_Reset_Stats"><?php esc_html_e( 'Delete All Data', 'give' ); ?></option>
50
-						<?php do_action( 'give_recount_tool_options' ); ?>
43
+						<option value="0" selected="selected" disabled="disabled"><?php esc_html_e('Please select an option', 'give'); ?></option>
44
+						<option data-type="recount-stats" value="Give_Tools_Recount_Income"><?php esc_html_e('Recalculate Total Donation Income Amount', 'give'); ?></option>
45
+						<option data-type="recount-form" value="Give_Tools_Recount_Form_Stats"><?php esc_html_e('Recalculate Income Amount and Donation Counts for a Form', 'give'); ?></option>
46
+						<option data-type="recount-all" value="Give_Tools_Recount_All_Stats"><?php esc_html_e('Recalculate Income Amount and Donation Counts for All Forms', 'give'); ?></option>
47
+						<option data-type="recount-customer-stats" value="Give_Tools_Recount_Customer_Stats"><?php esc_html_e('Recalculate Donor Statistics', 'give'); ?></option>
48
+						<option data-type="delete-test-transactions" value="Give_Tools_Delete_Test_Transactions"><?php esc_html_e('Delete Test Transactions', 'give'); ?></option>
49
+						<option data-type="reset-stats" value="Give_Tools_Reset_Stats"><?php esc_html_e('Delete All Data', 'give'); ?></option>
50
+						<?php do_action('give_recount_tool_options'); ?>
51 51
 					</select>
52 52
 
53 53
 					<span id="tools-form-dropdown" style="display: none">
54 54
 						<?php
55 55
 						$args = array(
56 56
 							'name'   => 'form_id',
57
-							'number' => - 1,
57
+							'number' => -1,
58 58
 							'chosen' => true,
59 59
 						);
60
-						echo Give()->html->forms_dropdown( $args );
60
+						echo Give()->html->forms_dropdown($args);
61 61
 						?>
62 62
 					</span>
63 63
 
64
-					<input type="submit" id="recount-stats-submit" value="<?php esc_attr_e( 'Submit', 'give' ); ?>" class="button-secondary"/>
64
+					<input type="submit" id="recount-stats-submit" value="<?php esc_attr_e('Submit', 'give'); ?>" class="button-secondary"/>
65 65
 
66 66
 					<br/>
67 67
 
68 68
 					<span class="give-recount-stats-descriptions">
69
-						<span id="recount-stats"><?php esc_html_e( 'Recalculates the overall donation income amount.', 'give' ); ?></span>
69
+						<span id="recount-stats"><?php esc_html_e('Recalculates the overall donation income amount.', 'give'); ?></span>
70 70
 						<span id="recount-form"><?php
71 71
 							printf(
72 72
 								/* translators: %s: form singular label */
73
-								esc_html( 'Recalculates the donation and income stats for a specific %s.', 'give' ),
74
-								give_get_forms_label_singular( true )
73
+								esc_html('Recalculates the donation and income stats for a specific %s.', 'give'),
74
+								give_get_forms_label_singular(true)
75 75
 							);
76 76
 						?></span>
77 77
 						<span id="recount-all"><?php
78 78
 							printf(
79 79
 								/* translators: %s: form plural label */
80
-								esc_html( 'Recalculates the earnings and sales stats for all %s.', 'give' ),
81
-								give_get_forms_label_plural( true )
80
+								esc_html('Recalculates the earnings and sales stats for all %s.', 'give'),
81
+								give_get_forms_label_plural(true)
82 82
 							);
83 83
 						?></span>
84
-						<span id="recount-customer-stats"><?php esc_html_e( 'Recalculates the lifetime value and donation counts for all donors.', 'give' ); ?></span>
85
-						<?php do_action( 'give_recount_tool_descriptions' ); ?>
86
-						<span id="delete-test-transactions"><?php _e( '<strong>Deletes</strong> all TEST payment records, donors, and related log entries.', 'give' ); ?></span>
87
-						<span id="reset-stats"><?php _e( '<strong>Deletes</strong> ALL transaction records, donors, and related log entries regardless of test or live mode.', 'give' ); ?></span>
84
+						<span id="recount-customer-stats"><?php esc_html_e('Recalculates the lifetime value and donation counts for all donors.', 'give'); ?></span>
85
+						<?php do_action('give_recount_tool_descriptions'); ?>
86
+						<span id="delete-test-transactions"><?php _e('<strong>Deletes</strong> all TEST payment records, donors, and related log entries.', 'give'); ?></span>
87
+						<span id="reset-stats"><?php _e('<strong>Deletes</strong> ALL transaction records, donors, and related log entries regardless of test or live mode.', 'give'); ?></span>
88 88
 					</span>
89 89
 
90 90
 					<span class="spinner"></span>
91 91
 
92 92
 				</form>
93
-				<?php do_action( 'give_tools_recount_forms' ); ?>
93
+				<?php do_action('give_tools_recount_forms'); ?>
94 94
 			</div><!-- .inside -->
95 95
 		</div><!-- .postbox -->
96 96
 	</div><!-- #poststuff -->
97 97
 	<?php
98
-	do_action( 'give_tools_recount_stats_after' );
98
+	do_action('give_tools_recount_stats_after');
99 99
 }
100 100
 
101
-add_action( 'give_reports_tab_tools', 'give_tools_recount_stats_display' );
101
+add_action('give_reports_tab_tools', 'give_tools_recount_stats_display');
Please login to merge, or discard this patch.
includes/country-functions.php 1 patch
Spacing   +333 added lines, -333 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
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,9 +23,9 @@  discard block
 block discarded – undo
23 23
  */
24 24
 function give_get_country() {
25 25
 	global $give_options;
26
-	$country = isset( $give_options['base_country'] ) ? $give_options['base_country'] : 'US';
26
+	$country = isset($give_options['base_country']) ? $give_options['base_country'] : 'US';
27 27
 
28
-	return apply_filters( 'give_give_country', $country );
28
+	return apply_filters('give_give_country', $country);
29 29
 }
30 30
 
31 31
 /**
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
  */
37 37
 function give_get_state() {
38 38
 	global $give_options;
39
-	$state = isset( $give_options['base_state'] ) ? $give_options['base_state'] : false;
39
+	$state = isset($give_options['base_state']) ? $give_options['base_state'] : false;
40 40
 
41
-	return apply_filters( 'give_give_state', $state );
41
+	return apply_filters('give_give_state', $state);
42 42
 }
43 43
 
44 44
 /**
@@ -50,14 +50,14 @@  discard block
 block discarded – undo
50 50
  *
51 51
  * @return mixed|void  A list of states for the shop's base country
52 52
  */
53
-function give_get_states( $country = null ) {
53
+function give_get_states($country = null) {
54 54
 	global $give_options;
55 55
 
56
-	if ( empty( $country ) ) {
56
+	if (empty($country)) {
57 57
 		$country = give_get_country();
58 58
 	}
59 59
 
60
-	switch ( $country ) :
60
+	switch ($country) :
61 61
 
62 62
 		case 'US' :
63 63
 			$states = give_get_states_list();
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
 	endswitch;
109 109
 
110
-	return apply_filters( 'give_give_states', $states );
110
+	return apply_filters('give_give_states', $states);
111 111
 }
112 112
 
113 113
 
@@ -120,253 +120,253 @@  discard block
 block discarded – undo
120 120
 function give_get_country_list() {
121 121
 	$countries = array(
122 122
 		''   => '',
123
-		'US' => esc_html__( 'United States', 'give' ),
124
-		'CA' => esc_html__( 'Canada', 'give' ),
125
-		'GB' => esc_html__( 'United Kingdom', 'give' ),
126
-		'AF' => esc_html__( 'Afghanistan', 'give' ),
127
-		'AL' => esc_html__( 'Albania', 'give' ),
128
-		'DZ' => esc_html__( 'Algeria', 'give' ),
129
-		'AS' => esc_html__( 'American Samoa', 'give' ),
130
-		'AD' => esc_html__( 'Andorra', 'give' ),
131
-		'AO' => esc_html__( 'Angola', 'give' ),
132
-		'AI' => esc_html__( 'Anguilla', 'give' ),
133
-		'AQ' => esc_html__( 'Antarctica', 'give' ),
134
-		'AG' => esc_html__( 'Antigua and Barbuda', 'give' ),
135
-		'AR' => esc_html__( 'Argentina', 'give' ),
136
-		'AM' => esc_html__( 'Armenia', 'give' ),
137
-		'AW' => esc_html__( 'Aruba', 'give' ),
138
-		'AU' => esc_html__( 'Australia', 'give' ),
139
-		'AT' => esc_html__( 'Austria', 'give' ),
140
-		'AZ' => esc_html__( 'Azerbaijan', 'give' ),
141
-		'BS' => esc_html__( 'Bahamas', 'give'),
142
-		'BH' => esc_html__( 'Bahrain', 'give' ),
143
-		'BD' => esc_html__( 'Bangladesh', 'give' ),
144
-		'BB' => esc_html__( 'Barbados', 'give' ),
145
-		'BY' => esc_html__( 'Belarus', 'give' ),
146
-		'BE' => esc_html__( 'Belgium', 'give' ),
147
-		'BZ' => esc_html__( 'Belize', 'give' ),
148
-		'BJ' => esc_html__( 'Benin', 'give' ),
149
-		'BM' => esc_html__( 'Bermuda', 'give' ),
150
-		'BT' => esc_html__( 'Bhutan', 'give' ),
151
-		'BO' => esc_html__( 'Bolivia', 'give' ),
152
-		'BA' => esc_html__( 'Bosnia and Herzegovina', 'give' ),
153
-		'BW' => esc_html__( 'Botswana', 'give' ),
154
-		'BV' => esc_html__( 'Bouvet Island', 'give' ),
155
-		'BR' => esc_html__( 'Brazil', 'give' ),
156
-		'IO' => esc_html__( 'British Indian Ocean Territory', 'give' ),
157
-		'BN' => esc_html__( 'Brunei Darrussalam', 'give' ),
158
-		'BG' => esc_html__( 'Bulgaria', 'give' ),
159
-		'BF' => esc_html__( 'Burkina Faso', 'give' ),
160
-		'BI' => esc_html__( 'Burundi', 'give' ),
161
-		'KH' => esc_html__( 'Cambodia', 'give' ),
162
-		'CM' => esc_html__( 'Cameroon', 'give' ),
163
-		'CV' => esc_html__( 'Cape Verde', 'give' ),
164
-		'KY' => esc_html__( 'Cayman Islands', 'give' ),
165
-		'CF' => esc_html__( 'Central African Republic', 'give' ),
166
-		'TD' => esc_html__( 'Chad', 'give' ),
167
-		'CL' => esc_html__( 'Chile', 'give' ),
168
-		'CN' => esc_html__( 'China', 'give' ),
169
-		'CX' => esc_html__( 'Christmas Island', 'give' ),
170
-		'CC' => esc_html__( 'Cocos Islands', 'give' ),
171
-		'CO' => esc_html__( 'Colombia', 'give' ),
172
-		'KM' => esc_html__( 'Comoros', 'give' ),
173
-		'CD' => esc_html__( 'Congo, Democratic People\'s Republic', 'give' ),
174
-		'CG' => esc_html__( 'Congo, Republic of', 'give' ),
175
-		'CK' => esc_html__( 'Cook Islands', 'give' ),
176
-		'CR' => esc_html__( 'Costa Rica', 'give' ),
177
-		'CI' => esc_html__( 'Cote d\'Ivoire', 'give' ),
178
-		'HR' => esc_html__( 'Croatia/Hrvatska', 'give' ),
179
-		'CU' => esc_html__( 'Cuba', 'give' ),
180
-		'CY' => esc_html__( 'Cyprus Island', 'give' ),
181
-		'CZ' => esc_html__( 'Czech Republic', 'give' ),
182
-		'DK' => esc_html__( 'Denmark', 'give' ),
183
-		'DJ' => esc_html__( 'Djibouti', 'give' ),
184
-		'DM' => esc_html__( 'Dominica', 'give' ),
185
-		'DO' => esc_html__( 'Dominican Republic', 'give' ),
186
-		'TP' => esc_html__( 'East Timor', 'give' ),
187
-		'EC' => esc_html__( 'Ecuador', 'give' ),
188
-		'EG' => esc_html__( 'Egypt', 'give' ),
189
-		'GQ' => esc_html__( 'Equatorial Guinea', 'give' ),
190
-		'SV' => esc_html__( 'El Salvador', 'give' ),
191
-		'ER' => esc_html__( 'Eritrea', 'give' ),
192
-		'EE' => esc_html__( 'Estonia', 'give' ),
193
-		'ET' => esc_html__( 'Ethiopia', 'give' ),
194
-		'FK' => esc_html__( 'Falkland Islands', 'give' ),
195
-		'FO' => esc_html__( 'Faroe Islands', 'give' ),
196
-		'FJ' => esc_html__( 'Fiji', 'give' ),
197
-		'FI' => esc_html__( 'Finland', 'give' ),
198
-		'FR' => esc_html__( 'France', 'give' ),
199
-		'GF' => esc_html__( 'French Guiana', 'give' ),
200
-		'PF' => esc_html__( 'French Polynesia', 'give' ),
201
-		'TF' => esc_html__( 'French Southern Territories', 'give' ),
202
-		'GA' => esc_html__( 'Gabon', 'give' ),
203
-		'GM' => esc_html__( 'Gambia', 'give' ),
204
-		'GE' => esc_html__( 'Georgia', 'give' ),
205
-		'DE' => esc_html__( 'Germany', 'give' ),
206
-		'GR' => esc_html__( 'Greece', 'give' ),
207
-		'GH' => esc_html__( 'Ghana', 'give' ),
208
-		'GI' => esc_html__( 'Gibraltar', 'give' ),
209
-		'GL' => esc_html__( 'Greenland', 'give' ),
210
-		'GD' => esc_html__( 'Grenada', 'give' ),
211
-		'GP' => esc_html__( 'Guadeloupe', 'give' ),
212
-		'GU' => esc_html__( 'Guam', 'give' ),
213
-		'GT' => esc_html__( 'Guatemala', 'give' ),
214
-		'GG' => esc_html__( 'Guernsey', 'give' ),
215
-		'GN' => esc_html__( 'Guinea', 'give' ),
216
-		'GW' => esc_html__( 'Guinea-Bissau', 'give' ),
217
-		'GY' => esc_html__( 'Guyana', 'give' ),
218
-		'HT' => esc_html__( 'Haiti', 'give' ),
219
-		'HM' => esc_html__( 'Heard and McDonald Islands', 'give' ),
220
-		'VA' => esc_html__( 'Holy See (City Vatican State)', 'give' ),
221
-		'HN' => esc_html__( 'Honduras', 'give' ),
222
-		'HK' => esc_html__( 'Hong Kong', 'give' ),
223
-		'HU' => esc_html__( 'Hungary', 'give' ),
224
-		'IS' => esc_html__( 'Iceland', 'give' ),
225
-		'IN' => esc_html__( 'India', 'give' ),
226
-		'ID' => esc_html__( 'Indonesia', 'give' ),
227
-		'IR' => esc_html__( 'Iran', 'give' ),
228
-		'IQ' => esc_html__( 'Iraq', 'give' ),
229
-		'IE' => esc_html__( 'Ireland', 'give' ),
230
-		'IM' => esc_html__( 'Isle of Man', 'give' ),
231
-		'IL' => esc_html__( 'Israel', 'give' ),
232
-		'IT' => esc_html__( 'Italy', 'give' ),
233
-		'JM' => esc_html__( 'Jamaica', 'give' ),
234
-		'JP' => esc_html__( 'Japan', 'give' ),
235
-		'JE' => esc_html__( 'Jersey', 'give' ),
236
-		'JO' => esc_html__( 'Jordan', 'give' ),
237
-		'KZ' => esc_html__( 'Kazakhstan', 'give' ),
238
-		'KE' => esc_html__( 'Kenya', 'give' ),
239
-		'KI' => esc_html__( 'Kiribati', 'give' ),
240
-		'KW' => esc_html__( 'Kuwait', 'give' ),
241
-		'KG' => esc_html__( 'Kyrgyzstan', 'give' ),
242
-		'LA' => esc_html__( 'Lao People\'s Democratic Republic', 'give' ),
243
-		'LV' => esc_html__( 'Latvia', 'give' ),
244
-		'LB' => esc_html__( 'Lebanon', 'give' ),
245
-		'LS' => esc_html__( 'Lesotho', 'give' ),
246
-		'LR' => esc_html__( 'Liberia', 'give' ),
247
-		'LY' => esc_html__( 'Libyan Arab Jamahiriya', 'give' ),
248
-		'LI' => esc_html__( 'Liechtenstein', 'give' ),
249
-		'LT' => esc_html__( 'Lithuania', 'give' ),
250
-		'LU' => esc_html__( 'Luxembourg', 'give' ),
251
-		'MO' => esc_html__( 'Macau', 'give' ),
252
-		'MK' => esc_html__( 'Macedonia', 'give' ),
253
-		'MG' => esc_html__( 'Madagascar', 'give' ),
254
-		'MW' => esc_html__( 'Malawi', 'give' ),
255
-		'MY' => esc_html__( 'Malaysia', 'give' ),
256
-		'MV' => esc_html__( 'Maldives', 'give' ),
257
-		'ML' => esc_html__( 'Mali', 'give' ),
258
-		'MT' => esc_html__( 'Malta', 'give' ),
259
-		'MH' => esc_html__( 'Marshall Islands', 'give' ),
260
-		'MQ' => esc_html__( 'Martinique', 'give' ),
261
-		'MR' => esc_html__( 'Mauritania', 'give' ),
262
-		'MU' => esc_html__( 'Mauritius', 'give' ),
263
-		'YT' => esc_html__( 'Mayotte', 'give' ),
264
-		'MX' => esc_html__( 'Mexico', 'give' ),
265
-		'FM' => esc_html__( 'Micronesia', 'give' ),
266
-		'MD' => esc_html__( 'Moldova, Republic of', 'give' ),
267
-		'MC' => esc_html__( 'Monaco', 'give' ),
268
-		'MN' => esc_html__( 'Mongolia', 'give' ),
269
-		'ME' => esc_html__( 'Montenegro', 'give' ),
270
-		'MS' => esc_html__( 'Montserrat', 'give' ),
271
-		'MA' => esc_html__( 'Morocco', 'give' ),
272
-		'MZ' => esc_html__( 'Mozambique', 'give' ),
273
-		'MM' => esc_html__( 'Myanmar', 'give' ),
274
-		'NA' => esc_html__( 'Namibia', 'give' ),
275
-		'NR' => esc_html__( 'Nauru', 'give' ),
276
-		'NP' => esc_html__( 'Nepal', 'give' ),
277
-		'NL' => esc_html__( 'Netherlands', 'give' ),
278
-		'AN' => esc_html__( 'Netherlands Antilles', 'give' ),
279
-		'NC' => esc_html__( 'New Caledonia', 'give' ),
280
-		'NZ' => esc_html__( 'New Zealand', 'give' ),
281
-		'NI' => esc_html__( 'Nicaragua', 'give' ),
282
-		'NE' => esc_html__( 'Niger', 'give' ),
283
-		'NG' => esc_html__( 'Nigeria', 'give' ),
284
-		'NU' => esc_html__( 'Niue', 'give' ),
285
-		'NF' => esc_html__( 'Norfolk Island', 'give' ),
286
-		'KP' => esc_html__( 'North Korea', 'give' ),
287
-		'MP' => esc_html__( 'Northern Mariana Islands', 'give' ),
288
-		'NO' => esc_html__( 'Norway', 'give' ),
289
-		'OM' => esc_html__( 'Oman', 'give' ),
290
-		'PK' => esc_html__( 'Pakistan', 'give' ),
291
-		'PW' => esc_html__( 'Palau', 'give' ),
292
-		'PS' => esc_html__( 'Palestinian Territories', 'give' ),
293
-		'PA' => esc_html__( 'Panama', 'give' ),
294
-		'PG' => esc_html__( 'Papua New Guinea', 'give' ),
295
-		'PY' => esc_html__( 'Paraguay', 'give' ),
296
-		'PE' => esc_html__( 'Peru', 'give' ),
297
-		'PH' => esc_html__( 'Phillipines', 'give' ),
298
-		'PN' => esc_html__( 'Pitcairn Island', 'give' ),
299
-		'PL' => esc_html__( 'Poland', 'give' ),
300
-		'PT' => esc_html__( 'Portugal', 'give' ),
301
-		'PR' => esc_html__( 'Puerto Rico', 'give' ),
302
-		'QA' => esc_html__( 'Qatar', 'give' ),
303
-		'RE' => esc_html__( 'Reunion Island', 'give' ),
304
-		'RO' => esc_html__( 'Romania', 'give' ),
305
-		'RU' => esc_html__( 'Russian Federation', 'give' ),
306
-		'RW' => esc_html__( 'Rwanda', 'give' ),
307
-		'SH' => esc_html__( 'Saint Helena', 'give' ),
308
-		'KN' => esc_html__( 'Saint Kitts and Nevis', 'give' ),
309
-		'LC' => esc_html__( 'Saint Lucia', 'give' ),
310
-		'PM' => esc_html__( 'Saint Pierre and Miquelon', 'give' ),
311
-		'VC' => esc_html__( 'Saint Vincent and the Grenadines', 'give' ),
312
-		'SM' => esc_html__( 'San Marino', 'give' ),
313
-		'ST' => esc_html__( 'Sao Tome and Principe', 'give' ),
314
-		'SA' => esc_html__( 'Saudi Arabia', 'give' ),
315
-		'SN' => esc_html__( 'Senegal', 'give' ),
316
-		'RS' => esc_html__( 'Serbia', 'give' ),
317
-		'SC' => esc_html__( 'Seychelles', 'give' ),
318
-		'SL' => esc_html__( 'Sierra Leone', 'give' ),
319
-		'SG' => esc_html__( 'Singapore', 'give' ),
320
-		'SK' => esc_html__( 'Slovak Republic', 'give' ),
321
-		'SI' => esc_html__( 'Slovenia', 'give' ),
322
-		'SB' => esc_html__( 'Solomon Islands', 'give' ),
323
-		'SO' => esc_html__( 'Somalia', 'give' ),
324
-		'ZA' => esc_html__( 'South Africa', 'give' ),
325
-		'GS' => esc_html__( 'South Georgia', 'give' ),
326
-		'KR' => esc_html__( 'South Korea', 'give' ),
327
-		'ES' => esc_html__( 'Spain', 'give' ),
328
-		'LK' => esc_html__( 'Sri Lanka', 'give' ),
329
-		'SD' => esc_html__( 'Sudan', 'give' ),
330
-		'SR' => esc_html__( 'Suriname', 'give' ),
331
-		'SJ' => esc_html__( 'Svalbard and Jan Mayen Islands', 'give' ),
332
-		'SZ' => esc_html__( 'Swaziland', 'give' ),
333
-		'SE' => esc_html__( 'Sweden', 'give' ),
334
-		'CH' => esc_html__( 'Switzerland', 'give' ),
335
-		'SY' => esc_html__( 'Syrian Arab Republic', 'give' ),
336
-		'TW' => esc_html__( 'Taiwan', 'give' ),
337
-		'TJ' => esc_html__( 'Tajikistan', 'give' ),
338
-		'TZ' => esc_html__( 'Tanzania', 'give' ),
339
-		'TG' => esc_html__( 'Togo', 'give' ),
340
-		'TK' => esc_html__( 'Tokelau', 'give' ),
341
-		'TO' => esc_html__( 'Tonga', 'give' ),
342
-		'TH' => esc_html__( 'Thailand', 'give' ),
343
-		'TT' => esc_html__( 'Trinidad and Tobago', 'give' ),
344
-		'TN' => esc_html__( 'Tunisia', 'give' ),
345
-		'TR' => esc_html__( 'Turkey', 'give' ),
346
-		'TM' => esc_html__( 'Turkmenistan', 'give' ),
347
-		'TC' => esc_html__( 'Turks and Caicos Islands', 'give' ),
348
-		'TV' => esc_html__( 'Tuvalu', 'give' ),
349
-		'UG' => esc_html__( 'Uganda', 'give' ),
350
-		'UA' => esc_html__( 'Ukraine', 'give' ),
351
-		'AE' => esc_html__( 'United Arab Emirates', 'give' ),
352
-		'UY' => esc_html__( 'Uruguay', 'give' ),
353
-		'UM' => esc_html__( 'US Minor Outlying Islands', 'give' ),
354
-		'UZ' => esc_html__( 'Uzbekistan', 'give' ),
355
-		'VU' => esc_html__( 'Vanuatu', 'give' ),
356
-		'VE' => esc_html__( 'Venezuela', 'give' ),
357
-		'VN' => esc_html__( 'Vietnam', 'give' ),
358
-		'VG' => esc_html__( 'Virgin Islands (British)', 'give' ),
359
-		'VI' => esc_html__( 'Virgin Islands (USA)', 'give' ),
360
-		'WF' => esc_html__( 'Wallis and Futuna Islands', 'give' ),
361
-		'EH' => esc_html__( 'Western Sahara', 'give' ),
362
-		'WS' => esc_html__( 'Western Samoa', 'give' ),
363
-		'YE' => esc_html__( 'Yemen', 'give' ),
364
-		'YU' => esc_html__( 'Yugoslavia', 'give' ),
365
-		'ZM' => esc_html__( 'Zambia', 'give' ),
366
-		'ZW' => esc_html__( 'Zimbabwe', 'give' )
123
+		'US' => esc_html__('United States', 'give'),
124
+		'CA' => esc_html__('Canada', 'give'),
125
+		'GB' => esc_html__('United Kingdom', 'give'),
126
+		'AF' => esc_html__('Afghanistan', 'give'),
127
+		'AL' => esc_html__('Albania', 'give'),
128
+		'DZ' => esc_html__('Algeria', 'give'),
129
+		'AS' => esc_html__('American Samoa', 'give'),
130
+		'AD' => esc_html__('Andorra', 'give'),
131
+		'AO' => esc_html__('Angola', 'give'),
132
+		'AI' => esc_html__('Anguilla', 'give'),
133
+		'AQ' => esc_html__('Antarctica', 'give'),
134
+		'AG' => esc_html__('Antigua and Barbuda', 'give'),
135
+		'AR' => esc_html__('Argentina', 'give'),
136
+		'AM' => esc_html__('Armenia', 'give'),
137
+		'AW' => esc_html__('Aruba', 'give'),
138
+		'AU' => esc_html__('Australia', 'give'),
139
+		'AT' => esc_html__('Austria', 'give'),
140
+		'AZ' => esc_html__('Azerbaijan', 'give'),
141
+		'BS' => esc_html__('Bahamas', 'give'),
142
+		'BH' => esc_html__('Bahrain', 'give'),
143
+		'BD' => esc_html__('Bangladesh', 'give'),
144
+		'BB' => esc_html__('Barbados', 'give'),
145
+		'BY' => esc_html__('Belarus', 'give'),
146
+		'BE' => esc_html__('Belgium', 'give'),
147
+		'BZ' => esc_html__('Belize', 'give'),
148
+		'BJ' => esc_html__('Benin', 'give'),
149
+		'BM' => esc_html__('Bermuda', 'give'),
150
+		'BT' => esc_html__('Bhutan', 'give'),
151
+		'BO' => esc_html__('Bolivia', 'give'),
152
+		'BA' => esc_html__('Bosnia and Herzegovina', 'give'),
153
+		'BW' => esc_html__('Botswana', 'give'),
154
+		'BV' => esc_html__('Bouvet Island', 'give'),
155
+		'BR' => esc_html__('Brazil', 'give'),
156
+		'IO' => esc_html__('British Indian Ocean Territory', 'give'),
157
+		'BN' => esc_html__('Brunei Darrussalam', 'give'),
158
+		'BG' => esc_html__('Bulgaria', 'give'),
159
+		'BF' => esc_html__('Burkina Faso', 'give'),
160
+		'BI' => esc_html__('Burundi', 'give'),
161
+		'KH' => esc_html__('Cambodia', 'give'),
162
+		'CM' => esc_html__('Cameroon', 'give'),
163
+		'CV' => esc_html__('Cape Verde', 'give'),
164
+		'KY' => esc_html__('Cayman Islands', 'give'),
165
+		'CF' => esc_html__('Central African Republic', 'give'),
166
+		'TD' => esc_html__('Chad', 'give'),
167
+		'CL' => esc_html__('Chile', 'give'),
168
+		'CN' => esc_html__('China', 'give'),
169
+		'CX' => esc_html__('Christmas Island', 'give'),
170
+		'CC' => esc_html__('Cocos Islands', 'give'),
171
+		'CO' => esc_html__('Colombia', 'give'),
172
+		'KM' => esc_html__('Comoros', 'give'),
173
+		'CD' => esc_html__('Congo, Democratic People\'s Republic', 'give'),
174
+		'CG' => esc_html__('Congo, Republic of', 'give'),
175
+		'CK' => esc_html__('Cook Islands', 'give'),
176
+		'CR' => esc_html__('Costa Rica', 'give'),
177
+		'CI' => esc_html__('Cote d\'Ivoire', 'give'),
178
+		'HR' => esc_html__('Croatia/Hrvatska', 'give'),
179
+		'CU' => esc_html__('Cuba', 'give'),
180
+		'CY' => esc_html__('Cyprus Island', 'give'),
181
+		'CZ' => esc_html__('Czech Republic', 'give'),
182
+		'DK' => esc_html__('Denmark', 'give'),
183
+		'DJ' => esc_html__('Djibouti', 'give'),
184
+		'DM' => esc_html__('Dominica', 'give'),
185
+		'DO' => esc_html__('Dominican Republic', 'give'),
186
+		'TP' => esc_html__('East Timor', 'give'),
187
+		'EC' => esc_html__('Ecuador', 'give'),
188
+		'EG' => esc_html__('Egypt', 'give'),
189
+		'GQ' => esc_html__('Equatorial Guinea', 'give'),
190
+		'SV' => esc_html__('El Salvador', 'give'),
191
+		'ER' => esc_html__('Eritrea', 'give'),
192
+		'EE' => esc_html__('Estonia', 'give'),
193
+		'ET' => esc_html__('Ethiopia', 'give'),
194
+		'FK' => esc_html__('Falkland Islands', 'give'),
195
+		'FO' => esc_html__('Faroe Islands', 'give'),
196
+		'FJ' => esc_html__('Fiji', 'give'),
197
+		'FI' => esc_html__('Finland', 'give'),
198
+		'FR' => esc_html__('France', 'give'),
199
+		'GF' => esc_html__('French Guiana', 'give'),
200
+		'PF' => esc_html__('French Polynesia', 'give'),
201
+		'TF' => esc_html__('French Southern Territories', 'give'),
202
+		'GA' => esc_html__('Gabon', 'give'),
203
+		'GM' => esc_html__('Gambia', 'give'),
204
+		'GE' => esc_html__('Georgia', 'give'),
205
+		'DE' => esc_html__('Germany', 'give'),
206
+		'GR' => esc_html__('Greece', 'give'),
207
+		'GH' => esc_html__('Ghana', 'give'),
208
+		'GI' => esc_html__('Gibraltar', 'give'),
209
+		'GL' => esc_html__('Greenland', 'give'),
210
+		'GD' => esc_html__('Grenada', 'give'),
211
+		'GP' => esc_html__('Guadeloupe', 'give'),
212
+		'GU' => esc_html__('Guam', 'give'),
213
+		'GT' => esc_html__('Guatemala', 'give'),
214
+		'GG' => esc_html__('Guernsey', 'give'),
215
+		'GN' => esc_html__('Guinea', 'give'),
216
+		'GW' => esc_html__('Guinea-Bissau', 'give'),
217
+		'GY' => esc_html__('Guyana', 'give'),
218
+		'HT' => esc_html__('Haiti', 'give'),
219
+		'HM' => esc_html__('Heard and McDonald Islands', 'give'),
220
+		'VA' => esc_html__('Holy See (City Vatican State)', 'give'),
221
+		'HN' => esc_html__('Honduras', 'give'),
222
+		'HK' => esc_html__('Hong Kong', 'give'),
223
+		'HU' => esc_html__('Hungary', 'give'),
224
+		'IS' => esc_html__('Iceland', 'give'),
225
+		'IN' => esc_html__('India', 'give'),
226
+		'ID' => esc_html__('Indonesia', 'give'),
227
+		'IR' => esc_html__('Iran', 'give'),
228
+		'IQ' => esc_html__('Iraq', 'give'),
229
+		'IE' => esc_html__('Ireland', 'give'),
230
+		'IM' => esc_html__('Isle of Man', 'give'),
231
+		'IL' => esc_html__('Israel', 'give'),
232
+		'IT' => esc_html__('Italy', 'give'),
233
+		'JM' => esc_html__('Jamaica', 'give'),
234
+		'JP' => esc_html__('Japan', 'give'),
235
+		'JE' => esc_html__('Jersey', 'give'),
236
+		'JO' => esc_html__('Jordan', 'give'),
237
+		'KZ' => esc_html__('Kazakhstan', 'give'),
238
+		'KE' => esc_html__('Kenya', 'give'),
239
+		'KI' => esc_html__('Kiribati', 'give'),
240
+		'KW' => esc_html__('Kuwait', 'give'),
241
+		'KG' => esc_html__('Kyrgyzstan', 'give'),
242
+		'LA' => esc_html__('Lao People\'s Democratic Republic', 'give'),
243
+		'LV' => esc_html__('Latvia', 'give'),
244
+		'LB' => esc_html__('Lebanon', 'give'),
245
+		'LS' => esc_html__('Lesotho', 'give'),
246
+		'LR' => esc_html__('Liberia', 'give'),
247
+		'LY' => esc_html__('Libyan Arab Jamahiriya', 'give'),
248
+		'LI' => esc_html__('Liechtenstein', 'give'),
249
+		'LT' => esc_html__('Lithuania', 'give'),
250
+		'LU' => esc_html__('Luxembourg', 'give'),
251
+		'MO' => esc_html__('Macau', 'give'),
252
+		'MK' => esc_html__('Macedonia', 'give'),
253
+		'MG' => esc_html__('Madagascar', 'give'),
254
+		'MW' => esc_html__('Malawi', 'give'),
255
+		'MY' => esc_html__('Malaysia', 'give'),
256
+		'MV' => esc_html__('Maldives', 'give'),
257
+		'ML' => esc_html__('Mali', 'give'),
258
+		'MT' => esc_html__('Malta', 'give'),
259
+		'MH' => esc_html__('Marshall Islands', 'give'),
260
+		'MQ' => esc_html__('Martinique', 'give'),
261
+		'MR' => esc_html__('Mauritania', 'give'),
262
+		'MU' => esc_html__('Mauritius', 'give'),
263
+		'YT' => esc_html__('Mayotte', 'give'),
264
+		'MX' => esc_html__('Mexico', 'give'),
265
+		'FM' => esc_html__('Micronesia', 'give'),
266
+		'MD' => esc_html__('Moldova, Republic of', 'give'),
267
+		'MC' => esc_html__('Monaco', 'give'),
268
+		'MN' => esc_html__('Mongolia', 'give'),
269
+		'ME' => esc_html__('Montenegro', 'give'),
270
+		'MS' => esc_html__('Montserrat', 'give'),
271
+		'MA' => esc_html__('Morocco', 'give'),
272
+		'MZ' => esc_html__('Mozambique', 'give'),
273
+		'MM' => esc_html__('Myanmar', 'give'),
274
+		'NA' => esc_html__('Namibia', 'give'),
275
+		'NR' => esc_html__('Nauru', 'give'),
276
+		'NP' => esc_html__('Nepal', 'give'),
277
+		'NL' => esc_html__('Netherlands', 'give'),
278
+		'AN' => esc_html__('Netherlands Antilles', 'give'),
279
+		'NC' => esc_html__('New Caledonia', 'give'),
280
+		'NZ' => esc_html__('New Zealand', 'give'),
281
+		'NI' => esc_html__('Nicaragua', 'give'),
282
+		'NE' => esc_html__('Niger', 'give'),
283
+		'NG' => esc_html__('Nigeria', 'give'),
284
+		'NU' => esc_html__('Niue', 'give'),
285
+		'NF' => esc_html__('Norfolk Island', 'give'),
286
+		'KP' => esc_html__('North Korea', 'give'),
287
+		'MP' => esc_html__('Northern Mariana Islands', 'give'),
288
+		'NO' => esc_html__('Norway', 'give'),
289
+		'OM' => esc_html__('Oman', 'give'),
290
+		'PK' => esc_html__('Pakistan', 'give'),
291
+		'PW' => esc_html__('Palau', 'give'),
292
+		'PS' => esc_html__('Palestinian Territories', 'give'),
293
+		'PA' => esc_html__('Panama', 'give'),
294
+		'PG' => esc_html__('Papua New Guinea', 'give'),
295
+		'PY' => esc_html__('Paraguay', 'give'),
296
+		'PE' => esc_html__('Peru', 'give'),
297
+		'PH' => esc_html__('Phillipines', 'give'),
298
+		'PN' => esc_html__('Pitcairn Island', 'give'),
299
+		'PL' => esc_html__('Poland', 'give'),
300
+		'PT' => esc_html__('Portugal', 'give'),
301
+		'PR' => esc_html__('Puerto Rico', 'give'),
302
+		'QA' => esc_html__('Qatar', 'give'),
303
+		'RE' => esc_html__('Reunion Island', 'give'),
304
+		'RO' => esc_html__('Romania', 'give'),
305
+		'RU' => esc_html__('Russian Federation', 'give'),
306
+		'RW' => esc_html__('Rwanda', 'give'),
307
+		'SH' => esc_html__('Saint Helena', 'give'),
308
+		'KN' => esc_html__('Saint Kitts and Nevis', 'give'),
309
+		'LC' => esc_html__('Saint Lucia', 'give'),
310
+		'PM' => esc_html__('Saint Pierre and Miquelon', 'give'),
311
+		'VC' => esc_html__('Saint Vincent and the Grenadines', 'give'),
312
+		'SM' => esc_html__('San Marino', 'give'),
313
+		'ST' => esc_html__('Sao Tome and Principe', 'give'),
314
+		'SA' => esc_html__('Saudi Arabia', 'give'),
315
+		'SN' => esc_html__('Senegal', 'give'),
316
+		'RS' => esc_html__('Serbia', 'give'),
317
+		'SC' => esc_html__('Seychelles', 'give'),
318
+		'SL' => esc_html__('Sierra Leone', 'give'),
319
+		'SG' => esc_html__('Singapore', 'give'),
320
+		'SK' => esc_html__('Slovak Republic', 'give'),
321
+		'SI' => esc_html__('Slovenia', 'give'),
322
+		'SB' => esc_html__('Solomon Islands', 'give'),
323
+		'SO' => esc_html__('Somalia', 'give'),
324
+		'ZA' => esc_html__('South Africa', 'give'),
325
+		'GS' => esc_html__('South Georgia', 'give'),
326
+		'KR' => esc_html__('South Korea', 'give'),
327
+		'ES' => esc_html__('Spain', 'give'),
328
+		'LK' => esc_html__('Sri Lanka', 'give'),
329
+		'SD' => esc_html__('Sudan', 'give'),
330
+		'SR' => esc_html__('Suriname', 'give'),
331
+		'SJ' => esc_html__('Svalbard and Jan Mayen Islands', 'give'),
332
+		'SZ' => esc_html__('Swaziland', 'give'),
333
+		'SE' => esc_html__('Sweden', 'give'),
334
+		'CH' => esc_html__('Switzerland', 'give'),
335
+		'SY' => esc_html__('Syrian Arab Republic', 'give'),
336
+		'TW' => esc_html__('Taiwan', 'give'),
337
+		'TJ' => esc_html__('Tajikistan', 'give'),
338
+		'TZ' => esc_html__('Tanzania', 'give'),
339
+		'TG' => esc_html__('Togo', 'give'),
340
+		'TK' => esc_html__('Tokelau', 'give'),
341
+		'TO' => esc_html__('Tonga', 'give'),
342
+		'TH' => esc_html__('Thailand', 'give'),
343
+		'TT' => esc_html__('Trinidad and Tobago', 'give'),
344
+		'TN' => esc_html__('Tunisia', 'give'),
345
+		'TR' => esc_html__('Turkey', 'give'),
346
+		'TM' => esc_html__('Turkmenistan', 'give'),
347
+		'TC' => esc_html__('Turks and Caicos Islands', 'give'),
348
+		'TV' => esc_html__('Tuvalu', 'give'),
349
+		'UG' => esc_html__('Uganda', 'give'),
350
+		'UA' => esc_html__('Ukraine', 'give'),
351
+		'AE' => esc_html__('United Arab Emirates', 'give'),
352
+		'UY' => esc_html__('Uruguay', 'give'),
353
+		'UM' => esc_html__('US Minor Outlying Islands', 'give'),
354
+		'UZ' => esc_html__('Uzbekistan', 'give'),
355
+		'VU' => esc_html__('Vanuatu', 'give'),
356
+		'VE' => esc_html__('Venezuela', 'give'),
357
+		'VN' => esc_html__('Vietnam', 'give'),
358
+		'VG' => esc_html__('Virgin Islands (British)', 'give'),
359
+		'VI' => esc_html__('Virgin Islands (USA)', 'give'),
360
+		'WF' => esc_html__('Wallis and Futuna Islands', 'give'),
361
+		'EH' => esc_html__('Western Sahara', 'give'),
362
+		'WS' => esc_html__('Western Samoa', 'give'),
363
+		'YE' => esc_html__('Yemen', 'give'),
364
+		'YU' => esc_html__('Yugoslavia', 'give'),
365
+		'ZM' => esc_html__('Zambia', 'give'),
366
+		'ZW' => esc_html__('Zimbabwe', 'give')
367 367
 	);
368 368
 
369
-	return apply_filters( 'give_countries', $countries );
369
+	return apply_filters('give_countries', $countries);
370 370
 }
371 371
 
372 372
 /**
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
 		'AP' => 'Armed Forces - Pacific'
448 448
 	);
449 449
 
450
-	return apply_filters( 'give_us_states', $states );
450
+	return apply_filters('give_us_states', $states);
451 451
 }
452 452
 
453 453
 /**
@@ -460,22 +460,22 @@  discard block
 block discarded – undo
460 460
 function give_get_provinces_list() {
461 461
 	$provinces = array(
462 462
 		''   => '',
463
-		'AB' => esc_html__('Alberta', 'give' ),
464
-		'BC' => esc_html__('British Columbia', 'give' ),
465
-		'MB' => esc_html__('Manitoba', 'give' ),
466
-		'NB' => esc_html__('New Brunswick', 'give' ),
467
-		'NL' => esc_html__('Newfoundland and Labrador', 'give' ),
468
-		'NS' => esc_html__('Nova Scotia', 'give' ),
469
-		'NT' => esc_html__('Northwest Territories', 'give' ),
470
-		'NU' => esc_html__('Nunavut', 'give' ),
471
-		'ON' => esc_html__('Ontario', 'give' ),
472
-		'PE' => esc_html__('Prince Edward Island', 'give' ),
473
-		'QC' => esc_html__('Quebec', 'give' ),
474
-		'SK' => esc_html__('Saskatchewan', 'give' ),
475
-		'YT' => esc_html__('Yukon', 'give' )
463
+		'AB' => esc_html__('Alberta', 'give'),
464
+		'BC' => esc_html__('British Columbia', 'give'),
465
+		'MB' => esc_html__('Manitoba', 'give'),
466
+		'NB' => esc_html__('New Brunswick', 'give'),
467
+		'NL' => esc_html__('Newfoundland and Labrador', 'give'),
468
+		'NS' => esc_html__('Nova Scotia', 'give'),
469
+		'NT' => esc_html__('Northwest Territories', 'give'),
470
+		'NU' => esc_html__('Nunavut', 'give'),
471
+		'ON' => esc_html__('Ontario', 'give'),
472
+		'PE' => esc_html__('Prince Edward Island', 'give'),
473
+		'QC' => esc_html__('Quebec', 'give'),
474
+		'SK' => esc_html__('Saskatchewan', 'give'),
475
+		'YT' => esc_html__('Yukon', 'give')
476 476
 	);
477 477
 
478
-	return apply_filters( 'give_canada_provinces', $provinces );
478
+	return apply_filters('give_canada_provinces', $provinces);
479 479
 }
480 480
 
481 481
 /**
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
 		'WA'  => 'Western Australia'
498 498
 	);
499 499
 
500
-	return apply_filters( 'give_australian_states', $states );
500
+	return apply_filters('give_australian_states', $states);
501 501
 }
502 502
 
503 503
 /**
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
 		'TO' => 'Tocantins'
539 539
 	);
540 540
 
541
-	return apply_filters( 'give_brazil_states', $states );
541
+	return apply_filters('give_brazil_states', $states);
542 542
 }
543 543
 
544 544
 /**
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
 		'NEW TERRITORIES' => 'New Territories'
556 556
 	);
557 557
 
558
-	return apply_filters( 'give_hong_kong_states', $states );
558
+	return apply_filters('give_hong_kong_states', $states);
559 559
 }
560 560
 
561 561
 /**
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
 		'ZA' => 'Zala'
590 590
 	);
591 591
 
592
-	return apply_filters( 'give_hungary_states', $states );
592
+	return apply_filters('give_hungary_states', $states);
593 593
 }
594 594
 
595 595
 /**
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
 		'CN32' => 'Xinjiang / &#26032;&#30086;'
636 636
 	);
637 637
 
638
-	return apply_filters( 'give_chinese_states', $states );
638
+	return apply_filters('give_chinese_states', $states);
639 639
 }
640 640
 
641 641
 /**
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
 		'WC' => 'West Coast'
665 665
 	);
666 666
 
667
-	return apply_filters( 'give_new_zealand_states', $states );
667
+	return apply_filters('give_new_zealand_states', $states);
668 668
 }
669 669
 
670 670
 /**
@@ -712,7 +712,7 @@  discard block
 block discarded – undo
712 712
 		'PB' => 'Papua Barat'
713 713
 	);
714 714
 
715
-	return apply_filters( 'give_indonesia_states', $states );
715
+	return apply_filters('give_indonesia_states', $states);
716 716
 }
717 717
 
718 718
 /**
@@ -762,7 +762,7 @@  discard block
 block discarded – undo
762 762
 		'PY' => 'Pondicherry (Puducherry)'
763 763
 	);
764 764
 
765
-	return apply_filters( 'give_indian_states', $states );
765
+	return apply_filters('give_indian_states', $states);
766 766
 }
767 767
 
768 768
 /**
@@ -792,7 +792,7 @@  discard block
 block discarded – undo
792 792
 		'PJY' => 'W.P. Putrajaya'
793 793
 	);
794 794
 
795
-	return apply_filters( 'give_malaysian_states', $states );
795
+	return apply_filters('give_malaysian_states', $states);
796 796
 }
797 797
 
798 798
 /**
@@ -815,7 +815,7 @@  discard block
 block discarded – undo
815 815
 		'WC'  => 'Western Cape'
816 816
 	);
817 817
 
818
-	return apply_filters( 'give_south_african_states', $states );
818
+	return apply_filters('give_south_african_states', $states);
819 819
 }
820 820
 
821 821
 /**
@@ -906,7 +906,7 @@  discard block
 block discarded – undo
906 906
 		'TH-35' => 'Yasothon (&#3618;&#3650;&#3626;&#3608;&#3619;)'
907 907
 	);
908 908
 
909
-	return apply_filters( 'give_thailand_states', $states );
909
+	return apply_filters('give_thailand_states', $states);
910 910
 }
911 911
 
912 912
 /**
@@ -918,59 +918,59 @@  discard block
 block discarded – undo
918 918
 function give_get_spain_states_list() {
919 919
 	$states = array(
920 920
 		''   => '',
921
-		'C'  => esc_html__( 'A Coru&ntilde;a', 'give' ),
922
-		'VI' => esc_html__( 'Araba', 'give' ),
923
-		'AB' => esc_html__( 'Albacete', 'give' ),
924
-		'A'  => esc_html__( 'Alicante', 'give' ),
925
-		'AL' => esc_html__( 'Almer&iacute;a', 'give' ),
926
-		'O'  => esc_html__( 'Asturias', 'give' ),
927
-		'AV' => esc_html__( '&Aacute;vila', 'give' ),
928
-		'BA' => esc_html__( 'Badajoz', 'give' ),
929
-		'PM' => esc_html__( 'Baleares', 'give' ),
930
-		'B'  => esc_html__( 'Barcelona', 'give' ),
931
-		'BU' => esc_html__( 'Burgos', 'give' ),
932
-		'CC' => esc_html__( 'C&aacute;ceres', 'give' ),
933
-		'CA' => esc_html__( 'C&aacute;diz', 'give' ),
934
-		'S'  => esc_html__( 'Cantabria', 'give' ),
935
-		'CS' => esc_html__( 'Castell&oacute;n', 'give' ),
936
-		'CE' => esc_html__( 'Ceuta', 'give' ),
937
-		'CR' => esc_html__( 'Ciudad Real', 'give' ),
938
-		'CO' => esc_html__( 'C&oacute;rdoba', 'give' ),
939
-		'CU' => esc_html__( 'Cuenca', 'give' ),
940
-		'GI' => esc_html__( 'Girona', 'give' ),
941
-		'GR' => esc_html__( 'Granada', 'give' ),
942
-		'GU' => esc_html__( 'Guadalajara', 'give' ),
943
-		'SS' => esc_html__( 'Gipuzkoa', 'give' ),
944
-		'H'  => esc_html__( 'Huelva', 'give' ),
945
-		'HU' => esc_html__( 'Huesca', 'give' ),
946
-		'J'  => esc_html__( 'Ja&eacute;n', 'give' ),
947
-		'LO' => esc_html__( 'La Rioja', 'give' ),
948
-		'GC' => esc_html__( 'Las Palmas', 'give' ),
949
-		'LE' => esc_html__( 'Le&oacute;n', 'give' ),
950
-		'L'  => esc_html__( 'Lleida', 'give' ),
951
-		'LU' => esc_html__( 'Lugo', 'give' ),
952
-		'M'  => esc_html__( 'Madrid', 'give' ),
953
-		'MA' => esc_html__( 'M&aacute;laga', 'give' ),
954
-		'ML' => esc_html__( 'Melilla', 'give' ),
955
-		'MU' => esc_html__( 'Murcia', 'give' ),
956
-		'NA' => esc_html__( 'Navarra', 'give' ),
957
-		'OR' => esc_html__( 'Ourense', 'give' ),
958
-		'P'  => esc_html__( 'Palencia', 'give' ),
959
-		'PO' => esc_html__( 'Pontevedra', 'give' ),
960
-		'SA' => esc_html__( 'Salamanca', 'give' ),
961
-		'TF' => esc_html__( 'Santa Cruz de Tenerife', 'give' ),
962
-		'SG' => esc_html__( 'Segovia', 'give' ),
963
-		'SE' => esc_html__( 'Sevilla', 'give' ),
964
-		'SO' => esc_html__( 'Soria', 'give' ),
965
-		'T'  => esc_html__( 'Tarragona', 'give' ),
966
-		'TE' => esc_html__( 'Teruel', 'give' ),
967
-		'TO' => esc_html__( 'Toledo', 'give' ),
968
-		'V'  => esc_html__( 'Valencia', 'give' ),
969
-		'VA' => esc_html__( 'Valladolid', 'give' ),
970
-		'BI' => esc_html__( 'Bizkaia', 'give' ),
971
-		'ZA' => esc_html__( 'Zamora', 'give' ),
972
-		'Z'  => esc_html__( 'Zaragoza', 'give' )
921
+		'C'  => esc_html__('A Coru&ntilde;a', 'give'),
922
+		'VI' => esc_html__('Araba', 'give'),
923
+		'AB' => esc_html__('Albacete', 'give'),
924
+		'A'  => esc_html__('Alicante', 'give'),
925
+		'AL' => esc_html__('Almer&iacute;a', 'give'),
926
+		'O'  => esc_html__('Asturias', 'give'),
927
+		'AV' => esc_html__('&Aacute;vila', 'give'),
928
+		'BA' => esc_html__('Badajoz', 'give'),
929
+		'PM' => esc_html__('Baleares', 'give'),
930
+		'B'  => esc_html__('Barcelona', 'give'),
931
+		'BU' => esc_html__('Burgos', 'give'),
932
+		'CC' => esc_html__('C&aacute;ceres', 'give'),
933
+		'CA' => esc_html__('C&aacute;diz', 'give'),
934
+		'S'  => esc_html__('Cantabria', 'give'),
935
+		'CS' => esc_html__('Castell&oacute;n', 'give'),
936
+		'CE' => esc_html__('Ceuta', 'give'),
937
+		'CR' => esc_html__('Ciudad Real', 'give'),
938
+		'CO' => esc_html__('C&oacute;rdoba', 'give'),
939
+		'CU' => esc_html__('Cuenca', 'give'),
940
+		'GI' => esc_html__('Girona', 'give'),
941
+		'GR' => esc_html__('Granada', 'give'),
942
+		'GU' => esc_html__('Guadalajara', 'give'),
943
+		'SS' => esc_html__('Gipuzkoa', 'give'),
944
+		'H'  => esc_html__('Huelva', 'give'),
945
+		'HU' => esc_html__('Huesca', 'give'),
946
+		'J'  => esc_html__('Ja&eacute;n', 'give'),
947
+		'LO' => esc_html__('La Rioja', 'give'),
948
+		'GC' => esc_html__('Las Palmas', 'give'),
949
+		'LE' => esc_html__('Le&oacute;n', 'give'),
950
+		'L'  => esc_html__('Lleida', 'give'),
951
+		'LU' => esc_html__('Lugo', 'give'),
952
+		'M'  => esc_html__('Madrid', 'give'),
953
+		'MA' => esc_html__('M&aacute;laga', 'give'),
954
+		'ML' => esc_html__('Melilla', 'give'),
955
+		'MU' => esc_html__('Murcia', 'give'),
956
+		'NA' => esc_html__('Navarra', 'give'),
957
+		'OR' => esc_html__('Ourense', 'give'),
958
+		'P'  => esc_html__('Palencia', 'give'),
959
+		'PO' => esc_html__('Pontevedra', 'give'),
960
+		'SA' => esc_html__('Salamanca', 'give'),
961
+		'TF' => esc_html__('Santa Cruz de Tenerife', 'give'),
962
+		'SG' => esc_html__('Segovia', 'give'),
963
+		'SE' => esc_html__('Sevilla', 'give'),
964
+		'SO' => esc_html__('Soria', 'give'),
965
+		'T'  => esc_html__('Tarragona', 'give'),
966
+		'TE' => esc_html__('Teruel', 'give'),
967
+		'TO' => esc_html__('Toledo', 'give'),
968
+		'V'  => esc_html__('Valencia', 'give'),
969
+		'VA' => esc_html__('Valladolid', 'give'),
970
+		'BI' => esc_html__('Bizkaia', 'give'),
971
+		'ZA' => esc_html__('Zamora', 'give'),
972
+		'Z'  => esc_html__('Zaragoza', 'give')
973 973
 	);
974 974
 
975
-	return apply_filters( 'give_spain_states', $states );
975
+	return apply_filters('give_spain_states', $states);
976 976
 }
Please login to merge, or discard this patch.