Test Failed
Push — master ( f5256c...25a383 )
by Devin
07:02
created

Give_Settings_General   A

Complexity

Total Complexity 20

Size/Duplication

Total Lines 511
Duplicated Lines 5.48 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 0
Metric Value
dl 28
loc 511
rs 10
c 0
b 0
f 0
wmc 20
lcom 1
cbo 4

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 14 2
C get_settings() 0 384 9
A get_sections() 0 10 1
A __give_change_donation_stating_number() 0 21 4
A __render_give_sequential_donation_code_preview() 14 14 2
A __render_give_unlock_all_settings() 14 14 2

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
/**
3
 * Give Settings Page/Tab
4
 *
5
 * @package     Give
6
 * @subpackage  Classes/Give_Settings_General
7
 * @copyright   Copyright (c) 2016, WordImpress
8
 * @license     http://opensource.org/licenses/gpl-2.0.php GNU Public License
9
 * @since       1.8
10
 */
11
12
if ( ! defined( 'ABSPATH' ) ) {
13
	exit; // Exit if accessed directly.
14
}
15
16
if ( ! class_exists( 'Give_Settings_General' ) ) :
17
18
	/**
19
	 * Give_Settings_General.
20
	 *
21
	 * @sine 1.8
22
	 */
23
	class Give_Settings_General extends Give_Settings_Page {
24
25
		/**
26
		 * Constructor.
27
		 */
28
		public function __construct() {
29
			$this->id    = 'general';
30
			$this->label = __( 'General', 'give' );
31
32
			$this->default_tab = 'general-settings';
33
34
			if ( $this->id === give_get_current_setting_tab() ) {
35
				add_action( 'give_save_settings_give_settings', array( $this, '__give_change_donation_stating_number' ), 10, 3 );
36
				add_action( 'give_admin_field_give_sequential_donation_code_preview', array( $this, '__render_give_sequential_donation_code_preview' ), 10, 3 );
37
				add_action( 'give_admin_field_give_unlock_all_settings', array( $this, '__render_give_unlock_all_settings' ), 10, 3 );
38
			}
39
40
			parent::__construct();
41
		}
42
43
		/**
44
		 * Get settings array.
45
		 *
46
		 * @since  1.8
47
		 * @return array
48
		 */
49
		public function get_settings() {
50
			$settings        = array();
51
			$current_section = give_get_current_setting_section();
52
53
			switch ( $current_section ) {
54
				case 'access-control':
55
					$settings = array(
56
						// Section 3: Access control.
57
						array(
58
							'id'   => 'give_title_session_control_1',
59
							'type' => 'title',
60
						),
61
						array(
62
							'id'      => 'session_lifetime',
63
							'name'    => __( 'Session Lifetime', 'give' ),
64
							'desc'    => __( 'The length of time a user\'s session is kept alive. Give starts a new session per user upon donation. Sessions allow donors to view their donation receipts without being logged in.', 'give' ),
65
							'type'    => 'select',
66
							'options' => array(
67
								'86400'  => __( '24 Hours', 'give' ),
68
								'172800' => __( '48 Hours', 'give' ),
69
								'259200' => __( '72 Hours', 'give' ),
70
								'604800' => __( '1 Week', 'give' ),
71
							),
72
						),
73
						array(
74
							'id'         => 'limit_display_donations',
75
							'name'       => __( 'Limit Donations Displayed', 'give' ),
76
							'desc'       => __( 'Adjusts the number of donations displayed to a non logged-in user when they attempt to access the Donation History page without an active session. For security reasons, it\'s best to leave this at 1-3 donations.', 'give' ),
77
							'default'    => '1',
78
							'type'       => 'number',
79
							'css'        => 'width:50px;',
80
							'attributes' => array(
81
								'min' => '1',
82
								'max' => '10',
83
							),
84
						),
85
						array(
86
							'name'    => __( 'Email Access', 'give' ),
87
							'desc'    => __( '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' ),
88
							'id'      => 'email_access',
89
							'type'    => 'radio_inline',
90
							'default' => 'disabled',
91
							'options' => array(
92
								'enabled'  => __( 'Enabled', 'give' ),
93
								'disabled' => __( 'Disabled', 'give' ),
94
							),
95
						),
96
						array(
97
							'name'    => __( 'Enable reCAPTCHA', 'give' ),
98
							'desc'    => __( 'Would you like to enable the reCAPTCHA feature?', 'give' ),
99
							'id'      => 'enable_recaptcha',
100
							'type'    => 'radio_inline',
101
							'default' => 'disabled',
102
							'options' => array(
103
								'enabled'  => __( 'Enabled', 'give' ),
104
								'disabled' => __( 'Disabled', 'give' ),
105
							),
106
						),
107
						array(
108
							'id'      => 'recaptcha_key',
109
							'name'    => __( 'reCAPTCHA Site Key', 'give' ),
110
							/* translators: %s: https://www.google.com/recaptcha/ */
111
							'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 and paste your reCAPTCHA site key here. The reCAPTCHA uses Google\'s user-friendly single click verification method.', 'give' ), esc_url( 'http://docs.givewp.com/recaptcha' ) ),
112
							'default' => '',
113
							'type'    => 'text',
114
						),
115
						array(
116
							'id'      => 'recaptcha_secret',
117
							'name'    => __( 'reCAPTCHA Secret Key', 'give' ),
118
							'desc'    => __( 'Please paste the reCAPTCHA secret key here from your  reCAPTCHA API Keys panel.', 'give' ),
119
							'default' => '',
120
							'type'    => 'text',
121
						),
122
						array(
123
							'name'  => __( 'Access Control Docs Link', 'give' ),
124
							'id'    => 'access_control_docs_link',
125
							'url'   => esc_url( 'http://docs.givewp.com/settings-access-control' ),
126
							'title' => __( 'Access Control', 'give' ),
127
							'type'  => 'give_docs_link',
128
						),
129
						array(
130
							'id'   => 'give_title_session_control_1',
131
							'type' => 'sectionend',
132
						),
133
					);
134
					break;
135
136
				case 'currency-settings' :
137
					$currency_position_before = __( 'Before - %s&#x200e;10', 'give' );
138
					$currency_position_after  = __( 'After - 10%s&#x200f;', 'give' );
139
140
					$settings = array(
141
						// Section 2: Currency
142
						array(
143
							'type' => 'title',
144
							'id'   => 'give_title_general_settings_2',
145
						),
146
						array(
147
							'name' => __( 'Currency Settings', 'give' ),
148
							'desc' => '',
149
							'type' => 'give_title',
150
							'id'   => 'give_title_general_settings_2',
151
						),
152
						array(
153
							'name'    => __( 'Currency', 'give' ),
154
							'desc'    => __( 'The donation currency. Note that some payment gateways have currency restrictions.', 'give' ),
155
							'id'      => 'currency',
156
							'class'   => 'give-select-chosen',
157
							'type'    => 'select',
158
							'options' => give_get_currencies(),
159
							'default' => 'USD',
160
						),
161
						array(
162
							'name'       => __( 'Currency Position', 'give' ),
163
							'desc'       => __( 'The position of the currency symbol.', 'give' ),
164
							'id'         => 'currency_position',
165
							'type'       => 'select',
166
							'options'    => array(
167
								/* translators: %s: currency symbol */
168
								'before' => sprintf( $currency_position_before, give_currency_symbol( give_get_currency() ) ),
169
								/* translators: %s: currency symbol */
170
								'after'  => sprintf( $currency_position_after, give_currency_symbol( give_get_currency() ) ),
171
							),
172
							'default'    => 'before',
173
							'attributes' => array(
174
								'data-before-template' => sprintf( $currency_position_before, '{currency_pos}' ),
175
								'data-after-template'  => sprintf( $currency_position_after, '{currency_pos}' ),
176
							),
177
						),
178
						array(
179
							'name'    => __( 'Thousands Separator', 'give' ),
180
							'desc'    => __( 'The symbol (typically , or .) to separate thousands.', 'give' ),
181
							'id'      => 'thousands_separator',
182
							'type'    => 'text',
183
							'default' => ',',
184
							'css'     => 'width:12em;',
185
						),
186
						array(
187
							'name'    => __( 'Decimal Separator', 'give' ),
188
							'desc'    => __( 'The symbol (usually , or .) to separate decimal points.', 'give' ),
189
							'id'      => 'decimal_separator',
190
							'type'    => 'text',
191
							'default' => '.',
192
							'css'     => 'width:12em;',
193
						),
194
						array(
195
							'name'    => __( 'Number of Decimals', 'give' ),
196
							'desc'    => __( 'The number of decimal points displayed in amounts.', 'give' ),
197
							'id'      => 'number_decimals',
198
							'type'    => 'text',
199
							'default' => 2,
200
							'css'     => 'width:12em;',
201
						),
202
						array(
203
							'name'  => __( 'Currency Options Docs Link', 'give' ),
204
							'id'    => 'currency_settings_docs_link',
205
							'url'   => esc_url( 'http://docs.givewp.com/settings-currency' ),
206
							'title' => __( 'Currency Settings', 'give' ),
207
							'type'  => 'give_docs_link',
208
						),
209
						array(
210
							'type' => 'sectionend',
211
							'id'   => 'give_title_general_settings_2',
212
						),
213
					);
214
215
					break;
216
217
				case 'general-settings':
218
					// Get default country code.
219
					$countries = give_get_country();
220
221
					// get the list of the states of which default country is selected.
222
					$states = give_get_states( $countries );
223
224
					// Get the country list that does not have any states init.
225
					$no_states_country = give_no_states_country_list();
226
227
					$states_label = give_get_states_label();
228
					$country      = give_get_country();
229
					$label        = __( 'State', 'give' );
230
					// Check if $country code exists in the array key for states label.
231
					if ( array_key_exists( $country, $states_label ) ) {
232
						$label = $states_label[ $country ];
233
					}
234
0 ignored issues
show
Coding Style introduced by
Functions must not contain multiple empty lines in a row; found 2 empty lines
Loading history...
235
236
					$settings = array(
237
						// Section 1: General.
238
						array(
239
							'type' => 'title',
240
							'id'   => 'give_title_general_settings_1',
241
						),
242
						array(
243
							'name' => __( 'General Settings', 'give' ),
244
							'desc' => '',
245
							'type' => 'give_title',
246
							'id'   => 'give_title_general_settings_1',
247
						),
248
						array(
249
							'name'       => __( 'Success Page', 'give' ),
250
							/* translators: %s: [give_receipt] */
251
							'desc'       => sprintf( __( 'The page donors are sent to after completing their donations. The %s shortcode should be on this page.', 'give' ), '<code>[give_receipt]</code>' ),
252
							'id'         => 'success_page',
253
							'class'      => 'give-select give-select-chosen',
254
							'type'       => 'select',
255
							'options'    => give_cmb2_get_post_options( array(
256
								'post_type'   => 'page',
257
								'numberposts' => 30,
258
							) ),
259
							'attributes' => array(
260
								'data-search-type' => 'pages'
0 ignored issues
show
introduced by
Each line in an array declaration must end in a comma
Loading history...
261
							)
262
						),
263
						array(
264
							'name'       => __( 'Failed Donation Page', 'give' ),
265
							'desc'       => __( 'The page donors are sent to if their donation is cancelled or fails.', 'give' ),
266
							'class'      => 'give-select give-select-chosen',
267
							'id'         => 'failure_page',
268
							'type'       => 'select',
269
							'options'    => give_cmb2_get_post_options( array(
270
								'post_type'   => 'page',
271
								'numberposts' => 30,
272
							) ),
273
							'attributes' => array(
274
								'data-search-type' => 'pages'
0 ignored issues
show
introduced by
Each line in an array declaration must end in a comma
Loading history...
275
							)
276
						),
277
						array(
278
							'name'       => __( 'Donation History Page', 'give' ),
279
							/* translators: %s: [donation_history] */
280
							'desc'       => sprintf( __( 'The page showing a complete donation history for the current user. The %s shortcode should be on this page.', 'give' ), '<code>[donation_history]</code>' ),
281
							'id'         => 'history_page',
282
							'class'      => 'give-select give-select-chosen',
283
							'type'       => 'select',
284
							'options'    => give_cmb2_get_post_options( array(
285
								'post_type'   => 'page',
286
								'numberposts' => 30,
287
							) ),
288
							'attributes' => array(
289
								'data-search-type' => 'pages'
0 ignored issues
show
introduced by
Each line in an array declaration must end in a comma
Loading history...
290
							)
291
						),
292
						array(
293
							'name'       => __( 'Base Country', 'give' ),
294
							'desc'       => __( 'The country your site operates from.', 'give' ),
295
							'id'         => 'base_country',
296
							'type'       => 'select',
297
							'options'    => give_get_country_list(),
298
							'class'      => 'give-select give-select-chosen',
299
							'attributes' => array(
300
								'data-search-type' => 'no_ajax'
0 ignored issues
show
introduced by
Each line in an array declaration must end in a comma
Loading history...
301
							),
302
							'default'    => $country,
303
						),
304
						/**
305
						 * Add base state to give setting
306
						 *
307
						 * @since 1.8.14
308
						 */
309
						array(
310
							'wrapper_class' => ( array_key_exists( $countries, $no_states_country ) ? 'give-hidden' : '' ),
311
							'name'          => __( 'Base State/Province', 'give' ),
312
							'desc'          => __( 'The state/province your site operates from.', 'give' ),
313
							'id'            => 'base_state',
314
							'type'          => ( empty( $states ) ? 'text' : 'select' ),
315
							'class'         => ( empty( $states ) ? '' : 'give-select give-select-chosen' ),
316
							'options'       => $states,
317
							'attributes'    => array(
318
								'data-search-type' => 'no_ajax',
319
								'data-placeholder' => $label,
320
							),
321
						),
322
						array(
323
							'name'  => __( 'General Options Docs Link', 'give' ),
324
							'id'    => 'general_options_docs_link',
325
							'url'   => esc_url( 'http://docs.givewp.com/settings-general' ),
326
							'title' => __( 'General Options', 'give' ),
327
							'type'  => 'give_docs_link',
328
						),
329
						array(
330
							'type' => 'sectionend',
331
							'id'   => 'give_title_general_settings_1',
332
						),
333
					);
334
					break;
335
336
				case 'sequential-ordering':
337
					$settings = array(
338
339
						// Section 4: Sequential Ordering
340
341
						array(
342
							'id'   => 'give_title_general_settings_4',
343
							'type' => 'title'
0 ignored issues
show
introduced by
Each line in an array declaration must end in a comma
Loading history...
344
						),
345
						array(
346
							'name'    => __( 'Sequential Ordering', 'give' ),
347
							'id'      => "{$current_section}_status",
348
							'desc'    => __( 'Custom donation numbering that increases sequentially to prevent gaps between donation IDs. If disabled, then donation numbers are generated from WordPress post IDs, which will result in gaps between numbers.', 'give' ),
349
							'type'    => 'radio_inline',
350
							'default' => 'disabled',
351
							'options' => array(
352
								'enabled'  => __( 'Enabled', 'give' ),
353
								'disabled' => __( 'Disabled', 'give' )
354
							)
355
						),
356
						array(
357
							'name' => __( 'Next Donation Number', 'give' ),
358
							'id'   => "{$current_section}_number",
359
							'desc' => sprintf(
360
								__( 'The number used to generate the next donation ID. This value must be greater than or equal to %s to avoid conflicts with existing donation IDs.', 'give' ),
361
								'<code>' . Give()->seq_donation_number->get_next_number() . '</code>'
0 ignored issues
show
introduced by
Expected a sanitizing function (see Codex for 'Data Validation'), but instead saw 'Give'
Loading history...
362
							),
363
							'type' => 'number',
364
						),
365
						array(
366
							'name' => __( 'Number Prefix', 'give' ),
367
							'id'   => "{$current_section}_number_prefix",
368
							'desc' => sprintf(
369
								__( 'The prefix appended to all sequential donation numbers. Spaces are replaced by %s.', 'give' ),
370
								'<code>-</code>'
371
							),
372
							'type' => 'text',
373
						),
374
						array(
375
							'name' => __( 'Number Suffix', 'give' ),
376
							'id'   => "{$current_section}_number_suffix",
377
							'desc' => sprintf(
378
								__( 'The suffix appended to all sequential donation numbers. Spaces are replaced by %s.', 'give' ),
379
								'<code>-</code>'
380
							),
381
							'type' => 'text',
382
						),
383
						array(
384
							'name'    => __( 'Number Padding', 'give' ),
385
							'id'      => "{$current_section}_number_padding",
386
							'desc'    => sprintf(
387
								__( 'The minimum number of digits in the sequential donation number. Enter %s to display %s as %s.', 'give' ),
388
								'<code>4</code>',
389
								'<code>1</code>',
390
								'<code>0001</code>'
391
							),
392
							'type'    => 'number',
393
							'default' => '0',
394
						),
395
						array(
396
							'name' => __( 'Donation ID Preview', 'give' ),
397
							'id'   => "{$current_section}_preview",
398
							'type' => 'give_sequential_donation_code_preview',
399
							'desc' => __( 'A preview of the next sequential donation ID. This preview cannot be edited directly as it is generated from the settings above.', 'give' ),
400
						),
401
						array(
402
							'name'  => __( 'Sequential Ordering Docs Link', 'give' ),
403
							'id'    => "{$current_section}_doc link",
404
							'url'   => esc_url( 'http://docs.givewp.com/settings-sequential-ordering' ),
405
							'title' => __( 'Sequential Ordering', 'give' ),
406
							'type'  => 'give_docs_link',
407
						),
408
						array(
409
							'id'   => 'give_title_general_settings_4',
410
							'type' => 'sectionend'
0 ignored issues
show
introduced by
Each line in an array declaration must end in a comma
Loading history...
411
						)
0 ignored issues
show
introduced by
Comma required after last value in array declaration
Loading history...
412
					);
413
			}
