Completed
Push — master ( 0d3b31...d2e7b3 )
by Fulvio
01:21
created
src/Admin.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
 namespace WP_PHP_Console;
16 16
 
17
-defined( 'ABSPATH' ) or exit;
17
+defined('ABSPATH') or exit;
18 18
 
19 19
 /**
20 20
  * WP PHP Console admin handler.
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 		self::output_admin_notices();
36 36
 
37 37
 		// init settings page
38
-		if ( ! defined( 'DOING_AJAX' ) ) {
38
+		if ( ! defined('DOING_AJAX')) {
39 39
 			new Admin\SettingsPage();
40 40
 		}
41 41
 	}
@@ -49,17 +49,17 @@  discard block
 block discarded – undo
49 49
 	private static function output_admin_notices() {
50 50
 
51 51
 		// display admin notice and abort if no password has been set
52
-		add_action( 'admin_notices', static function() {
52
+		add_action('admin_notices', static function() {
53 53
 
54
-			if ( ! Settings::has_eval_terminal_password() ) :
54
+			if ( ! Settings::has_eval_terminal_password()) :
55 55
 
56 56
 				?>
57 57
 				<div class="update-nag">
58 58
 					<p><?php printf(
59 59
 						/* translators: Placeholders: %1$s - WP PHP Console name, %2$s - opening HTML <a> link tag; %3$s closing HTML </a> link tag */
60
-							__( '%1$s: Please remember to %2$sset a password%3$s if you want to enable the terminal.', 'wp-php-console' ),
61
-							'<strong>' . Plugin::NAME . '</strong>',
62
-							'<a href="' . esc_url( admin_url( 'options-general.php?page=wp-php-console' ) ) .'">',
60
+							__('%1$s: Please remember to %2$sset a password%3$s if you want to enable the terminal.', 'wp-php-console'),
61
+							'<strong>'.Plugin::NAME.'</strong>',
62
+							'<a href="'.esc_url(admin_url('options-general.php?page=wp-php-console')).'">',
63 63
 							'</a>'
64 64
 						); ?></p>
65 65
 				</div>
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
 			endif;
69 69
 
70
-		}, -1000 );
70
+		}, -1000);
71 71
 	}
72 72
 
73 73
 
@@ -78,14 +78,14 @@  discard block
 block discarded – undo
78 78
 	 */
79 79
 	private static function add_plugin_page_row_action_links() {
80 80
 
81
-		add_filter( 'plugin_action_links_wp-php-console/wp-php-console.php', static function( $actions ) {
81
+		add_filter('plugin_action_links_wp-php-console/wp-php-console.php', static function($actions) {
82 82
 
83
-			return array_merge( [
84
-				'<a href="' . esc_url( admin_url() ) . '">' . esc_html__( 'Settings', 'wp-php-console' ) . '</a>',
85
-				'<a href="' . esc_url( Plugin::get_project_page_url() ) . '">' . esc_html__( 'GitHub', 'wp-php-console' ) . '</a>',
86
-				'<a href="' . esc_url( Plugin::get_support_page_url() ) . '">' . esc_html__( 'Support', 'wp-php-console' ) . '</a>',
87
-				'<a href="' . esc_url( Plugin::get_reviews_page_url() ) . '">' . esc_html__( 'Review', 'wp-php-console' ) . '</a>',
88
-			], $actions );
83
+			return array_merge([
84
+				'<a href="'.esc_url(admin_url()).'">'.esc_html__('Settings', 'wp-php-console').'</a>',
85
+				'<a href="'.esc_url(Plugin::get_project_page_url()).'">'.esc_html__('GitHub', 'wp-php-console').'</a>',
86
+				'<a href="'.esc_url(Plugin::get_support_page_url()).'">'.esc_html__('Support', 'wp-php-console').'</a>',
87
+				'<a href="'.esc_url(Plugin::get_reviews_page_url()).'">'.esc_html__('Review', 'wp-php-console').'</a>',
88
+			], $actions);
89 89
 
90 90
 		} );
91 91
 	}
Please login to merge, or discard this patch.
src/Admin/SettingsPage.php 1 patch
Spacing   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 use WP_PHP_Console\Plugin;
18 18
 use WP_PHP_Console\Settings;
19 19
 
20
-defined( 'ABSPATH' ) or exit;
20
+defined('ABSPATH') or exit;
21 21
 
22 22
 /**
23 23
  * WP PHP Console settings page handler.
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
 	 */
45 45
 	public function __construct() {
46 46
 
47
-		$this->page_id    = str_replace( '-', '_', Plugin::ID );
47
+		$this->page_id    = str_replace('-', '_', Plugin::ID);
48 48
 		$this->option_key = Settings::get_settings_key();
49 49
 		$this->options    = Settings::get_settings();
50 50
 
51
-		add_action( 'admin_menu', function() { $this->register_settings_page(); } );
52
-		add_action( 'admin_init', function() { $this->register_settings(); } );
51
+		add_action('admin_menu', function() { $this->register_settings_page(); } );
52
+		add_action('admin_init', function() { $this->register_settings(); } );
53 53
 	}
54 54
 
55 55
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 			Plugin::NAME,
66 66
 			'manage_options',
67 67
 			$this->page_id,
68
-			[ $this, 'output_settings_page' ]
68
+			[$this, 'output_settings_page']
69 69
 		);
70 70
 	}
