Test Failed
Pull Request — master (#2823)
by Devin
05:06
created
includes/admin/admin-filters.php 1 patch
Spacing   +58 added lines, -58 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
 
@@ -27,30 +27,30 @@  discard block
 block discarded – undo
27 27
  *
28 28
  * @return  mixed
29 29
  */
30
-function __give_sanitize_number_decimals_setting_field( $value ) {
30
+function __give_sanitize_number_decimals_setting_field($value) {
31 31
 	$value_changed = false;
32 32
 	$old_value     = $value;
33 33
 
34
-	if ( isset( $_POST['decimal_separator'] ) ) {
35
-		$value         = ! empty( $_POST['decimal_separator'] ) ? $value : 0;
34
+	if (isset($_POST['decimal_separator'])) {
35
+		$value         = ! empty($_POST['decimal_separator']) ? $value : 0;
36 36
 		$value_changed = true;
37 37
 	}
38 38
 
39
-	if ( $value_changed && ( $old_value != $value ) ) {
40
-		Give_Admin_Settings::add_error( 'give-number-decimal', __( 'The \'Number of Decimals\' option has been automatically set to zero because the \'Decimal Separator\' is not set.', 'give' ) );
39
+	if ($value_changed && ($old_value != $value)) {
40
+		Give_Admin_Settings::add_error('give-number-decimal', __('The \'Number of Decimals\' option has been automatically set to zero because the \'Decimal Separator\' is not set.', 'give'));
41 41
 	}
42 42
 
43
-	$value = absint( $value );
43
+	$value = absint($value);
44 44
 
45
-	if( 6 <= $value ) {
45
+	if (6 <= $value) {
46 46
 		$value = 5;
47
-		Give_Admin_Settings::add_error( 'give-number-decimal', __( 'The \'Number of Decimals\' option has been automatically set to 5 because you entered a number higher than the maximum allowed.', 'give' ) );
47
+		Give_Admin_Settings::add_error('give-number-decimal', __('The \'Number of Decimals\' option has been automatically set to 5 because you entered a number higher than the maximum allowed.', 'give'));
48 48
 	}
49 49
 
50
-	return absint( $value );
50
+	return absint($value);
51 51
 }
52 52
 
53
-add_filter( 'give_admin_settings_sanitize_option_number_decimals', '__give_sanitize_number_decimals_setting_field', 10 );
53
+add_filter('give_admin_settings_sanitize_option_number_decimals', '__give_sanitize_number_decimals_setting_field', 10);
54 54
 
55 55
 
56 56
 /**
@@ -66,20 +66,20 @@  discard block
 block discarded – undo
66 66
  *
67 67
  * @return  mixed
68 68
  */
69
-function __give_validate_decimal_separator_setting_field( $value ) {
70
-	$thousand_separator = give_clean( $_POST['thousands_separator'] );
71
-	$decimal_separator  = give_clean( $_POST['decimal_separator'] );
69
+function __give_validate_decimal_separator_setting_field($value) {
70
+	$thousand_separator = give_clean($_POST['thousands_separator']);
71
+	$decimal_separator  = give_clean($_POST['decimal_separator']);
72 72
 
73
-	if ( $decimal_separator === $thousand_separator ) {
73
+	if ($decimal_separator === $thousand_separator) {
74 74
 		$value                    = '';
75 75
 		$_POST['number_decimals'] = 0;
76
-		Give_Admin_Settings::add_error( 'give-decimal-separator', __( 'The \'Decimal Separator\' option has automatically been set to empty because it can not be equal to the \'Thousand Separator\'', 'give' ) );
76
+		Give_Admin_Settings::add_error('give-decimal-separator', __('The \'Decimal Separator\' option has automatically been set to empty because it can not be equal to the \'Thousand Separator\'', 'give'));
77 77
 	}
78 78
 
79 79
 	return $value;
80 80
 }
81 81
 
82
-add_filter( 'give_admin_settings_sanitize_option_decimal_separator', '__give_validate_decimal_separator_setting_field', 10 );
82
+add_filter('give_admin_settings_sanitize_option_decimal_separator', '__give_validate_decimal_separator_setting_field', 10);
83 83
 
84 84
 /**
85 85
  * Change $delimiter text to symbol.
@@ -90,16 +90,16 @@  discard block
 block discarded – undo
90 90
  *
91 91
  * @return string $delimiter.
92 92
  */
93
-function __give_import_delimiter_set_callback( $delimiter ) {
93
+function __give_import_delimiter_set_callback($delimiter) {
94 94
 	$delimite_type = array(
95 95
 		'csv'                  => ",",
96 96
 		'tab-separated-values' => "\t",
97 97
 	);
98 98
 
99
-	return ( array_key_exists( $delimiter, $delimite_type ) ? $delimite_type[ $delimiter ] : "," );
99
+	return (array_key_exists($delimiter, $delimite_type) ? $delimite_type[$delimiter] : ",");
100 100
 }
101 101
 
102
-add_filter( 'give_import_delimiter_set', '__give_import_delimiter_set_callback', 10 );
102
+add_filter('give_import_delimiter_set', '__give_import_delimiter_set_callback', 10);
103 103
 
104 104
 /**
105 105
  * Give unset the page id from the core setting data from the json files.
@@ -111,17 +111,17 @@  discard block
 block discarded – undo
111 111
  *
112 112
  * @return array $json_to_array
113 113
  */
114
-function give_import_core_settings_merge_pages( $json_to_array, $type ) {
115
-	if ( 'merge' === $type ) {
116
-		unset( $json_to_array['success_page'] );
117
-		unset( $json_to_array['failure_page'] );
118
-		unset( $json_to_array['history_page'] );
114
+function give_import_core_settings_merge_pages($json_to_array, $type) {
115
+	if ('merge' === $type) {
116
+		unset($json_to_array['success_page']);
117
+		unset($json_to_array['failure_page']);
118
+		unset($json_to_array['history_page']);
119 119
 	}
120 120
 
121 121
 	return $json_to_array;
122 122
 }
123 123
 
124
-add_filter( 'give_import_core_settings_data', 'give_import_core_settings_merge_pages', 11, 2 );
124
+add_filter('give_import_core_settings_data', 'give_import_core_settings_merge_pages', 11, 2);
125 125
 
126 126
 /**
127 127
  * Give check the image size from the core setting data from the json files.
@@ -133,14 +133,14 @@  discard block
 block discarded – undo
133 133
  *
134 134
  * @return array $json_to_array
135 135
  */
136
-function give_import_core_settings_merge_image_size( $json_to_array, $type ) {
137
-	if ( 'merge' === $type ) {
136
+function give_import_core_settings_merge_image_size($json_to_array, $type) {
137
+	if ('merge' === $type) {
138 138
 		// Featured image sizes import under Display Options > Post Types > Featured Image Size.
139
-		if ( 'enabled' === $json_to_array['form_featured_img'] ) {
139
+		if ('enabled' === $json_to_array['form_featured_img']) {
140 140
 			$images_sizes = get_intermediate_image_sizes();
141 141
 
142
-			if ( ! in_array( $json_to_array['featured_image_size'], $images_sizes ) ) {
143
-				unset( $json_to_array['featured_image_size'] );
142
+			if ( ! in_array($json_to_array['featured_image_size'], $images_sizes)) {
143
+				unset($json_to_array['featured_image_size']);
144 144
 			}
145 145
 		}
146 146
 	}
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 	return $json_to_array;
149 149
 }
150 150
 
151
-add_filter( 'give_import_core_settings_data', 'give_import_core_settings_merge_image_size', 12, 2 );
151
+add_filter('give_import_core_settings_data', 'give_import_core_settings_merge_image_size', 12, 2);
152 152
 
153 153
 /**
154 154
  * Give upload the image logo from the core setting data from the json files.
@@ -160,24 +160,24 @@  discard block
 block discarded – undo
160 160
  *
161 161
  * @return array $json_to_array
162 162
  */
163
-function give_import_core_settings_merge_upload_image( $json_to_array, $type ) {
164
-	if ( 'merge' === $type ) {
163
+function give_import_core_settings_merge_upload_image($json_to_array, $type) {
164
+	if ('merge' === $type) {
165 165
 		// Emails > Email Settings > Logo.
166
-		if ( ! empty( $json_to_array['email_logo'] ) ) {
166
+		if ( ! empty($json_to_array['email_logo'])) {
167 167
 
168 168
 			// Need to require these files.
169
-			if ( ! function_exists( 'media_handle_upload' ) ) {
170
-				require_once( ABSPATH . 'wp-admin/includes/image.php' );
171
-				require_once( ABSPATH . 'wp-admin/includes/file.php' );
172
-				require_once( ABSPATH . 'wp-admin/includes/media.php' );
169
+			if ( ! function_exists('media_handle_upload')) {
170
+				require_once(ABSPATH.'wp-admin/includes/image.php');
171
+				require_once(ABSPATH.'wp-admin/includes/file.php');
172
+				require_once(ABSPATH.'wp-admin/includes/media.php');
173 173
 			}
174 174
 
175 175
 			$url     = $json_to_array['email_logo'];
176
-			$new_url = media_sideload_image( $url, 0, null, 'src' );
177
-			if ( ! is_wp_error( $new_url ) ) {
176
+			$new_url = media_sideload_image($url, 0, null, 'src');
177
+			if ( ! is_wp_error($new_url)) {
178 178
 				$json_to_array['email_logo'] = $new_url;
179 179
 			} else {
180
-				unset( $json_to_array['email_logo'] );
180
+				unset($json_to_array['email_logo']);
181 181
 			}
182 182
 		}
183 183
 	}
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 	return $json_to_array;
186 186
 }
187 187
 
188
-add_filter( 'give_import_core_settings_data', 'give_import_core_settings_merge_upload_image', 13, 2 );
188
+add_filter('give_import_core_settings_data', 'give_import_core_settings_merge_upload_image', 13, 2);
189 189
 
190 190
 /**
191 191
  * Give unset the license key from the core setting data from the json files.
@@ -197,12 +197,12 @@  discard block
 block discarded – undo
197 197
  *
198 198
  * @return array $json_to_array
199 199
  */
200
-function give_import_core_settings_merge_license_key( $json_to_array, $type ) {
201
-	if ( 'merge' === $type ) {
202
-		foreach ( $json_to_array as $key => $value ) {
203
-			$is_license_key = strpos( '_license_key', $key );
204
-			if ( ! empty( $is_license_key ) ) {
205
-				unset( $json_to_array[ $key ] );
200
+function give_import_core_settings_merge_license_key($json_to_array, $type) {
201
+	if ('merge' === $type) {
202
+		foreach ($json_to_array as $key => $value) {
203
+			$is_license_key = strpos('_license_key', $key);
204
+			if ( ! empty($is_license_key)) {
205
+				unset($json_to_array[$key]);
206 206
 			}
207 207
 		}
208 208
 	}
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 	return $json_to_array;
211 211
 }
212 212
 
213
-add_filter( 'give_import_core_settings_data', 'give_import_core_settings_merge_license_key', 14, 2 );
213
+add_filter('give_import_core_settings_data', 'give_import_core_settings_merge_license_key', 14, 2);
214 214
 
215 215
 /**
216 216
  * Give merge the json data and setting data.
@@ -223,16 +223,16 @@  discard block
 block discarded – undo
223 223
  *
224 224
  * @return array $json_to_array
225 225
  */
226
-function give_import_core_settings_merge_data( $json_to_array, $type, $host_give_options ) {
227
-	if ( 'merge' === $type ) {
228
-		$json_to_array_merge = array_merge( $host_give_options, $json_to_array );
226
+function give_import_core_settings_merge_data($json_to_array, $type, $host_give_options) {
227
+	if ('merge' === $type) {
228
+		$json_to_array_merge = array_merge($host_give_options, $json_to_array);
229 229
 		$json_to_array       = $json_to_array_merge;
230 230
 	}
231 231
 
232 232
 	return $json_to_array;
233 233
 }
234 234
 
235
-add_filter( 'give_import_core_settings_data', 'give_import_core_settings_merge_data', 1000, 3 );
235
+add_filter('give_import_core_settings_data', 'give_import_core_settings_merge_data', 1000, 3);
236 236
 
237 237
 /**
238 238
  * Backward Compatibility - Cleanup User Roles.
@@ -243,11 +243,11 @@  discard block
 block discarded – undo
243 243
  *
244 244
  * @return mixed
245 245
  */
246
-function give_bc_1817_cleanup_user_roles( $caps ){
246
+function give_bc_1817_cleanup_user_roles($caps) {
247 247
 
248 248
 	if (
249
-		! give_has_upgrade_completed( 'v1817_cleanup_user_roles' ) &&
250
-		! isset( $caps['view_give_payments'] )
249
+		! give_has_upgrade_completed('v1817_cleanup_user_roles') &&
250
+		! isset($caps['view_give_payments'])
251 251
 	) {
252 252
 		give_v1817_process_cleanup_user_roles();
253 253
 	}
@@ -255,4 +255,4 @@  discard block
 block discarded – undo
255 255
 	return $caps;
256 256
 }
257 257
 
258
-add_filter( 'user_has_cap', 'give_bc_1817_cleanup_user_roles' );
259 258
\ No newline at end of file
259
+add_filter('user_has_cap', 'give_bc_1817_cleanup_user_roles');
260 260
\ No newline at end of file
Please login to merge, or discard this patch.
includes/admin/tools/class-settings-export.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@  discard block
 block discarded – undo
9 9
  * @since       1.8
10 10
  */
11 11
 
12
-if ( ! defined( 'ABSPATH' ) ) {
12
+if ( ! defined('ABSPATH')) {
13 13
 	exit; // Exit if accessed directly
14 14
 }
15 15
 
16
-if ( ! class_exists( 'Give_Settings_Export' ) ) :
16
+if ( ! class_exists('Give_Settings_Export')) :
17 17
 
18 18
 	/**
19 19
 	 * Give_Settings_Export.
@@ -34,16 +34,16 @@  discard block
 block discarded – undo
34 34
 		 */
35 35
 		public function __construct() {
36 36
 			$this->id    = 'export';
37
-			$this->label = __( 'Export', 'give' );
37
+			$this->label = __('Export', 'give');
38 38
 
39 39
 			parent::__construct();
40 40
 
41
-			add_action( 'give_admin_field_tools_export', array( $this, 'render_export_field' ), 10, 2 );
41
+			add_action('give_admin_field_tools_export', array($this, 'render_export_field'), 10, 2);
42 42
 
43 43
 			// Do not use main donor for this tab.
44
-			if( give_get_current_setting_tab() === $this->id ) {
45
-				add_action( 'give-tools_open_form', '__return_empty_string' );
46
-				add_action( 'give-tools_close_form', '__return_empty_string' );
44
+			if (give_get_current_setting_tab() === $this->id) {
45
+				add_action('give-tools_open_form', '__return_empty_string');
46
+				add_action('give-tools_close_form', '__return_empty_string');
47 47
 			}
48 48
 		}
49 49
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 			 * @param  array $settings
62 62
 			 */
63 63
 			$settings = apply_filters(
64
-				'give_get_settings_' . $this->id,
64
+				'give_get_settings_'.$this->id,
65 65
 				array(
66 66
 					array(
67 67
 						'id'   => 'give_tools_export',
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 					),
71 71
 					array(
72 72
 						'id'   => 'export',
73
-						'name' => __( 'Export', 'give' ),
73
+						'name' => __('Export', 'give'),
74 74
 						'type' => 'tools_export',
75 75
 					),
76 76
 					array(
@@ -94,8 +94,8 @@  discard block
 block discarded – undo
94 94
 		 * @param $field
95 95
 		 * @param $option_value
96 96
 		 */
97
-		public function render_export_field( $field, $option_value ) {
98
-			include_once( 'views/html-admin-page-exports.php' );
97
+		public function render_export_field($field, $option_value) {
98
+			include_once('views/html-admin-page-exports.php');
99 99
 		}
100 100
 	}
101 101
 
Please login to merge, or discard this patch.
includes/admin/tools/export/export-actions.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  * @license     https://opensource.org/licenses/gpl-license GNU Public License
11 11
  */
12 12
 
13
-if ( ! defined( 'ABSPATH' ) ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	exit;
15 15
 }
16 16
 
@@ -22,13 +22,13 @@  discard block
 block discarded – undo
22 22
  */
23 23
 function give_process_batch_export_form() {
24 24
 
25
-	if ( ! wp_verify_nonce( $_REQUEST['nonce'], 'give-batch-export' ) ) {
26
-		wp_die( esc_html__( 'Nonce verification failed.', 'give' ), esc_html__( 'Error', 'give' ), array(
25
+	if ( ! wp_verify_nonce($_REQUEST['nonce'], 'give-batch-export')) {
26
+		wp_die(esc_html__('Nonce verification failed.', 'give'), esc_html__('Error', 'give'), array(
27 27
 			'response' => 403,
28
-		) );
28
+		));
29 29
 	}
30 30
 
31
-	require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/export/class-batch-export.php';
31
+	require_once GIVE_PLUGIN_DIR.'includes/admin/tools/export/class-batch-export.php';
32 32
 
33 33
 	/**
34 34
 	 * Fires before batch export.
@@ -37,14 +37,14 @@  discard block
 block discarded – undo
37 37
 	 *
38 38
 	 * @param string $class Export class.
39 39
 	 */
40
-	do_action( 'give_batch_export_class_include', $_REQUEST['class'] );
40
+	do_action('give_batch_export_class_include', $_REQUEST['class']);
41 41
 
42 42
 	$export = new $_REQUEST['class'];
43 43
 	$export->export();
44 44
 
45 45
 }
46 46
 
47
-add_action( 'give_form_batch_export', 'give_process_batch_export_form' );
47
+add_action('give_form_batch_export', 'give_process_batch_export_form');
48 48
 
49 49
 /**
50 50
  * Exports earnings for a specified time period.
@@ -55,14 +55,14 @@  discard block
 block discarded – undo
55 55
  * @return void
56 56
  */
57 57
 function give_export_earnings() {
58
-	require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/export/class-export-earnings.php';
58
+	require_once GIVE_PLUGIN_DIR.'includes/admin/tools/export/class-export-earnings.php';
59 59
 
60 60
 	$earnings_export = new Give_Earnings_Export();
61 61
 
62 62
 	$earnings_export->export();
63 63
 }
64 64
 
65
-add_action( 'give_earnings_export', 'give_export_earnings' );
65
+add_action('give_earnings_export', 'give_export_earnings');
66 66
 
67 67
 /**
68 68
  * Exports Give's core settings.
@@ -73,14 +73,14 @@  discard block
 block discarded – undo
73 73
  * @return void
74 74
  */
75 75
 function give_core_settings_export() {
76
-	require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/export/class-core-settings-export.php';
76
+	require_once GIVE_PLUGIN_DIR.'includes/admin/tools/export/class-core-settings-export.php';
77 77
 
78 78
 	$core_settings = new Give_Core_Settings_Export();
79 79
 
80 80
 	$core_settings->export();
81 81
 }
82 82
 
83
-add_action( 'give_core_settings_export', 'give_core_settings_export' );
83
+add_action('give_core_settings_export', 'give_core_settings_export');
84 84
 
85 85
 
86 86
 /**
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
  * @return void
91 91
  */
92 92
 function give_register_batch_exporters() {
93
-	if ( is_admin() ) {
93
+	if (is_admin()) {
94 94
 		/**
95 95
 		 * Fires in the admin, while plugins loaded.
96 96
 		 *
@@ -100,11 +100,11 @@  discard block
 block discarded – undo
100 100
 		 *
101 101
 		 * @param string $class Export class.
102 102
 		 */
103
-		do_action( 'give_register_batch_exporter' );
103
+		do_action('give_register_batch_exporter');
104 104
 	}
105 105
 }
106 106
 
107
-add_action( 'plugins_loaded', 'give_register_batch_exporters' );
107
+add_action('plugins_loaded', 'give_register_batch_exporters');
108 108
 
109 109
 /**
110 110
  * Register the payments batch exporter
@@ -112,10 +112,10 @@  discard block
 block discarded – undo
112 112
  * @since  1.5
113 113
  */
114 114
 function give_register_payments_batch_export() {
115
-	add_action( 'give_batch_export_class_include', 'give_include_payments_batch_processor', 10, 1 );
115
+	add_action('give_batch_export_class_include', 'give_include_payments_batch_processor', 10, 1);
116 116
 }
117 117
 
118
-add_action( 'give_register_batch_exporter', 'give_register_payments_batch_export', 10 );
118
+add_action('give_register_batch_exporter', 'give_register_payments_batch_export', 10);
119 119
 
120 120
 /**
121 121
  * Loads the payments batch process if needed
@@ -126,10 +126,10 @@  discard block
 block discarded – undo
126 126
  *
127 127
  * @return void
128 128
  */
129
-function give_include_payments_batch_processor( $class ) {
129
+function give_include_payments_batch_processor($class) {
130 130
 
131
-	if ( 'Give_Batch_Payments_Export' === $class ) {
132
-		require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/export/class-batch-export-payments.php';
131
+	if ('Give_Batch_Payments_Export' === $class) {
132
+		require_once GIVE_PLUGIN_DIR.'includes/admin/tools/export/class-batch-export-payments.php';
133 133
 	}
134 134
 
135 135
 }
@@ -140,10 +140,10 @@  discard block
 block discarded – undo
140 140
  * @since  1.5.2
141 141
  */
142 142
 function give_register_donors_batch_export() {
143
-	add_action( 'give_batch_export_class_include', 'give_include_donors_batch_processor', 10, 1 );
143
+	add_action('give_batch_export_class_include', 'give_include_donors_batch_processor', 10, 1);
144 144
 }
145 145
 
146
-add_action( 'give_register_batch_exporter', 'give_register_donors_batch_export', 10 );
146
+add_action('give_register_batch_exporter', 'give_register_donors_batch_export', 10);
147 147
 
148 148
 /**
149 149
  * Loads the donors batch process if needed.
@@ -154,10 +154,10 @@  discard block
 block discarded – undo
154 154
  *
155 155
  * @return void
156 156
  */
157
-function give_include_donors_batch_processor( $class ) {
157
+function give_include_donors_batch_processor($class) {
158 158
 
159
-	if ( 'Give_Batch_Donors_Export' === $class ) {
160
-		require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/export/class-batch-export-donors.php';
159
+	if ('Give_Batch_Donors_Export' === $class) {
160
+		require_once GIVE_PLUGIN_DIR.'includes/admin/tools/export/class-batch-export-donors.php';
161 161
 	}
162 162
 
163 163
 }
@@ -168,10 +168,10 @@  discard block
 block discarded – undo
168 168
  * @since  1.5
169 169
  */
170 170
 function give_register_forms_batch_export() {
171
-	add_action( 'give_batch_export_class_include', 'give_include_forms_batch_processor', 10, 1 );
171
+	add_action('give_batch_export_class_include', 'give_include_forms_batch_processor', 10, 1);
172 172
 }
173 173
 
174
-add_action( 'give_register_batch_exporter', 'give_register_forms_batch_export', 10 );
174
+add_action('give_register_batch_exporter', 'give_register_forms_batch_export', 10);
175 175
 
176 176
 /**
177 177
  * Loads the file downloads batch process if needed
@@ -182,10 +182,10 @@  discard block
 block discarded – undo
182 182
  *
183 183
  * @return void
184 184
  */
185
-function give_include_forms_batch_processor( $class ) {
185
+function give_include_forms_batch_processor($class) {
186 186
 
187
-	if ( 'Give_Batch_Forms_Export' === $class ) {
188
-		require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/export/class-batch-export-forms.php';
187
+	if ('Give_Batch_Forms_Export' === $class) {
188
+		require_once GIVE_PLUGIN_DIR.'includes/admin/tools/export/class-batch-export-forms.php';
189 189
 	}
190 190
 
191 191
 }
Please login to merge, or discard this patch.
includes/admin/tools/class-settings-api.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@  discard block
 block discarded – undo
9 9
  * @since       1.8
10 10
  */
11 11
 
12
-if ( ! defined( 'ABSPATH' ) ) {
12
+if ( ! defined('ABSPATH')) {
13 13
 	exit; // Exit if accessed directly
14 14
 }
15 15
 
16
-if ( ! class_exists( 'Give_Settings_API' ) ) :
16
+if ( ! class_exists('Give_Settings_API')) :
17 17
 
18 18
 	/**
19 19
 	 * Give_Settings_API.
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 		 */
35 35
 		public function __construct() {
36 36
 			$this->id    = 'api';
37
-			$this->label = esc_html__( 'API', 'give' );
37
+			$this->label = esc_html__('API', 'give');
38 38
 
39 39
 			parent::__construct();
40 40
 		}
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 		 */
48 48
 		public function get_settings() {
49 49
 			// Get settings.
50
-			$settings = apply_filters( 'give_settings_api', array(
50
+			$settings = apply_filters('give_settings_api', array(
51 51
 				array(
52 52
 					'id'   => 'give_tools_api',
53 53
 					'type' => 'title',
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 				),
56 56
 				array(
57 57
 					'id'   => 'api',
58
-					'name' => esc_html__( 'API', 'give' ),
58
+					'name' => esc_html__('API', 'give'),
59 59
 					'type' => 'api',
60 60
 				),
61 61
 				array(
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 			 * @since  1.8
72 72
 			 * @param  array $settings
73 73
 			 */
74
-			$settings = apply_filters( 'give_get_settings_' . $this->id, $settings );
74
+			$settings = apply_filters('give_get_settings_'.$this->id, $settings);
75 75
 
76 76
 			// Output.
77 77
 			return $settings;
Please login to merge, or discard this patch.
includes/admin/tools/class-settings-data.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@  discard block
 block discarded – undo
9 9
  * @since       1.8
10 10
  */
11 11
 
12
-if ( ! defined( 'ABSPATH' ) ) {
12
+if ( ! defined('ABSPATH')) {
13 13
 	exit; // Exit if accessed directly
14 14
 }
15 15
 
16
-if ( ! class_exists( 'Give_Settings_Data' ) ) :
16
+if ( ! class_exists('Give_Settings_Data')) :
17 17
 
18 18
 	/**
19 19
 	 * Give_Settings_Data.
@@ -35,14 +35,14 @@  discard block
 block discarded – undo
35 35
 		 */
36 36
 		public function __construct() {
37 37
 			$this->id    = 'data';
38
-			$this->label = esc_html__( 'Data', 'give' );
38
+			$this->label = esc_html__('Data', 'give');
39 39
 
40 40
 			parent::__construct();
41 41
 
42 42
 			// Do not use main form for this tab.
43
-			if( give_get_current_setting_tab() === $this->id ) {
44
-				add_action( "give-tools_open_form", '__return_empty_string' );
45
-				add_action( "give-tools_close_form", '__return_empty_string' );
43
+			if (give_get_current_setting_tab() === $this->id) {
44
+				add_action("give-tools_open_form", '__return_empty_string');
45
+				add_action("give-tools_close_form", '__return_empty_string');
46 46
 			}
47 47
 		}
48 48
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 		 */
55 55
 		public function get_settings() {
56 56
 			// Get settings.
57
-			$settings = apply_filters( 'give_settings_data', array(
57
+			$settings = apply_filters('give_settings_data', array(
58 58
 				array(
59 59
 					'id'   => 'give_tools_tools',
60 60
 					'type' => 'title',
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 				),
63 63
 				array(
64 64
 					'id'   => 'api',
65
-					'name' => esc_html__( 'Tools', 'give' ),
65
+					'name' => esc_html__('Tools', 'give'),
66 66
 					'type' => 'data',
67 67
 				),
68 68
 				array(
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 			 * @since  1.8
79 79
 			 * @param  array $settings
80 80
 			 */
81
-			$settings = apply_filters( 'give_get_settings_' . $this->id, $settings );
81
+			$settings = apply_filters('give_get_settings_'.$this->id, $settings);
82 82
 
83 83
 			// Output.
84 84
 			return $settings;
Please login to merge, or discard this patch.
includes/admin/tools/class-settings-import.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@  discard block
 block discarded – undo
9 9
  * @since       1.8
10 10
  */
11 11
 
12
-if ( ! defined( 'ABSPATH' ) ) {
12
+if ( ! defined('ABSPATH')) {
13 13
 	exit; // Exit if accessed directly
14 14
 }
15 15
 
16
-if ( ! class_exists( 'Give_Settings_Import' ) ) {
16
+if ( ! class_exists('Give_Settings_Import')) {
17 17
 
18 18
 	/**
19 19
 	 * Give_Settings_Import.
@@ -45,23 +45,23 @@  discard block
 block discarded – undo
45 45
 		 */
46 46
 		public function __construct() {
47 47
 			$this->id    = 'import';
48
-			$this->label = __( 'Import', 'give' );
48
+			$this->label = __('Import', 'give');
49 49
 
50 50
 			parent::__construct();
51 51
 
52 52
 			// Will display html of the import donation.
53
-			add_action( 'give_admin_field_tools_import', array(
53
+			add_action('give_admin_field_tools_import', array(
54 54
 				'Give_Settings_Import',
55 55
 				'render_import_field',
56
-			), 10, 2 );
56
+			), 10, 2);
57 57
 
58 58
 			// Do not use main form for this tab.
59
-			if ( give_get_current_setting_tab() === $this->id ) {
60
-				add_action( "give-tools_open_form", '__return_empty_string' );
61
-				add_action( "give-tools_close_form", '__return_empty_string' );
59
+			if (give_get_current_setting_tab() === $this->id) {
60
+				add_action("give-tools_open_form", '__return_empty_string');
61
+				add_action("give-tools_close_form", '__return_empty_string');
62 62
 
63
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/import/class-give-import-donations.php';
64
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/import/class-give-import-core-settings.php';
63
+				require_once GIVE_PLUGIN_DIR.'includes/admin/tools/import/class-give-import-donations.php';
64
+				require_once GIVE_PLUGIN_DIR.'includes/admin/tools/import/class-give-import-core-settings.php';
65 65
 			}
66 66
 		}
67 67
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 			 * @param  array $settings
81 81
 			 */
82 82
 			$settings = apply_filters(
83
-				'give_get_settings_' . $this->id,
83
+				'give_get_settings_'.$this->id,
84 84
 				array(
85 85
 					array(
86 86
 						'id'         => 'give_tools_import',
@@ -89,14 +89,14 @@  discard block
 block discarded – undo
89 89
 					),
90 90
 					array(
91 91
 						'id'   => 'import',
92
-						'name' => __( 'Import', 'give' ),
92
+						'name' => __('Import', 'give'),
93 93
 						'type' => 'tools_import',
94 94
 					),
95 95
 					array(
96
-						'name'  => esc_html__( 'Import Docs Link', 'give' ),
96
+						'name'  => esc_html__('Import Docs Link', 'give'),
97 97
 						'id'    => 'import_docs_link',
98
-						'url'   => esc_url( 'http://docs.givewp.com/tools-importer' ),
99
-						'title' => __( 'Import Tab', 'give' ),
98
+						'url'   => esc_url('http://docs.givewp.com/tools-importer'),
99
+						'title' => __('Import Tab', 'give'),
100 100
 						'type'  => 'give_docs_link',
101 101
 					),
102 102
 					array(
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
 		 * @param $field
121 121
 		 * @param $option_value
122 122
 		 */
123
-		public static function render_import_field( $field, $option_value ) {
124
-			include_once GIVE_PLUGIN_DIR . 'includes/admin/tools/views/html-admin-page-imports.php';
123
+		public static function render_import_field($field, $option_value) {
124
+			include_once GIVE_PLUGIN_DIR.'includes/admin/tools/views/html-admin-page-imports.php';
125 125
 		}
126 126
 	}
127 127
 }
Please login to merge, or discard this patch.
includes/admin/tools/views/html-admin-page-import-donations.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -3,11 +3,11 @@  discard block
 block discarded – undo
3 3
  * Admin View: Import Donations
4 4
  */
5 5
 
6
-if ( ! defined( 'ABSPATH' ) ) {
6
+if ( ! defined('ABSPATH')) {
7 7
 	exit;
8 8
 }
9 9
 
10
-if ( ! current_user_can( 'manage_give_settings' ) ) {
10
+if ( ! current_user_can('manage_give_settings')) {
11 11
 	return;
12 12
 }
13 13
 
@@ -16,11 +16,11 @@  discard block
 block discarded – undo
16 16
  *
17 17
  * @since 1.8.13
18 18
  */
19
-do_action( 'give_tools_import_donations_main_before' );
19
+do_action('give_tools_import_donations_main_before');
20 20
 ?>
21 21
     <div id="poststuff">
22 22
         <div class="postbox">
23
-            <h1 class="give-importer-h1" align="center"><?php esc_html_e( 'Import Donations', 'give' ); ?></h1>
23
+            <h1 class="give-importer-h1" align="center"><?php esc_html_e('Import Donations', 'give'); ?></h1>
24 24
             <div class="inside give-tools-setting-page-import give-import-donations">
25 25
 				<?php
26 26
 				/**
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 				 *
29 29
 				 * @since 1.8.14
30 30
 				 */
31
-				do_action( 'give_tools_import_donations_form_before_start' );
31
+				do_action('give_tools_import_donations_form_before_start');
32 32
 				?>
33 33
                 <form method="post" id="give-import-donations-form" class="give-import-form tools-setting-page-import tools-setting-page-import">
34 34
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 					 *
39 39
 					 * @since 1.8.14
40 40
 					 */
41
-					do_action( 'give_tools_import_donations_form_start' );
41
+					do_action('give_tools_import_donations_form_start');
42 42
 					?>
43 43
 
44 44
 					<?php
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 					 *
48 48
 					 * @since 1.8.14
49 49
 					 */
50
-					do_action( 'give_tools_import_donations_form_end' );
50
+					do_action('give_tools_import_donations_form_end');
51 51
 					?>
52 52
                 </form>
53 53
 				<?php
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 				 *
57 57
 				 * @since 1.8.14
58 58
 				 */
59
-				do_action( 'give_tools_import_donations_form_after_end' );
59
+				do_action('give_tools_import_donations_form_after_end');
60 60
 				?>
61 61
             </div><!-- .inside -->
62 62
         </div><!-- .postbox -->
@@ -67,4 +67,4 @@  discard block
 block discarded – undo
67 67
  *
68 68
  * @since 1.8.13
69 69
  */
70
-do_action( 'give_tools_import_donations_main_after' );
70
+do_action('give_tools_import_donations_main_after');
Please login to merge, or discard this patch.
includes/admin/tools/views/html-admin-page-exports.php 1 patch
Spacing   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  * Admin View: Exports
4 4
  */
5 5
 
6
-if ( ! defined( 'ABSPATH' ) ) {
6
+if ( ! defined('ABSPATH')) {
7 7
 	exit;
8 8
 } ?>
9 9
 
@@ -18,14 +18,14 @@  discard block
 block discarded – undo
18 18
 				 *
19 19
 				 * @since 1.0
20 20
 				 */
21
-				do_action( 'give_tools_tab_export_content_top' );
21
+				do_action('give_tools_tab_export_content_top');
22 22
 				?>
23 23
 
24 24
 				<table class="widefat export-options-table give-table striped">
25 25
 					<thead>
26 26
 						<tr>
27
-							<th scope="col"><?php esc_html_e( 'Export Type', 'give' ); ?></th>
28
-							<th scope="col"><?php esc_html_e( 'Export Options', 'give' ); ?></th>
27
+							<th scope="col"><?php esc_html_e('Export Type', 'give'); ?></th>
28
+							<th scope="col"><?php esc_html_e('Export Options', 'give'); ?></th>
29 29
 						</tr>
30 30
 					</thead>
31 31
 					<tbody>
@@ -38,42 +38,42 @@  discard block
 block discarded – undo
38 38
 						 *
39 39
 						 * @since 1.0
40 40
 						 */
41
-						do_action( 'give_tools_tab_export_table_top' );
41
+						do_action('give_tools_tab_export_table_top');
42 42
 						?>
43 43
 						<tr class="give-export-pdf-sales-earnings">
44 44
 							<td scope="row" class="row-title">
45 45
 								<h3>
46
-									<span><?php esc_html_e( 'Export PDF of Donations and Income', 'give' ); ?></span>
46
+									<span><?php esc_html_e('Export PDF of Donations and Income', 'give'); ?></span>
47 47
 								</h3>
48
-								<p><?php esc_html_e( 'Download a PDF of Donations and Income reports for all forms for the current year.', 'give' ); ?></p>
48
+								<p><?php esc_html_e('Download a PDF of Donations and Income reports for all forms for the current year.', 'give'); ?></p>
49 49
 							</td>
50 50
 							<td>
51
-								<a class="button" href="<?php echo wp_nonce_url( add_query_arg( array( 'give-action' => 'generate_pdf' ) ), 'give_generate_pdf' ); ?>">
52
-									<?php esc_html_e( 'Generate PDF', 'give' ); ?>
51
+								<a class="button" href="<?php echo wp_nonce_url(add_query_arg(array('give-action' => 'generate_pdf')), 'give_generate_pdf'); ?>">
52
+									<?php esc_html_e('Generate PDF', 'give'); ?>
53 53
 								</a>
54 54
 							</td>
55 55
 						</tr>
56 56
 						<tr class="give-export-sales-earnings">
57 57
 							<td scope="row" class="row-title">
58 58
 								<h3>
59
-									<span><?php esc_html_e( 'Export Income and Donation Stats', 'give' ); ?></span>
59
+									<span><?php esc_html_e('Export Income and Donation Stats', 'give'); ?></span>
60 60
 								</h3>
61
-								<p><?php esc_html_e( 'Download a CSV of income and donations over time.', 'give' ); ?></p>
61
+								<p><?php esc_html_e('Download a CSV of income and donations over time.', 'give'); ?></p>
62 62
 							</td>
63 63
 							<td>
64 64
 								<form method="post">
65 65
 									<?php
66 66
 									printf(
67 67
 									/* translators: 1: start date dropdown 2: end date dropdown */
68
-										esc_html__( '%1$s to %2$s', 'give' ),
69
-										Give()->html->year_dropdown( 'start_year' ) . ' ' . Give()->html->month_dropdown( 'start_month' ),
70
-										Give()->html->year_dropdown( 'end_year' ) . ' ' . Give()->html->month_dropdown( 'end_month' )
68
+										esc_html__('%1$s to %2$s', 'give'),
69
+										Give()->html->year_dropdown('start_year').' '.Give()->html->month_dropdown('start_month'),
70
+										Give()->html->year_dropdown('end_year').' '.Give()->html->month_dropdown('end_month')
71 71
 									);
72 72
 									?>
73 73
 									<input type="hidden" name="give-action"
74 74
 										   value="earnings_export"/>
75 75
 									<input type="submit"
76
-										   value="<?php esc_attr_e( 'Generate CSV', 'give' ); ?>"
76
+										   value="<?php esc_attr_e('Generate CSV', 'give'); ?>"
77 77
 										   class="button-secondary"/>
78 78
 								</form>
79 79
 							</td>
@@ -81,37 +81,37 @@  discard block
 block discarded – undo
81 81
 						<tr class="give-export-payment-history">
82 82
 							<td scope="row" class="row-title">
83 83
 								<h3>
84
-									<span><?php esc_html_e( 'Export Donation History', 'give' ); ?></span>
84
+									<span><?php esc_html_e('Export Donation History', 'give'); ?></span>
85 85
 								</h3>
86
-								<p><?php esc_html_e( 'Download a CSV of all donations recorded.', 'give' ); ?></p>
86
+								<p><?php esc_html_e('Download a CSV of all donations recorded.', 'give'); ?></p>
87 87
 							</td>
88 88
 							<td>
89 89
 								<form id="give-export-payments"
90 90
 									  class="give-export-form" method="post">
91 91
 									<?php
92
-									echo Give()->html->date_field( array(
92
+									echo Give()->html->date_field(array(
93 93
 										'id'          => 'give-payment-export-start',
94 94
 										'name'        => 'start',
95
-										'placeholder' => esc_attr__( 'Start date', 'give' ),
96
-									) );
95
+										'placeholder' => esc_attr__('Start date', 'give'),
96
+									));
97 97
 
98
-									echo Give()->html->date_field( array(
98
+									echo Give()->html->date_field(array(
99 99
 										'id'          => 'give-payment-export-end',
100 100
 										'name'        => 'end',
101
-										'placeholder' => esc_attr__( 'End date', 'give' ),
102
-									) );
101
+										'placeholder' => esc_attr__('End date', 'give'),
102
+									));
103 103
 									?>
104 104
 									<select name="status">
105
-										<option value="any"><?php esc_html_e( 'All Statuses', 'give' ); ?></option>
105
+										<option value="any"><?php esc_html_e('All Statuses', 'give'); ?></option>
106 106
 										<?php
107 107
 										$statuses = give_get_payment_statuses();
108
-										foreach ( $statuses as $status => $label ) {
109
-											echo '<option value="' . $status . '">' . $label . '</option>';
108
+										foreach ($statuses as $status => $label) {
109
+											echo '<option value="'.$status.'">'.$label.'</option>';
110 110
 										}
111 111
 										?>
112 112
 									</select>
113 113
 									<?php
114
-									if ( give_is_setting_enabled( give_get_option( 'categories' ) ) ) {
114
+									if (give_is_setting_enabled(give_get_option('categories'))) {
115 115
 										echo Give()->html->category_dropdown(
116 116
 											'give_forms_categories[]',
117 117
 											0,
@@ -121,12 +121,12 @@  discard block
 block discarded – undo
121 121
 												'multiple'        => true,
122 122
 												'selected'        => array(),
123 123
 												'show_option_all' => false,
124
-												'placeholder'     => __( 'Choose one or more from categories', 'give' ),
124
+												'placeholder'     => __('Choose one or more from categories', 'give'),
125 125
 											)
126 126
 										);
127 127
 									}
128 128
 
129
-									if ( give_is_setting_enabled( give_get_option( 'tags' ) ) ) {
129
+									if (give_is_setting_enabled(give_get_option('tags'))) {
130 130
 										echo Give()->html->tags_dropdown(
131 131
 											'give_forms_tags[]',
132 132
 											0,
@@ -136,18 +136,18 @@  discard block
 block discarded – undo
136 136
 												'multiple'        => true,
137 137
 												'selected'        => array(),
138 138
 												'show_option_all' => false,
139
-												'placeholder'     => __( 'Choose one or more from tags', 'give' ),
139
+												'placeholder'     => __('Choose one or more from tags', 'give'),
140 140
 											)
141 141
 										);
142 142
 									}
143 143
 
144
-									wp_nonce_field( 'give_ajax_export', 'give_ajax_export' );
144
+									wp_nonce_field('give_ajax_export', 'give_ajax_export');
145 145
 									?>
146 146
 									<input type="hidden" name="give-export-class"
147 147
 										   value="Give_Batch_Payments_Export"/>
148 148
 									<span>
149 149
 									<input type="submit"
150
-										   value="<?php esc_attr_e( 'Generate CSV', 'give' ); ?>"
150
+										   value="<?php esc_attr_e('Generate CSV', 'give'); ?>"
151 151
 										   class="button-secondary"/>
152 152
 									<span class="spinner"></span>
153 153
 								</span>
@@ -157,9 +157,9 @@  discard block
 block discarded – undo
157 157
 						<tr class="give-export-donors">
158 158
 							<td scope="row" class="row-title">
159 159
 								<h3>
160
-									<span><?php esc_html_e( 'Export Donors in CSV', 'give' ); ?></span>
160
+									<span><?php esc_html_e('Export Donors in CSV', 'give'); ?></span>
161 161
 								</h3>
162
-								<p><?php esc_html_e( 'Download an export of donors for all donation forms or only those who have given to a particular form.', 'give' ); ?></p>
162
+								<p><?php esc_html_e('Download an export of donors for all donation forms or only those who have given to a particular form.', 'give'); ?></p>
163 163
 							</td>
164 164
 							<td>
165 165
 								<form method="post" id="give_donor_export"
@@ -167,93 +167,93 @@  discard block
 block discarded – undo
167 167
 
168 168
 									<?php
169 169
 									// Start Date form field for donors
170
-									echo Give()->html->date_field( array(
170
+									echo Give()->html->date_field(array(
171 171
 										'id'          => 'give_donor_export_start_date',
172 172
 										'name'        => 'donor_export_start_date',
173
-										'placeholder' => esc_attr__( 'Start date', 'give' ),
174
-									) );
173
+										'placeholder' => esc_attr__('Start date', 'give'),
174
+									));
175 175
 
176 176
 									// End Date form field for donors
177
-									echo Give()->html->date_field( array(
177
+									echo Give()->html->date_field(array(
178 178
 										'id'          => 'give_donor_export_end_date',
179 179
 										'name'        => 'donor_export_end_date',
180
-										'placeholder' => esc_attr__( 'End date', 'give' ),
181
-									) );
180
+										'placeholder' => esc_attr__('End date', 'give'),
181
+									));
182 182
 
183 183
 									// Donation forms dropdown for donors export
184
-									echo Give()->html->forms_dropdown( array(
184
+									echo Give()->html->forms_dropdown(array(
185 185
 										'name'   => 'forms',
186 186
 										'id'     => 'give_donor_export_form',
187 187
 										'chosen' => true,
188
-									) );
188
+									));
189 189
 									?>
190
-									<input type="submit" value="<?php esc_attr_e( 'Generate CSV', 'give' ); ?>" class="button-secondary"/>
190
+									<input type="submit" value="<?php esc_attr_e('Generate CSV', 'give'); ?>" class="button-secondary"/>
191 191
 
192 192
 								<div id="export-donor-options-wrap"
193 193
 								     class="give-clearfix">
194
-									<p><?php esc_html_e( 'Export Columns:', 'give' ); ?></p>
194
+									<p><?php esc_html_e('Export Columns:', 'give'); ?></p>
195 195
 									<ul id="give-export-option-ul">
196 196
 										<li>
197 197
 											<label for="give-export-fullname">
198 198
 												<input type="checkbox" checked
199 199
 												       name="give_export_option[full_name]"
200
-												       id="give-export-fullname"><?php esc_html_e( 'Name', 'give' ); ?>
200
+												       id="give-export-fullname"><?php esc_html_e('Name', 'give'); ?>
201 201
 											</label>
202 202
 										</li>
203 203
 										<li>
204 204
 											<label for="give-export-email">
205 205
 												<input type="checkbox" checked
206 206
 												       name="give_export_option[email]"
207
-												       id="give-export-email"><?php esc_html_e( 'Email', 'give' ); ?>
207
+												       id="give-export-email"><?php esc_html_e('Email', 'give'); ?>
208 208
 											</label>
209 209
 										</li>
210 210
 										<li>
211 211
 											<label for="give-export-address">
212 212
 												<input type="checkbox" checked
213 213
 												       name="give_export_option[address]"
214
-												       id="give-export-address"><?php esc_html_e( 'Address', 'give' ); ?>
214
+												       id="give-export-address"><?php esc_html_e('Address', 'give'); ?>
215 215
 											</label>
216 216
 										</li>
217 217
 										<li>
218 218
 											<label for="give-export-userid">
219 219
 												<input type="checkbox" checked
220 220
 												       name="give_export_option[userid]"
221
-												       id="give-export-userid"><?php esc_html_e( 'User ID', 'give' ); ?>
221
+												       id="give-export-userid"><?php esc_html_e('User ID', 'give'); ?>
222 222
 											</label>
223 223
 										</li>
224 224
 										<li>
225 225
 											<label for="give-export-donation-form">
226 226
 												<input type="checkbox" checked
227 227
 												       name="give_export_option[donation_form]"
228
-												       id="give-export-donation-form"><?php esc_html_e( 'Donation Form', 'give' ); ?>
228
+												       id="give-export-donation-form"><?php esc_html_e('Donation Form', 'give'); ?>
229 229
 											</label>
230 230
 										</li>
231 231
 										<li>
232 232
 											<label for="give-export-first-donation-date">
233 233
 												<input type="checkbox" checked
234 234
 												       name="give_export_option[date_first_donated]"
235
-												       id="give-export-first-donation-date"><?php esc_html_e( 'First Donation Date', 'give' ); ?>
235
+												       id="give-export-first-donation-date"><?php esc_html_e('First Donation Date', 'give'); ?>
236 236
 											</label>
237 237
 										</li>
238 238
 										<li>
239 239
 											<label for="give-export-donation-number">
240 240
 												<input type="checkbox" checked
241 241
 												       name="give_export_option[donations]"
242
-												       id="give-export-donation-number"><?php esc_html_e( 'Number of Donations', 'give' ); ?>
242
+												       id="give-export-donation-number"><?php esc_html_e('Number of Donations', 'give'); ?>
243 243
 											</label>
244 244
 										</li>
245 245
 										<li>
246 246
 											<label for="give-export-donation-sum">
247 247
 												<input type="checkbox" checked
248 248
 												       name="give_export_option[donation_sum]"
249
-												       id="give-export-donation-sum"><?php esc_html_e( 'Total Donated', 'give' ); ?>
249
+												       id="give-export-donation-sum"><?php esc_html_e('Total Donated', 'give'); ?>
250 250
 											</label>
251 251
 										</li>
252 252
 									</ul>
253 253
 								</div>
254
-								<?php wp_nonce_field( 'give_ajax_export', 'give_ajax_export' ); ?>
254
+								<?php wp_nonce_field('give_ajax_export', 'give_ajax_export'); ?>
255 255
 								<input type="hidden" name="give-export-class" value="Give_Batch_Donors_Export"/>
256
-								<input type="hidden" name="give_export_option[query_id]" value="<?php echo uniqid( 'give_' ); ?>"/>
256
+								<input type="hidden" name="give_export_option[query_id]" value="<?php echo uniqid('give_'); ?>"/>
257 257
 							</form>
258 258
 						</td>
259 259
 					</tr>
@@ -261,14 +261,14 @@  discard block
 block discarded – undo
261 261
 					<tr class="give-export-core-settings">
262 262
 						<td scope="row" class="row-title">
263 263
 							<h3>
264
-								<span><?php esc_html_e( 'Export Give Settings', 'give' ); ?></span>
264
+								<span><?php esc_html_e('Export Give Settings', 'give'); ?></span>
265 265
 							</h3>
266
-							<p><?php esc_html_e( 'Download an export of Give\'s settings and import it in a new WordPress installation.', 'give' ); ?></p>
266
+							<p><?php esc_html_e('Download an export of Give\'s settings and import it in a new WordPress installation.', 'give'); ?></p>
267 267
 						</td>
268 268
 						<td>
269 269
 							<form method="post">
270 270
 								<input type="hidden" name="give-action" value="core_settings_export"/>
271
-								<input type="submit" value="<?php esc_attr_e( 'Export JSON', 'give' ); ?>" class="button-secondary"/>
271
+								<input type="submit" value="<?php esc_attr_e('Export JSON', 'give'); ?>" class="button-secondary"/>
272 272
 							</form>
273 273
 						</td>
274 274
 					</tr>
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 					 *
282 282
 					 * @since 1.0
283 283
 					 */
284
-					do_action( 'give_tools_tab_export_table_bottom' );
284
+					do_action('give_tools_tab_export_table_bottom');
285 285
 					?>
286 286
 					</tbody>
287 287
 				</table>
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 				 *
293 293
 				 * @since 1.0
294 294
 				 */
295
-				do_action( 'give_tools_tab_export_content_bottom' );
295
+				do_action('give_tools_tab_export_content_bottom');
296 296
 				?>
297 297
 
298 298
 			</div>
Please login to merge, or discard this patch.
includes/admin/tools/views/html-admin-page-data.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -3,11 +3,11 @@  discard block
 block discarded – undo
3 3
  * Admin View: Exports
4 4
  */
5 5
 
6
-if ( ! defined( 'ABSPATH' ) ) {
6
+if ( ! defined('ABSPATH')) {
7 7
 	exit;
8 8
 }
9 9
 
10
-if ( ! current_user_can( 'manage_give_settings' ) ) {
10
+if ( ! current_user_can('manage_give_settings')) {
11 11
 	return;
12 12
 }
13 13
 
@@ -16,29 +16,29 @@  discard block
 block discarded – undo
16 16
  *
17 17
  * @since 1.5
18 18
  */
19
-do_action( 'give_tools_recount_stats_before' );
19
+do_action('give_tools_recount_stats_before');
20 20
 ?>
21 21
 	<div id="poststuff">
22 22
 		<div class="postbox">
23 23
 
24
-			<h2 class="hndle ui-sortable-handle"><span><?php esc_html_e( 'Recount Stats', 'give' ); ?></span></h2>
24
+			<h2 class="hndle ui-sortable-handle"><span><?php esc_html_e('Recount Stats', 'give'); ?></span></h2>
25 25
 
26 26
 			<div class="inside recount-stats-controls">
27
-				<p><?php esc_html_e( 'Use these tools to recount stats, delete test transactions, or reset stats.', 'give' ); ?></p>
27
+				<p><?php esc_html_e('Use these tools to recount stats, delete test transactions, or reset stats.', 'give'); ?></p>
28 28
 				<form method="post" id="give-tools-recount-form" class="give-export-form">
29 29
 
30
-					<?php wp_nonce_field( 'give_ajax_export', 'give_ajax_export' ); ?>
30
+					<?php wp_nonce_field('give_ajax_export', 'give_ajax_export'); ?>
31 31
 
32 32
 					<select name="give-export-class" id="recount-stats-type">
33
-						<option value="0" selected="selected" disabled="disabled"><?php esc_html_e( 'Please select an option', 'give' ); ?></option>
34
-						<option data-type="recount-stats" value="Give_Tools_Recount_Income"><?php esc_html_e( 'Recalculate Total Donation Income Amount', 'give' ); ?></option>
35
-						<option data-type="recount-form" value="Give_Tools_Recount_Form_Stats"><?php esc_html_e( 'Recalculate Income Amount and Donation Counts for a Form', 'give' ); ?></option>
36
-						<option data-type="recount-all" value="Give_Tools_Recount_All_Stats"><?php esc_html_e( 'Recalculate Income Amount and Donation Counts for All Forms', 'give' ); ?></option>
37
-						<option data-type="recount-donor-stats" value="Give_Tools_Recount_Donor_Stats"><?php esc_html_e( 'Recalculate Donor Statistics', 'give' ); ?></option>
38
-						<option data-type="delete-test-transactions" value="Give_Tools_Delete_Test_Transactions"><?php esc_html_e( 'Delete Test Payments', 'give' ); ?></option>
39
-						<option data-type="delete-test-donors"   value="Give_Tools_Delete_Donors"><?php esc_html_e( 'Delete Test Donors and Payments', 'give' ); ?></option>
40
-						<option data-type="delete-import-donors"   value="Give_Tools_Import_Donors"><?php esc_html_e( 'Delete Imported Donors and Payments', 'give' ); ?></option>
41
-						<option data-type="reset-stats" value="Give_Tools_Reset_Stats"><?php esc_html_e( 'Delete All Data', 'give' ); ?></option>
33
+						<option value="0" selected="selected" disabled="disabled"><?php esc_html_e('Please select an option', 'give'); ?></option>
34
+						<option data-type="recount-stats" value="Give_Tools_Recount_Income"><?php esc_html_e('Recalculate Total Donation Income Amount', 'give'); ?></option>
35
+						<option data-type="recount-form" value="Give_Tools_Recount_Form_Stats"><?php esc_html_e('Recalculate Income Amount and Donation Counts for a Form', 'give'); ?></option>
36
+						<option data-type="recount-all" value="Give_Tools_Recount_All_Stats"><?php esc_html_e('Recalculate Income Amount and Donation Counts for All Forms', 'give'); ?></option>
37
+						<option data-type="recount-donor-stats" value="Give_Tools_Recount_Donor_Stats"><?php esc_html_e('Recalculate Donor Statistics', 'give'); ?></option>
38
+						<option data-type="delete-test-transactions" value="Give_Tools_Delete_Test_Transactions"><?php esc_html_e('Delete Test Payments', 'give'); ?></option>
39
+						<option data-type="delete-test-donors"   value="Give_Tools_Delete_Donors"><?php esc_html_e('Delete Test Donors and Payments', 'give'); ?></option>
40
+						<option data-type="delete-import-donors"   value="Give_Tools_Import_Donors"><?php esc_html_e('Delete Imported Donors and Payments', 'give'); ?></option>
41
+						<option data-type="reset-stats" value="Give_Tools_Reset_Stats"><?php esc_html_e('Delete All Data', 'give'); ?></option>
42 42
 						<?php
43 43
 						/**
44 44
 						 * Fires in the recount stats selectbox.
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 						 *
48 48
 						 * @since 1.5
49 49
 						 */
50
-						do_action( 'give_recount_tool_options' );
50
+						do_action('give_recount_tool_options');
51 51
 						?>
52 52
 					</select>
53 53
 
@@ -56,34 +56,34 @@  discard block
 block discarded – undo
56 56
 						$args = array(
57 57
 							'class'       => 'tools-form-dropdown-recount-form-select',
58 58
 							'name'        => 'form_id',
59
-							'number'      => - 1,
59
+							'number'      => -1,
60 60
 							'chosen'      => true,
61
-							'placeholder' => __( 'Select Form', 'give' ),
61
+							'placeholder' => __('Select Form', 'give'),
62 62
 						);
63
-						echo Give()->html->forms_dropdown( $args );
63
+						echo Give()->html->forms_dropdown($args);
64 64
 						?>
65 65
 					</span>
66 66
 
67 67
 					<span class="tools-form-dropdown tools-form-dropdown-delete-import-donors" style="display: none">
68 68
 						<label for="delete-import-donors">
69 69
 							<?php
70
-							echo Give()->html->checkbox( array(
70
+							echo Give()->html->checkbox(array(
71 71
 								'name'    => 'delete-import-donors'
72
-							) );
73
-							_e( 'Delete imported WordPress users', 'give' );
72
+							));
73
+							_e('Delete imported WordPress users', 'give');
74 74
 							?>
75 75
 						</label>
76 76
 					</span>
77 77
 
78
-					<input type="submit" id="recount-stats-submit" value="<?php esc_attr_e( 'Submit', 'give' ); ?>" class="button-secondary"/>
78
+					<input type="submit" id="recount-stats-submit" value="<?php esc_attr_e('Submit', 'give'); ?>" class="button-secondary"/>
79 79
 
80 80
 					<br/>
81 81
 
82 82
 					<span class="give-recount-stats-descriptions">
83
-						<span id="recount-stats"><?php esc_html_e( 'Recalculates the overall donation income amount.', 'give' ); ?></span>
84
-						<span id="recount-form"><?php esc_html_e( 'Recalculates the donation and income stats for a specific form.', 'give' ); ?></span>
85
-						<span id="recount-all"><?php esc_html_e( 'Recalculates the earnings and sales stats for all forms.', 'give' ); ?></span>
86
-						<span id="recount-customer-stats"><?php esc_html_e( 'Recalculates the lifetime value and donation counts for all donors.', 'give' ); ?></span>
83
+						<span id="recount-stats"><?php esc_html_e('Recalculates the overall donation income amount.', 'give'); ?></span>
84
+						<span id="recount-form"><?php esc_html_e('Recalculates the donation and income stats for a specific form.', 'give'); ?></span>
85
+						<span id="recount-all"><?php esc_html_e('Recalculates the earnings and sales stats for all forms.', 'give'); ?></span>
86
+						<span id="recount-customer-stats"><?php esc_html_e('Recalculates the lifetime value and donation counts for all donors.', 'give'); ?></span>
87 87
 						<?php
88 88
 						/**
89 89
 						 * Fires in the recount stats description area.
@@ -92,10 +92,10 @@  discard block
 block discarded – undo
92 92
 						 *
93 93
 						 * @since 1.5
94 94
 						 */
95
-						do_action( 'give_recount_tool_descriptions' );
95
+						do_action('give_recount_tool_descriptions');
96 96
 						?>
97
-						<span id="delete-test-transactions"><?php _e( '<strong>Deletes</strong> all TEST donations, donors, and related log entries.', 'give' ); ?></span>
98
-						<span id="reset-stats"><?php _e( '<strong>Deletes</strong> ALL donations, donors, and related log entries regardless of test or live mode.', 'give' ); ?></span>
97
+						<span id="delete-test-transactions"><?php _e('<strong>Deletes</strong> all TEST donations, donors, and related log entries.', 'give'); ?></span>
98
+						<span id="reset-stats"><?php _e('<strong>Deletes</strong> ALL donations, donors, and related log entries regardless of test or live mode.', 'give'); ?></span>
99 99
 					</span>
100 100
 
101 101
 					<span class="spinner"></span>
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 				 *
110 110
 				 * @since 1.5
111 111
 				 */
112
-				do_action( 'give_tools_recount_forms' );
112
+				do_action('give_tools_recount_forms');
113 113
 				?>
114 114
 			</div><!-- .inside -->
115 115
 		</div><!-- .postbox -->
@@ -120,4 +120,4 @@  discard block
 block discarded – undo
120 120
  *
121 121
  * @since 1.5
122 122
  */
123
-do_action( 'give_tools_recount_stats_after' );
123
+do_action('give_tools_recount_stats_after');
Please login to merge, or discard this patch.