414
415
			/**
416
			 * Filter the general settings.
417
			 * Backward compatibility: Please do not use this filter. This filter is deprecated in 1.8
418
			 */
419
			$settings = apply_filters( 'give_settings_general', $settings );
420
421
			/**
422
			 * Filter the settings.
423
			 *
424
			 * @since  1.8
425
			 *
426
			 * @param  array $settings
427
			 */
428
			$settings = apply_filters( 'give_get_settings_' . $this->id, $settings );
429
430
			// Output.
431
			return $settings;
432
		}
433
434
		/**
435
		 * Get sections.
436
		 *
437
		 * @since 1.8
438
		 * @return array
439
		 */
440
		public function get_sections() {
441
			$sections = array(
442
				'general-settings'    => __( 'General', 'give' ),
443
				'currency-settings'   => __( 'Currency', 'give' ),
444
				'access-control'      => __( 'Access Control', 'give' ),
445
				'sequential-ordering' => __( 'Sequential Ordering', 'give' ),
446
			);
447
448
			return apply_filters( 'give_get_sections_' . $this->id, $sections );
449
		}
450
451
452
		/**
453
		 * Set flag to reset sequestion donation number starting point when "Sequential Starting Number" value changes
454
		 *
455
		 * @since  2.1
456
		 * @access public
457
		 *
458
		 * @param $update_options
459
		 * @param $option_name
460
		 * @param $old_options
461
		 *
462
		 * @return bool
463
		 */
