Completed
Pull Request — master (#782)
by
unknown
20:41
created
includes/class-give-html-elements.php 1 patch
Spacing   +128 added lines, -128 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
  */
13 13
 
14 14
 // Exit if accessed directly
15
-if ( ! defined( 'ABSPATH' ) ) {
15
+if ( ! defined('ABSPATH')) {
16 16
 	exit;
17 17
 }
18 18
 
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	 *
34 34
 	 * @return string $output Give forms dropdown
35 35
 	 */
36
-	public function forms_dropdown( $args = array() ) {
36
+	public function forms_dropdown($args = array()) {
37 37
 
38 38
 		$defaults = array(
39 39
 			'name'        => 'forms',
@@ -44,47 +44,47 @@  discard block
 block discarded – undo
44 44
 			'chosen'      => false,
45 45
 			'number'      => 30,
46 46
 			/* translators: %s: form singular label */
47
-			'placeholder' => sprintf( esc_attr__( 'Select a %s', 'give' ), give_get_forms_label_singular() )
47
+			'placeholder' => sprintf(esc_attr__('Select a %s', 'give'), give_get_forms_label_singular())
48 48
 		);
49 49
 
50
-		$args = wp_parse_args( $args, $defaults );
50
+		$args = wp_parse_args($args, $defaults);
51 51
 
52
-		$forms = get_posts( array(
52
+		$forms = get_posts(array(
53 53
 			'post_type'      => 'give_forms',
54 54
 			'orderby'        => 'title',
55 55
 			'order'          => 'ASC',
56 56
 			'posts_per_page' => $args['number']
57
-		) );
57
+		));
58 58
 
59 59
 		$options = array();
60 60
 
61
-		if ( $forms ) {
61
+		if ($forms) {
62 62
 			$options[0] = sprintf(
63 63
 				/* translators: %s: form singular label */
64
-				esc_html__( 'Select a %s', 'give' ),
64
+				esc_html__('Select a %s', 'give'),
65 65
 				give_get_forms_label_singular()
66 66
 			);
67
-			foreach ( $forms as $form ) {
68
-				$options[ absint( $form->ID ) ] = esc_html__( $form->post_title );
67
+			foreach ($forms as $form) {
68
+				$options[absint($form->ID)] = esc_html__($form->post_title);
69 69
 			}
70 70
 		} else {
71
-			$options[0] = esc_html__( 'No Give Forms Found', 'give' );
71
+			$options[0] = esc_html__('No Give Forms Found', 'give');
72 72
 		}
73 73
 
74 74
 		// This ensures that any selected forms are included in the drop down
75
-		if ( is_array( $args['selected'] ) ) {
76
-			foreach ( $args['selected'] as $item ) {
77
-				if ( ! in_array( $item, $options ) ) {
78
-					$options[ $item ] = get_the_title( $item );
75
+		if (is_array($args['selected'])) {
76
+			foreach ($args['selected'] as $item) {
77
+				if ( ! in_array($item, $options)) {
78
+					$options[$item] = get_the_title($item);
79 79
 				}
80 80
 			}
81
-		} elseif ( is_numeric( $args['selected'] ) && $args['selected'] !== 0 ) {
82
-			if ( ! in_array( $args['selected'], $options ) ) {
83
-				$options[ $args['selected'] ] = get_the_title( $args['selected'] );
81
+		} elseif (is_numeric($args['selected']) && $args['selected'] !== 0) {
82
+			if ( ! in_array($args['selected'], $options)) {
83
+				$options[$args['selected']] = get_the_title($args['selected']);
84 84
 			}
85 85
 		}
86 86
 
87
-		$output = $this->select( array(
87
+		$output = $this->select(array(
88 88
 			'name'             => $args['name'],
89 89
 			'selected'         => $args['selected'],
90 90
 			'id'               => $args['id'],
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 			'placeholder'      => $args['placeholder'],
96 96
 			'show_option_all'  => false,
97 97
 			'show_option_none' => false
98
-		) );
98
+		));
99 99
 
100 100
 		return $output;
101 101
 	}
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 	 *
111 111
 	 * @return string $output Donor dropdown
112 112
 	 */
113
-	public function donor_dropdown( $args = array() ) {
113
+	public function donor_dropdown($args = array()) {
114 114
 
115 115
 		$defaults = array(
116 116
 			'name'        => 'customers',
@@ -119,38 +119,38 @@  discard block
 block discarded – undo
119 119
 			'multiple'    => false,
120 120
 			'selected'    => 0,
121 121
 			'chosen'      => true,
122
-			'placeholder' => esc_attr__( 'Select a Donor', 'give' ),
122
+			'placeholder' => esc_attr__('Select a Donor', 'give'),
123 123
 			'number'      => 30
124 124
 		);
125 125
 
126
-		$args = wp_parse_args( $args, $defaults );
126
+		$args = wp_parse_args($args, $defaults);
127 127
 
128
-		$customers = Give()->customers->get_customers( array(
128
+		$customers = Give()->customers->get_customers(array(
129 129
 			'number' => $args['number']
130
-		) );
130
+		));
131 131
 
132 132
 		$options = array();
133 133
 
134
-		if ( $customers ) {
135
-			$options[0] = esc_html__( 'No donor attached', 'give' );
136
-			foreach ( $customers as $customer ) {
137
-				$options[ absint( $customer->id ) ] = esc_html__( $customer->name . ' (' . $customer->email . ')' );
134
+		if ($customers) {
135
+			$options[0] = esc_html__('No donor attached', 'give');
136
+			foreach ($customers as $customer) {
137
+				$options[absint($customer->id)] = esc_html__($customer->name.' ('.$customer->email.')');
138 138
 			}
139 139
 		} else {
140
-			$options[0] = esc_html__( 'No donors found', 'give' );
140
+			$options[0] = esc_html__('No donors found', 'give');
141 141
 		}
142 142
 
143
-		if ( ! empty( $args['selected'] ) ) {
143
+		if ( ! empty($args['selected'])) {
144 144
 
145 145
 			// If a selected customer has been specified, we need to ensure it's in the initial list of customers displayed
146 146
 
147
-			if ( ! array_key_exists( $args['selected'], $options ) ) {
147
+			if ( ! array_key_exists($args['selected'], $options)) {
148 148
 
149
-				$customer = new Give_Customer( $args['selected'] );
149
+				$customer = new Give_Customer($args['selected']);
150 150
 
151
-				if ( $customer ) {
151
+				if ($customer) {
152 152
 
153
-					$options[ absint( $args['selected'] ) ] = esc_html__( $customer->name . ' (' . $customer->email . ')' );
153
+					$options[absint($args['selected'])] = esc_html__($customer->name.' ('.$customer->email.')');
154 154
 
155 155
 				}
156 156
 
@@ -158,17 +158,17 @@  discard block
 block discarded – undo
158 158
 
159 159
 		}
160 160
 
161
-		$output = $this->select( array(
161
+		$output = $this->select(array(
162 162
 			'name'             => $args['name'],
163 163
 			'selected'         => $args['selected'],
164 164
 			'id'               => $args['id'],
165
-			'class'            => $args['class'] . ' give-customer-select',
165
+			'class'            => $args['class'].' give-customer-select',
166 166
 			'options'          => $options,
167 167
 			'multiple'         => $args['multiple'],
168 168
 			'chosen'           => $args['chosen'],
169 169
 			'show_option_all'  => false,
170 170
 			'show_option_none' => false
171
-		) );
171
+		));
172 172
 
173 173
 		return $output;
174 174
 	}
@@ -185,21 +185,21 @@  discard block
 block discarded – undo
185 185
 	 *
186 186
 	 * @return string $output Category dropdown
187 187
 	 */
188
-	public function category_dropdown( $name = 'give_forms_categories', $selected = 0 ) {
189
-		$categories = get_terms( 'give_forms_category', apply_filters( 'give_forms_category_dropdown', array() ) );
188
+	public function category_dropdown($name = 'give_forms_categories', $selected = 0) {
189
+		$categories = get_terms('give_forms_category', apply_filters('give_forms_category_dropdown', array()));
190 190
 		$options    = array();
191 191
 
192
-		foreach ( $categories as $category ) {
193
-			$options[ absint( $category->term_id ) ] = esc_html__( $category->name );
192
+		foreach ($categories as $category) {
193
+			$options[absint($category->term_id)] = esc_html__($category->name);
194 194
 		}
195 195
 
196
-		$output = $this->select( array(
196
+		$output = $this->select(array(
197 197
 			'name'             => $name,
198 198
 			'selected'         => $selected,
199 199
 			'options'          => $options,
200
-			'show_option_all'  => esc_html__( 'All Categories', 'give' ),
200
+			'show_option_all'  => esc_html__('All Categories', 'give'),
201 201
 			'show_option_none' => false
202
-		) );
202
+		));
203 203
 
204 204
 		return $output;
205 205
 	}
@@ -217,25 +217,25 @@  discard block
 block discarded – undo
217 217
 	 *
218 218
 	 * @return string $output Year dropdown
219 219
 	 */
220
-	public function year_dropdown( $name = 'year', $selected = 0, $years_before = 5, $years_after = 0 ) {
221
-		$current    = date( 'Y' );
222
-		$start_year = $current - absint( $years_before );
223
-		$end_year   = $current + absint( $years_after );
224
-		$selected   = empty( $selected ) ? date( 'Y' ) : $selected;
220
+	public function year_dropdown($name = 'year', $selected = 0, $years_before = 5, $years_after = 0) {
221
+		$current    = date('Y');
222
+		$start_year = $current - absint($years_before);
223
+		$end_year   = $current + absint($years_after);
224
+		$selected   = empty($selected) ? date('Y') : $selected;
225 225
 		$options    = array();
226 226
 
227
-		while ( $start_year <= $end_year ) {
228
-			$options[ absint( $start_year ) ] = $start_year;
229
-			$start_year ++;
227
+		while ($start_year <= $end_year) {
228
+			$options[absint($start_year)] = $start_year;
229
+			$start_year++;
230 230
 		}
231 231
 
232
-		$output = $this->select( array(
232
+		$output = $this->select(array(
233 233
 			'name'             => $name,
234 234
 			'selected'         => $selected,
235 235
 			'options'          => $options,
236 236
 			'show_option_all'  => false,
237 237
 			'show_option_none' => false
238
-		) );
238
+		));
239 239
 
240 240
 		return $output;
241 241
 	}
@@ -252,23 +252,23 @@  discard block
 block discarded – undo
252 252
 	 *
253 253
 	 * @return string $output Month dropdown
254 254
 	 */
255
-	public function month_dropdown( $name = 'month', $selected = 0 ) {
255
+	public function month_dropdown($name = 'month', $selected = 0) {
256 256
 		$month    = 1;
257 257
 		$options  = array();
258
-		$selected = empty( $selected ) ? date( 'n' ) : $selected;
258
+		$selected = empty($selected) ? date('n') : $selected;
259 259
 
260
-		while ( $month <= 12 ) {
261
-			$options[ absint( $month ) ] = give_month_num_to_name( $month );
262
-			$month ++;
260
+		while ($month <= 12) {
261
+			$options[absint($month)] = give_month_num_to_name($month);
262
+			$month++;
263 263
 		}
264 264
 
265
-		$output = $this->select( array(
265
+		$output = $this->select(array(
266 266
 			'name'             => $name,
267 267
 			'selected'         => $selected,
268 268
 			'options'          => $options,
269 269
 			'show_option_all'  => false,
270 270
 			'show_option_none' => false
271
-		) );
271
+		));
272 272
 
273 273
 		return $output;
274 274
 	}
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 	 *
283 283
 	 * @return string
284 284
 	 */
285
-	public function select( $args = array() ) {
285
+	public function select($args = array()) {
286 286
 		$defaults = array(
287 287
 			'options'          => array(),
288 288
 			'name'             => null,
@@ -292,60 +292,60 @@  discard block
 block discarded – undo
292 292
 			'chosen'           => false,
293 293
 			'placeholder'      => null,
294 294
 			'multiple'         => false,
295
-			'show_option_all'  => esc_html__( 'All', 'give' ),
296
-			'show_option_none' => esc_html__( 'None', 'give' )
295
+			'show_option_all'  => esc_html__('All', 'give'),
296
+			'show_option_none' => esc_html__('None', 'give')
297 297
 		);
298 298
 
299
-		$args = wp_parse_args( $args, $defaults );
299
+		$args = wp_parse_args($args, $defaults);
300 300
 
301 301
 
302
-		if ( $args['multiple'] ) {
302
+		if ($args['multiple']) {
303 303
 			$multiple = ' MULTIPLE';
304 304
 		} else {
305 305
 			$multiple = '';
306 306
 		}
307 307
 
308
-		if ( $args['chosen'] ) {
308
+		if ($args['chosen']) {
309 309
 			$args['class'] .= ' give-select-chosen';
310 310
 		}
311 311
 
312
-		if ( $args['placeholder'] ) {
312
+		if ($args['placeholder']) {
313 313
 			$placeholder = $args['placeholder'];
314 314
 		} else {
315 315
 			$placeholder = '';
316 316
 		}
317 317
 
318
-		$output = '<select name="' . esc_attr__( $args['name'] ) . '" id="' . esc_attr__( sanitize_key( str_replace( '-', '_', $args['id'] ) ) ) . '" class="give-select ' . esc_attr__( $args['class'] ) . '"' . $multiple . ' data-placeholder="' . $placeholder . '">';
318
+		$output = '<select name="'.esc_attr__($args['name']).'" id="'.esc_attr__(sanitize_key(str_replace('-', '_', $args['id']))).'" class="give-select '.esc_attr__($args['class']).'"'.$multiple.' data-placeholder="'.$placeholder.'">';
319 319
 
320
-		if ( $args['show_option_all'] ) {
321
-			if ( $args['multiple'] ) {
322
-				$selected = selected( true, in_array( 0, $args['selected'] ), false );
320
+		if ($args['show_option_all']) {
321
+			if ($args['multiple']) {
322
+				$selected = selected(true, in_array(0, $args['selected']), false);
323 323
 			} else {
324
-				$selected = selected( $args['selected'], 0, false );
324
+				$selected = selected($args['selected'], 0, false);
325 325
 			}
326
-			$output .= '<option value="all"' . $selected . '>' . esc_html__( $args['show_option_all'] ) . '</option>';
326
+			$output .= '<option value="all"'.$selected.'>'.esc_html__($args['show_option_all']).'</option>';
327 327
 		}
328 328
 
329
-		if ( ! empty( $args['options'] ) ) {
329
+		if ( ! empty($args['options'])) {
330 330
 
331
-			if ( $args['show_option_none'] ) {
332
-				if ( $args['multiple'] ) {
333
-					$selected = selected( true, in_array( - 1, $args['selected'] ), false );
331
+			if ($args['show_option_none']) {
332
+				if ($args['multiple']) {
333
+					$selected = selected(true, in_array( -1, $args['selected'] ), false);
334 334
 				} else {
335
-					$selected = selected( $args['selected'], - 1, false );
335
+					$selected = selected($args['selected'], - 1, false);
336 336
 				}
337
-				$output .= '<option value="-1"' . $selected . '>' . esc_html__( $args['show_option_none'] ) . '</option>';
337
+				$output .= '<option value="-1"'.$selected.'>'.esc_html__($args['show_option_none']).'</option>';
338 338
 			}
339 339
 
340
-			foreach ( $args['options'] as $key => $option ) {
340
+			foreach ($args['options'] as $key => $option) {
341 341
 
342
-				if ( $args['multiple'] && is_array( $args['selected'] ) ) {
343
-					$selected = selected( true, in_array( $key, $args['selected'] ), false );
342
+				if ($args['multiple'] && is_array($args['selected'])) {
343
+					$selected = selected(true, in_array($key, $args['selected']), false);
344 344
 				} else {
345
-					$selected = selected( $args['selected'], $key, false );
345
+					$selected = selected($args['selected'], $key, false);
346 346
 				}
347 347
 
348
-				$output .= '<option value="' . esc_attr__( $key ) . '"' . $selected . '>' . esc_html__( $option ) . '</option>';
348
+				$output .= '<option value="'.esc_attr__($key).'"'.$selected.'>'.esc_html__($option).'</option>';
349 349
 			}
350 350
 		}
351 351
 
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 	 *
364 364
 	 * @return string
365 365
 	 */
366
-	public function checkbox( $args = array() ) {
366
+	public function checkbox($args = array()) {
367 367
 		$defaults = array(
368 368
 			'name'    => null,
369 369
 			'current' => null,
@@ -374,16 +374,16 @@  discard block
 block discarded – undo
374 374
 			)
375 375
 		);
376 376
 
377
-		$args = wp_parse_args( $args, $defaults );
377
+		$args = wp_parse_args($args, $defaults);
378 378
 
379 379
 		$options = '';
380
-		if ( ! empty( $args['options']['disabled'] ) ) {
380
+		if ( ! empty($args['options']['disabled'])) {
381 381
 			$options .= ' disabled="disabled"';
382
-		} elseif ( ! empty( $args['options']['readonly'] ) ) {
382
+		} elseif ( ! empty($args['options']['readonly'])) {
383 383
 			$options .= ' readonly';
384 384
 		}
385 385
 
386
-		$output = '<input type="checkbox"' . $options . ' name="' . esc_attr__( $args['name'] ) . '" id="' . esc_attr__( $args['name'] ) . '" class="' . $args['class'] . ' ' . esc_attr__( $args['name'] ) . '" ' . checked( 1, $args['current'], false ) . ' />';
386
+		$output = '<input type="checkbox"'.$options.' name="'.esc_attr__($args['name']).'" id="'.esc_attr__($args['name']).'" class="'.$args['class'].' '.esc_attr__($args['name']).'" '.checked(1, $args['current'], false).' />';
387 387
 
388 388
 		return $output;
389 389
 	}
@@ -397,22 +397,22 @@  discard block
 block discarded – undo
397 397
 	 *
398 398
 	 * @return string Text field
399 399
 	 */
400
-	public function text( $args = array() ) {
400
+	public function text($args = array()) {
401 401
 		// Backwards compatabliity
402
-		if ( func_num_args() > 1 ) {
402
+		if (func_num_args() > 1) {
403 403
 			$args = func_get_args();
404 404
 
405 405
 			$name  = $args[0];
406
-			$value = isset( $args[1] ) ? $args[1] : '';
407
-			$label = isset( $args[2] ) ? $args[2] : '';
408
-			$desc  = isset( $args[3] ) ? $args[3] : '';
406
+			$value = isset($args[1]) ? $args[1] : '';
407
+			$label = isset($args[2]) ? $args[2] : '';
408
+			$desc  = isset($args[3]) ? $args[3] : '';
409 409
 		}
410 410
 
411 411
 		$defaults = array(
412
-			'name'         => isset( $name ) ? $name : 'text',
413
-			'value'        => isset( $value ) ? $value : null,
414
-			'label'        => isset( $label ) ? $label : null,
415
-			'desc'         => isset( $desc ) ? $desc : null,
412
+			'name'         => isset($name) ? $name : 'text',
413
+			'value'        => isset($value) ? $value : null,
414
+			'label'        => isset($label) ? $label : null,
415
+			'desc'         => isset($desc) ? $desc : null,
416 416
 			'placeholder'  => '',
417 417
 			'class'        => 'regular-text',
418 418
 			'disabled'     => false,
@@ -420,29 +420,29 @@  discard block
 block discarded – undo
420 420
 			'data'         => false
421 421
 		);
422 422
 
423
-		$args = wp_parse_args( $args, $defaults );
423
+		$args = wp_parse_args($args, $defaults);
424 424
 
425 425
 		$disabled = '';
426
-		if ( $args['disabled'] ) {
426
+		if ($args['disabled']) {
427 427
 			$disabled = ' disabled="disabled"';
428 428
 		}
429 429
 
430 430
 		$data = '';
431
-		if ( ! empty( $args['data'] ) ) {
432
-			foreach ( $args['data'] as $key => $value ) {
433
-				$data .= 'data-' . $key . '="' . $value . '" ';
431
+		if ( ! empty($args['data'])) {
432
+			foreach ($args['data'] as $key => $value) {
433
+				$data .= 'data-'.$key.'="'.$value.'" ';
434 434
 			}
435 435
 		}
436 436
 
437
-		$output = '<span id="give-' . sanitize_key( $args['name'] ) . '-wrap">';
437
+		$output = '<span id="give-'.sanitize_key($args['name']).'-wrap">';
438 438
 
439
-		$output .= '<label class="give-label" for="give-' . sanitize_key( $args['name'] ) . '">' . esc_html__( $args['label'] ) . '</label>';
439
+		$output .= '<label class="give-label" for="give-'.sanitize_key($args['name']).'">'.esc_html__($args['label']).'</label>';
440 440
 
441
-		if ( ! empty( $args['desc'] ) ) {
442
-			$output .= '<span class="give-description">' . esc_html__( $args['desc'] ) . '</span>';
441
+		if ( ! empty($args['desc'])) {
442
+			$output .= '<span class="give-description">'.esc_html__($args['desc']).'</span>';
443 443
 		}
444 444
 
445
-		$output .= '<input type="text" name="' . esc_attr__( $args['name'] ) . '" id="' . esc_attr__( $args['name'] ) . '" autocomplete="' . esc_attr__( $args['autocomplete'] ) . '" value="' . esc_attr__( $args['value'] ) . '" placeholder="' . esc_attr__( $args['placeholder'] ) . '" class="' . $args['class'] . '" ' . $data . '' . $disabled . '/>';
445
+		$output .= '<input type="text" name="'.esc_attr__($args['name']).'" id="'.esc_attr__($args['name']).'" autocomplete="'.esc_attr__($args['autocomplete']).'" value="'.esc_attr__($args['value']).'" placeholder="'.esc_attr__($args['placeholder']).'" class="'.$args['class'].'" '.$data.''.$disabled.'/>';
446 446
 
447 447
 		$output .= '</span>';
448 448
 
@@ -458,15 +458,15 @@  discard block
 block discarded – undo
458 458
 	 *
459 459
 	 * @return string Datepicker field
460 460
 	 */
461
-	public function date_field( $args = array() ) {
461
+	public function date_field($args = array()) {
462 462
 
463
-		if ( empty( $args['class'] ) ) {
463
+		if (empty($args['class'])) {
464 464
 			$args['class'] = 'give_datepicker';
465
-		} elseif ( ! strpos( $args['class'], 'give_datepicker' ) ) {
465
+		} elseif ( ! strpos($args['class'], 'give_datepicker')) {
466 466
 			$args['class'] .= ' give_datepicker';
467 467
 		}
468 468
 
469
-		return $this->text( $args );
469
+		return $this->text($args);
470 470
 	}
471 471
 
472 472
 
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
 	 *
480 480
 	 * @return string textarea
481 481
 	 */
482
-	public function textarea( $args = array() ) {
482
+	public function textarea($args = array()) {
483 483
 		$defaults = array(
484 484
 			'name'     => 'textarea',
485 485
 			'value'    => null,
@@ -489,21 +489,21 @@  discard block
 block discarded – undo
489 489
 			'disabled' => false
490 490
 		);
491 491
 
492
-		$args = wp_parse_args( $args, $defaults );
492
+		$args = wp_parse_args($args, $defaults);
493 493
 
494 494
 		$disabled = '';
495
-		if ( $args['disabled'] ) {
495
+		if ($args['disabled']) {
496 496
 			$disabled = ' disabled="disabled"';
497 497
 		}
498 498
 
499
-		$output = '<span id="give-' . sanitize_key( $args['name'] ) . '-wrap">';
499
+		$output = '<span id="give-'.sanitize_key($args['name']).'-wrap">';
500 500
 
501
-		$output .= '<label class="give-label" for="give-' . sanitize_key( $args['name'] ) . '">' . esc_html__( $args['label'] ) . '</label>';
501
+		$output .= '<label class="give-label" for="give-'.sanitize_key($args['name']).'">'.esc_html__($args['label']).'</label>';
502 502
 
503
-		$output .= '<textarea name="' . esc_attr__( $args['name'] ) . '" id="' . esc_attr__( $args['name'] ) . '" class="' . $args['class'] . '"' . $disabled . '>' . esc_html__( $args['value'] ) . '</textarea>';
503
+		$output .= '<textarea name="'.esc_attr__($args['name']).'" id="'.esc_attr__($args['name']).'" class="'.$args['class'].'"'.$disabled.'>'.esc_html__($args['value']).'</textarea>';
504 504
 
505
-		if ( ! empty( $args['desc'] ) ) {
506
-			$output .= '<span class="give-description">' . esc_html__( $args['desc'] ) . '</span>';
505
+		if ( ! empty($args['desc'])) {
506
+			$output .= '<span class="give-description">'.esc_html__($args['desc']).'</span>';
507 507
 		}
508 508
 
509 509
 		$output .= '</span>';
@@ -520,12 +520,12 @@  discard block
 block discarded – undo
520 520
 	 *
521 521
 	 * @return string text field with ajax search
522 522
 	 */
523
-	public function ajax_user_search( $args = array() ) {
523
+	public function ajax_user_search($args = array()) {
524 524
 
525 525
 		$defaults = array(
526 526
 			'name'         => 'user_id',
527 527
 			'value'        => null,
528
-			'placeholder'  => esc_attr__( 'Enter username', 'give' ),
528
+			'placeholder'  => esc_attr__('Enter username', 'give'),
529 529
 			'label'        => null,
530 530
 			'desc'         => null,
531 531
 			'class'        => '',
@@ -534,13 +534,13 @@  discard block
 block discarded – undo
534 534
 			'data'         => false
535 535
 		);
536 536
 
537
-		$args = wp_parse_args( $args, $defaults );
537
+		$args = wp_parse_args($args, $defaults);
538 538
 
539
-		$args['class'] = 'give-ajax-user-search ' . $args['class'];
539
+		$args['class'] = 'give-ajax-user-search '.$args['class'];
540 540
 
541 541
 		$output = '<span class="give_user_search_wrap">';
542
-		$output .= $this->text( $args );
543
-		$output .= '<span class="give_user_search_results hidden"><a class="give-ajax-user-cancel" title="' . esc_attr__( 'Cancel', 'give' ) . '" aria-label="' . esc_attr__( 'Cancel', 'give' ) . '" href="#">x</a><span></span></span>';
542
+		$output .= $this->text($args);
543
+		$output .= '<span class="give_user_search_results hidden"><a class="give-ajax-user-cancel" title="'.esc_attr__('Cancel', 'give').'" aria-label="'.esc_attr__('Cancel', 'give').'" href="#">x</a><span></span></span>';
544 544
 		$output .= '</span>';
545 545
 
546 546
 		return $output;
Please login to merge, or discard this patch.
includes/admin/admin-footer.php 1 patch
Spacing   +7 added lines, -7 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
 
@@ -24,15 +24,15 @@  discard block
 block discarded – undo
24 24
  *
25 25
  * @return      string
26 26
  */
27
-function give_admin_rate_us( $footer_text ) {
27
+function give_admin_rate_us($footer_text) {
28 28
 	global $typenow;
29 29
 
30
-	if ( $typenow == 'give_forms' ) {
30
+	if ($typenow == 'give_forms') {
31 31
 		$rate_text = sprintf(
32 32
 			/* translators: 1: plugin name - "Give". 2: Link to 5 star rating */
33
-			esc_html__( 'If you like %1$s please leave us a %2$s rating. It takes a minute and helps a lot. Thanks in advance!', 'give' ),
34
-			sprintf( '<strong>%s</strong>', esc_html__( 'Give', 'give' ) ),
35
-			'<a href="https://wordpress.org/support/view/plugin-reviews/give?filter=5#postform" target="_blank" class="give-rating-link" data-rated="' . esc_attr__( 'Thanks :)', 'give' ) . '">&#9733;&#9733;&#9733;&#9733;&#9733;</a>'
33
+			esc_html__('If you like %1$s please leave us a %2$s rating. It takes a minute and helps a lot. Thanks in advance!', 'give'),
34
+			sprintf('<strong>%s</strong>', esc_html__('Give', 'give')),
35
+			'<a href="https://wordpress.org/support/view/plugin-reviews/give?filter=5#postform" target="_blank" class="give-rating-link" data-rated="'.esc_attr__('Thanks :)', 'give').'">&#9733;&#9733;&#9733;&#9733;&#9733;</a>'
36 36
 		);
37 37
 
38 38
 		return $rate_text;
@@ -41,4 +41,4 @@  discard block
 block discarded – undo
41 41
 	}
42 42
 }
43 43
 
44
-add_filter( 'admin_footer_text', 'give_admin_rate_us' );
44
+add_filter('admin_footer_text', 'give_admin_rate_us');
Please login to merge, or discard this patch.
includes/admin/shortcodes/shortcode-give-form.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * @since       1.3.0
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) or exit;
12
+defined('ABSPATH') or exit;
13 13
 
14 14
 /**
15 15
  * Class Give_Shortcode_Donation_Form
@@ -21,10 +21,10 @@  discard block
 block discarded – undo
21 21
 	 */
22 22
 	public function __construct() {
23 23
 
24
-		$this->shortcode['title']   = esc_html__( 'Donation Form', 'give' );
25
-		$this->shortcode['label']   = esc_html__( 'Donation Form', 'give' );
24
+		$this->shortcode['title']   = esc_html__('Donation Form', 'give');
25
+		$this->shortcode['label']   = esc_html__('Donation Form', 'give');
26 26
 
27
-		parent::__construct( 'give_form' );
27
+		parent::__construct('give_form');
28 28
 	}
29 29
 
30 30
 	/**
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
 
37 37
 		$create_form_link = sprintf(
38 38
 			/* translators: %s: create new form URL */
39
-			__( '<a href="%s">Create</a> a new Donation Form.', 'give' ),
40
-			admin_url( 'post-new.php?post_type=give_forms' )
39
+			__('<a href="%s">Create</a> a new Donation Form.', 'give'),
40
+			admin_url('post-new.php?post_type=give_forms')
41 41
 		);
42 42
 
43 43
 		return array(
@@ -47,68 +47,68 @@  discard block
 block discarded – undo
47 47
 					'post_type' => 'give_forms',
48 48
 				),
49 49
 				'name'        => 'id',
50
-				'tooltip'     => esc_attr__( 'Select a Donation Form', 'give' ),
51
-				'placeholder' => esc_attr__( '- Select a Form -', 'give' ),
50
+				'tooltip'     => esc_attr__('Select a Donation Form', 'give'),
51
+				'placeholder' => esc_attr__('- Select a Form -', 'give'),
52 52
 				'required'    => array(
53
-					'alert' => esc_html__( 'You must first select a Form!', 'give' ),
54
-					'error' => sprintf( '<p class="strong">%s</p><p class="no-margin">%s</p>', esc_html__( 'No donation forms were found!', 'give' ), $create_form_link ),
53
+					'alert' => esc_html__('You must first select a Form!', 'give'),
54
+					'error' => sprintf('<p class="strong">%s</p><p class="no-margin">%s</p>', esc_html__('No donation forms were found!', 'give'), $create_form_link),
55 55
 				),
56 56
 			),
57 57
 			array(
58 58
 				'type' => 'container',
59
-				'html' => sprintf( '<p class="strong margin-top">%s</p>', esc_html__( 'Optional form settings', 'give' ) ),
59
+				'html' => sprintf('<p class="strong margin-top">%s</p>', esc_html__('Optional form settings', 'give')),
60 60
 			),
61 61
 			array(
62 62
 				'type'    => 'listbox',
63 63
 				'name'    => 'show_title',
64
-				'label'   => esc_html__( 'Show Title:', 'give' ),
65
-				'tooltip' => esc_attr__( 'Do you want to display the form title?', 'give' ),
64
+				'label'   => esc_html__('Show Title:', 'give'),
65
+				'tooltip' => esc_attr__('Do you want to display the form title?', 'give'),
66 66
 				'options' => array(
67
-					'true'  => esc_html__( 'Show', 'give' ),
68
-					'false' => esc_html__( 'Hide', 'give' ),
67
+					'true'  => esc_html__('Show', 'give'),
68
+					'false' => esc_html__('Hide', 'give'),
69 69
 				),
70 70
 			),
71 71
 			array(
72 72
 				'type'    => 'listbox',
73 73
 				'name'    => 'show_goal',
74
-				'label'   => esc_html__( 'Show Goal:', 'give' ),
75
-				'tooltip' => esc_attr__( 'Do you want to display the donation goal?', 'give' ),
74
+				'label'   => esc_html__('Show Goal:', 'give'),
75
+				'tooltip' => esc_attr__('Do you want to display the donation goal?', 'give'),
76 76
 				'options' => array(
77
-					'true'  => esc_html__( 'Show', 'give' ),
78
-					'false' => esc_html__( 'Hide', 'give' ),
77
+					'true'  => esc_html__('Show', 'give'),
78
+					'false' => esc_html__('Hide', 'give'),
79 79
 				),
80 80
 			),
81 81
 			array(
82 82
 				'type'    => 'listbox',
83 83
 				'name'    => 'show_content',
84 84
 				'minWidth' => 240,
85
-				'label'   => esc_html__( 'Display Content:', 'give' ),
86
-				'tooltip' => esc_attr__( 'Do you want to display the form content?', 'give' ),
85
+				'label'   => esc_html__('Display Content:', 'give'),
86
+				'tooltip' => esc_attr__('Do you want to display the form content?', 'give'),
87 87
 				'options' => array(
88
-					'none'  => esc_html__( 'No Content', 'give' ),
89
-					'above' => esc_html__( 'Display above the form fields', 'give' ),
90
-					'below' => esc_html__( 'Display below the form fields', 'give' ),
88
+					'none'  => esc_html__('No Content', 'give'),
89
+					'above' => esc_html__('Display above the form fields', 'give'),
90
+					'below' => esc_html__('Display below the form fields', 'give'),
91 91
 				),
92 92
 			),
93 93
 			array(
94 94
 				'type'    => 'listbox',
95 95
 				'name'    => 'display_style',
96
-				'label'   => esc_html__( 'Payment Fields:', 'give' ),
97
-				'tooltip' => esc_attr__( 'How would you like to display payment information?', 'give' ),
96
+				'label'   => esc_html__('Payment Fields:', 'give'),
97
+				'tooltip' => esc_attr__('How would you like to display payment information?', 'give'),
98 98
 				'options' => array(
99
-					'onpage' => esc_html__( 'Show on Page', 'give' ),
100
-					'reveal' => esc_html__( 'Reveal Upon Click', 'give' ),
101
-					'modal'  => esc_html__( 'Modal Window Upon Click', 'give' ),
99
+					'onpage' => esc_html__('Show on Page', 'give'),
100
+					'reveal' => esc_html__('Reveal Upon Click', 'give'),
101
+					'modal'  => esc_html__('Modal Window Upon Click', 'give'),
102 102
 				),
103 103
 			),
104 104
 			array(
105 105
 				'type'    => 'listbox',
106 106
 				'name'    => 'float_labels',
107
-				'label'   => esc_html__( 'Floating Labels:', 'give' ),
108
-				'tooltip' => esc_attr__( 'Override the default floating labels setting for this form?', 'give' ),
107
+				'label'   => esc_html__('Floating Labels:', 'give'),
108
+				'tooltip' => esc_attr__('Override the default floating labels setting for this form?', 'give'),
109 109
 				'options' => array(
110
-					'enabled'  => esc_html__( 'Enabled', 'give' ),
111
-					'disabled' => esc_html__( 'Disabled', 'give' ),
110
+					'enabled'  => esc_html__('Enabled', 'give'),
111
+					'disabled' => esc_html__('Disabled', 'give'),
112 112
 				),
113 113
 			),
114 114
 		);
Please login to merge, or discard this patch.
includes/admin/shortcodes/shortcode-give-profile-editor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * @since       1.3.0
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) or exit;
12
+defined('ABSPATH') or exit;
13 13
 
14 14
 class Give_Shortcode_Profile_Editor extends Give_Shortcode_Generator {
15 15
 
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
 	 */
19 19
 	public function __construct() {
20 20
 
21
-		$this->shortcode['label'] = esc_html__( 'Profile Editor', 'give' );
21
+		$this->shortcode['label'] = esc_html__('Profile Editor', 'give');
22 22
 
23
-		parent::__construct( 'give_profile_editor' );
23
+		parent::__construct('give_profile_editor');
24 24
 	}
25 25
 }
26 26
 
Please login to merge, or discard this patch.
includes/admin/shortcodes/shortcode-give-receipt.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * @since       1.3.0
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) or exit;
12
+defined('ABSPATH') or exit;
13 13
 
14 14
 class Give_Shortcode_Donation_Receipt extends Give_Shortcode_Generator {
15 15
 
@@ -18,10 +18,10 @@  discard block
 block discarded – undo
18 18
 	 */
19 19
 	public function __construct() {
20 20
 
21
-		$this->shortcode['title'] = esc_html__( 'Donation Receipt', 'give' );
22
-		$this->shortcode['label'] = esc_html__( 'Donation Receipt', 'give' );
21
+		$this->shortcode['title'] = esc_html__('Donation Receipt', 'give');
22
+		$this->shortcode['label'] = esc_html__('Donation Receipt', 'give');
23 23
 
24
-		parent::__construct( 'give_receipt' );
24
+		parent::__construct('give_receipt');
25 25
 	}
26 26
 
27 27
 	/**
@@ -34,60 +34,60 @@  discard block
 block discarded – undo
34 34
 		return array(
35 35
 			array(
36 36
 				'type' => 'container',
37
-				'html' => sprintf( '<p class="strong">%s</p>', esc_html__( 'Optional settings', 'give' ) ),
37
+				'html' => sprintf('<p class="strong">%s</p>', esc_html__('Optional settings', 'give')),
38 38
 			),
39 39
 			array(
40 40
 				'type'    => 'listbox',
41 41
 				'name'    => 'price',
42
-				'label'   => esc_html__( 'Show Donation Amount:', 'give' ),
42
+				'label'   => esc_html__('Show Donation Amount:', 'give'),
43 43
 				'options' => array(
44
-					'true'  => esc_html__( 'Show', 'give' ),
45
-					'false' => esc_html__( 'Hide', 'give' ),
44
+					'true'  => esc_html__('Show', 'give'),
45
+					'false' => esc_html__('Hide', 'give'),
46 46
 				),
47 47
 			),
48 48
 			array(
49 49
 				'type'    => 'listbox',
50 50
 				'name'    => 'donor',
51
-				'label'   => esc_html__( 'Show Donor Name:', 'give' ),
51
+				'label'   => esc_html__('Show Donor Name:', 'give'),
52 52
 				'options' => array(
53
-					'true'  => esc_html__( 'Show', 'give' ),
54
-					'false' => esc_html__( 'Hide', 'give' ),
53
+					'true'  => esc_html__('Show', 'give'),
54
+					'false' => esc_html__('Hide', 'give'),
55 55
 				),
56 56
 			),
57 57
 			array(
58 58
 				'type'    => 'listbox',
59 59
 				'name'    => 'date',
60
-				'label'   => esc_html__( 'Show Date:', 'give' ),
60
+				'label'   => esc_html__('Show Date:', 'give'),
61 61
 				'options' => array(
62
-					'true'  => esc_html__( 'Show', 'give' ),
63
-					'false' => esc_html__( 'Hide', 'give' ),
62
+					'true'  => esc_html__('Show', 'give'),
63
+					'false' => esc_html__('Hide', 'give'),
64 64
 				),
65 65
 			),
66 66
 			array(
67 67
 				'type'    => 'listbox',
68 68
 				'name'    => 'payment_key',
69
-				'label'   => esc_html__( 'Show Payment Key:', 'give' ),
69
+				'label'   => esc_html__('Show Payment Key:', 'give'),
70 70
 				'options' => array(
71
-					'true'  => esc_html__( 'Show', 'give' ),
72
-					'false' => esc_html__( 'Hide', 'give' ),
71
+					'true'  => esc_html__('Show', 'give'),
72
+					'false' => esc_html__('Hide', 'give'),
73 73
 				),
74 74
 			),
75 75
 			array(
76 76
 				'type'    => 'listbox',
77 77
 				'name'    => 'payment_method',
78
-				'label'   => esc_html__( 'Show Payment Method:', 'give' ),
78
+				'label'   => esc_html__('Show Payment Method:', 'give'),
79 79
 				'options' => array(
80
-					'true'  => esc_html__( 'Show', 'give' ),
81
-					'false' => esc_html__( 'Hide', 'give' ),
80
+					'true'  => esc_html__('Show', 'give'),
81
+					'false' => esc_html__('Hide', 'give'),
82 82
 				),
83 83
 			),
84 84
 			array(
85 85
 				'type'    => 'listbox',
86 86
 				'name'    => 'payment_id',
87
-				'label'   => esc_html__( 'Show Payment ID:', 'give' ),
87
+				'label'   => esc_html__('Show Payment ID:', 'give'),
88 88
 				'options' => array(
89
-					'true'  => esc_html__( 'Show', 'give' ),
90
-					'false' => esc_html__( 'Hide', 'give' ),
89
+					'true'  => esc_html__('Show', 'give'),
90
+					'false' => esc_html__('Hide', 'give'),
91 91
 				),
92 92
 			),
93 93
 		);
Please login to merge, or discard this patch.
includes/admin/shortcodes/shortcode-give-goal.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * @since       1.3.0
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) or exit;
12
+defined('ABSPATH') or exit;
13 13
 
14 14
 class Give_Shortcode_Donation_Form_Goal extends Give_Shortcode_Generator {
15 15
 
@@ -18,10 +18,10 @@  discard block
 block discarded – undo
18 18
 	 */
19 19
 	public function __construct() {
20 20
 
21
-		$this->shortcode['title'] = esc_html__( 'Donation Form Goal', 'give' );
22
-		$this->shortcode['label'] = esc_html__( 'Donation Form Goal', 'give' );
21
+		$this->shortcode['title'] = esc_html__('Donation Form Goal', 'give');
22
+		$this->shortcode['label'] = esc_html__('Donation Form Goal', 'give');
23 23
 
24
-		parent::__construct( 'give_goal' );
24
+		parent::__construct('give_goal');
25 25
 	}
26 26
 
27 27
 	/**
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
 
34 34
 		$create_form_link = sprintf(
35 35
 			/* translators: %s: create new form URL */
36
-			__( '<a href="%s">Create</a> a new Donation Form.', 'give' ),
37
-			admin_url( 'post-new.php?post_type=give_forms' )
36
+			__('<a href="%s">Create</a> a new Donation Form.', 'give'),
37
+			admin_url('post-new.php?post_type=give_forms')
38 38
 		);
39 39
 
40 40
 		return array(
@@ -44,35 +44,35 @@  discard block
 block discarded – undo
44 44
 					'post_type' => 'give_forms',
45 45
 				),
46 46
 				'name'        => 'id',
47
-				'tooltip'     => esc_attr__( 'Select a Donation Form', 'give' ),
48
-				'placeholder' => esc_attr__( '- Select a Form -', 'give' ),
47
+				'tooltip'     => esc_attr__('Select a Donation Form', 'give'),
48
+				'placeholder' => esc_attr__('- Select a Form -', 'give'),
49 49
 				'required'    => array(
50
-					'alert' => esc_html__( 'You must first select a Form!', 'give' ),
51
-					'error' => sprintf( '<p class="strong">%s</p><p class="no-margin">%s</p>', esc_html__( 'No donation forms were found!', 'give' ), $create_form_link ),
50
+					'alert' => esc_html__('You must first select a Form!', 'give'),
51
+					'error' => sprintf('<p class="strong">%s</p><p class="no-margin">%s</p>', esc_html__('No donation forms were found!', 'give'), $create_form_link),
52 52
 				),
53 53
 			),
54 54
 			array(
55 55
 				'type' => 'container',
56
-				'html' => sprintf( '<p class="strong margin-top">%s</p>', esc_html__( 'Optional settings', 'give' ) ),
56
+				'html' => sprintf('<p class="strong margin-top">%s</p>', esc_html__('Optional settings', 'give')),
57 57
 			),
58 58
 			array(
59 59
 				'type'    => 'listbox',
60 60
 				'name'    => 'show_text',
61
-				'label'   => esc_html__( 'Show Text:', 'give' ),
62
-				'tooltip' => esc_attr__( 'This text displays the amount of income raised compared to the goal.', 'give' ),
61
+				'label'   => esc_html__('Show Text:', 'give'),
62
+				'tooltip' => esc_attr__('This text displays the amount of income raised compared to the goal.', 'give'),
63 63
 				'options' => array(
64
-					'true'  => esc_html__( 'Show', 'give' ),
65
-					'false' => esc_html__( 'Hide', 'give' ),
64
+					'true'  => esc_html__('Show', 'give'),
65
+					'false' => esc_html__('Hide', 'give'),
66 66
 				),
67 67
 			),
68 68
 			array(
69 69
 				'type'    => 'listbox',
70 70
 				'name'    => 'show_bar',
71
-				'label'   => esc_html__( 'Show Progress Bar:', 'give' ),
72
-				'tooltip' => esc_attr__( 'Do you want to display the goal\'s progress bar?', 'give' ),
71
+				'label'   => esc_html__('Show Progress Bar:', 'give'),
72
+				'tooltip' => esc_attr__('Do you want to display the goal\'s progress bar?', 'give'),
73 73
 				'options' => array(
74
-					'true'  => esc_html__( 'Show', 'give' ),
75
-					'false' => esc_html__( 'Hide', 'give' ),
74
+					'true'  => esc_html__('Show', 'give'),
75
+					'false' => esc_html__('Hide', 'give'),
76 76
 				),
77 77
 			),
78 78
 		);
Please login to merge, or discard this patch.
includes/admin/shortcodes/shortcode-give-donation-history.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * @since       1.3.0
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) or exit;
12
+defined('ABSPATH') or exit;
13 13
 
14 14
 class Give_Shortcode_Donation_History extends Give_Shortcode_Generator {
15 15
 
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
 	 */
19 19
 	public function __construct() {
20 20
 
21
-		$this->shortcode['label'] = esc_html__( 'Donation History', 'give' );
21
+		$this->shortcode['label'] = esc_html__('Donation History', 'give');
22 22
 
23
-		parent::__construct( 'donation_history' );
23
+		parent::__construct('donation_history');
24 24
 	}
25 25
 }
26 26
 
Please login to merge, or discard this patch.
includes/admin/shortcodes/shortcode-give-login.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * @since       1.3.0
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) or exit;
12
+defined('ABSPATH') or exit;
13 13
 
14 14
 class Give_Shortcode_Login extends Give_Shortcode_Generator {
15 15
 
@@ -18,10 +18,10 @@  discard block
 block discarded – undo
18 18
 	 */
19 19
 	public function __construct() {
20 20
 
21
-		$this->shortcode['title'] = esc_html__( 'Login', 'give' );
22
-		$this->shortcode['label'] = esc_html__( 'Login', 'give' );
21
+		$this->shortcode['title'] = esc_html__('Login', 'give');
22
+		$this->shortcode['label'] = esc_html__('Login', 'give');
23 23
 
24
-		parent::__construct( 'give_login' );
24
+		parent::__construct('give_login');
25 25
 	}
26 26
 
27 27
 	/**
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
 		return array(
35 35
 			array(
36 36
 				'type' => 'container',
37
-				'html' => sprintf( '<p class="no-margin">%s</p>', esc_html__( 'Redirect URL (optional):', 'give' ) ),
37
+				'html' => sprintf('<p class="no-margin">%s</p>', esc_html__('Redirect URL (optional):', 'give')),
38 38
 			),
39 39
 			array(
40 40
 				'type'     => 'textbox',
41 41
 				'name'     => 'redirect',
42 42
 				'minWidth' => 320,
43
-				'tooltip'  => esc_attr__( 'Enter an URL here to redirect to after login.', 'give' ),
43
+				'tooltip'  => esc_attr__('Enter an URL here to redirect to after login.', 'give'),
44 44
 			),
45 45
 		);
46 46
 	}
Please login to merge, or discard this patch.
includes/admin/shortcodes/shortcode-give-register.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * @since       1.3.0
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) or exit;
12
+defined('ABSPATH') or exit;
13 13
 
14 14
 class Give_Shortcode_Register extends Give_Shortcode_Generator {
15 15
 
@@ -18,10 +18,10 @@  discard block
 block discarded – undo
18 18
 	 */
19 19
 	public function __construct() {
20 20
 
21
-		$this->shortcode['title'] = esc_html__( 'Register', 'give' );
22
-		$this->shortcode['label'] = esc_html__( 'Register', 'give' );
21
+		$this->shortcode['title'] = esc_html__('Register', 'give');
22
+		$this->shortcode['label'] = esc_html__('Register', 'give');
23 23
 
24
-		parent::__construct( 'give_register' );
24
+		parent::__construct('give_register');
25 25
 	}
26 26
 
27 27
 	/**
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
 		return array(
35 35
 			array(
36 36
 				'type' => 'container',
37
-				'html' => sprintf( '<p class="no-margin">%s</p>', esc_html__( 'Redirect URL (optional):', 'give' ) ),
37
+				'html' => sprintf('<p class="no-margin">%s</p>', esc_html__('Redirect URL (optional):', 'give')),
38 38
 			),
39 39
 			array(
40 40
 				'type'     => 'textbox',
41 41
 				'name'     => 'redirect',
42 42
 				'minWidth' => 320,
43
-				'tooltip'  => esc_attr__( 'Enter an URL here to redirect to after registering.', 'give' ),
43
+				'tooltip'  => esc_attr__('Enter an URL here to redirect to after registering.', 'give'),
44 44
 			),
45 45
 		);
46 46
 	}
Please login to merge, or discard this patch.