71 71
 
@@ -80,19 +80,19 @@  discard block
 block discarded – undo
80 80
 		register_setting(
81 81
 			$this->option_key,
82 82
 			$this->option_key,
83
-			[ $this, 'sanitize_field' ]
83
+			[$this, 'sanitize_field']
84 84
 		);
85 85
 
86 86
 		add_settings_section(
87 87
 			$this->option_key,
88
-			__( 'Settings', 'wp-php-console' ),
89
-			[ $this, 'output_settings_instructions' ],
88
+			__('Settings', 'wp-php-console'),
89
+			[$this, 'output_settings_instructions'],
90 90
 			$this->page_id
91 91
 		);
92 92
 
93 93
 		$settings_fields = [
94 94
 			'password' => [
95
-				'label' => esc_html__( 'Password', 'wp-php-console' ),
95
+				'label' => esc_html__('Password', 'wp-php-console'),
96 96
 				'args'  => [
97 97
 					'id'       => 'password',
98 98
 					'type'     => 'password',
@@ -100,35 +100,35 @@  discard block
 block discarded – undo
100 100
 				]
101 101
 			],
102 102
 			'ssl' => [
103
-				'label' => esc_html__( 'Allow only on SSL', 'wp-php-console' ),
103
+				'label' => esc_html__('Allow only on SSL', 'wp-php-console'),
104 104
 				'args'  => [
105 105
 					'id'   => 'ssl',
106 106
 					'type' => 'checkbox',
107 107
 				]
108 108
 			],
109 109
 			'ip' => [
110
-				'label' => esc_html__( 'Allowed IP Masks', 'wp-php-console' ),
110
+				'label' => esc_html__('Allowed IP Masks', 'wp-php-console'),
111 111
 				'args'  => [
112 112
 					'id'   => 'ip',
113 113
 					'type' => 'text',
114 114
 				]
115 115
 			],
116 116
 			'register' => [
117
-				'label' => esc_html__( 'Register PC Class', 'wp-php-console' ),
117
+				'label' => esc_html__('Register PC Class', 'wp-php-console'),
118 118
 				'args'  => [
119 119
 					'id'   => 'register',
120 120
 					'type' => 'checkbox',
121 121
 				]
122 122
 			],
123 123
 			'stack' => [
124
-				'label' => esc_html__( 'Show Call Stack', 'wp-php-console' ),
124
+				'label' => esc_html__('Show Call Stack', 'wp-php-console'),
125 125
 				'args'  => [
126 126
 					'id'   => 'stack',
127 127
 					'type' => 'checkbox',
128 128
 				]
129 129
 			],
130 130
 			'short' => [
131
-				'label' => esc_html__( 'Short Path Names', 'wp-php-console' ),
131
+				'label' => esc_html__('Short Path Names', 'wp-php-console'),
132 132
 				'args'  => [
133 133
 					'id'   => 'short',
134 134
 					'type' => 'checkbox',
@@ -136,11 +136,11 @@  discard block
 block discarded – undo
136 136
 			],
137 137
 		];
138 138
 
139
-		foreach ( $settings_fields as $key => $field ) {
139
+		foreach ($settings_fields as $key => $field) {
140 140
 			add_settings_field(
141
-				$this->page_id . '['. $key . ']',
141
+				$this->page_id.'['.$key.']',
142 142
 				$field['label'],
143
-				[ $this, 'output_input_field' ],
143
+				[$this, 'output_input_field'],
144 144
 				$this->page_id,
145 145
 				$this->option_key,
146 146
 				$field['args']
@@ -163,32 +163,32 @@  discard block
 block discarded – undo
163 163
 		?>
164 164
 		<p><?php printf(
165 165
 				/* translators: Placeholder: %s refers to the PHP Console library, pointing to its GitHub repository */
166
-				_x( 'This plugin allows you to use %s within your WordPress installation for testing, debugging and development purposes.', 'PHP Console, the PHP Library', 'wp-php-console' ),
167
-				'<a href="' . esc_url( Plugin::get_php_console_project_page_url() ) . '" target="_blank">PHP Console</a>'
166
+				_x('This plugin allows you to use %s within your WordPress installation for testing, debugging and development purposes.', 'PHP Console, the PHP Library', 'wp-php-console'),
167
+				'<a href="'.esc_url(Plugin::get_php_console_project_page_url()).'" target="_blank">PHP Console</a>'
168 168
 			);
169 169
 		?></p>
170
-		<h4><?php esc_html_e( 'Usage instructions:', 'wp-php-console' ); ?></h4>
170
+		<h4><?php esc_html_e('Usage instructions:', 'wp-php-console'); ?></h4>
171 171
 		<ol>
172 172
 			<?php
173 173
 
174 174
 			$instructions = [
175 175
 				sprintf(
176 176
 					/* translators: Placeholder: %s represents the Google Chrome PHP Console extension download link */
177
-					_x( 'Make sure you have downloaded and installed %s.', 'PHP Console, the Chrome Extension', 'wp-php-console' ),
178
-					'<a target="_blank" href="' . esc_url( Plugin::get_php_console_chrome_extension_url() ) .'">PHP Console extension for Google Chrome</a>'
177
+					_x('Make sure you have downloaded and installed %s.', 'PHP Console, the Chrome Extension', 'wp-php-console'),
178
+					'<a target="_blank" href="'.esc_url(Plugin::get_php_console_chrome_extension_url()).'">PHP Console extension for Google Chrome</a>'
179 179
 				),
180
-				esc_html__( 'Set a password for the eval terminal in the options below and hit "Save Changes".', 'wp-php-console' ),
181
-				esc_html__( 'Reload any page of your installation and click on the key icon in your Chrome browser address bar, enter your password and access the terminal.', 'wp-php-console' ),
182
-				esc_html__( 'From the eval terminal you can execute any PHP or WordPress specific function, including functions from your plugins and active theme.', 'wp-php-console' ),
180
+				esc_html__('Set a password for the eval terminal in the options below and hit "Save Changes".', 'wp-php-console'),
181
+				esc_html__('Reload any page of your installation and click on the key icon in your Chrome browser address bar, enter your password and access the terminal.', 'wp-php-console'),
182
+				esc_html__('From the eval terminal you can execute any PHP or WordPress specific function, including functions from your plugins and active theme.', 'wp-php-console'),
183 183
 				sprintf(
184 184
 					/* translators: Placeholders: %1$s - PHP code snippet example, %2$s - Chrome javascript console shortcut */
185
-					__( 'In your PHP code, you can call PHP Console debug statements like %1$s to display PHP variables in the browser\'s JavaScript-console (e.g. %2$s) and optionally filter selected tags through the browser\'s Remote PHP Eval Terminal screen\'s "Ignore Debug options".', 'wp-php-console' ),
185
+					__('In your PHP code, you can call PHP Console debug statements like %1$s to display PHP variables in the browser\'s JavaScript-console (e.g. %2$s) and optionally filter selected tags through the browser\'s Remote PHP Eval Terminal screen\'s "Ignore Debug options".', 'wp-php-console'),
186 186
 					'<code>debug(&#36;var, &#36;tag)</code>',
187 187
 					'<code>CTRL+SHIFT+J</code>'
188 188
 				),
189 189
 			];
190 190
 
191
-			foreach ( $instructions as $list_item ) :
191
+			foreach ($instructions as $list_item) :
192 192
 				?><li><?php echo $list_item; ?></li><?php
193 193
 			endforeach;
194 194
 
@@ -207,9 +207,9 @@  discard block
 block discarded – undo
207 207
 	 * @param array $field field arguments
208 208
 	 * @return string
209 209
 	 */
210
-	private function get_field_id( array $field ) {
210
+	private function get_field_id(array $field) {
211 211
 
212
-		return $this->page_id . '-' . $field['id'];
212
+		return $this->page_id.'-'.$field['id'];
213 213
 	}
214 214
 
215 215
 
@@ -221,9 +221,9 @@  discard block
 block discarded – undo
221 221
 	 * @param array $field field arguments
222 222
 	 * @return string
223 223
 	 */
224
-	private function get_field_name( array $field ) {
224
+	private function get_field_name(array $field) {
225 225
 
226
-		return str_replace( '-', '_', $this->page_id . '[' . $field['id'] . ']' );
226
+		return str_replace('-', '_', $this->page_id.'['.$field['id'].']');
227 227
 	}
228 228
 
229 229
 
@@ -235,9 +235,9 @@  discard block
 block discarded – undo
235 235
 	 * @param array $field field arguments
236 236
 	 * @return int|string|bool
237 237
 	 */
238
-	private function get_field_value( array $field ) {
238
+	private function get_field_value(array $field) {
239 239
 
240
-		return $this->options[ $field['id'] ];
240
+		return $this->options[$field['id']];
241 241
 	}
242 242
 
243 243
 
@@ -250,19 +250,19 @@  discard block
 block discarded – undo
250 250
 	 *
251 251
 	 * @param array $args
252 252
 	 */
253
-	public function output_input_field( array $args = [] ) {
253
+	public function output_input_field(array $args = []) {
254 254
 
255
-		if ( empty( $args ) ) {
255
+		if (empty($args)) {
256 256
 			return;
257 257
 		}
258 258
 
259
-		switch ( $args['type'] ) {
259
+		switch ($args['type']) {
260 260
 			case 'password' :
261 261
 			case 'text' :
262
-				$this->output_input_text_field( $args );
262
+				$this->output_input_text_field($args);
263 263
 				break;
264 264
 			case 'checkbox' :
265
-				$this->output_checkbox_field( $args );
265
+				$this->output_checkbox_field($args);
266 266
 			break;
267 267
 		}
268 268
 	}
@@ -275,23 +275,23 @@  discard block
 block discarded – undo
275 275
 	 *
276 276
 	 * @param array $args
277 277
 	 */
278
-	private function output_input_text_field( $args = [] ) {
278
+	private function output_input_text_field($args = []) {
279 279
 
280 280
 		?>
281 281
 		<label>
282 282
 			<input
283
-				type="<?php echo isset( $args['type'] ) ? esc_attr( $args['type'] ) : 'text'; ?>"
284
-				id="<?php echo esc_attr( $this->get_field_id( $args ) ); ?>"
285
-				name="<?php echo esc_attr( $this->get_field_name( $args ) ); ?>"
286
-				value="<?php echo esc_attr( $this->get_field_value( $args ) ); ?>"
283
+				type="<?php echo isset($args['type']) ? esc_attr($args['type']) : 'text'; ?>"
284
+				id="<?php echo esc_attr($this->get_field_id($args)); ?>"
285
+				name="<?php echo esc_attr($this->get_field_name($args)); ?>"
286
+				value="<?php echo esc_attr($this->get_field_value($args)); ?>"
287 287
 			>
288
-			<?php if ( ! empty( $args['required'] ) ) : ?>
289
-				<span style="color:red;" title="<?php esc_attr_e( 'Required', 'wp-php-console' ); ?>">*</span>
288
+			<?php if ( ! empty($args['required'])) : ?>
289
+				<span style="color:red;" title="<?php esc_attr_e('Required', 'wp-php-console'); ?>">*</span>
290 290
 			<?php endif; ?>
291 291
 		</label>
292 292
 		<?php
293 293
 
294
-		switch ( $args['id'] ) :
294
+		switch ($args['id']) :
295 295
 
296 296
 			case 'ip' :
297 297
 				$this->output_ip_field_instructions();
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
 	private function output_password_field_instructions() {
314 314
 
315 315
 		?>
316
-		<p class="description"><?php esc_html_e( 'The password for the eval terminal. If empty, the connector will not work.', 'wp-php-console' ); ?></p>
316
+		<p class="description"><?php esc_html_e('The password for the eval terminal. If empty, the connector will not work.', 'wp-php-console'); ?></p>
317 317
 		<?php
318 318
 	}
319 319
 
@@ -326,17 +326,17 @@  discard block
 block discarded – undo
326 326
 	private function output_ip_field_instructions() {
327 327
 
328 328
 		?>
329
-		<p class="description"><?php esc_html_e( 'You may specify any of the following, to give access to specific IPs to the eval terminal:', 'wp-php-console' ); ?></p>
329
+		<p class="description"><?php esc_html_e('You may specify any of the following, to give access to specific IPs to the eval terminal:', 'wp-php-console'); ?></p>
330 330
 		<ol>
331 331
 			<li><span class="description"><?php printf(
332 332
 						/* translators: Placeholders: %1$s - a single IP address, %2$s link to Varying Vagrant Vagrants project repository */
333
-						__( 'An IP address (for example %1$s, %2$s default IP address).', 'wp-php-console' ),
333
+						__('An IP address (for example %1$s, %2$s default IP address).', 'wp-php-console'),
334 334
 						'<code>192.168.50.4</code>',
335 335
 						'<a href="https://github.com/Varying-Vagrant-Vagrants/VVV">Varying Vagrant Vagrants</a>'
336 336
 					); ?></span></li>
337 337
 			<li><span class="description"><?php printf(
338 338
 						/* translators: Placeholders: %1$s a range of IP addresses, %2$s - comma separated IP addresses */
339
-						__( 'A range of addresses (%1$s) or multiple addresses, comma separated (%2$s).', 'wp-php-console' ),
339
+						__('A range of addresses (%1$s) or multiple addresses, comma separated (%2$s).', 'wp-php-console'),
340 340
 						'<code>192.168.*.*</code>',
341 341
 						'<code>192.168.10.25,192.168.10.28</code>'
342 342
 					); ?></span></li>
@@ -352,23 +352,23 @@  discard block
 block discarded – undo
352 352
 	 *
353 353
 	 * @param array $args
354 354
 	 */
355
-	public function output_checkbox_field( array $args = [] ) {
355
+	public function output_checkbox_field(array $args = []) {
356 356
 
357
-		$field_id = esc_attr( $this->get_field_id( $args ) );
357
+		$field_id = esc_attr($this->get_field_id($args));
358 358
 
359 359
 		?>
360 360
 		<label>
361 361
 			<input
362 362
 				type="checkbox"
363 363
 				id="<?php echo $field_id; ?>"
364
-				name="<?php echo esc_attr( $this->get_field_name( $args ) ); ?>"
364
+				name="<?php echo esc_attr($this->get_field_name($args)); ?>"
365 365
 				value="1"
366
-				<?php checked( (bool) $this->get_field_value( $args ) ); ?>
367
-			><?php esc_html_e( 'Yes', 'wp-php-console' ); ?>
366
+				<?php checked((bool) $this->get_field_value($args)); ?>
367
+			><?php esc_html_e('Yes', 'wp-php-console'); ?>
368 368
 		</label>
369 369
 		<?php
370 370
 
371
-		switch ( $args['id'] ) :
371
+		switch ($args['id']) :
372 372
 
373 373
 			case 'register' :
374 374
 				$this->output_register_pc_class_field_instructions();
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
 	private function output_ssl_field_instructions() {
399 399
 
400 400
 		?>
401
-		<p class="description"><?php esc_html_e( 'Enable this option if you want the eval terminal to work only on a SSL connection.', 'wp-php-console' ); ?></p>
401
+		<p class="description"><?php esc_html_e('Enable this option if you want the eval terminal to work only on a SSL connection.', 'wp-php-console'); ?></p>
402 402
 		<?php
403 403
 	}
404 404
 
@@ -412,11 +412,11 @@  discard block
 block discarded – undo
412 412
 
413 413
 		?>
414 414
 		<p class="description"><?php
415
-			esc_html_e( 'Enable to register PC class in the global namespace.', 'wp-php-console' );
415
+			esc_html_e('Enable to register PC class in the global namespace.', 'wp-php-console');
416 416
 			echo '<br>';
417 417
 			printf(
418 418
 				/* translators: Placeholders: %1$s, %2$s and %3$s are PHP code snippets examples */
419
-				__( 'Allows to write %1$s or %2$s instructions in PHP to inspect %3$s in the JavaScript console.', 'wp-php-console' ),
419
+				__('Allows to write %1$s or %2$s instructions in PHP to inspect %3$s in the JavaScript console.', 'wp-php-console'),
420 420
 				'<code>PC::debug(&#36;var, &#36;tag)</code>',
421 421
 				'<code>PC::magic_tag(&#36;var)</code>',
422 422
 				'<code>&#36;var</code>'
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
 	private function output_show_call_stack_field_instructions() {
434 434
 
435 435
 		?>
436
-		<p class="description"><?php esc_html_e( 'Enable to see the full call stack when PHP Console writes to the browser JavaScript console.', 'wp-php-console' ); ?></p>
436
+		<p class="description"><?php esc_html_e('Enable to see the full call stack when PHP Console writes to the browser JavaScript console.', 'wp-php-console'); ?></p>
437 437
 		<?php
438 438
 	}
439 439
 
@@ -447,11 +447,11 @@  discard block
 block discarded – undo
447 447
 
448 448
 		?>
449 449
 		<p class="description"><?php
450
-			esc_html_e( 'Enable to shorten the length of PHP Console error sources and traces paths in browser JavaScript console for better readability.', 'wp-php-console' );
450
+			esc_html_e('Enable to shorten the length of PHP Console error sources and traces paths in browser JavaScript console for better readability.', 'wp-php-console');
451 451
 			echo '<br>';
452 452
 			printf(
453 453
 				/* translators: Placeholders: %1$s - long server path, %2$s - shortened server path */
454
-				__( 'Paths like %1$s will be displayed as %2$s', 'wp-php-console' ),
454
+				__('Paths like %1$s will be displayed as %2$s', 'wp-php-console'),
455 455
 				'<code>/server/path/to/document/root/WP/wp-admin/admin.php:31</code>',
456 456
 				'<code>/WP/wp-admin/admin.php:31</code>'
457 457
 			); ?></p>
@@ -469,24 +469,24 @@  discard block
 block discarded – undo
469 469
 	 * @param array $option user input
470 470
 	 * @return array sanitized input
471 471
 	 */
472
-	public function sanitize_field( $option ) {
472
+	public function sanitize_field($option) {
473 473
 
474
-		$input = wp_parse_args( $option, [
474
+		$input = wp_parse_args($option, [
475 475
 			'ip'       => '',
476 476
 			'password' => '',
477 477
 			'register' => false,
478 478
 			'short'    => false,
479 479
 			'ssl'      => false,
480 480
 			'stack'    => false,
481
-		] );
481
+		]);
482 482
 
483 483
 		$sanitized_input = [
484
-			'ip'       => sanitize_text_field( $input['ip'] ),
485
-			'password' => sanitize_text_field( $input['password'] ),
486
-			'register' => ! empty( $input['register'] ),
487
-			'short'    => ! empty( $input['short'] ),
488
-			'ssl'      => ! empty( $input['ssl'] ),
489
-			'stack'    => ! empty( $input['stack'] ),
484
+			'ip'       => sanitize_text_field($input['ip']),
485
+			'password' => sanitize_text_field($input['password']),
486
+			'register' => ! empty($input['register']),
487
+			'short'    => ! empty($input['short']),
488
+			'ssl'      => ! empty($input['ssl']),
489
+			'stack'    => ! empty($input['stack']),
490 490
 		];
491 491
 
492 492
 		return $sanitized_input;
@@ -509,9 +509,9 @@  discard block
 block discarded – undo
509 509
 			<form method="post" action="options.php">
510 510
 				<?php
511 511
 
512
-				settings_fields( $this->option_key );
512
+				settings_fields($this->option_key);
513 513
 
514
-				do_settings_sections( $this->page_id );
514
+				do_settings_sections($this->page_id);
515 515
 
516 516
 				submit_button();
517 517
 
Please login to merge, or discard this patch.