464
		public function __give_change_donation_stating_number( $update_options, $option_name, $old_options ) {
0 ignored issues
show
Coding Style introduced by
Method name "Give_Settings_General::__give_change_donation_stating_number" is invalid; only PHP magic methods should be prefixed with a double underscore
Loading history...
465
			if ( ! isset( $_POST['sequential-ordering_number'] ) ) {
0 ignored issues
show
introduced by
Detected access of super global var $_POST, probably need manual inspection.
Loading history...
466
				return false;
467
			}
468
469
			if ( ( $next_number = Give()->seq_donation_number->get_next_number() ) > $update_options['sequential-ordering_number'] ) {
470
				give_update_option( 'sequential-ordering_number', $next_number );
471
472
				Give_Admin_Settings::add_error(
473
					'give-invalid-sequential-starting-number',
474
					sprintf(
475
						__( 'Next Donation Number must be equal to or larger than %s to avoid conflicts with existing donation IDs.', 'give' ),
476
						$next_number
477
					)
478
				);
479
			} elseif ( $update_options['sequential-ordering_number'] !== $old_options['sequential-ordering_number'] ) {
480
				update_option( '_give_reset_sequential_number', 1, false );
481
			}
482
483
			return true;
484
		}
485
486
487
		/**
488
		 * Render give_sequential_donation_code_preview field type
489
		 *
490
		 * @since  2.1.0
491
		 * @access public
492
		 *
493
		 * @param $field
494
		 */
