Completed
Pull Request — master (#801)
by
unknown
18:24
created
includes/admin/class-give-settings.php 1 patch
Spacing   +312 added lines, -312 removed lines patch added patch discarded remove patch
@@ -46,26 +46,26 @@  discard block
 block discarded – undo
46 46
 	 */
47 47
 	public function __construct() {
48 48
 
49
-		add_action( 'admin_init', array( $this, 'init' ) );
49
+		add_action('admin_init', array($this, 'init'));
50 50
 
51 51
 		//Customize CMB2 URL
52
-		add_filter( 'cmb2_meta_box_url', array( $this, 'give_update_cmb_meta_box_url' ) );
52
+		add_filter('cmb2_meta_box_url', array($this, 'give_update_cmb_meta_box_url'));
53 53
 
54 54
 		//Custom CMB2 Settings Fields
55
-		add_action( 'cmb2_render_give_title', 'give_title_callback', 10, 5 );
56
-		add_action( 'cmb2_render_give_description', 'give_description_callback', 10, 5 );
57
-		add_action( 'cmb2_render_enabled_gateways', 'give_enabled_gateways_callback', 10, 5 );
58
-		add_action( 'cmb2_render_default_gateway', 'give_default_gateway_callback', 10, 5 );
59
-		add_action( 'cmb2_render_email_preview_buttons', 'give_email_preview_buttons_callback', 10, 5 );
60
-		add_action( 'cmb2_render_system_info', 'give_system_info_callback', 10, 5 );
61
-		add_action( 'cmb2_render_api', 'give_api_callback', 10, 5 );
62
-		add_action( 'cmb2_render_license_key', 'give_license_key_callback', 10, 5 );
63
-		add_action( 'admin_notices', array( $this, 'settings_notices' ) );
55
+		add_action('cmb2_render_give_title', 'give_title_callback', 10, 5);
56
+		add_action('cmb2_render_give_description', 'give_description_callback', 10, 5);
57
+		add_action('cmb2_render_enabled_gateways', 'give_enabled_gateways_callback', 10, 5);
58
+		add_action('cmb2_render_default_gateway', 'give_default_gateway_callback', 10, 5);
59
+		add_action('cmb2_render_email_preview_buttons', 'give_email_preview_buttons_callback', 10, 5);
60
+		add_action('cmb2_render_system_info', 'give_system_info_callback', 10, 5);
61
+		add_action('cmb2_render_api', 'give_api_callback', 10, 5);
62
+		add_action('cmb2_render_license_key', 'give_license_key_callback', 10, 5);
63
+		add_action('admin_notices', array($this, 'settings_notices'));
64 64
 
65 65
 		// Include CMB CSS in the head to avoid FOUC
66
-		add_action( 'admin_print_styles-give_forms_page_give-settings', array( 'CMB2_hookup', 'enqueue_cmb_css' ) );
66
+		add_action('admin_print_styles-give_forms_page_give-settings', array('CMB2_hookup', 'enqueue_cmb_css'));
67 67
 
68
-		add_filter( 'cmb2_get_metabox_form_format', array( $this, 'give_modify_cmb2_form_output' ), 10, 3 );
68
+		add_filter('cmb2_get_metabox_form_format', array($this, 'give_modify_cmb2_form_output'), 10, 3);
69 69
 
70 70
 	}
71 71
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	 * @since  1.0
77 77
 	 */
78 78
 	public function init() {
79
-		register_setting( $this->key, $this->key );
79
+		register_setting($this->key, $this->key);
80 80
 
81 81
 	}
82 82
 
@@ -90,9 +90,9 @@  discard block
 block discarded – undo
90 90
 	 *
91 91
 	 * @return mixed
92 92
 	 */
93
-	public function give_update_cmb_meta_box_url( $url ) {
93
+	public function give_update_cmb_meta_box_url($url) {
94 94
 		//Path to Give's CMB
95
-		return GIVE_PLUGIN_URL . '/includes/libraries/cmb2';
95
+		return GIVE_PLUGIN_URL.'/includes/libraries/cmb2';
96 96
 	}
97 97
 
98 98
 
@@ -104,27 +104,27 @@  discard block
 block discarded – undo
104 104
 	 */
105 105
 	public function give_get_settings_tabs() {
106 106
 
107
-		$settings = $this->give_settings( null );
107
+		$settings = $this->give_settings(null);
108 108
 
109 109
 		$tabs             = array();
110
-		$tabs['general']  = esc_html__( 'General', 'give' );
111
-		$tabs['gateways'] = esc_html__( 'Payment Gateways', 'give' );
112
-		$tabs['display']  = esc_html__( 'Display Options', 'give' );
113
-		$tabs['emails']   = esc_html__( 'Emails', 'give' );
110
+		$tabs['general']  = esc_html__('General', 'give');
111
+		$tabs['gateways'] = esc_html__('Payment Gateways', 'give');
112
+		$tabs['display']  = esc_html__('Display Options', 'give');
113
+		$tabs['emails']   = esc_html__('Emails', 'give');
114 114
 
115
-		if ( ! empty( $settings['addons']['fields'] ) ) {
116
-			$tabs['addons'] = esc_html__( 'Add-ons', 'give' );
115
+		if ( ! empty($settings['addons']['fields'])) {
116
+			$tabs['addons'] = esc_html__('Add-ons', 'give');
117 117
 		}
118 118
 
119
-		if ( ! empty( $settings['licenses']['fields'] ) ) {
120
-			$tabs['licenses'] = esc_html__( 'Licenses', 'give' );
119
+		if ( ! empty($settings['licenses']['fields'])) {
120
+			$tabs['licenses'] = esc_html__('Licenses', 'give');
121 121
 		}
122 122
 
123
-		$tabs['advanced']    = esc_html__( 'Advanced', 'give' );
124
-		$tabs['api']         = esc_html__( 'API', 'give' );
125
-		$tabs['system_info'] = esc_html__( 'System Info', 'give' );
123
+		$tabs['advanced']    = esc_html__('Advanced', 'give');
124
+		$tabs['api']         = esc_html__('API', 'give');
125
+		$tabs['system_info'] = esc_html__('System Info', 'give');
126 126
 
127
-		return apply_filters( 'give_settings_tabs', $tabs );
127
+		return apply_filters('give_settings_tabs', $tabs);
128 128
 	}
129 129
 
130 130
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 	 */
135 135
 	public function admin_page_display() {
136 136
 
137
-		$active_tab = isset( $_GET['tab'] ) && array_key_exists( $_GET['tab'], $this->give_get_settings_tabs() ) ? $_GET['tab'] : 'general';
137
+		$active_tab = isset($_GET['tab']) && array_key_exists($_GET['tab'], $this->give_get_settings_tabs()) ? $_GET['tab'] : 'general';
138 138
 
139 139
 		?>
140 140
 
@@ -142,20 +142,20 @@  discard block
 block discarded – undo
142 142
 
143 143
 			<h1 class="nav-tab-wrapper">
144 144
 				<?php
145
-				foreach ( $this->give_get_settings_tabs() as $tab_id => $tab_name ) {
145
+				foreach ($this->give_get_settings_tabs() as $tab_id => $tab_name) {
146 146
 
147 147
 					//Support legacy tab creation conditions based off $_GET parameter
148 148
 					//We pass the $_GET['tab'] to conditions executed later
149 149
 					$_GET['tab'] = $tab_id;
150 150
 
151
-					$tab_url = esc_url( add_query_arg( array(
151
+					$tab_url = esc_url(add_query_arg(array(
152 152
 						'settings-updated' => false,
153 153
 						'tab'              => $tab_id
154
-					) ) );
154
+					)));
155 155
 
156 156
 					$active = $active_tab == $tab_id ? ' nav-tab-active' : '';
157 157
 
158
-					echo '<a href="' . esc_url( $tab_url ) . '" title="' . esc_attr( $tab_name ) . '" class="nav-tab' . $active . '" id="tab-' . $tab_id . '">' . esc_html( $tab_name ) . '</a>';
158
+					echo '<a href="'.esc_url($tab_url).'" title="'.esc_attr($tab_name).'" class="nav-tab'.$active.'" id="tab-'.$tab_id.'">'.esc_html($tab_name).'</a>';
159 159
 
160 160
 				}
161 161
 				?>
@@ -163,20 +163,20 @@  discard block
 block discarded – undo
163 163
 
164 164
 			<?php
165 165
 			//Loop through and output settings
166
-			foreach ( $this->give_get_settings_tabs() as $tab_id => $tab_name ) {
166
+			foreach ($this->give_get_settings_tabs() as $tab_id => $tab_name) {
167 167
 
168 168
 				//Support legacy tab creation conditions based off $_GET parameter
169 169
 				//We 'trick' the conditions into thinking this is the tab
170 170
 				$_GET['tab'] = $tab_id;
171 171
 
172
-				$tab_settings = $this->give_settings( $tab_id );
172
+				$tab_settings = $this->give_settings($tab_id);
173 173
 
174 174
 				//Pass active tab within $tab_settings so we can hide with CSS via PHP
175
-				if ( $active_tab == $tab_id ) {
175
+				if ($active_tab == $tab_id) {
176 176
 					$tab_settings['active_tab'] = true;
177 177
 				}
178 178
 
179
-				cmb2_metabox_form( $tab_settings, $this->key );
179
+				cmb2_metabox_form($tab_settings, $this->key);
180 180
 
181 181
 			} ?>
182 182
 
@@ -194,34 +194,34 @@  discard block
 block discarded – undo
194 194
 	 * @since 1.5 Modified to CSS hide non-active tabs
195 195
 	 * @since 1.0
196 196
 	 */
197
-	function give_modify_cmb2_form_output( $form_format, $object_id, $cmb ) {
197
+	function give_modify_cmb2_form_output($form_format, $object_id, $cmb) {
198 198
 
199 199
 
200
-		$pagenow = isset( $_GET['page'] ) ? $_GET['page'] : '';
200
+		$pagenow = isset($_GET['page']) ? $_GET['page'] : '';
201 201
 
202 202
 		//only modify the give settings form
203
-		if ( 'give_settings' == $object_id && $pagenow == 'give-settings' ) {
203
+		if ('give_settings' == $object_id && $pagenow == 'give-settings') {
204 204
 
205 205
 			$style = '';
206
-			if ( ! isset( $cmb->meta_box['active_tab'] ) ) {
206
+			if ( ! isset($cmb->meta_box['active_tab'])) {
207 207
 				$style = 'style="display:none;"';
208 208
 			}
209 209
 
210 210
 			//Set ID based off tab name - protects backwards compatibility
211
-			$tab_id = isset( $_GET['tab'] ) ? $_GET['tab'] : $cmb->meta_box['id'];
211
+			$tab_id = isset($_GET['tab']) ? $_GET['tab'] : $cmb->meta_box['id'];
212 212
 
213
-			$save_button = apply_filters( 'give_save_button_markup', '<div class="give-submit-wrap"><input type="submit" name="submit-cmb" value="' . esc_attr__( 'Save Settings', 'give' ) . '" class="button-primary"></div>' );
213
+			$save_button = apply_filters('give_save_button_markup', '<div class="give-submit-wrap"><input type="submit" name="submit-cmb" value="'.esc_attr__('Save Settings', 'give').'" class="button-primary"></div>');
214 214
 
215 215
 			//Filter so some tabs won't have save settings
216
-			$no_save_button = apply_filters( 'give_settings_no_save_output', array(
216
+			$no_save_button = apply_filters('give_settings_no_save_output', array(
217 217
 				'system_info'
218
-			) );
218
+			));
219 219
 
220
-			if ( in_array( $tab_id, $no_save_button ) ) {
220
+			if (in_array($tab_id, $no_save_button)) {
221 221
 				$save_button = '';
222 222
 			}
223 223
 
224
-			$form_format = '<form class="cmb-form" method="post" id="%1$s" enctype="multipart/form-data" encoding="multipart/form-data" ' . $style . ' data-tab="' . $tab_id . '"><input type="hidden" name="give_settings_saved" value="true"><input type="hidden" name="object_id" value="%2$s">%3$s' . $save_button . '</form>';
224
+			$form_format = '<form class="cmb-form" method="post" id="%1$s" enctype="multipart/form-data" encoding="multipart/form-data" '.$style.' data-tab="'.$tab_id.'"><input type="hidden" name="give_settings_saved" value="true"><input type="hidden" name="object_id" value="%2$s">%3$s'.$save_button.'</form>';
225 225
 
226 226
 		}
227 227
 
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 	 *
239 239
 	 * @return array
240 240
 	 */
241
-	public function give_settings( $active_tab ) {
241
+	public function give_settings($active_tab) {
242 242
 
243 243
 		$give_settings = array(
244 244
 			/**
@@ -246,92 +246,92 @@  discard block
 block discarded – undo
246 246
 			 */
247 247
 			'general'     => array(
248 248
 				'id'         => 'general_settings',
249
-				'give_title' => esc_html__( 'General Settings', 'give' ),
250
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key, ), ),
251
-				'fields'     => apply_filters( 'give_settings_general', array(
249
+				'give_title' => esc_html__('General Settings', 'give'),
250
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key,),),
251
+				'fields'     => apply_filters('give_settings_general', array(
252 252
 						array(
253
-							'name' => esc_html__( 'General Settings', 'give' ),
253
+							'name' => esc_html__('General Settings', 'give'),
254 254
 							'desc' => '',
255 255
 							'type' => 'give_title',
256 256
 							'id'   => 'give_title_general_settings_1'
257 257
 						),
258 258
 						array(
259
-							'name'    => esc_html__( 'Success Page', 'give' ),
259
+							'name'    => esc_html__('Success Page', 'give'),
260 260
 							/* translators: %s: [give_receipt] */
261
-							'desc'    => sprintf( __( 'This is the page donors are sent to after completing their donations. The %s shortcode should be on this page.', 'give' ), '<code>[give_receipt]</code>' ),
261
+							'desc'    => sprintf(__('This is the page donors are sent to after completing their donations. The %s shortcode should be on this page.', 'give'), '<code>[give_receipt]</code>'),
262 262
 							'id'      => 'success_page',
263 263
 							'type'    => 'select',
264
-							'options' => give_cmb2_get_post_options( array(
264
+							'options' => give_cmb2_get_post_options(array(
265 265
 								'post_type'   => 'page',
266
-								'numberposts' => - 1
267
-							) ),
266
+								'numberposts' => -1
267
+							)),
268 268
 						),
269 269
 						array(
270
-							'name'    => esc_html__( 'Failed Transaction Page', 'give' ),
271
-							'desc'    => esc_html__( 'This is the page donors are sent to if their transaction is cancelled or fails.', 'give' ),
270
+							'name'    => esc_html__('Failed Transaction Page', 'give'),
271
+							'desc'    => esc_html__('This is the page donors are sent to if their transaction is cancelled or fails.', 'give'),
272 272
 							'id'      => 'failure_page',
273 273
 							'type'    => 'select',
274
-							'options' => give_cmb2_get_post_options( array(
274
+							'options' => give_cmb2_get_post_options(array(
275 275
 								'post_type'   => 'page',
276
-								'numberposts' => - 1
277
-							) ),
276
+								'numberposts' => -1
277
+							)),
278 278
 						),
279 279
 						array(
280
-							'name'    => esc_html__( 'Donation History Page', 'give' ),
280
+							'name'    => esc_html__('Donation History Page', 'give'),
281 281
 							/* translators: %s: [donation_history] */
282
-							'desc'    => sprintf( __( 'This page shows a complete donation history for the current user. The %s shortcode should be on this page.', 'give' ), '<code>[donation_history]</code>' ),
282
+							'desc'    => sprintf(__('This page shows a complete donation history for the current user. The %s shortcode should be on this page.', 'give'), '<code>[donation_history]</code>'),
283 283
 							'id'      => 'history_page',
284 284
 							'type'    => 'select',
285
-							'options' => give_cmb2_get_post_options( array(
285
+							'options' => give_cmb2_get_post_options(array(
286 286
 								'post_type'   => 'page',
287
-								'numberposts' => - 1
288
-							) ),
287
+								'numberposts' => -1
288
+							)),
289 289
 						),
290 290
 						array(
291
-							'name'    => esc_html__( 'Base Country', 'give' ),
292
-							'desc'    => esc_html__( 'Where does your site operate from?', 'give' ),
291
+							'name'    => esc_html__('Base Country', 'give'),
292
+							'desc'    => esc_html__('Where does your site operate from?', 'give'),
293 293
 							'id'      => 'base_country',
294 294
 							'type'    => 'select',
295 295
 							'options' => give_get_country_list(),
296 296
 						),
297 297
 						array(
298
-							'name' => esc_html__( 'Currency Settings', 'give' ),
298
+							'name' => esc_html__('Currency Settings', 'give'),
299 299
 							'desc' => '',
300 300
 							'type' => 'give_title',
301 301
 							'id'   => 'give_title_general_settings_2'
302 302
 						),
303 303
 						array(
304
-							'name'    => esc_html__( 'Currency', 'give' ),
305
-							'desc'    => esc_html__( 'Choose your currency. Note that some payment gateways have currency restrictions.', 'give' ),
304
+							'name'    => esc_html__('Currency', 'give'),
305
+							'desc'    => esc_html__('Choose your currency. Note that some payment gateways have currency restrictions.', 'give'),
306 306
 							'id'      => 'currency',
307 307
 							'type'    => 'select',
308 308
 							'options' => give_get_currencies(),
309 309
 							'default' => 'USD',
310 310
 						),
311 311
 						array(
312
-							'name'    => esc_html__( 'Currency Position', 'give' ),
313
-							'desc'    => esc_html__( 'Choose the position of the currency sign.', 'give' ),
312
+							'name'    => esc_html__('Currency Position', 'give'),
313
+							'desc'    => esc_html__('Choose the position of the currency sign.', 'give'),
314 314
 							'id'      => 'currency_position',
315 315
 							'type'    => 'select',
316 316
 							'options' => array(
317 317
 								/* translators: %s: currency symbol */
318
-								'before' => sprintf( esc_html__( 'Before - %s10', 'give' ), give_currency_symbol( give_get_currency() ) ),
318
+								'before' => sprintf(esc_html__('Before - %s10', 'give'), give_currency_symbol(give_get_currency())),
319 319
 								/* translators: %s: currency symbol */
320
-								'after'  => sprintf( esc_html__( 'After - 10%s', 'give' ), give_currency_symbol( give_get_currency() ) )
320
+								'after'  => sprintf(esc_html__('After - 10%s', 'give'), give_currency_symbol(give_get_currency()))
321 321
 							),
322 322
 							'default' => 'before',
323 323
 						),
324 324
 						array(
325
-							'name'    => esc_html__( 'Thousands Separator', 'give' ),
326
-							'desc'    => esc_html__( 'The symbol (typically , or .) to separate thousands.', 'give' ),
325
+							'name'    => esc_html__('Thousands Separator', 'give'),
326
+							'desc'    => esc_html__('The symbol (typically , or .) to separate thousands.', 'give'),
327 327
 							'id'      => 'thousands_separator',
328 328
 							'type'    => 'text_small',
329 329
 							'sanitization_cb' => 'give_sanitize_thousand_separator',
330 330
 							'default' => ',',
331 331
 						),
332 332
 						array(
333
-							'name'    => esc_html__( 'Decimal Separator', 'give' ),
334
-							'desc'    => esc_html__( 'The symbol (usually , or .) to separate decimal points.', 'give' ),
333
+							'name'    => esc_html__('Decimal Separator', 'give'),
334
+							'desc'    => esc_html__('The symbol (usually , or .) to separate decimal points.', 'give'),
335 335
 							'id'      => 'decimal_separator',
336 336
 							'type'    => 'text_small',
337 337
 							'default' => '.',
@@ -344,83 +344,83 @@  discard block
 block discarded – undo
344 344
 			 */
345 345
 			'gateways'    => array(
346 346
 				'id'         => 'payment_gateways',
347
-				'give_title' => esc_html__( 'Payment Gateways', 'give' ),
348
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key, ), ),
349
-				'fields'     => apply_filters( 'give_settings_gateways', array(
347
+				'give_title' => esc_html__('Payment Gateways', 'give'),
348
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key,),),
349
+				'fields'     => apply_filters('give_settings_gateways', array(
350 350
 						array(
351
-							'name' => esc_html__( 'Gateways Settings', 'give' ),
351
+							'name' => esc_html__('Gateways Settings', 'give'),
352 352
 							'desc' => '',
353 353
 							'id'   => 'give_title_gateway_settings_1',
354 354
 							'type' => 'give_title'
355 355
 						),
356 356
 						array(
357
-							'name' => esc_html__( 'Test Mode', 'give' ),
358
-							'desc' => esc_html__( 'While in test mode no live transactions are processed. To fully use test mode, you must have a sandbox (test) account for the payment gateway you are testing.', 'give' ),
357
+							'name' => esc_html__('Test Mode', 'give'),
358
+							'desc' => esc_html__('While in test mode no live transactions are processed. To fully use test mode, you must have a sandbox (test) account for the payment gateway you are testing.', 'give'),
359 359
 							'id'   => 'test_mode',
360 360
 							'type' => 'checkbox'
361 361
 						),
362 362
 						array(
363
-							'name' => esc_html__( 'Enabled Gateways', 'give' ),
364
-							'desc' => esc_html__( 'Choose the payment gateways you would like enabled. You can drag-and-drop payment gateways to reorder them.', 'give' ),
363
+							'name' => esc_html__('Enabled Gateways', 'give'),
364
+							'desc' => esc_html__('Choose the payment gateways you would like enabled. You can drag-and-drop payment gateways to reorder them.', 'give'),
365 365
 							'id'   => 'gateways',
366 366
 							'type' => 'enabled_gateways'
367 367
 						),
368 368
 						array(
369
-							'name' => esc_html__( 'Default Gateway', 'give' ),
370
-							'desc' => esc_html__( 'This is the gateway that will be selected by default.', 'give' ),
369
+							'name' => esc_html__('Default Gateway', 'give'),
370
+							'desc' => esc_html__('This is the gateway that will be selected by default.', 'give'),
371 371
 							'id'   => 'default_gateway',
372 372
 							'type' => 'default_gateway'
373 373
 						),
374 374
 						array(
375
-							'name' => esc_html__( 'PayPal Standard', 'give' ),
375
+							'name' => esc_html__('PayPal Standard', 'give'),
376 376
 							'desc' => '',
377 377
 							'type' => 'give_title',
378 378
 							'id'   => 'give_title_gateway_settings_2',
379 379
 						),
380 380
 						array(
381
-							'name' => esc_html__( 'PayPal Email', 'give' ),
382
-							'desc' => esc_html__( 'Enter your PayPal account\'s email.', 'give' ),
381
+							'name' => esc_html__('PayPal Email', 'give'),
382
+							'desc' => esc_html__('Enter your PayPal account\'s email.', 'give'),
383 383
 							'id'   => 'paypal_email',
384 384
 							'type' => 'text_email',
385 385
 						),
386 386
 						array(
387
-							'name' => esc_html__( 'PayPal Page Style', 'give' ),
388
-							'desc' => esc_html__( 'Enter the name of the page style to use, or leave blank to use the default.', 'give' ),
387
+							'name' => esc_html__('PayPal Page Style', 'give'),
388
+							'desc' => esc_html__('Enter the name of the page style to use, or leave blank to use the default.', 'give'),
389 389
 							'id'   => 'paypal_page_style',
390 390
 							'type' => 'text',
391 391
 						),
392 392
 						array(
393
-							'name'    => esc_html__( 'PayPal Transaction Type', 'give' ),
394
-							'desc'    => esc_html__( 'Nonprofits must verify their status to withdraw donations they receive via PayPal. PayPal users that are not verified nonprofits must demonstrate how their donations will be used, once they raise more than $10,000. By default, Give transactions are sent to PayPal as donations. You may change the transaction type using this option if you feel you may not meet PayPal\'s donation requirements.', 'give' ),
393
+							'name'    => esc_html__('PayPal Transaction Type', 'give'),
394
+							'desc'    => esc_html__('Nonprofits must verify their status to withdraw donations they receive via PayPal. PayPal users that are not verified nonprofits must demonstrate how their donations will be used, once they raise more than $10,000. By default, Give transactions are sent to PayPal as donations. You may change the transaction type using this option if you feel you may not meet PayPal\'s donation requirements.', 'give'),
395 395
 							'id'      => 'paypal_button_type',
396 396
 							'type'    => 'radio_inline',
397 397
 							'options' => array(
398
-								'donation' => esc_html__( 'Donation', 'give' ),
399
-								'standard' => esc_html__( 'Standard Transaction', 'give' )
398
+								'donation' => esc_html__('Donation', 'give'),
399
+								'standard' => esc_html__('Standard Transaction', 'give')
400 400
 							),
401 401
 							'default' => 'donation',
402 402
 						),
403 403
 						array(
404
-							'name' => esc_html__( 'Disable PayPal IPN Verification', 'give' ),
405
-							'desc' => esc_html__( 'If donations are not getting marked as complete, then check this box. This forces the site to use a slightly less secure method of verifying donations.', 'give' ),
404
+							'name' => esc_html__('Disable PayPal IPN Verification', 'give'),
405
+							'desc' => esc_html__('If donations are not getting marked as complete, then check this box. This forces the site to use a slightly less secure method of verifying donations.', 'give'),
406 406
 							'id'   => 'disable_paypal_verification',
407 407
 							'type' => 'checkbox'
408 408
 						),
409 409
 						array(
410
-							'name' => esc_html__( 'Offline Donations', 'give' ),
410
+							'name' => esc_html__('Offline Donations', 'give'),
411 411
 							'desc' => '',
412 412
 							'type' => 'give_title',
413 413
 							'id'   => 'give_title_gateway_settings_3',
414 414
 						),
415 415
 						array(
416
-							'name' => esc_html__( 'Collect Billing Details', 'give' ),
417
-							'desc' => esc_html__( 'This option will enable the billing details section for offline donations. The fieldset will appear above the offline donation instructions. Note: You may customize this option per form as needed.', 'give' ),
416
+							'name' => esc_html__('Collect Billing Details', 'give'),
417
+							'desc' => esc_html__('This option will enable the billing details section for offline donations. The fieldset will appear above the offline donation instructions. Note: You may customize this option per form as needed.', 'give'),
418 418
 							'id'   => 'give_offline_donation_enable_billing_fields',
419 419
 							'type' => 'checkbox'
420 420
 						),
421 421
 						array(
422
-							'name'    => esc_html__( 'Offline Donation Instructions', 'give' ),
423
-							'desc'    => esc_html__( 'The following content will appear for all forms when the user selects the offline donation payment option. Note: You may customize the content per form as needed.', 'give' ),
422
+							'name'    => esc_html__('Offline Donation Instructions', 'give'),
423
+							'desc'    => esc_html__('The following content will appear for all forms when the user selects the offline donation payment option. Note: You may customize the content per form as needed.', 'give'),
424 424
 							'id'      => 'global_offline_donation_content',
425 425
 							'default' => give_get_default_offline_donation_content(),
426 426
 							'type'    => 'wysiwyg',
@@ -429,15 +429,15 @@  discard block
 block discarded – undo
429 429
 							)
430 430
 						),
431 431
 						array(
432
-							'name'    => esc_html__( 'Offline Donation Email Instructions Subject', 'give' ),
433
-							'desc'    => esc_html__( 'Enter the subject line for the donation receipt email.', 'give' ),
432
+							'name'    => esc_html__('Offline Donation Email Instructions Subject', 'give'),
433
+							'desc'    => esc_html__('Enter the subject line for the donation receipt email.', 'give'),
434 434
 							'id'      => 'offline_donation_subject',
435
-							'default' => esc_attr__( '{donation} - Offline Donation Instructions', 'give' ),
435
+							'default' => esc_attr__('{donation} - Offline Donation Instructions', 'give'),
436 436
 							'type'    => 'text'
437 437
 						),
438 438
 						array(
439
-							'name'    => esc_html__( 'Offline Donation Email Instructions', 'give' ),
440
-							'desc'    => esc_html__( 'Enter the instructions you want emailed to the donor after they have submitted the donation form. Most likely this would include important information like mailing address and who to make the check out to.', 'give' ),
439
+							'name'    => esc_html__('Offline Donation Email Instructions', 'give'),
440
+							'desc'    => esc_html__('Enter the instructions you want emailed to the donor after they have submitted the donation form. Most likely this would include important information like mailing address and who to make the check out to.', 'give'),
441 441
 							'id'      => 'global_offline_donation_email',
442 442
 							'default' => give_get_default_offline_donation_email_content(),
443 443
 							'type'    => 'wysiwyg',
@@ -451,95 +451,95 @@  discard block
 block discarded – undo
451 451
 			/** Display Settings */
452 452
 			'display'     => array(
453 453
 				'id'         => 'display_settings',
454
-				'give_title' => esc_html__( 'Display Settings', 'give' ),
455
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key, ), ),
456
-				'fields'     => apply_filters( 'give_settings_display', array(
454
+				'give_title' => esc_html__('Display Settings', 'give'),
455
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key,),),
456
+				'fields'     => apply_filters('give_settings_display', array(
457 457
 						array(
458
-							'name' => esc_html__( 'Display Settings', 'give' ),
458
+							'name' => esc_html__('Display Settings', 'give'),
459 459
 							'desc' => '',
460 460
 							'id'   => 'give_title_display_settings_1',
461 461
 							'type' => 'give_title'
462 462
 						),
463 463
 						array(
464
-							'name' => esc_html__( 'Disable CSS', 'give' ),
465
-							'desc' => esc_html__( 'Enable this option if you would like to disable all of Give\'s included CSS stylesheets.', 'give' ),
464
+							'name' => esc_html__('Disable CSS', 'give'),
465
+							'desc' => esc_html__('Enable this option if you would like to disable all of Give\'s included CSS stylesheets.', 'give'),
466 466
 							'id'   => 'disable_css',
467 467
 							'type' => 'checkbox'
468 468
 						),
469 469
 						array(
470
-							'name' => esc_html__( 'Enable Floating Labels', 'give' ),
470
+							'name' => esc_html__('Enable Floating Labels', 'give'),
471 471
 							/* translators: %s: http://bradfrost.com/blog/post/float-label-pattern/ */
472
-							'desc' => sprintf( wp_kses ( __( 'Enable this option if you would like to enable <a href="%s" target="_blank">floating labels</a> in Give\'s donation forms. <br />Be aware that if you have the "Disable CSS" option enabled, you will need to style the floating labels yourself.', 'give' ) , array(  'a' => array( 'href' => array() ) ) ), esc_url( 'http://bradfrost.com/blog/post/float-label-pattern/' ) ),
472
+							'desc' => sprintf(wp_kses(__('Enable this option if you would like to enable <a href="%s" target="_blank">floating labels</a> in Give\'s donation forms. <br />Be aware that if you have the "Disable CSS" option enabled, you will need to style the floating labels yourself.', 'give'), array('a' => array('href' => array()))), esc_url('http://bradfrost.com/blog/post/float-label-pattern/')),
473 473
 							'id'   => 'enable_floatlabels',
474 474
 							'type' => 'checkbox'
475 475
 						),
476 476
 						array(
477
-							'name' => esc_html__( 'Disable Welcome Screen', 'give' ),
477
+							'name' => esc_html__('Disable Welcome Screen', 'give'),
478 478
 							/* translators: %s: about page URL */
479
-							'desc' => sprintf( wp_kses ( __( 'Enable this option if you would like to disable the Give Welcome screen every time Give is activated and/or updated. You can always access the <a href="%s">Welcome Screen</a> if you want in the future.', 'give' ), array(  'a' => array( 'href' => array() ) ) ), esc_url( admin_url( 'index.php?page=give-about' ) ) ),
479
+							'desc' => sprintf(wp_kses(__('Enable this option if you would like to disable the Give Welcome screen every time Give is activated and/or updated. You can always access the <a href="%s">Welcome Screen</a> if you want in the future.', 'give'), array('a' => array('href' => array()))), esc_url(admin_url('index.php?page=give-about'))),
480 480
 							'id'   => 'disable_welcome',
481 481
 							'type' => 'checkbox'
482 482
 						),
483 483
 						array(
484
-							'name' => esc_html__( 'Post Types', 'give' ),
484
+							'name' => esc_html__('Post Types', 'give'),
485 485
 							'desc' => '',
486 486
 							'id'   => 'give_title_display_settings_2',
487 487
 							'type' => 'give_title'
488 488
 						),
489 489
 						array(
490
-							'name' => esc_html__( 'Disable Form Single Views', 'give' ),
491
-							'desc' => esc_html__( 'By default, all forms have single views enabled which create a specific URL on your website for that form. This option disables the singular and archive views from being publicly viewable. Note: you will need to embed forms using a shortcode or widget if enabled.', 'give' ),
490
+							'name' => esc_html__('Disable Form Single Views', 'give'),
491
+							'desc' => esc_html__('By default, all forms have single views enabled which create a specific URL on your website for that form. This option disables the singular and archive views from being publicly viewable. Note: you will need to embed forms using a shortcode or widget if enabled.', 'give'),
492 492
 							'id'   => 'disable_forms_singular',
493 493
 							'type' => 'checkbox'
494 494
 						),
495 495
 						array(
496
-							'name' => esc_html__( 'Disable Form Archives', 'give' ),
497
-							'desc' => esc_html__( 'Archives pages list all the forms you have created. This option will disable only the form\'s archive page(s). The single form\'s view will remain in place. Note: you will need to refresh your permalinks after this option has been enabled.', 'give' ),
496
+							'name' => esc_html__('Disable Form Archives', 'give'),
497
+							'desc' => esc_html__('Archives pages list all the forms you have created. This option will disable only the form\'s archive page(s). The single form\'s view will remain in place. Note: you will need to refresh your permalinks after this option has been enabled.', 'give'),
498 498
 							'id'   => 'disable_forms_archives',
499 499
 							'type' => 'checkbox'
500 500
 						),
501 501
 						array(
502
-							'name' => esc_html__( 'Disable Form Excerpts', 'give' ),
503
-							'desc' => esc_html__( 'The excerpt is an optional summary or description of a donation form; in short, a summary as to why the user should give.', 'give' ),
502
+							'name' => esc_html__('Disable Form Excerpts', 'give'),
503
+							'desc' => esc_html__('The excerpt is an optional summary or description of a donation form; in short, a summary as to why the user should give.', 'give'),
504 504
 							'id'   => 'disable_forms_excerpt',
505 505
 							'type' => 'checkbox'
506 506
 						),
507 507
 
508 508
 						array(
509
-							'name'    => esc_html__( 'Featured Image Size', 'give' ),
510
-							'desc'    => esc_html__( 'The Featured Image is an image that is chosen as the representative image for a donation form. Some themes may have custom featured image sizes. Please select the size you would like to display for your single donation forms\' featured image.', 'give' ),
509
+							'name'    => esc_html__('Featured Image Size', 'give'),
510
+							'desc'    => esc_html__('The Featured Image is an image that is chosen as the representative image for a donation form. Some themes may have custom featured image sizes. Please select the size you would like to display for your single donation forms\' featured image.', 'give'),
511 511
 							'id'      => 'featured_image_size',
512 512
 							'type'    => 'select',
513 513
 							'default' => 'large',
514 514
 							'options' => give_get_featured_image_sizes()
515 515
 						),
516 516
 						array(
517
-							'name' => esc_html__( 'Disable Form Featured Image', 'give' ),
518
-							'desc' => esc_html__( 'If you do not wish to use the featured image functionality you can disable it using this option and it will not be displayed for single donation forms.', 'give' ),
517
+							'name' => esc_html__('Disable Form Featured Image', 'give'),
518
+							'desc' => esc_html__('If you do not wish to use the featured image functionality you can disable it using this option and it will not be displayed for single donation forms.', 'give'),
519 519
 							'id'   => 'disable_form_featured_img',
520 520
 							'type' => 'checkbox'
521 521
 						),
522 522
 						array(
523
-							'name' => esc_html__( 'Disable Single Form Sidebar', 'give' ),
524
-							'desc' => esc_html__( 'The sidebar allows you to add additional widget to the Give single form view. If you don\'t plan on using the sidebar you may disable it with this option.', 'give' ),
523
+							'name' => esc_html__('Disable Single Form Sidebar', 'give'),
524
+							'desc' => esc_html__('The sidebar allows you to add additional widget to the Give single form view. If you don\'t plan on using the sidebar you may disable it with this option.', 'give'),
525 525
 							'id'   => 'disable_form_sidebar',
526 526
 							'type' => 'checkbox'
527 527
 						),
528 528
 						array(
529
-							'name' => esc_html__( 'Taxonomies', 'give' ),
529
+							'name' => esc_html__('Taxonomies', 'give'),
530 530
 							'desc' => '',
531 531
 							'id'   => 'give_title_display_settings_3',
532 532
 							'type' => 'give_title'
533 533
 						),
534 534
 						array(
535
-							'name' => esc_html__( 'Enable Form Categories', 'give' ),
536
-							'desc' => esc_html__( 'Check this option if you would like to categorize your donation forms. This option enables the form\'s category taxonomy.', 'give' ),
535
+							'name' => esc_html__('Enable Form Categories', 'give'),
536
+							'desc' => esc_html__('Check this option if you would like to categorize your donation forms. This option enables the form\'s category taxonomy.', 'give'),
537 537
 							'id'   => 'enable_categories',
538 538
 							'type' => 'checkbox'
539 539
 						),
540 540
 						array(
541
-							'name' => esc_html__( 'Enable Form Tags', 'give' ),
542
-							'desc' => esc_html__( 'Check this option if you would like to tag your donation forms. This option enables the form\'s tag taxonomy.', 'give' ),
541
+							'name' => esc_html__('Enable Form Tags', 'give'),
542
+							'desc' => esc_html__('Check this option if you would like to tag your donation forms. This option enables the form\'s tag taxonomy.', 'give'),
543 543
 							'id'   => 'enable_tags',
544 544
 							'type' => 'checkbox'
545 545
 						),
@@ -552,95 +552,95 @@  discard block
 block discarded – undo
552 552
 			 */
553 553
 			'emails'      => array(
554 554
 				'id'         => 'email_settings',
555
-				'give_title' => esc_html__( 'Email Settings', 'give' ),
556
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key, ), ),
557
-				'fields'     => apply_filters( 'give_settings_emails', array(
555
+				'give_title' => esc_html__('Email Settings', 'give'),
556
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key,),),
557
+				'fields'     => apply_filters('give_settings_emails', array(
558 558
 						array(
559
-							'name' => esc_html__( 'Email Settings', 'give' ),
559
+							'name' => esc_html__('Email Settings', 'give'),
560 560
 							'desc' => '',
561 561
 							'id'   => 'give_title_email_settings_1',
562 562
 							'type' => 'give_title'
563 563
 						),
564 564
 						array(
565 565
 							'id'      => 'email_template',
566
-							'name'    => esc_html__( 'Email Template', 'give' ),
567
-							'desc'    => esc_html__( 'Choose a template. Click "Save Changes" then "Preview Donation Receipt" to see the new template.', 'give' ),
566
+							'name'    => esc_html__('Email Template', 'give'),
567
+							'desc'    => esc_html__('Choose a template. Click "Save Changes" then "Preview Donation Receipt" to see the new template.', 'give'),
568 568
 							'type'    => 'select',
569 569
 							'options' => give_get_email_templates()
570 570
 						),
571 571
 						array(
572 572
 							'id'   => 'email_logo',
573
-							'name' => esc_html__( 'Logo', 'give' ),
574
-							'desc' => esc_html__( 'Upload or choose a logo to be displayed at the top of the donation receipt emails. Displayed on HTML emails only.', 'give' ),
573
+							'name' => esc_html__('Logo', 'give'),
574
+							'desc' => esc_html__('Upload or choose a logo to be displayed at the top of the donation receipt emails. Displayed on HTML emails only.', 'give'),
575 575
 							'type' => 'file'
576 576
 						),
577 577
 						array(
578 578
 							'id'      => 'from_name',
579
-							'name'    => esc_html__( 'From Name', 'give' ),
580
-							'desc'    => esc_html__( 'The name donation receipts are said to come from. This should probably be your site or shop name.', 'give' ),
581
-							'default' => get_bloginfo( 'name' ),
579
+							'name'    => esc_html__('From Name', 'give'),
580
+							'desc'    => esc_html__('The name donation receipts are said to come from. This should probably be your site or shop name.', 'give'),
581
+							'default' => get_bloginfo('name'),
582 582
 							'type'    => 'text'
583 583
 						),
584 584
 						array(
585 585
 							'id'      => 'from_email',
586
-							'name'    => esc_html__( 'From Email', 'give' ),
587
-							'desc'    => esc_html__( 'Email to send donation receipts from. This will act as the "from" and "reply-to" address.', 'give' ),
588
-							'default' => get_bloginfo( 'admin_email' ),
586
+							'name'    => esc_html__('From Email', 'give'),
587
+							'desc'    => esc_html__('Email to send donation receipts from. This will act as the "from" and "reply-to" address.', 'give'),
588
+							'default' => get_bloginfo('admin_email'),
589 589
 							'type'    => 'text'
590 590
 						),
591 591
 						array(
592
-							'name' => esc_html__( 'Donation Receipt', 'give' ),
592
+							'name' => esc_html__('Donation Receipt', 'give'),
593 593
 							'desc' => '',
594 594
 							'id'   => 'give_title_email_settings_2',
595 595
 							'type' => 'give_title'
596 596
 						),
597 597
 						array(
598 598
 							'id'      => 'donation_subject',
599
-							'name'    => esc_html__( 'Donation Email Subject', 'give' ),
600
-							'desc'    => esc_html__( 'Enter the subject line for the donation receipt email.', 'give' ),
601
-							'default' => esc_attr__( 'Donation Receipt', 'give' ),
599
+							'name'    => esc_html__('Donation Email Subject', 'give'),
600
+							'desc'    => esc_html__('Enter the subject line for the donation receipt email.', 'give'),
601
+							'default' => esc_attr__('Donation Receipt', 'give'),
602 602
 							'type'    => 'text'
603 603
 						),
604 604
 						array(
605 605
 							'id'      => 'donation_receipt',
606
-							'name'    => esc_html__( 'Donation Receipt', 'give' ),
606
+							'name'    => esc_html__('Donation Receipt', 'give'),
607 607
 							/* translators: %s: emails tags list */
608
-							'desc'    => sprintf( __( 'Enter the email that is sent to users after completing a successful donation. HTML is accepted. Available template tags: %s', 'give' ), give_get_emails_tags_list() ) . '<br/>',
608
+							'desc'    => sprintf(__('Enter the email that is sent to users after completing a successful donation. HTML is accepted. Available template tags: %s', 'give'), give_get_emails_tags_list()).'<br/>',
609 609
 							'type'    => 'wysiwyg',
610 610
 							'default' => give_get_default_donation_receipt_email()
611 611
 						),
612 612
 						array(
613
-							'name' => esc_html__( 'New Donation Notification', 'give' ),
613
+							'name' => esc_html__('New Donation Notification', 'give'),
614 614
 							'desc' => '',
615 615
 							'id'   => 'give_title_email_settings_3',
616 616
 							'type' => 'give_title'
617 617
 						),
618 618
 						array(
619 619
 							'id'      => 'donation_notification_subject',
620
-							'name'    => esc_html__( 'Donation Notification Subject', 'give' ),
621
-							'desc'    => esc_html__( 'Enter the subject line for the donation notification email.', 'give' ),
620
+							'name'    => esc_html__('Donation Notification Subject', 'give'),
621
+							'desc'    => esc_html__('Enter the subject line for the donation notification email.', 'give'),
622 622
 							'type'    => 'text',
623
-							'default' => esc_attr__( 'New Donation - #{payment_id}', 'give' )
623
+							'default' => esc_attr__('New Donation - #{payment_id}', 'give')
624 624
 						),
625 625
 						array(
626 626
 							'id'      => 'donation_notification',
627
-							'name'    => esc_html__( 'Donation Notification', 'give' ),
627
+							'name'    => esc_html__('Donation Notification', 'give'),
628 628
 							/* translators: %s: emails tags list */
629
-							'desc'    => sprintf( __( 'Enter the email that is sent to donation notification emails after completion of a donation. HTML is accepted. Available template tags: %s', 'give' ), give_get_emails_tags_list() ) . '<br/>',
629
+							'desc'    => sprintf(__('Enter the email that is sent to donation notification emails after completion of a donation. HTML is accepted. Available template tags: %s', 'give'), give_get_emails_tags_list()).'<br/>',
630 630
 							'type'    => 'wysiwyg',
631 631
 							'default' => give_get_default_donation_notification_email()
632 632
 						),
633 633
 						array(
634 634
 							'id'      => 'admin_notice_emails',
635
-							'name'    => esc_html__( 'Donation Notification Emails', 'give' ),
636
-							'desc'    => __( 'Enter the email address(es) that should receive a notification anytime a donation is made, please only enter <span class="give-underline">one email address per line</span> and not separated by commas.', 'give' ),
635
+							'name'    => esc_html__('Donation Notification Emails', 'give'),
636
+							'desc'    => __('Enter the email address(es) that should receive a notification anytime a donation is made, please only enter <span class="give-underline">one email address per line</span> and not separated by commas.', 'give'),
637 637
 							'type'    => 'textarea',
638
-							'default' => get_bloginfo( 'admin_email' )
638
+							'default' => get_bloginfo('admin_email')
639 639
 						),
640 640
 						array(
641 641
 							'id'   => 'disable_admin_notices',
642
-							'name' => esc_html__( 'Disable Admin Notifications', 'give' ),
643
-							'desc' => esc_html__( 'Check this box if you do not want to receive emails when new donations are made.', 'give' ),
642
+							'name' => esc_html__('Disable Admin Notifications', 'give'),
643
+							'desc' => esc_html__('Check this box if you do not want to receive emails when new donations are made.', 'give'),
644 644
 							'type' => 'checkbox'
645 645
 						)
646 646
 					)
@@ -649,99 +649,99 @@  discard block
 block discarded – undo
649 649
 			/** Extension Settings */
650 650
 			'addons'      => array(
651 651
 				'id'         => 'addons',
652
-				'give_title' => esc_html__( 'Give Add-ons Settings', 'give' ),
653
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key, ), ),
654
-				'fields'     => apply_filters( 'give_settings_addons', array()
652
+				'give_title' => esc_html__('Give Add-ons Settings', 'give'),
653
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key,),),
654
+				'fields'     => apply_filters('give_settings_addons', array()
655 655
 				)
656 656
 			),
657 657
 			/** Licenses Settings */
658 658
 			'licenses'    => array(
659 659
 				'id'         => 'licenses',
660
-				'give_title' => esc_html__( 'Give Licenses', 'give' ),
661
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key, ), ),
662
-				'fields'     => apply_filters( 'give_settings_licenses', array()
660
+				'give_title' => esc_html__('Give Licenses', 'give'),
661
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key,),),
662
+				'fields'     => apply_filters('give_settings_licenses', array()
663 663
 				)
664 664
 			),
665 665
 			/** Advanced Options */
666 666
 			'advanced'    => array(
667 667
 				'id'         => 'advanced_options',
668
-				'give_title' => esc_html__( 'Advanced Options', 'give' ),
669
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key, ), ),
670
-				'fields'     => apply_filters( 'give_settings_advanced', array(
668
+				'give_title' => esc_html__('Advanced Options', 'give'),
669
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key,),),
670
+				'fields'     => apply_filters('give_settings_advanced', array(
671 671
 						array(
672
-							'name' => esc_html__( 'Access Control', 'give' ),
672
+							'name' => esc_html__('Access Control', 'give'),
673 673
 							'desc' => '',
674 674
 							'id'   => 'give_title_session_control_1',
675 675
 							'type' => 'give_title'
676 676
 						),
677 677
 						array(
678 678
 							'id'      => 'session_lifetime',
679
-							'name'    => esc_html__( 'Session Lifetime', 'give' ),
680
-							'desc'    => esc_html__( 'Give will start a new session per user once they have donated. This option controls the lifetime a user\'s session is kept alive. An active session allows users to view donation receipts on your site without having to be logged in as long as they are using the same browser they used when donating.', 'give' ),
679
+							'name'    => esc_html__('Session Lifetime', 'give'),
680
+							'desc'    => esc_html__('Give will start a new session per user once they have donated. This option controls the lifetime a user\'s session is kept alive. An active session allows users to view donation receipts on your site without having to be logged in as long as they are using the same browser they used when donating.', 'give'),
681 681
 							'type'    => 'select',
682 682
 							'options' => array(
683
-								'86400'  => esc_html__( '24 Hours', 'give' ),
684
-								'172800' => esc_html__( '48 Hours', 'give' ),
685
-								'259200' => esc_html__( '72 Hours', 'give' ),
686
-								'604800' => esc_html__( '1 Week', 'give' ),
683
+								'86400'  => esc_html__('24 Hours', 'give'),
684
+								'172800' => esc_html__('48 Hours', 'give'),
685
+								'259200' => esc_html__('72 Hours', 'give'),
686
+								'604800' => esc_html__('1 Week', 'give'),
687 687
 							)
688 688
 						),
689 689
 						array(
690
-							'name' => esc_html__( 'Email Access', 'give' ),
691
-							'desc' => esc_html__( 'Would you like your donors to be able to access their donation history using only email? Donors whose sessions have expired and do not have an account may still access their donation history via a temporary email access link.', 'give' ),
690
+							'name' => esc_html__('Email Access', 'give'),
691
+							'desc' => esc_html__('Would you like your donors to be able to access their donation history using only email? Donors whose sessions have expired and do not have an account may still access their donation history via a temporary email access link.', 'give'),
692 692
 							'id'   => 'email_access',
693 693
 							'type' => 'checkbox',
694 694
 						),
695 695
 						array(
696 696
 							'id'      => 'recaptcha_key',
697
-							'name'    => esc_html__( 'reCAPTCHA Site Key', 'give' ),
697
+							'name'    => esc_html__('reCAPTCHA Site Key', 'give'),
698 698
 							/* translators: %s: https://www.google.com/recaptcha/ */
699
-							'desc'    => sprintf( __( 'If you would like to prevent spam on the email access form navigate to <a href="%s" target="_blank">the reCAPTCHA website</a> and sign up for an API key. The reCAPTCHA uses Google\'s user-friendly single click verification method.', 'give' ), esc_url( 'https://www.google.com/recaptcha/' ) ),
699
+							'desc'    => sprintf(__('If you would like to prevent spam on the email access form navigate to <a href="%s" target="_blank">the reCAPTCHA website</a> and sign up for an API key. The reCAPTCHA uses Google\'s user-friendly single click verification method.', 'give'), esc_url('https://www.google.com/recaptcha/')),
700 700
 							'default' => '',
701 701
 							'type'    => 'text'
702 702
 						),
703 703
 						array(
704 704
 							'id'      => 'recaptcha_secret',
705
-							'name'    => esc_html__( 'reCAPTCHA Secret Key', 'give' ),
706
-							'desc'    => esc_html__( 'Please paste the reCAPTCHA secret key here from your manage reCAPTCHA API Keys panel.', 'give' ),
705
+							'name'    => esc_html__('reCAPTCHA Secret Key', 'give'),
706
+							'desc'    => esc_html__('Please paste the reCAPTCHA secret key here from your manage reCAPTCHA API Keys panel.', 'give'),
707 707
 							'default' => '',
708 708
 							'type'    => 'text'
709 709
 						),
710 710
 						array(
711
-							'name' => esc_html__( 'Data Control', 'give' ),
711
+							'name' => esc_html__('Data Control', 'give'),
712 712
 							'desc' => '',
713 713
 							'id'   => 'give_title_data_control_2',
714 714
 							'type' => 'give_title'
715 715
 						),
716 716
 						array(
717
-							'name' => esc_html__( 'Remove All Data on Uninstall?', 'give' ),
718
-							'desc' => esc_html__( 'Check this box if you would like Give to completely remove all of its data when the plugin is deleted.', 'give' ),
717
+							'name' => esc_html__('Remove All Data on Uninstall?', 'give'),
718
+							'desc' => esc_html__('Check this box if you would like Give to completely remove all of its data when the plugin is deleted.', 'give'),
719 719
 							'id'   => 'uninstall_on_delete',
720 720
 							'type' => 'checkbox'
721 721
 						),
722 722
 						array(
723
-							'name' => esc_html__( 'Filter Control', 'give' ),
723
+							'name' => esc_html__('Filter Control', 'give'),
724 724
 							'desc' => '',
725 725
 							'id'   => 'give_title_filter_control',
726 726
 							'type' => 'give_title'
727 727
 						),
728 728
 						array(
729 729
 							/* translators: %s: the_content */
730
-							'name' => sprintf( __( 'Disable %s filter', 'give' ), '<code>the_content</code>' ),
730
+							'name' => sprintf(__('Disable %s filter', 'give'), '<code>the_content</code>'),
731 731
 							/* translators: 1: https://codex.wordpress.org/Plugin_API/Filter_Reference/the_content 2: the_content */
732
-							'desc' => sprintf( __( 'If you are seeing extra social buttons, related posts, or other unwanted elements appearing within your forms then you can disable WordPress\' content filter. <a href="%1$s" target="_blank">Learn more</a> about %2$s filter.', 'give' ), esc_url( 'https://codex.wordpress.org/Plugin_API/Filter_Reference/the_content' ), '<code>the_content</code>' ),
732
+							'desc' => sprintf(__('If you are seeing extra social buttons, related posts, or other unwanted elements appearing within your forms then you can disable WordPress\' content filter. <a href="%1$s" target="_blank">Learn more</a> about %2$s filter.', 'give'), esc_url('https://codex.wordpress.org/Plugin_API/Filter_Reference/the_content'), '<code>the_content</code>'),
733 733
 							'id'   => 'disable_the_content_filter',
734 734
 							'type' => 'checkbox'
735 735
 						),
736 736
 						array(
737
-							'name' => esc_html__( 'Script Loading', 'give' ),
737
+							'name' => esc_html__('Script Loading', 'give'),
738 738
 							'desc' => '',
739 739
 							'id'   => 'give_title_script_control',
740 740
 							'type' => 'give_title'
741 741
 						),
742 742
 						array(
743
-							'name' => esc_html__( 'Load Scripts in Footer?', 'give' ),
744
-							'desc' => esc_html__( 'Check this box if you would like Give to load all frontend JavaScript files in the footer.', 'give' ),
743
+							'name' => esc_html__('Load Scripts in Footer?', 'give'),
744
+							'desc' => esc_html__('Check this box if you would like Give to load all frontend JavaScript files in the footer.', 'give'),
745 745
 							'id'   => 'scripts_footer',
746 746
 							'type' => 'checkbox'
747 747
 						)
@@ -751,13 +751,13 @@  discard block
 block discarded – undo
751 751
 			/** API Settings */
752 752
 			'api'         => array(
753 753
 				'id'         => 'api',
754
-				'give_title' => esc_html__( 'API', 'give' ),
755
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key, ), ),
754
+				'give_title' => esc_html__('API', 'give'),
755
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key,),),
756 756
 				'show_names' => false, // Hide field names on the left
757
-				'fields'     => apply_filters( 'give_settings_system', array(
757
+				'fields'     => apply_filters('give_settings_system', array(
758 758
 						array(
759 759
 							'id'   => 'api',
760
-							'name' => esc_html__( 'API', 'give' ),
760
+							'name' => esc_html__('API', 'give'),
761 761
 							'type' => 'api'
762 762
 						)
763 763
 					)
@@ -766,13 +766,13 @@  discard block
 block discarded – undo
766 766
 			/** Licenses Settings */
767 767
 			'system_info' => array(
768 768
 				'id'         => 'system_info',
769
-				'give_title' => esc_html__( 'System Info', 'give' ),
770
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key, ), ),
771
-				'fields'     => apply_filters( 'give_settings_system', array(
769
+				'give_title' => esc_html__('System Info', 'give'),
770
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key,),),
771
+				'fields'     => apply_filters('give_settings_system', array(
772 772
 						array(
773 773
 							'id'   => 'system_info',
774
-							'name' => esc_html__( 'System Info', 'give' ),
775
-							'desc' => esc_html__( 'Please copy and paste this information in your ticket when contacting support.', 'give' ),
774
+							'name' => esc_html__('System Info', 'give'),
775
+							'desc' => esc_html__('Please copy and paste this information in your ticket when contacting support.', 'give'),
776 776
 							'type' => 'system_info'
777 777
 						)
778 778
 					)
@@ -781,15 +781,15 @@  discard block
 block discarded – undo
781 781
 		);
782 782
 
783 783
 		//Return all settings array if no active tab
784
-		if ( $active_tab === null || ! isset( $give_settings[ $active_tab ] ) ) {
784
+		if ($active_tab === null || ! isset($give_settings[$active_tab])) {
785 785
 
786
-			return apply_filters( 'give_registered_settings', $give_settings );
786
+			return apply_filters('give_registered_settings', $give_settings);
787 787
 
788 788
 		}
789 789
 
790 790
 
791 791
 		// Add other tabs and settings fields as needed
792
-		return apply_filters( 'give_registered_settings', $give_settings[ $active_tab ] );
792
+		return apply_filters('give_registered_settings', $give_settings[$active_tab]);
793 793
 
794 794
 	}
795 795
 
@@ -798,11 +798,11 @@  discard block
 block discarded – undo
798 798
 	 */
799 799
 	public function settings_notices() {
800 800
 
801
-		if ( ! isset( $_POST['give_settings_saved'] ) ) {
801
+		if ( ! isset($_POST['give_settings_saved'])) {
802 802
 			return;
803 803
 		}
804 804
 
805
-		add_settings_error( 'give-notices', 'global-settings-updated', esc_html__( 'Settings updated.', 'give' ), 'updated' );
805
+		add_settings_error('give-notices', 'global-settings-updated', esc_html__('Settings updated.', 'give'), 'updated');
806 806
 
807 807
 	}
808 808
 
@@ -816,17 +816,17 @@  discard block
 block discarded – undo
816 816
 	 *
817 817
 	 * @return mixed          Field value or exception is thrown
818 818
 	 */
819
-	public function __get( $field ) {
819
+	public function __get($field) {
820 820
 
821 821
 		// Allowed fields to retrieve
822
-		if ( in_array( $field, array( 'key', 'fields', 'give_title', 'options_page' ), true ) ) {
822
+		if (in_array($field, array('key', 'fields', 'give_title', 'options_page'), true)) {
823 823
 			return $this->{$field};
824 824
 		}
825
-		if ( 'option_metabox' === $field ) {
825
+		if ('option_metabox' === $field) {
826 826
 			return $this->option_metabox();
827 827
 		}
828 828
 
829
-		throw new Exception( 'Invalid property: ' . $field );
829
+		throw new Exception('Invalid property: '.$field);
830 830
 	}
831 831
 
832 832
 
@@ -843,12 +843,12 @@  discard block
 block discarded – undo
843 843
  *
844 844
  * @return mixed        Option value
845 845
  */
846
-function give_get_option( $key = '', $default = false ) {
846
+function give_get_option($key = '', $default = false) {
847 847
 	global $give_options;
848
-	$value = ! empty( $give_options[ $key ] ) ? $give_options[ $key ] : $default;
849
-	$value = apply_filters( 'give_get_option', $value, $key, $default );
848
+	$value = ! empty($give_options[$key]) ? $give_options[$key] : $default;
849
+	$value = apply_filters('give_get_option', $value, $key, $default);
850 850
 
851
-	return apply_filters( 'give_get_option_' . $key, $value, $key, $default );
851
+	return apply_filters('give_get_option_'.$key, $value, $key, $default);
852 852
 }
853 853
 
854 854
 
@@ -866,33 +866,33 @@  discard block
 block discarded – undo
866 866
  *
867 867
  * @return boolean True if updated, false if not.
868 868
  */
869
-function give_update_option( $key = '', $value = false ) {
869
+function give_update_option($key = '', $value = false) {
870 870
 
871 871
 	// If no key, exit
872
-	if ( empty( $key ) ) {
872
+	if (empty($key)) {
873 873
 		return false;
874 874
 	}
875 875
 
876
-	if ( empty( $value ) ) {
877
-		$remove_option = give_delete_option( $key );
876
+	if (empty($value)) {
877
+		$remove_option = give_delete_option($key);
878 878
 
879 879
 		return $remove_option;
880 880
 	}
881 881
 
882 882
 	// First let's grab the current settings
883
-	$options = get_option( 'give_settings' );
883
+	$options = get_option('give_settings');
884 884
 
885 885
 	// Let's let devs alter that value coming in
886
-	$value = apply_filters( 'give_update_option', $value, $key );
886
+	$value = apply_filters('give_update_option', $value, $key);
887 887
 
888 888
 	// Next let's try to update the value
889
-	$options[ $key ] = $value;
890
-	$did_update      = update_option( 'give_settings', $options );
889
+	$options[$key] = $value;
890
+	$did_update      = update_option('give_settings', $options);
891 891
 
892 892
 	// If it updated, let's update the global variable
893
-	if ( $did_update ) {
893
+	if ($did_update) {
894 894
 		global $give_options;
895
-		$give_options[ $key ] = $value;
895
+		$give_options[$key] = $value;
896 896
 	}
897 897
 
898 898
 	return $did_update;
@@ -909,27 +909,27 @@  discard block
 block discarded – undo
909 909
  *
910 910
  * @return boolean True if updated, false if not.
911 911
  */
912
-function give_delete_option( $key = '' ) {
912
+function give_delete_option($key = '') {
913 913
 
914 914
 	// If no key, exit
915
-	if ( empty( $key ) ) {
915
+	if (empty($key)) {
916 916
 		return false;
917 917
 	}
918 918
 
919 919
 	// First let's grab the current settings
920
-	$options = get_option( 'give_settings' );
920
+	$options = get_option('give_settings');
921 921
 
922 922
 	// Next let's try to update the value
923
-	if ( isset( $options[ $key ] ) ) {
923
+	if (isset($options[$key])) {
924 924
 
925
-		unset( $options[ $key ] );
925
+		unset($options[$key]);
926 926
 
927 927
 	}
928 928
 
929
-	$did_update = update_option( 'give_settings', $options );
929
+	$did_update = update_option('give_settings', $options);
930 930
 
931 931
 	// If it updated, let's update the global variable
932
-	if ( $did_update ) {
932
+	if ($did_update) {
933 933
 		global $give_options;
934 934
 		$give_options = $options;
935 935
 	}
@@ -948,9 +948,9 @@  discard block
 block discarded – undo
948 948
  */
949 949
 function give_get_settings() {
950 950
 
951
-	$settings = get_option( 'give_settings' );
951
+	$settings = get_option('give_settings');
952 952
 
953
-	return (array) apply_filters( 'give_get_settings', $settings );
953
+	return (array) apply_filters('give_get_settings', $settings);
954 954
 
955 955
 }
956 956
 
@@ -968,25 +968,25 @@  discard block
 block discarded – undo
968 968
  *
969 969
  * @return array
970 970
  */
971
-function give_settings_array_insert( $array, $position, $insert ) {
972
-	if ( is_int( $position ) ) {
973
-		array_splice( $array, $position, 0, $insert );
971
+function give_settings_array_insert($array, $position, $insert) {
972
+	if (is_int($position)) {
973
+		array_splice($array, $position, 0, $insert);
974 974
 	} else {
975 975
 
976
-		foreach ( $array as $index => $subarray ) {
977
-			if ( isset( $subarray['id'] ) && $subarray['id'] == $position ) {
976
+		foreach ($array as $index => $subarray) {
977
+			if (isset($subarray['id']) && $subarray['id'] == $position) {
978 978
 				$pos = $index;
979 979
 			}
980 980
 		}
981 981
 
982
-		if ( ! isset( $pos ) ) {
982
+		if ( ! isset($pos)) {
983 983
 			return $array;
984 984
 		}
985 985
 
986 986
 		$array = array_merge(
987
-			array_slice( $array, 0, $pos ),
987
+			array_slice($array, 0, $pos),
988 988
 			$insert,
989
-			array_slice( $array, $pos )
989
+			array_slice($array, $pos)
990 990
 		);
991 991
 	}
992 992
 
@@ -1009,31 +1009,31 @@  discard block
 block discarded – undo
1009 1009
  *
1010 1010
  * @return void
1011 1011
  */
1012
-function give_enabled_gateways_callback( $field_object, $escaped_value, $object_id, $object_type, $field_type_object ) {
1012
+function give_enabled_gateways_callback($field_object, $escaped_value, $object_id, $object_type, $field_type_object) {
1013 1013
 
1014 1014
 	$id                = $field_type_object->field->args['id'];
1015 1015
 	$field_description = $field_type_object->field->args['desc'];
1016
-	$gateways          = give_get_ordered_payment_gateways( give_get_payment_gateways() );
1016
+	$gateways          = give_get_ordered_payment_gateways(give_get_payment_gateways());
1017 1017
 
1018 1018
 	echo '<ul class="cmb2-checkbox-list cmb2-list">';
1019 1019
 
1020
-	foreach ( $gateways as $key => $option ) :
1020
+	foreach ($gateways as $key => $option) :
1021 1021
 
1022
-		if ( is_array( $escaped_value ) && array_key_exists( $key, $escaped_value ) ) {
1022
+		if (is_array($escaped_value) && array_key_exists($key, $escaped_value)) {
1023 1023
 			$enabled = '1';
1024 1024
 		} else {
1025 1025
 			$enabled = null;
1026 1026
 		}
1027 1027
 
1028
-		echo '<li><span class="give-drag-handle"><span class="dashicons dashicons-menu"></span></span><input name="' . $id . '[' . $key . ']" id="' . $id . '[' . $key . ']" type="checkbox" value="1" ' . checked( '1', $enabled, false ) . '/>&nbsp;';
1029
-		echo '<label for="' . $id . '[' . $key . ']">' . $option['admin_label'] . '</label></li>';
1028
+		echo '<li><span class="give-drag-handle"><span class="dashicons dashicons-menu"></span></span><input name="'.$id.'['.$key.']" id="'.$id.'['.$key.']" type="checkbox" value="1" '.checked('1', $enabled, false).'/>&nbsp;';
1029
+		echo '<label for="'.$id.'['.$key.']">'.$option['admin_label'].'</label></li>';
1030 1030
 
1031 1031
 	endforeach;
1032 1032
 
1033 1033
 	echo '</ul>';
1034 1034
 
1035
-	if ( $field_description ) {
1036
-		echo '<p class="cmb2-metabox-description">' . $field_description . '</p>';
1035
+	if ($field_description) {
1036
+		echo '<p class="cmb2-metabox-description">'.$field_description.'</p>';
1037 1037
 	}
1038 1038
 
1039 1039
 }
@@ -1049,31 +1049,31 @@  discard block
 block discarded – undo
1049 1049
  *
1050 1050
  * @return void
1051 1051
  */
1052
-function give_default_gateway_callback( $field_object, $escaped_value, $object_id, $object_type, $field_type_object ) {
1052
+function give_default_gateway_callback($field_object, $escaped_value, $object_id, $object_type, $field_type_object) {
1053 1053
 
1054 1054
 	$id                = $field_type_object->field->args['id'];
1055 1055
 	$field_description = $field_type_object->field->args['desc'];
1056 1056
 	$gateways          = give_get_enabled_payment_gateways();
1057 1057
 
1058
-	echo '<select class="cmb2_select" name="' . $id . '" id="' . $id . '">';
1058
+	echo '<select class="cmb2_select" name="'.$id.'" id="'.$id.'">';
1059 1059
 
1060 1060
 	//Add a field to the Give Form admin single post view of this field
1061
-	if ( $field_type_object->field->object_type === 'post' ) {
1062
-		echo '<option value="global">' . esc_html__( 'Global Default', 'give' ) . '</option>';
1061
+	if ($field_type_object->field->object_type === 'post') {
1062
+		echo '<option value="global">'.esc_html__('Global Default', 'give').'</option>';
1063 1063
 	}
1064 1064
 
1065
-	foreach ( $gateways as $key => $option ) :
1065
+	foreach ($gateways as $key => $option) :
1066 1066
 
1067
-		$selected = isset( $escaped_value ) ? selected( $key, $escaped_value, false ) : '';
1067
+		$selected = isset($escaped_value) ? selected($key, $escaped_value, false) : '';
1068 1068
 
1069 1069
 
1070
-		echo '<option value="' . esc_attr( $key ) . '"' . $selected . '>' . esc_html( $option['admin_label'] ) . '</option>';
1070
+		echo '<option value="'.esc_attr($key).'"'.$selected.'>'.esc_html($option['admin_label']).'</option>';
1071 1071
 
1072 1072
 	endforeach;
1073 1073
 
1074 1074
 	echo '</select>';
1075 1075
 
1076
-	echo '<p class="cmb2-metabox-description">' . $field_description . '</p>';
1076
+	echo '<p class="cmb2-metabox-description">'.$field_description.'</p>';
1077 1077
 
1078 1078
 }
1079 1079
 
@@ -1088,13 +1088,13 @@  discard block
 block discarded – undo
1088 1088
  *
1089 1089
  * @return void
1090 1090
  */
1091
-function give_title_callback( $field_object, $escaped_value, $object_id, $object_type, $field_type_object ) {
1091
+function give_title_callback($field_object, $escaped_value, $object_id, $object_type, $field_type_object) {
1092 1092
 
1093 1093
 	$id                = $field_type_object->field->args['id'];
1094 1094
 	$title             = $field_type_object->field->args['name'];
1095 1095
 	$field_description = $field_type_object->field->args['desc'];
1096 1096
 
1097
-	echo '<hr>' . $field_description;
1097
+	echo '<hr>'.$field_description;
1098 1098
 
1099 1099
 }
1100 1100
 
@@ -1109,7 +1109,7 @@  discard block
 block discarded – undo
1109 1109
  *
1110 1110
  * @return void
1111 1111
  */
1112
-function give_description_callback( $field_object, $escaped_value, $object_id, $object_type, $field_type_object ) {
1112
+function give_description_callback($field_object, $escaped_value, $object_id, $object_type, $field_type_object) {
1113 1113
 
1114 1114
 	$id                = $field_type_object->field->args['id'];
1115 1115
 	$title             = $field_type_object->field->args['name'];
@@ -1129,25 +1129,25 @@  discard block
 block discarded – undo
1129 1129
  * @see: https://github.com/WebDevStudios/CMB2/wiki/Adding-your-own-field-types
1130 1130
  * @return array An array of options that matches the CMB2 options array
1131 1131
  */
1132
-function give_cmb2_get_post_options( $query_args, $force = false ) {
1132
+function give_cmb2_get_post_options($query_args, $force = false) {
1133 1133
 
1134
-	$post_options = array( '' => '' ); // Blank option
1134
+	$post_options = array('' => ''); // Blank option
1135 1135
 
1136
-	if ( ( ! isset( $_GET['page'] ) || 'give-settings' != $_GET['page'] ) && ! $force ) {
1136
+	if (( ! isset($_GET['page']) || 'give-settings' != $_GET['page']) && ! $force) {
1137 1137
 		return $post_options;
1138 1138
 	}
1139 1139
 
1140
-	$args = wp_parse_args( $query_args, array(
1140
+	$args = wp_parse_args($query_args, array(
1141 1141
 		'post_type'   => 'page',
1142 1142
 		'numberposts' => 10,
1143
-	) );
1143
+	));
1144 1144
 
1145
-	$posts = get_posts( $args );
1145
+	$posts = get_posts($args);
1146 1146
 
1147
-	if ( $posts ) {
1148
-		foreach ( $posts as $post ) {
1147
+	if ($posts) {
1148
+		foreach ($posts as $post) {
1149 1149
 
1150
-			$post_options[ $post->ID ] = $post->post_title;
1150
+			$post_options[$post->ID] = $post->post_title;
1151 1151
 
1152 1152
 		}
1153 1153
 	}
@@ -1167,17 +1167,17 @@  discard block
 block discarded – undo
1167 1167
 	global $_wp_additional_image_sizes;
1168 1168
 	$sizes = array();
1169 1169
 
1170
-	foreach ( get_intermediate_image_sizes() as $_size ) {
1170
+	foreach (get_intermediate_image_sizes() as $_size) {
1171 1171
 
1172
-		if ( in_array( $_size, array( 'thumbnail', 'medium', 'medium_large', 'large' ) ) ) {
1173
-			$sizes[ $_size ] = $_size . ' - ' . get_option( "{$_size}_size_w" ) . 'x' . get_option( "{$_size}_size_h" );
1174
-		} elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {
1175
-			$sizes[ $_size ] = $_size . ' - ' . $_wp_additional_image_sizes[ $_size ]['width'] . 'x' . $_wp_additional_image_sizes[ $_size ]['height'];
1172
+		if (in_array($_size, array('thumbnail', 'medium', 'medium_large', 'large'))) {
1173
+			$sizes[$_size] = $_size.' - '.get_option("{$_size}_size_w").'x'.get_option("{$_size}_size_h");
1174
+		} elseif (isset($_wp_additional_image_sizes[$_size])) {
1175
+			$sizes[$_size] = $_size.' - '.$_wp_additional_image_sizes[$_size]['width'].'x'.$_wp_additional_image_sizes[$_size]['height'];
1176 1176
 		}
1177 1177
 
1178 1178
 	}
1179 1179
 
1180
-	return apply_filters( 'give_get_featured_image_sizes', $sizes );
1180
+	return apply_filters('give_get_featured_image_sizes', $sizes);
1181 1181
 }
1182 1182
 
1183 1183
 
@@ -1192,34 +1192,34 @@  discard block
 block discarded – undo
1192 1192
  *
1193 1193
  * @return void
1194 1194
  */
1195
-function give_license_key_callback( $field_object, $escaped_value, $object_id, $object_type, $field_type_object ) {
1195
+function give_license_key_callback($field_object, $escaped_value, $object_id, $object_type, $field_type_object) {
1196 1196
 
1197 1197
 	$id                = $field_type_object->field->args['id'];
1198 1198
 	$field_description = $field_type_object->field->args['desc'];
1199
-	$license_status    = get_option( $field_type_object->field->args['options']['is_valid_license_option'] );
1199
+	$license_status    = get_option($field_type_object->field->args['options']['is_valid_license_option']);
1200 1200
 	$field_classes     = 'regular-text give-license-field';
1201
-	$type              = empty( $escaped_value ) ? 'text' : 'password';
1201
+	$type              = empty($escaped_value) ? 'text' : 'password';
1202 1202
 
1203
-	if ( $license_status === 'valid' ) {
1203
+	if ($license_status === 'valid') {
1204 1204
 		$field_classes .= ' give-license-active';
1205 1205
 	}
1206 1206
 
1207
-	$html = $field_type_object->input( array(
1207
+	$html = $field_type_object->input(array(
1208 1208
 		'class' => $field_classes,
1209 1209
 		'type'  => $type
1210
-	) );
1210
+	));
1211 1211
 
1212 1212
 	//License is active so show deactivate button
1213
-	if ( $license_status === 'valid' ) {
1214
-		$html .= '<input type="submit" class="button-secondary give-license-deactivate" name="' . $id . '_deactivate" value="' . esc_attr__( 'Deactivate License', 'give' ) . '"/>';
1213
+	if ($license_status === 'valid') {
1214
+		$html .= '<input type="submit" class="button-secondary give-license-deactivate" name="'.$id.'_deactivate" value="'.esc_attr__('Deactivate License', 'give').'"/>';
1215 1215
 	} else {
1216 1216
 		//This license is not valid so delete it
1217
-		give_delete_option( $id );
1217
+		give_delete_option($id);
1218 1218
 	}
1219 1219
 
1220
-	$html .= '<label for="give_settings[' . $id . ']"> ' . $field_description . '</label>';
1220
+	$html .= '<label for="give_settings['.$id.']"> '.$field_description.'</label>';
1221 1221
 
1222
-	wp_nonce_field( $id . '-nonce', $id . '-nonce' );
1222
+	wp_nonce_field($id.'-nonce', $id.'-nonce');
1223 1223
 
1224 1224
 	echo $html;
1225 1225
 }
@@ -1233,13 +1233,13 @@  discard block
 block discarded – undo
1233 1233
  */
1234 1234
 function give_api_callback() {
1235 1235
 
1236
-	if ( ! current_user_can( 'manage_give_settings' ) ) {
1236
+	if ( ! current_user_can('manage_give_settings')) {
1237 1237
 		return;
1238 1238
 	}
1239 1239
 
1240
-	do_action( 'give_tools_api_keys_before' );
1240
+	do_action('give_tools_api_keys_before');
1241 1241
 
1242
-	require_once GIVE_PLUGIN_DIR . 'includes/admin/class-api-keys-table.php';
1242
+	require_once GIVE_PLUGIN_DIR.'includes/admin/class-api-keys-table.php';
1243 1243
 
1244 1244
 	$api_keys_table = new Give_API_Keys_Table();
1245 1245
 	$api_keys_table->prepare_items();
@@ -1248,17 +1248,17 @@  discard block
 block discarded – undo
1248 1248
 	<span class="cmb2-metabox-description api-description">
1249 1249
 		<?php echo sprintf(
1250 1250
 		/* translators: 1: https://givewp.com/documentation/give-api-reference/ 2: https://givewp.com/addons/zapier/ */
1251
-			__( 'You can create API keys for individual users within their profile edit screen. API keys allow users to use the <a href="%1$s" target="_blank">Give REST API</a> to retrieve donation data in JSON or XML for external applications or devices, such as <a href="%2$s" target="_blank">Zapier</a>.', 'give' ),
1252
-			esc_url( 'https://givewp.com/documentation/give-api-reference/' ),
1253
-			esc_url( 'https://givewp.com/addons/zapier/' )
1251
+			__('You can create API keys for individual users within their profile edit screen. API keys allow users to use the <a href="%1$s" target="_blank">Give REST API</a> to retrieve donation data in JSON or XML for external applications or devices, such as <a href="%2$s" target="_blank">Zapier</a>.', 'give'),
1252
+			esc_url('https://givewp.com/documentation/give-api-reference/'),
1253
+			esc_url('https://givewp.com/addons/zapier/')
1254 1254
 		); ?>
1255 1255
 	</span>
1256 1256
 	<?php
1257 1257
 
1258
-	do_action( 'give_tools_api_keys_after' );
1258
+	do_action('give_tools_api_keys_after');
1259 1259
 }
1260 1260
 
1261
-add_action( 'give_settings_tab_api_keys', 'give_api_callback' );
1261
+add_action('give_settings_tab_api_keys', 'give_api_callback');
1262 1262
 
1263 1263
 /**
1264 1264
  * Hook Callback
@@ -1271,8 +1271,8 @@  discard block
 block discarded – undo
1271 1271
  *
1272 1272
  * @return void
1273 1273
  */
1274
-function give_hook_callback( $args ) {
1275
-	do_action( 'give_' . $args['id'] );
1274
+function give_hook_callback($args) {
1275
+	do_action('give_'.$args['id']);
1276 1276
 }
1277 1277
 
1278 1278
 /**
@@ -1283,10 +1283,10 @@  discard block
 block discarded – undo
1283 1283
  * This prevents fatal error conflicts with other themes and users of the CMB2 WP.org plugin.
1284 1284
  */
1285 1285
 
1286
-if ( file_exists( WP_PLUGIN_DIR . '/cmb2/init.php' ) && ! defined( 'CMB2_LOADED' ) ) {
1287
-	require_once WP_PLUGIN_DIR . '/cmb2/init.php';
1288
-} elseif ( file_exists( GIVE_PLUGIN_DIR . '/includes/libraries/cmb2/init.php' ) && ! defined( 'CMB2_LOADED' ) ) {
1289
-	require_once GIVE_PLUGIN_DIR . '/includes/libraries/cmb2/init.php';
1290
-} elseif ( file_exists( GIVE_PLUGIN_DIR . '/includes/libraries/CMB2/init.php' ) && ! defined( 'CMB2_LOADED' ) ) {
1291
-	require_once GIVE_PLUGIN_DIR . '/includes/libraries/CMB2/init.php';
1286
+if (file_exists(WP_PLUGIN_DIR.'/cmb2/init.php') && ! defined('CMB2_LOADED')) {
1287
+	require_once WP_PLUGIN_DIR.'/cmb2/init.php';
1288
+} elseif (file_exists(GIVE_PLUGIN_DIR.'/includes/libraries/cmb2/init.php') && ! defined('CMB2_LOADED')) {
1289
+	require_once GIVE_PLUGIN_DIR.'/includes/libraries/cmb2/init.php';
1290
+} elseif (file_exists(GIVE_PLUGIN_DIR.'/includes/libraries/CMB2/init.php') && ! defined('CMB2_LOADED')) {
1291
+	require_once GIVE_PLUGIN_DIR.'/includes/libraries/CMB2/init.php';
1292 1292
 }
1293 1293
\ No newline at end of file
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/class-addon-activation-banner.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  */
9 9
 
10 10
 // Exit if accessed directly
11
-if ( ! defined( 'ABSPATH' ) ) {
11
+if ( ! defined('ABSPATH')) {
12 12
 	exit;
13 13
 }
14 14
 
@@ -26,12 +26,12 @@  discard block
 block discarded – undo
26 26
 	 *
27 27
 	 * @param $_banner_details
28 28
 	 */
29
-	function __construct( $_banner_details ) {
29
+	function __construct($_banner_details) {
30 30
 
31 31
 		global $current_user;
32 32
 		$this->banner_details = $_banner_details;
33
-		$this->test_mode      = ( $this->banner_details['testing'] == 'true' ) ? true : false;
34
-		$this->nag_meta_key   = 'give_addon_activation_ignore_' . sanitize_title( $this->banner_details['name'] );
33
+		$this->test_mode      = ($this->banner_details['testing'] == 'true') ? true : false;
34
+		$this->nag_meta_key   = 'give_addon_activation_ignore_'.sanitize_title($this->banner_details['name']);
35 35
 
36 36
 		//Get current user
37 37
 		$this->user_id = $current_user->ID;
@@ -50,13 +50,13 @@  discard block
 block discarded – undo
50 50
 	public function init() {
51 51
 
52 52
 		//Testing?
53
-		if ( $this->test_mode ) {
54
-			delete_user_meta( $this->user_id, $this->nag_meta_key );
53
+		if ($this->test_mode) {
54
+			delete_user_meta($this->user_id, $this->nag_meta_key);
55 55
 		}
56 56
 
57 57
 		//Get the current page to add the notice to
58
-		add_action( 'current_screen', array( $this, 'give_addon_notice_ignore' ) );
59
-		add_action( 'admin_notices', array( $this, 'give_addon_activation_admin_notice' ) );
58
+		add_action('current_screen', array($this, 'give_addon_notice_ignore'));
59
+		add_action('admin_notices', array($this, 'give_addon_activation_admin_notice'));
60 60
 
61 61
 
62 62
 	}
@@ -71,13 +71,13 @@  discard block
 block discarded – undo
71 71
 		global $pagenow;
72 72
 
73 73
 		//Make sure we're on the plugins page.
74
-		if ( $pagenow !== 'plugins.php' ) {
74
+		if ($pagenow !== 'plugins.php') {
75 75
 			return false;
76 76
 		}
77 77
 
78 78
 		// If the user hasn't already dismissed our alert,
79 79
 		// Output the activation banner
80
-		if ( ! get_user_meta( $this->user_id, $this->nag_meta_key ) ) { ?>
80
+		if ( ! get_user_meta($this->user_id, $this->nag_meta_key)) { ?>
81 81
 
82 82
 			<!-- * I output inline styles here
83 83
 				 * because there's no reason to keep these
@@ -157,15 +157,15 @@  discard block
 block discarded – undo
157 157
 				<h3><?php
158 158
 					printf(
159 159
 						/* translators: %s: Add-on name */
160
-						__( "Thank you for installing Give's %s Add-on!", 'give' ),
161
-						'<span>' . $this->banner_details['name'] . '</span>'
160
+						__("Thank you for installing Give's %s Add-on!", 'give'),
161
+						'<span>'.$this->banner_details['name'].'</span>'
162 162
 					);
163 163
 				?></h3>
164 164
 
165 165
 				<a href="<?php
166 166
 				//The Dismiss Button
167
-				$nag_admin_dismiss_url = 'plugins.php?' . $this->nag_meta_key . '=0';
168
-				echo admin_url( $nag_admin_dismiss_url ); ?>" class="dismiss"><span class="dashicons dashicons-dismiss"></span></a>
167
+				$nag_admin_dismiss_url = 'plugins.php?'.$this->nag_meta_key.'=0';
168
+				echo admin_url($nag_admin_dismiss_url); ?>" class="dismiss"><span class="dashicons dashicons-dismiss"></span></a>
169 169
 
170 170
 				<!-- * Now we output a few "actions"
171 171
 					 * that the user can take from here -->
@@ -173,21 +173,21 @@  discard block
 block discarded – undo
173 173
 				<div class="alert-actions">
174 174
 
175 175
 					<?php //Point them to your settings page
176
-					if ( isset( $this->banner_details['settings_url'] ) ) { ?>
176
+					if (isset($this->banner_details['settings_url'])) { ?>
177 177
 						<a href="<?php echo $this->banner_details['settings_url']; ?>">
178
-							<span class="dashicons dashicons-admin-settings"></span><?php esc_html_e( 'Go to Settings', 'give' ); ?>
178
+							<span class="dashicons dashicons-admin-settings"></span><?php esc_html_e('Go to Settings', 'give'); ?>
179 179
 						</a>
180 180
 					<?php } ?>
181 181
 
182 182
 					<?php
183 183
 					// Show them how to configure the Addon
184
-					if ( isset( $this->banner_details['documentation_url'] ) ) { ?>
184
+					if (isset($this->banner_details['documentation_url'])) { ?>
185 185
 						<a href="<?php echo $this->banner_details['documentation_url'] ?>" target="_blank">
186 186
 							<span class="dashicons dashicons-media-text"></span>
187 187
 							<?php
188 188
 								printf(
189 189
 									/* translators: %s: Add-on name */
190
-									esc_html__( 'Documentation: %s Add-on', 'give' ),
190
+									esc_html__('Documentation: %s Add-on', 'give'),
191 191
 									$this->banner_details['name']
192 192
 								);
193 193
 							?>
@@ -195,10 +195,10 @@  discard block
 block discarded – undo
195 195
 					<?php } ?>
196 196
 					<?php
197 197
 					//Let them signup for plugin updates
198
-					if ( isset( $this->banner_details['support_url'] ) ) { ?>
198
+					if (isset($this->banner_details['support_url'])) { ?>
199 199
 
200 200
 						<a href="<?php echo $this->banner_details['support_url'] ?>" target="_blank">
201
-							<span class="dashicons dashicons-sos"></span><?php esc_html_e( 'Get Support', 'give' ); ?>
201
+							<span class="dashicons dashicons-sos"></span><?php esc_html_e('Get Support', 'give'); ?>
202 202
 						</a>
203 203
 
204 204
 					<?php } ?>
@@ -220,13 +220,13 @@  discard block
 block discarded – undo
220 220
 		/* If user clicks to ignore the notice, add that to their user meta the banner then checks whether this tag exists already or not.
221 221
 		 * See here: http://codex.wordpress.org/Function_Reference/add_user_meta
222 222
 		 */
223
-		if ( isset( $_GET[ $this->nag_meta_key ] ) && '0' == $_GET[ $this->nag_meta_key ] ) {
223
+		if (isset($_GET[$this->nag_meta_key]) && '0' == $_GET[$this->nag_meta_key]) {
224 224
 
225 225
 			//Get the global user
226 226
 			global $current_user;
227 227
 			$user_id = $current_user->ID;
228 228
 
229
-			add_user_meta( $user_id, $this->nag_meta_key, 'true', true );
229
+			add_user_meta($user_id, $this->nag_meta_key, 'true', true);
230 230
 		}
231 231
 	}
232 232
 
Please login to merge, or discard this patch.
includes/admin/reporting/export/export-functions.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -11,12 +11,12 @@  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
 
18
-require_once GIVE_PLUGIN_DIR . 'includes/admin/reporting/class-export.php';
19
-require_once GIVE_PLUGIN_DIR . 'includes/admin/reporting/export/export-actions.php';
18
+require_once GIVE_PLUGIN_DIR.'includes/admin/reporting/class-export.php';
19
+require_once GIVE_PLUGIN_DIR.'includes/admin/reporting/export/export-actions.php';
20 20
 
21 21
 /**
22 22
  * Process batch exports via ajax
@@ -26,79 +26,79 @@  discard block
 block discarded – undo
26 26
  */
27 27
 function give_do_ajax_export() {
28 28
 
29
-	require_once GIVE_PLUGIN_DIR . 'includes/admin/reporting/export/class-batch-export.php';
29
+	require_once GIVE_PLUGIN_DIR.'includes/admin/reporting/export/class-batch-export.php';
30 30
 
31
-	parse_str( $_POST['form'], $form );
31
+	parse_str($_POST['form'], $form);
32 32
 
33 33
 	$_REQUEST = $form = (array) $form;
34 34
 
35
-	if ( ! wp_verify_nonce( $_REQUEST['give_ajax_export'], 'give_ajax_export' ) ) {
36
-		die( '-2' );
35
+	if ( ! wp_verify_nonce($_REQUEST['give_ajax_export'], 'give_ajax_export')) {
36
+		die('-2');
37 37
 	}
38 38
 
39
-	do_action( 'give_batch_export_class_include', $form['give-export-class'] );
39
+	do_action('give_batch_export_class_include', $form['give-export-class']);
40 40
 
41
-	$step   = absint( $_POST['step'] );
42
-	$class  = sanitize_text_field( $form['give-export-class'] );
41
+	$step   = absint($_POST['step']);
42
+	$class  = sanitize_text_field($form['give-export-class']);
43 43
 
44
-	$export = new $class( $step );
44
+	$export = new $class($step);
45 45
 
46
-	if ( ! $export->can_export() ) {
47
-		die( '-1' );
46
+	if ( ! $export->can_export()) {
47
+		die('-1');
48 48
 	}
49 49
 
50
-	if ( ! $export->is_writable ) {
50
+	if ( ! $export->is_writable) {
51 51
 		$json_args = array(
52 52
 			'error'   => true,
53
-			'message' => esc_html__( 'Export location or file not writable.', 'give' )
53
+			'message' => esc_html__('Export location or file not writable.', 'give')
54 54
 		);
55 55
 		echo json_encode($json_args);
56 56
 		exit;
57 57
 	}
58 58
 
59
-	$export->set_properties( $_REQUEST );
59
+	$export->set_properties($_REQUEST);
60 60
 
61 61
 	$export->pre_fetch();
62 62
 
63
-	$ret = $export->process_step( $step );
63
+	$ret = $export->process_step($step);
64 64
 
65 65
 	$percentage = $export->get_percentage_complete();
66 66
 
67
-	if ( $ret ) {
67
+	if ($ret) {
68 68
 
69 69
 		$step += 1;
70
-		echo json_encode( array( 'step' => $step, 'percentage' => $percentage ) );
70
+		echo json_encode(array('step' => $step, 'percentage' => $percentage));
71 71
 		exit;
72 72
 
73
-	} elseif ( true === $export->is_empty ) {
73
+	} elseif (true === $export->is_empty) {
74 74
 
75
-		echo json_encode( array(
75
+		echo json_encode(array(
76 76
 			'error'   => true,
77
-			'message' => esc_html__( 'No data found for export parameters.', 'give' )
78
-		) );
77
+			'message' => esc_html__('No data found for export parameters.', 'give')
78
+		));
79 79
 		exit;
80 80
 
81
-	} elseif ( true === $export->done && true === $export->is_void ) {
81
+	} elseif (true === $export->done && true === $export->is_void) {
82 82
 
83
-		$message = ! empty( $export->message ) ? $export->message : esc_html__( 'Batch Processing Complete.', 'give' );
84
-		echo json_encode( array( 'success' => true, 'message' => $message ) );
83
+		$message = ! empty($export->message) ? $export->message : esc_html__('Batch Processing Complete.', 'give');
84
+		echo json_encode(array('success' => true, 'message' => $message));
85 85
 		exit;
86 86
 
87 87
 	} else {
88 88
 		
89
-		$args = array_merge( $_REQUEST, array(
89
+		$args = array_merge($_REQUEST, array(
90 90
 			'step'        => $step,
91 91
 			'class'       => $class,
92
-			'nonce'       => wp_create_nonce( 'give-batch-export' ),
92
+			'nonce'       => wp_create_nonce('give-batch-export'),
93 93
 			'give_action' => 'form_batch_export',
94
-		) );
94
+		));
95 95
 
96
-		$download_url = add_query_arg( $args, admin_url() );
96
+		$download_url = add_query_arg($args, admin_url());
97 97
 
98
-		echo json_encode( array( 'step' => 'done', 'url' => $download_url ) );
98
+		echo json_encode(array('step' => 'done', 'url' => $download_url));
99 99
 		exit;
100 100
 
101 101
 	}
102 102
 }
103 103
 
104
-add_action( 'wp_ajax_give_do_ajax_export', 'give_do_ajax_export' );
104
+add_action('wp_ajax_give_do_ajax_export', 'give_do_ajax_export');
Please login to merge, or discard this patch.
includes/admin/reporting/class-gateways-reports-table.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -10,13 +10,13 @@  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
 
17 17
 // Load WP_List_Table if not loaded
18
-if ( ! class_exists( 'WP_List_Table' ) ) {
19
-	require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
18
+if ( ! class_exists('WP_List_Table')) {
19
+	require_once ABSPATH.'wp-admin/includes/class-wp-list-table.php';
20 20
 }
21 21
 
22 22
 /**
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
 		global $status, $page;
46 46
 
47 47
 		// Set parent defaults
48
-		parent::__construct( array(
49
-			'singular' => give_get_forms_label_singular(),    // Singular name of the listed records
50
-			'plural'   => give_get_forms_label_plural(),        // Plural name of the listed records
48
+		parent::__construct(array(
49
+			'singular' => give_get_forms_label_singular(), // Singular name of the listed records
50
+			'plural'   => give_get_forms_label_plural(), // Plural name of the listed records
51 51
 			'ajax'     => false                        // Does this table support ajax?
52
-		) );
52
+		));
53 53
 
54 54
 	}
55 55
 
@@ -64,10 +64,10 @@  discard block
 block discarded – undo
64 64
 	 *
65 65
 	 * @return string Column Name
66 66
 	 */
67
-	public function column_default( $item, $column_name ) {
68
-		switch ( $column_name ) {
67
+	public function column_default($item, $column_name) {
68
+		switch ($column_name) {
69 69
 			default:
70
-				return $item[ $column_name ];
70
+				return $item[$column_name];
71 71
 		}
72 72
 	}
73 73
 
@@ -80,11 +80,11 @@  discard block
 block discarded – undo
80 80
 	 */
81 81
 	public function get_columns() {
82 82
 		$columns = array(
83
-			'label'           => esc_html__( 'Gateway', 'give' ),
84
-			'complete_sales'  => esc_html__( 'Complete Transactions', 'give' ),
85
-			'pending_sales'   => esc_html__( 'Pending / Failed Transactions', 'give' ),
86
-			'total_sales'     => esc_html__( 'Total Transactions', 'give' ),
87
-			'total_donations' => esc_html__( 'Total Donations', 'give' )
83
+			'label'           => esc_html__('Gateway', 'give'),
84
+			'complete_sales'  => esc_html__('Complete Transactions', 'give'),
85
+			'pending_sales'   => esc_html__('Pending / Failed Transactions', 'give'),
86
+			'total_sales'     => esc_html__('Total Transactions', 'give'),
87
+			'total_donations' => esc_html__('Total Donations', 'give')
88 88
 		);
89 89
 
90 90
 		return $columns;
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 * @return int Current page number
100 100
 	 */
101 101
 	public function get_paged() {
102
-		return isset( $_GET['paged'] ) ? absint( $_GET['paged'] ) : 1;
102
+		return isset($_GET['paged']) ? absint($_GET['paged']) : 1;
103 103
 	}
104 104
 
105 105
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 	 * @since  1.0
111 111
 	 * @return void
112 112
 	 */
113
-	public function bulk_actions( $which = '' ) {
113
+	public function bulk_actions($which = '') {
114 114
 		// These aren't really bulk actions but this outputs the markup in the right place
115 115
 		give_report_views();
116 116
 	}
@@ -123,23 +123,23 @@  discard block
 block discarded – undo
123 123
 	 *
124 124
 	 * @param string $which
125 125
 	 */
126
-	protected function display_tablenav( $which ) {
126
+	protected function display_tablenav($which) {
127 127
 
128
-		if ( 'top' == $which ) {
129
-			wp_nonce_field( 'bulk-' . $this->_args['plural'] );
128
+		if ('top' == $which) {
129
+			wp_nonce_field('bulk-'.$this->_args['plural']);
130 130
 		}
131 131
 		?>
132
-		<div class="tablenav gateways-report-tablenav give-clearfix <?php echo esc_attr( $which ); ?>">
132
+		<div class="tablenav gateways-report-tablenav give-clearfix <?php echo esc_attr($which); ?>">
133 133
 
134
-			<h3 class="alignleft reports-earnings-title"><span><?php esc_html_e( 'Payment Methods Report', 'give' ); ?></span></h3>
134
+			<h3 class="alignleft reports-earnings-title"><span><?php esc_html_e('Payment Methods Report', 'give'); ?></span></h3>
135 135
 
136 136
 			<div class="alignright tablenav-right">
137 137
 				<div class="actions bulkactions">
138
-					<?php $this->bulk_actions( $which ); ?>
138
+					<?php $this->bulk_actions($which); ?>
139 139
 				</div>
140 140
 				<?php
141
-				$this->extra_tablenav( $which );
142
-				$this->pagination( $which );
141
+				$this->extra_tablenav($which);
142
+				$this->pagination($which);
143 143
 				?>
144 144
 			</div>
145 145
 
@@ -164,18 +164,18 @@  discard block
 block discarded – undo
164 164
 		$gateways     = give_get_payment_gateways();
165 165
 		$stats        = new Give_Payment_Stats();
166 166
 
167
-		foreach ( $gateways as $gateway_id => $gateway ) {
167
+		foreach ($gateways as $gateway_id => $gateway) {
168 168
 
169
-			$complete_count = give_count_sales_by_gateway( $gateway_id, 'publish' );
170
-			$pending_count  = give_count_sales_by_gateway( $gateway_id, array( 'pending', 'failed' ) );
169
+			$complete_count = give_count_sales_by_gateway($gateway_id, 'publish');
170
+			$pending_count  = give_count_sales_by_gateway($gateway_id, array('pending', 'failed'));
171 171
 
172 172
 			$reports_data[] = array(
173 173
 				'ID'              => $gateway_id,
174 174
 				'label'           => $gateway['admin_label'],
175
-				'complete_sales'  => give_format_amount( $complete_count, false ),
176
-				'pending_sales'   => give_format_amount( $pending_count, false ),
177
-				'total_sales'     => give_format_amount( $complete_count + $pending_count, false ),
178
-				'total_donations' => give_currency_filter( give_format_amount( $stats->get_earnings( 0, 0, 0, $gateway_id ) ) )
175
+				'complete_sales'  => give_format_amount($complete_count, false),
176
+				'pending_sales'   => give_format_amount($pending_count, false),
177
+				'total_sales'     => give_format_amount($complete_count + $pending_count, false),
178
+				'total_donations' => give_currency_filter(give_format_amount($stats->get_earnings(0, 0, 0, $gateway_id)))
179 179
 			);
180 180
 		}
181 181
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 		$columns               = $this->get_columns();
198 198
 		$hidden                = array(); // No hidden columns
199 199
 		$sortable              = $this->get_sortable_columns();
200
-		$this->_column_headers = array( $columns, $hidden, $sortable );
200
+		$this->_column_headers = array($columns, $hidden, $sortable);
201 201
 		$this->items           = $this->reports_data();
202 202
 
203 203
 	}
Please login to merge, or discard this patch.
includes/admin/reporting/class-gateway-error-logs-list-table.php 1 patch
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -9,13 +9,13 @@  discard block
 block discarded – undo
9 9
  */
10 10
 
11 11
 // Exit if accessed directly
12
-if ( ! defined( 'ABSPATH' ) ) {
12
+if ( ! defined('ABSPATH')) {
13 13
 	exit;
14 14
 }
15 15
 
16 16
 // Load WP_List_Table if not loaded
17
-if ( ! class_exists( 'WP_List_Table' ) ) {
18
-	require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
17
+if ( ! class_exists('WP_List_Table')) {
18
+	require_once ABSPATH.'wp-admin/includes/class-wp-list-table.php';
19 19
 }
20 20
 
21 21
 /**
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
 		global $status, $page;
46 46
 
47 47
 		// Set parent defaults
48
-		parent::__construct( array(
49
-			'singular' => give_get_forms_label_singular(),    // Singular name of the listed records
50
-			'plural'   => give_get_forms_label_plural(),        // Plural name of the listed records
48
+		parent::__construct(array(
49
+			'singular' => give_get_forms_label_singular(), // Singular name of the listed records
50
+			'plural'   => give_get_forms_label_plural(), // Plural name of the listed records
51 51
 			'ajax'     => false                        // Does this table support ajax?
52
-		) );
52
+		));
53 53
 	}
54 54
 
55 55
 	/**
@@ -63,14 +63,14 @@  discard block
 block discarded – undo
63 63
 	 *
64 64
 	 * @return string Column Name
65 65
 	 */
66
-	public function column_default( $item, $column_name ) {
67
-		switch ( $column_name ) {
66
+	public function column_default($item, $column_name) {
67
+		switch ($column_name) {
68 68
 			case 'ID' :
69 69
 				return $item['ID_label'];
70 70
 			case 'error' :
71
-				return get_the_title( $item['ID'] ) ? get_the_title( $item['ID'] ) : esc_html__( 'Payment Error', 'give' );
71
+				return get_the_title($item['ID']) ? get_the_title($item['ID']) : esc_html__('Payment Error', 'give');
72 72
 			default:
73
-				return $item[ $column_name ];
73
+				return $item[$column_name];
74 74
 		}
75 75
 	}
76 76
 
@@ -84,29 +84,29 @@  discard block
 block discarded – undo
84 84
 	 *
85 85
 	 * @return void
86 86
 	 */
87
-	public function column_message( $item ) {
87
+	public function column_message($item) {
88 88
 
89 89
 		?>
90
-		<a href="#TB_inline?width=640&amp;inlineId=log-message-<?php echo $item['ID']; ?>" class="thickbox" title="<?php esc_attr_e( 'View Log Message', 'give' ); ?> "><?php esc_html_e( 'View Log Message', 'give' ); ?></a>
90
+		<a href="#TB_inline?width=640&amp;inlineId=log-message-<?php echo $item['ID']; ?>" class="thickbox" title="<?php esc_attr_e('View Log Message', 'give'); ?> "><?php esc_html_e('View Log Message', 'give'); ?></a>
91 91
 		<div id="log-message-<?php echo $item['ID']; ?>" style="display:none;">
92 92
 			<?php
93 93
 
94
-			$log_message = get_post_field( 'post_content', $item['ID'] );
94
+			$log_message = get_post_field('post_content', $item['ID']);
95 95
 
96
-			$serialized  = strpos( $log_message, '{"' );
96
+			$serialized  = strpos($log_message, '{"');
97 97
 
98 98
 			// Check to see if the log message contains serialized information
99
-			if ( $serialized !== false ) {
100
-				$length = strlen( $log_message ) - $serialized;
101
-				$intro  = substr( $log_message, 0, - $length );
102
-				$data   = substr( $log_message, $serialized, strlen( $log_message ) - 1 );
99
+			if ($serialized !== false) {
100
+				$length = strlen($log_message) - $serialized;
101
+				$intro  = substr($log_message, 0, - $length);
102
+				$data   = substr($log_message, $serialized, strlen($log_message) - 1);
103 103
 
104
-				echo wpautop( $intro );
105
-				echo wpautop( '<strong>' . esc_html__( 'Log data:', 'give' ) . '</strong>' );
106
-				echo '<div style="word-wrap: break-word;">' . wpautop( $data ) . '</div>';
104
+				echo wpautop($intro);
105
+				echo wpautop('<strong>'.esc_html__('Log data:', 'give').'</strong>');
106
+				echo '<div style="word-wrap: break-word;">'.wpautop($data).'</div>';
107 107
 			} else {
108 108
 				// No serialized data found
109
-				echo wpautop( $log_message );
109
+				echo wpautop($log_message);
110 110
 			}
111 111
 			?>
112 112
 		</div>
@@ -122,12 +122,12 @@  discard block
 block discarded – undo
122 122
 	 */
123 123
 	public function get_columns() {
124 124
 		$columns = array(
125
-			'ID'         => esc_html__( 'Log ID', 'give' ),
126
-			'payment_id' => esc_html__( 'Payment ID', 'give' ),
127
-			'error'      => esc_html__( 'Error', 'give' ),
128
-			'message'    => esc_html__( 'Error Message', 'give' ),
129
-			'gateway'    => esc_html__( 'Gateway', 'give' ),
130
-			'date'       => esc_html__( 'Date', 'give' )
125
+			'ID'         => esc_html__('Log ID', 'give'),
126
+			'payment_id' => esc_html__('Payment ID', 'give'),
127
+			'error'      => esc_html__('Error', 'give'),
128
+			'message'    => esc_html__('Error Message', 'give'),
129
+			'gateway'    => esc_html__('Gateway', 'give'),
130
+			'date'       => esc_html__('Date', 'give')
131 131
 		);
132 132
 
133 133
 		return $columns;
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 	 * @return int Current page number
142 142
 	 */
143 143
 	public function get_paged() {
144
-		return isset( $_GET['paged'] ) ? absint( $_GET['paged'] ) : 1;
144
+		return isset($_GET['paged']) ? absint($_GET['paged']) : 1;
145 145
 	}
146 146
 
147 147
 	/**
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	 * @since  1.0
152 152
 	 * @return void
153 153
 	 */
154
-	public function bulk_actions( $which = '' ) {
154
+	public function bulk_actions($which = '') {
155 155
 		give_log_views();
156 156
 	}
157 157
 
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 		global $give_logs;
168 168
 
169 169
 		// Prevent the queries from getting cached. Without this there are occasional memory issues for some installs
170
-		wp_suspend_cache_addition( true );
170
+		wp_suspend_cache_addition(true);
171 171
 
172 172
 		$logs_data = array();
173 173
 		$paged     = $this->get_paged();
@@ -176,17 +176,17 @@  discard block
 block discarded – undo
176 176
 			'paged'    => $paged
177 177
 		);
178 178
 
179
-		$logs = $give_logs->get_connected_logs( $log_query );
179
+		$logs = $give_logs->get_connected_logs($log_query);
180 180
 
181
-		if ( $logs ) {
182
-			foreach ( $logs as $log ) {
181
+		if ($logs) {
182
+			foreach ($logs as $log) {
183 183
 
184 184
 				$logs_data[] = array(
185 185
 					'ID'         => $log->ID,
186
-					'ID_label'   => '<span class=\'give-item-label give-item-label-gray\'>' . $log->ID . '</span>',
186
+					'ID_label'   => '<span class=\'give-item-label give-item-label-gray\'>'.$log->ID.'</span>',
187 187
 					'payment_id' => $log->post_parent,
188 188
 					'error'      => 'error',
189
-					'gateway'    => give_get_payment_gateway( $log->post_parent ),
189
+					'gateway'    => give_get_payment_gateway($log->post_parent),
190 190
 					'date'       => $log->post_date
191 191
 				);
192 192
 			}
@@ -207,19 +207,19 @@  discard block
 block discarded – undo
207 207
 	 *
208 208
 	 * @param string $which
209 209
 	 */
210
-	protected function display_tablenav( $which ) {
211
-		if ( 'top' === $which ) {
212
-			wp_nonce_field( 'bulk-' . $this->_args['plural'] );
210
+	protected function display_tablenav($which) {
211
+		if ('top' === $which) {
212
+			wp_nonce_field('bulk-'.$this->_args['plural']);
213 213
 		}
214 214
 		?>
215
-		<div class="tablenav <?php echo esc_attr( $which ); ?>">
215
+		<div class="tablenav <?php echo esc_attr($which); ?>">
216 216
 
217 217
 			<div class="alignleft actions bulkactions">
218
-				<?php $this->bulk_actions( $which ); ?>
218
+				<?php $this->bulk_actions($which); ?>
219 219
 			</div>
220 220
 			<?php
221
-			$this->extra_tablenav( $which );
222
-			$this->pagination( $which );
221
+			$this->extra_tablenav($which);
222
+			$this->pagination($which);
223 223
 			?>
224 224
 
225 225
 			<br class="clear"/>
@@ -246,15 +246,15 @@  discard block
 block discarded – undo
246 246
 		$columns               = $this->get_columns();
247 247
 		$hidden                = array(); // No hidden columns
248 248
 		$sortable              = $this->get_sortable_columns();
249
-		$this->_column_headers = array( $columns, $hidden, $sortable );
249
+		$this->_column_headers = array($columns, $hidden, $sortable);
250 250
 		$current_page          = $this->get_pagenum();
251 251
 		$this->items           = $this->get_logs();
252
-		$total_items           = $give_logs->get_log_count( 0, 'gateway_error' );
252
+		$total_items           = $give_logs->get_log_count(0, 'gateway_error');
253 253
 
254
-		$this->set_pagination_args( array(
254
+		$this->set_pagination_args(array(
255 255
 				'total_items' => $total_items,
256 256
 				'per_page'    => $this->per_page,
257
-				'total_pages' => ceil( $total_items / $this->per_page )
257
+				'total_pages' => ceil($total_items / $this->per_page)
258 258
 			)
259 259
 		);
260 260
 	}
Please login to merge, or discard this patch.
includes/admin/reporting/class-donor-reports-table.php 1 patch
Spacing   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -10,13 +10,13 @@  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
 
17 17
 // Load WP_List_Table if not loaded
18
-if ( ! class_exists( 'WP_List_Table' ) ) {
19
-	require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
18
+if ( ! class_exists('WP_List_Table')) {
19
+	require_once ABSPATH.'wp-admin/includes/class-wp-list-table.php';
20 20
 }
21 21
 
22 22
 /**
@@ -62,11 +62,11 @@  discard block
 block discarded – undo
62 62
 		global $status, $page;
63 63
 
64 64
 		// Set parent defaults
65
-		parent::__construct( array(
66
-			'singular' => esc_html__( 'Donor', 'give' ),     // Singular name of the listed records
67
-			'plural'   => esc_html__( 'Donors', 'give' ),    // Plural name of the listed records
65
+		parent::__construct(array(
66
+			'singular' => esc_html__('Donor', 'give'), // Singular name of the listed records
67
+			'plural'   => esc_html__('Donors', 'give'), // Plural name of the listed records
68 68
 			'ajax'     => false                        // Does this table support ajax?
69
-		) );
69
+		));
70 70
 
71 71
 	}
72 72
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 	 *
84 84
 	 * @return false
85 85
 	 */
86
-	public function search_box( $text, $input_id ) {
86
+	public function search_box($text, $input_id) {
87 87
 		return;
88 88
 	}
89 89
 
@@ -98,20 +98,20 @@  discard block
 block discarded – undo
98 98
 	 *
99 99
 	 * @return void
100 100
 	 */
101
-	public function give_search_box( $text, $input_id ) {
102
-		$input_id = $input_id . '-search-input';
101
+	public function give_search_box($text, $input_id) {
102
+		$input_id = $input_id.'-search-input';
103 103
 
104
-		if ( ! empty( $_REQUEST['orderby'] ) ) {
105
-			echo '<input type="hidden" name="orderby" value="' . esc_attr( $_REQUEST['orderby'] ) . '" />';
104
+		if ( ! empty($_REQUEST['orderby'])) {
105
+			echo '<input type="hidden" name="orderby" value="'.esc_attr($_REQUEST['orderby']).'" />';
106 106
 		}
107
-		if ( ! empty( $_REQUEST['order'] ) ) {
108
-			echo '<input type="hidden" name="order" value="' . esc_attr( $_REQUEST['order'] ) . '" />';
107
+		if ( ! empty($_REQUEST['order'])) {
108
+			echo '<input type="hidden" name="order" value="'.esc_attr($_REQUEST['order']).'" />';
109 109
 		}
110 110
 		?>
111 111
 		<p class="search-box donor-search">
112 112
 			<label class="screen-reader-text" for="<?php echo $input_id ?>"><?php echo $text; ?>:</label>
113 113
 			<input type="search" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query(); ?>" />
114
-			<?php submit_button( $text, 'button', false, false, array( 'ID' => 'search-submit' ) ); ?>
114
+			<?php submit_button($text, 'button', false, false, array('ID' => 'search-submit')); ?>
115 115
 		</p>
116 116
 	<?php
117 117
 	}
@@ -124,29 +124,29 @@  discard block
 block discarded – undo
124 124
 	 *
125 125
 	 * @param string $which
126 126
 	 */
127
-	protected function display_tablenav( $which ) {
127
+	protected function display_tablenav($which) {
128 128
 
129
-		if ( 'top' == $which ) {
130
-			wp_nonce_field( 'bulk-' . $this->_args['plural'] );
129
+		if ('top' == $which) {
130
+			wp_nonce_field('bulk-'.$this->_args['plural']);
131 131
 		}
132 132
 		?>
133
-		<div class="tablenav give-clearfix <?php echo esc_attr( $which ); ?>">
133
+		<div class="tablenav give-clearfix <?php echo esc_attr($which); ?>">
134 134
 
135
-			<h3 class="alignleft reports-earnings-title"><span><?php esc_html_e( 'Donors Report', 'give' ); ?></span></h3>
135
+			<h3 class="alignleft reports-earnings-title"><span><?php esc_html_e('Donors Report', 'give'); ?></span></h3>
136 136
 
137 137
 			<div class="alignright tablenav-right">
138 138
 				<div class="actions bulkactions">
139 139
 					<?php
140
-					if ( 'top' == $which ) {
141
-						$this->give_search_box( esc_html__( 'Search Donors', 'give' ), 'give-donors-report-search' );
140
+					if ('top' == $which) {
141
+						$this->give_search_box(esc_html__('Search Donors', 'give'), 'give-donors-report-search');
142 142
 					}
143 143
 
144
-					$this->bulk_actions( $which ); ?>
144
+					$this->bulk_actions($which); ?>
145 145
 
146 146
 				</div>
147 147
 				<?php
148
-				$this->extra_tablenav( $which );
149
-				$this->pagination( $which );
148
+				$this->extra_tablenav($which);
149
+				$this->pagination($which);
150 150
 				?>
151 151
 			</div>
152 152
 
@@ -168,25 +168,25 @@  discard block
 block discarded – undo
168 168
 	 *
169 169
 	 * @return string Column Name
170 170
 	 */
171
-	public function column_default( $item, $column_name ) {
172
-		switch ( $column_name ) {
171
+	public function column_default($item, $column_name) {
172
+		switch ($column_name) {
173 173
 
174 174
 			case 'num_purchases' :
175
-				$value = '<a href="' .
176
-				         admin_url( '/edit.php?post_type=give_forms&page=give-payment-history&user=' . urlencode( $item['email'] )
177
-				         ) . '">' . esc_html( $item['num_purchases'] ) . '</a>';
175
+				$value = '<a href="'.
176
+				         admin_url('/edit.php?post_type=give_forms&page=give-payment-history&user='.urlencode($item['email'])
177
+				         ).'">'.esc_html($item['num_purchases']).'</a>';
178 178
 				break;
179 179
 
180 180
 			case 'amount_spent' :
181
-				$value = give_currency_filter( give_format_amount( $item[ $column_name ] ) );
181
+				$value = give_currency_filter(give_format_amount($item[$column_name]));
182 182
 				break;
183 183
 
184 184
 			default:
185
-				$value = isset( $item[ $column_name ] ) ? $item[ $column_name ] : null;
185
+				$value = isset($item[$column_name]) ? $item[$column_name] : null;
186 186
 				break;
187 187
 		}
188 188
 
189
-		return apply_filters( 'give_report_column_' . $column_name, $value, $item['id'] );
189
+		return apply_filters('give_report_column_'.$column_name, $value, $item['id']);
190 190
 	}
191 191
 
192 192
 	/**
@@ -198,14 +198,14 @@  discard block
 block discarded – undo
198 198
 	 */
199 199
 	public function get_columns() {
200 200
 		$columns = array(
201
-			'name'          => esc_html__( 'Name', 'give' ),
202
-			'id'            => esc_html__( 'ID', 'give' ),
203
-			'email'         => esc_html__( 'Email', 'give' ),
204
-			'num_purchases' => esc_html__( 'Purchases', 'give' ),
205
-			'amount_spent'  => esc_html__( 'Total Spent', 'give' )
201
+			'name'          => esc_html__('Name', 'give'),
202
+			'id'            => esc_html__('ID', 'give'),
203
+			'email'         => esc_html__('Email', 'give'),
204
+			'num_purchases' => esc_html__('Purchases', 'give'),
205
+			'amount_spent'  => esc_html__('Total Spent', 'give')
206 206
 		);
207 207
 
208
-		return apply_filters( 'give_report_donor_columns', $columns );
208
+		return apply_filters('give_report_donor_columns', $columns);
209 209
 
210 210
 	}
211 211
 
@@ -218,10 +218,10 @@  discard block
 block discarded – undo
218 218
 	 */
219 219
 	public function get_sortable_columns() {
220 220
 		return array(
221
-			'id'            => array( 'id', true ),
222
-			'name'          => array( 'name', true ),
223
-			'num_purchases' => array( 'purchase_count', false ),
224
-			'amount_spent'  => array( 'purchase_value', false ),
221
+			'id'            => array('id', true),
222
+			'name'          => array('name', true),
223
+			'num_purchases' => array('purchase_count', false),
224
+			'amount_spent'  => array('purchase_value', false),
225 225
 		);
226 226
 	}
227 227
 
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 	 * @since  1.0
233 233
 	 * @return void
234 234
 	 */
235
-	public function bulk_actions( $which = '' ) {
235
+	public function bulk_actions($which = '') {
236 236
 		// These aren't really bulk actions but this outputs the markup in the right place
237 237
 		give_report_views();
238 238
 	}
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 	 * @return int Current page number
246 246
 	 */
247 247
 	public function get_paged() {
248
-		return isset( $_GET['paged'] ) ? absint( $_GET['paged'] ) : 1;
248
+		return isset($_GET['paged']) ? absint($_GET['paged']) : 1;
249 249
 	}
250 250
 
251 251
 	/**
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 	 * @return mixed string If search is present, false otherwise
257 257
 	 */
258 258
 	public function get_search() {
259
-		return ! empty( $_GET['s'] ) ? urldecode( trim( $_GET['s'] ) ) : false;
259
+		return ! empty($_GET['s']) ? urldecode(trim($_GET['s'])) : false;
260 260
 	}
261 261
 
262 262
 	/**
@@ -273,10 +273,10 @@  discard block
 block discarded – undo
273 273
 
274 274
 		$data    = array();
275 275
 		$paged   = $this->get_paged();
276
-		$offset  = $this->per_page * ( $paged - 1 );
276
+		$offset  = $this->per_page * ($paged - 1);
277 277
 		$search  = $this->get_search();
278
-		$order   = isset( $_GET['order'] ) ? sanitize_text_field( $_GET['order'] ) : 'DESC';
279
-		$orderby = isset( $_GET['orderby'] ) ? sanitize_text_field( $_GET['orderby'] ) : 'id';
278
+		$order   = isset($_GET['order']) ? sanitize_text_field($_GET['order']) : 'DESC';
279
+		$orderby = isset($_GET['orderby']) ? sanitize_text_field($_GET['orderby']) : 'id';
280 280
 
281 281
 		$args = array(
282 282
 			'number'  => $this->per_page,
@@ -285,21 +285,21 @@  discard block
 block discarded – undo
285 285
 			'orderby' => $orderby
286 286
 		);
287 287
 
288
-		if ( is_email( $search ) ) {
288
+		if (is_email($search)) {
289 289
 			$args['email'] = $search;
290
-		} elseif ( is_numeric( $search ) ) {
290
+		} elseif (is_numeric($search)) {
291 291
 			$args['id'] = $search;
292 292
 		}
293 293
 
294
-		$donors = Give()->customers->get_customers( $args );
294
+		$donors = Give()->customers->get_customers($args);
295 295
 
296
-		if ( $donors ) {
296
+		if ($donors) {
297 297
 
298
-			$this->count = count( $donors );
298
+			$this->count = count($donors);
299 299
 
300
-			foreach ( $donors as $donor ) {
300
+			foreach ($donors as $donor) {
301 301
 
302
-				$user_id = ! empty( $donor->user_id ) ? absint( $donor->user_id ) : 0;
302
+				$user_id = ! empty($donor->user_id) ? absint($donor->user_id) : 0;
303 303
 
304 304
 				$data[] = array(
305 305
 					'id'            => $donor->id,
@@ -332,16 +332,16 @@  discard block
 block discarded – undo
332 332
 		$hidden   = array(); // No hidden columns
333 333
 		$sortable = $this->get_sortable_columns();
334 334
 
335
-		$this->_column_headers = array( $columns, $hidden, $sortable );
335
+		$this->_column_headers = array($columns, $hidden, $sortable);
336 336
 
337 337
 		$this->items = $this->reports_data();
338 338
 
339 339
 		$this->total = give_count_total_customers();
340 340
 
341
-		$this->set_pagination_args( array(
341
+		$this->set_pagination_args(array(
342 342
 			'total_items' => $this->total,
343 343
 			'per_page'    => $this->per_page,
344
-			'total_pages' => ceil( $this->total / $this->per_page )
345
-		) );
344
+			'total_pages' => ceil($this->total / $this->per_page)
345
+		));
346 346
 	}
347 347
 }
348 348
\ No newline at end of file
Please login to merge, or discard this patch.
includes/admin/reporting/class-form-reports-table.php 1 patch
Spacing   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -10,13 +10,13 @@  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
 
17 17
 // Load WP_List_Table if not loaded
18
-if ( ! class_exists( 'WP_List_Table' ) ) {
19
-	require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
18
+if ( ! class_exists('WP_List_Table')) {
19
+	require_once ABSPATH.'wp-admin/includes/class-wp-list-table.php';
20 20
 }
21 21
 
22 22
 /**
@@ -50,13 +50,13 @@  discard block
 block discarded – undo
50 50
 		global $status, $page;
51 51
 
52 52
 		// Set parent defaults
53
-		parent::__construct( array(
54
-			'singular' => give_get_forms_label_singular(),    // Singular name of the listed records
55
-			'plural'   => give_get_forms_label_plural(),        // Plural name of the listed records
53
+		parent::__construct(array(
54
+			'singular' => give_get_forms_label_singular(), // Singular name of the listed records
55
+			'plural'   => give_get_forms_label_plural(), // Plural name of the listed records
56 56
 			'ajax'     => false                        // Does this table support ajax?
57
-		) );
57
+		));
58 58
 
59
-		add_action( 'give_report_view_actions', array( $this, 'category_filter' ) );
59
+		add_action('give_report_view_actions', array($this, 'category_filter'));
60 60
 		$this->query();
61 61
 
62 62
 	}
@@ -72,18 +72,18 @@  discard block
 block discarded – undo
72 72
 	 *
73 73
 	 * @return string Column Name
74 74
 	 */
75
-	public function column_default( $item, $column_name ) {
76
-		switch ( $column_name ) {
75
+	public function column_default($item, $column_name) {
76
+		switch ($column_name) {
77 77
 			case 'earnings' :
78
-				return give_currency_filter( give_format_amount( $item[ $column_name ] ) );
78
+				return give_currency_filter(give_format_amount($item[$column_name]));
79 79
 			case 'average_sales' :
80
-				return round( $item[ $column_name ] );
80
+				return round($item[$column_name]);
81 81
 			case 'average_earnings' :
82
-				return give_currency_filter( give_format_amount( $item[ $column_name ] ) );
82
+				return give_currency_filter(give_format_amount($item[$column_name]));
83 83
 			case 'details' :
84
-				return '<a href="' . admin_url( 'edit.php?post_type=give_forms&page=give-reports&view=forms&form-id=' . $item['ID'] ) . '">' . esc_html__( 'View Detailed Report', 'give' ) . '</a>';
84
+				return '<a href="'.admin_url('edit.php?post_type=give_forms&page=give-reports&view=forms&form-id='.$item['ID']).'">'.esc_html__('View Detailed Report', 'give').'</a>';
85 85
 			default:
86
-				return $item[ $column_name ];
86
+				return $item[$column_name];
87 87
 		}
88 88
 	}
89 89
 
@@ -97,11 +97,11 @@  discard block
 block discarded – undo
97 97
 	public function get_columns() {
98 98
 		$columns = array(
99 99
 			'title'            => give_get_forms_label_singular(),
100
-			'sales'            => esc_html__( 'Donations', 'give' ),
101
-			'earnings'         => esc_html__( 'Income', 'give' ),
102
-			'average_sales'    => esc_html__( 'Monthly Average Donations', 'give' ),
103
-			'average_earnings' => esc_html__( 'Monthly Average Income', 'give' ),
104
-			'details'          => esc_html__( 'Detailed Report', 'give' )
100
+			'sales'            => esc_html__('Donations', 'give'),
101
+			'earnings'         => esc_html__('Income', 'give'),
102
+			'average_sales'    => esc_html__('Monthly Average Donations', 'give'),
103
+			'average_earnings' => esc_html__('Monthly Average Income', 'give'),
104
+			'details'          => esc_html__('Detailed Report', 'give')
105 105
 		);
106 106
 
107 107
 		return $columns;
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
 	 */
117 117
 	public function get_sortable_columns() {
118 118
 		return array(
119
-			'title'    => array( 'title', true ),
120
-			'sales'    => array( 'sales', false ),
121
-			'earnings' => array( 'earnings', false ),
119
+			'title'    => array('title', true),
120
+			'sales'    => array('sales', false),
121
+			'earnings' => array('earnings', false),
122 122
 		);
123 123
 	}
124 124
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 	 * @return int Current page number
131 131
 	 */
132 132
 	public function get_paged() {
133
-		return isset( $_GET['paged'] ) ? absint( $_GET['paged'] ) : 1;
133
+		return isset($_GET['paged']) ? absint($_GET['paged']) : 1;
134 134
 	}
135 135
 
136 136
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 	 * @return int Category ID
143 143
 	 */
144 144
 	public function get_category() {
145
-		return isset( $_GET['category'] ) ? absint( $_GET['category'] ) : 0;
145
+		return isset($_GET['category']) ? absint($_GET['category']) : 0;
146 146
 	}
147 147
 
148 148
 
@@ -155,8 +155,8 @@  discard block
 block discarded – undo
155 155
 	 */
156 156
 	public function get_total_forms() {
157 157
 		$total  = 0;
158
-		$counts = wp_count_posts( 'give_forms', 'readable' );
159
-		foreach ( $counts as $status => $count ) {
158
+		$counts = wp_count_posts('give_forms', 'readable');
159
+		foreach ($counts as $status => $count) {
160 160
 			$total += $count;
161 161
 		}
162 162
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 	 * @since  1.0
171 171
 	 * @return void
172 172
 	 */
173
-	public function bulk_actions( $which = '' ) {
173
+	public function bulk_actions($which = '') {
174 174
 		// These aren't really bulk actions but this outputs the markup in the right place
175 175
 		give_report_views();
176 176
 	}
@@ -183,23 +183,23 @@  discard block
 block discarded – undo
183 183
 	 *
184 184
 	 * @param string $which
185 185
 	 */
186
-	protected function display_tablenav( $which ) {
186
+	protected function display_tablenav($which) {
187 187
 
188
-		if ( 'top' == $which ) {
189
-			wp_nonce_field( 'bulk-' . $this->_args['plural'] );
188
+		if ('top' == $which) {
189
+			wp_nonce_field('bulk-'.$this->_args['plural']);
190 190
 		}
191 191
 		?>
192
-		<div class="tablenav give-clearfix <?php echo esc_attr( $which ); ?>">
192
+		<div class="tablenav give-clearfix <?php echo esc_attr($which); ?>">
193 193
 
194
-			<h3 class="alignleft reports-earnings-title"><span><?php esc_html_e( 'Donation Forms Report', 'give' ); ?></span></h3>
194
+			<h3 class="alignleft reports-earnings-title"><span><?php esc_html_e('Donation Forms Report', 'give'); ?></span></h3>
195 195
 
196 196
 			<div class="alignright tablenav-right">
197 197
 				<div class="actions bulkactions">
198
-					<?php $this->bulk_actions( $which ); ?>
198
+					<?php $this->bulk_actions($which); ?>
199 199
 				</div>
200 200
 				<?php
201
-				$this->extra_tablenav( $which );
202
-				$this->pagination( $which );
201
+				$this->extra_tablenav($which);
202
+				$this->pagination($which);
203 203
 				?>
204 204
 			</div>
205 205
 
@@ -219,9 +219,9 @@  discard block
 block discarded – undo
219 219
 	 */
220 220
 	public function category_filter() {
221 221
 
222
-		$categories = get_terms( 'form_category' );
223
-		if ( $categories && ! is_wp_error( $categories ) ) {
224
-			echo Give()->html->category_dropdown( 'category', $this->get_category() );
222
+		$categories = get_terms('form_category');
223
+		if ($categories && ! is_wp_error($categories)) {
224
+			echo Give()->html->category_dropdown('category', $this->get_category());
225 225
 		}
226 226
 	}
227 227
 
@@ -235,8 +235,8 @@  discard block
 block discarded – undo
235 235
 	 */
236 236
 	public function query() {
237 237
 
238
-		$orderby  = isset( $_GET['orderby'] ) ? $_GET['orderby'] : 'title';
239
-		$order    = isset( $_GET['order'] ) ? $_GET['order'] : 'DESC';
238
+		$orderby  = isset($_GET['orderby']) ? $_GET['orderby'] : 'title';
239
+		$order    = isset($_GET['order']) ? $_GET['order'] : 'DESC';
240 240
 		$category = $this->get_category();
241 241
 
242 242
 		$args = array(
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 			'suppress_filters' => true
250 250
 		);
251 251
 
252
-		if ( ! empty( $category ) ) {
252
+		if ( ! empty($category)) {
253 253
 			$args['tax_query'] = array(
254 254
 				array(
255 255
 					'taxonomy' => 'form_category',
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 			);
259 259
 		}
260 260
 
261
-		switch ( $orderby ) :
261
+		switch ($orderby) :
262 262
 			case 'title' :
263 263
 				$args['orderby'] = 'title';
264 264
 				break;
@@ -274,9 +274,9 @@  discard block
 block discarded – undo
274 274
 				break;
275 275
 		endswitch;
276 276
 
277
-		$args = apply_filters( 'give_form_reports_prepare_items_args', $args, $this );
277
+		$args = apply_filters('give_form_reports_prepare_items_args', $args, $this);
278 278
 
279
-		$this->products = new WP_Query( $args );
279
+		$this->products = new WP_Query($args);
280 280
 
281 281
 	}
282 282
 
@@ -292,15 +292,15 @@  discard block
 block discarded – undo
292 292
 
293 293
 		$give_forms = $this->products->posts;
294 294
 
295
-		if ( $give_forms ) {
296
-			foreach ( $give_forms as $form ) {
295
+		if ($give_forms) {
296
+			foreach ($give_forms as $form) {
297 297
 				$reports_data[] = array(
298 298
 					'ID'               => $form,
299
-					'title'            => get_the_title( $form ),
300
-					'sales'            => give_get_form_sales_stats( $form ),
301
-					'earnings'         => give_get_form_earnings_stats( $form ),
302
-					'average_sales'    => give_get_average_monthly_form_sales( $form ),
303
-					'average_earnings' => give_get_average_monthly_form_earnings( $form )
299
+					'title'            => get_the_title($form),
300
+					'sales'            => give_get_form_sales_stats($form),
301
+					'earnings'         => give_get_form_earnings_stats($form),
302
+					'average_sales'    => give_get_average_monthly_form_sales($form),
303
+					'average_earnings' => give_get_average_monthly_form_earnings($form)
304 304
 				);
305 305
 			}
306 306
 		}
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
 
329 329
 		$sortable = $this->get_sortable_columns();
330 330
 
331
-		$this->_column_headers = array( $columns, $hidden, $sortable );
331
+		$this->_column_headers = array($columns, $hidden, $sortable);
332 332
 
333 333
 		$data = $this->reports_data();
334 334
 
@@ -336,10 +336,10 @@  discard block
 block discarded – undo
336 336
 
337 337
 		$this->items = $data;
338 338
 
339
-		$this->set_pagination_args( array(
339
+		$this->set_pagination_args(array(
340 340
 				'total_items' => $total_items,
341 341
 				'per_page'    => $this->per_page,
342
-				'total_pages' => ceil( $total_items / $this->per_page )
342
+				'total_pages' => ceil($total_items / $this->per_page)
343 343
 			)
344 344
 		);
345 345
 	}
Please login to merge, or discard this patch.
includes/admin/reporting/logs.php 1 patch
Spacing   +20 added lines, -20 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,7 +23,7 @@  discard block
 block discarded – undo
23 23
  * @return void
24 24
  */
25 25
 function give_logs_view_sales() {
26
-	include( dirname( __FILE__ ) . '/class-sales-logs-list-table.php' );
26
+	include(dirname(__FILE__).'/class-sales-logs-list-table.php');
27 27
 
28 28
 	$logs_table = new Give_Sales_Log_Table();
29 29
 	$logs_table->prepare_items();
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
 }
33 33
 
34
-add_action( 'give_logs_view_sales', 'give_logs_view_sales' );
34
+add_action('give_logs_view_sales', 'give_logs_view_sales');
35 35
 
36 36
 
37 37
 /**
@@ -43,14 +43,14 @@  discard block
 block discarded – undo
43 43
  * @return void
44 44
  */
45 45
 function give_logs_view_gateway_errors() {
46
-	include( dirname( __FILE__ ) . '/class-gateway-error-logs-list-table.php' );
46
+	include(dirname(__FILE__).'/class-gateway-error-logs-list-table.php');
47 47
 
48 48
 	$logs_table = new Give_Gateway_Error_Log_Table();
49 49
 	$logs_table->prepare_items();
50 50
 	$logs_table->display();
51 51
 }
52 52
 
53
-add_action( 'give_logs_view_gateway_errors', 'give_logs_view_gateway_errors' );
53
+add_action('give_logs_view_gateway_errors', 'give_logs_view_gateway_errors');
54 54
 
55 55
 /**
56 56
  * API Request Logs
@@ -62,28 +62,28 @@  discard block
 block discarded – undo
62 62
  * @return void
63 63
  */
64 64
 function give_logs_view_api_requests() {
65
-	include( dirname( __FILE__ ) . '/class-api-requests-logs-list-table.php' );
65
+	include(dirname(__FILE__).'/class-api-requests-logs-list-table.php');
66 66
 
67 67
 	$logs_table = new Give_API_Request_Log_Table();
68 68
 	$logs_table->prepare_items();
69 69
 	?>
70 70
 	<div class="wrap">
71
-		<?php do_action( 'give_logs_api_requests_top' ); ?>
72
-		<form id="give-logs-filter" method="get" action="<?php echo admin_url( 'edit.php?post_type=give_forms&page=give-reports&tab=logs' ); ?>">
71
+		<?php do_action('give_logs_api_requests_top'); ?>
72
+		<form id="give-logs-filter" method="get" action="<?php echo admin_url('edit.php?post_type=give_forms&page=give-reports&tab=logs'); ?>">
73 73
 			<?php
74
-			$logs_table->search_box( esc_html__( 'Search', 'give' ), 'give-api-requests' );
74
+			$logs_table->search_box(esc_html__('Search', 'give'), 'give-api-requests');
75 75
 			$logs_table->display();
76 76
 			?>
77 77
 			<input type="hidden" name="post_type" value="give_forms"/>
78 78
 			<input type="hidden" name="page" value="give-reports"/>
79 79
 			<input type="hidden" name="tab" value="logs"/>
80 80
 		</form>
81
-		<?php do_action( 'give_logs_api_requests_bottom' ); ?>
81
+		<?php do_action('give_logs_api_requests_bottom'); ?>
82 82
 	</div>
83 83
 	<?php
84 84
 }
85 85
 
86
-add_action( 'give_logs_view_api_requests', 'give_logs_view_api_requests' );
86
+add_action('give_logs_view_api_requests', 'give_logs_view_api_requests');
87 87
 
88 88
 
89 89
 /**
@@ -94,12 +94,12 @@  discard block
 block discarded – undo
94 94
  */
95 95
 function give_log_default_views() {
96 96
 	$views = array(
97
-		'sales'          => esc_html__( 'Donations', 'give' ),
98
-		'gateway_errors' => esc_html__( 'Payment Errors', 'give' ),
99
-		'api_requests'   => esc_html__( 'API Requests', 'give' )
97
+		'sales'          => esc_html__('Donations', 'give'),
98
+		'gateway_errors' => esc_html__('Payment Errors', 'give'),
99
+		'api_requests'   => esc_html__('API Requests', 'give')
100 100
 	);
101 101
 
102
-	$views = apply_filters( 'give_log_views', $views );
102
+	$views = apply_filters('give_log_views', $views);
103 103
 
104 104
 	return $views;
105 105
 }
@@ -112,24 +112,24 @@  discard block
 block discarded – undo
112 112
  */
113 113
 function give_log_views() {
114 114
 	$views        = give_log_default_views();
115
-	$current_view = isset( $_GET['view'] ) && array_key_exists( $_GET['view'], give_log_default_views() ) ? sanitize_text_field( $_GET['view'] ) : 'sales';
115
+	$current_view = isset($_GET['view']) && array_key_exists($_GET['view'], give_log_default_views()) ? sanitize_text_field($_GET['view']) : 'sales';
116 116
 	?>
117 117
 	<form id="give-logs-filter" method="get" action="edit.php">
118 118
 		<select id="give-logs-view" name="view">
119 119
 			<optgroup label="Log Type:">
120
-				<?php foreach ( $views as $view_id => $label ): ?>
121
-					<option value="<?php echo esc_attr( $view_id ); ?>" <?php selected( $view_id, $current_view ); ?>><?php echo $label; ?></option>
120
+				<?php foreach ($views as $view_id => $label): ?>
121
+					<option value="<?php echo esc_attr($view_id); ?>" <?php selected($view_id, $current_view); ?>><?php echo $label; ?></option>
122 122
 				<?php endforeach; ?>
123 123
 			</optgroup>
124 124
 		</select>
125 125
 
126
-		<?php do_action( 'give_log_view_actions' ); ?>
126
+		<?php do_action('give_log_view_actions'); ?>
127 127
 
128 128
 		<input type="hidden" name="post_type" value="give_forms"/>
129 129
 		<input type="hidden" name="page" value="give-reports"/>
130 130
 		<input type="hidden" name="tab" value="logs"/>
131 131
 
132
-		<?php submit_button( esc_html__( 'Apply', 'give' ), 'secondary', 'submit', false ); ?>
132
+		<?php submit_button(esc_html__('Apply', 'give'), 'secondary', 'submit', false); ?>
133 133
 	</form>
134 134
 	<?php
135 135
 }
136 136
\ No newline at end of file
Please login to merge, or discard this patch.