495 View Code Duplication
		public function __render_give_sequential_donation_code_preview( $field ) {
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
Coding Style introduced by
Method name "Give_Settings_General::__render_give_sequential_donation_code_preview" is invalid; only PHP magic methods should be prefixed with a double underscore
Loading history...
496
			?>
497
			<tr valign="top" <?php echo ! empty( $field['wrapper_class'] ) ? 'class="' . $field['wrapper_class'] . '"' : '' ?>>
0 ignored issues
show
introduced by
Expected next thing to be a escaping function, not '!'
Loading history...
introduced by
Expected next thing to be a escaping function, not '$field'
Loading history...
498
				<th scope="row" class="titledesc">
499
					<label
500
						for="<?php echo esc_attr( $field['id'] ); ?>"><?php echo esc_html( $field['name'] ) ?></label>
501
				</th>
502
				<td class="give-forminp">
503
					<input id="<?php echo esc_attr( $field['id'] ); ?>" class="give-input-field" type="text" disabled>
504
					<?php echo Give_Admin_Settings::get_field_description( $field ); ?>
0 ignored issues
show
introduced by
Expected a sanitizing function (see Codex for 'Data Validation'), but instead saw 'Give_Admin_Settings'
Loading history...
505
				</td>
506
			</tr>
507
			<?php
508
		}
509
510
511
		/**
512
		 * Render give_unlock_all_settings field type
513
		 *
514
		 * @since  2.1.0
515
		 * @access public
516
		 *
517
		 * @param $field
518
		 */
519 View Code Duplication
		public function __render_give_unlock_all_settings( $field ) {
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
Coding Style introduced by
Method name "Give_Settings_General::__render_give_unlock_all_settings" is invalid; only PHP magic methods should be prefixed with a double underscore
Loading history...
520
			?>
521
			<tr valign="top" <?php echo ! empty( $field['wrapper_class'] ) ? 'class="' . $field['wrapper_class'] . '"' : '' ?>>
0 ignored issues
show
introduced by
Expected next thing to be a escaping function, not '!'
Loading history...
introduced by
Expected next thing to be a escaping function, not '$field'
Loading history...
522
				<th scope="row" class="titledesc">
523
					<label
524
						for="<?php echo esc_attr( $field['id'] ); ?>"><?php echo esc_html( $field['name'] ) ?></label>
525
				</th>
526
				<td class="give-forminp">
527
					<?php echo Give_Admin_Settings::get_field_description( $field ); ?>
0 ignored issues
show
introduced by
Expected a sanitizing function (see Codex for 'Data Validation'), but instead saw 'Give_Admin_Settings'
Loading history...
528
					<a href="" id="<?php echo $field['id']; ?>" data-message="<?php echo $field['confirmation_msg'] ?>"><?php echo __( 'Unlock all settings', 'give' ); ?></a>
0 ignored issues
show
introduced by
Expected next thing to be a escaping function, not '$field'
Loading history...
introduced by
Expected a sanitizing function (see Codex for 'Data Validation'), but instead saw '__'
Loading history...
529
				</td>
530
			</tr>
531
			<?php
532
		}
533
	}
534
535
endif;
536
537
return new Give_Settings_General();
538