Code Duplication    Length = 13-13 lines in 3 locations

includes/class-wp-php-console.php 3 locations

@@ 473-485 (lines=13) @@
470
	 *
471
	 * @since 1.2.4
472
	 */
473
	public function register_field() {
474
475
		$register = ! empty( $this->options['register'] );
476
477
		printf (
478
			'<input type="checkbox" id="wp-php-console-register" name="wp_php_console[register]" value="1" %s /> ',
479
			$register ? 'checked="checked"' : ''
480
		);
481
		echo '<label for="wp-php-console-register">' . esc_html__( 'Yes', 'wp-php-console' ) . '</label>';
482
		echo '<br />';
483
		echo '<small class="description">' . __( 'Choose to register PC in the global namespace. Allows to write <code>PC::debug(&#36;var, &#36;tag)</code> or <code>PC::magic_tag(&#36;var)</code> instructions in PHP to inspect <code>&#36;var</code> in the JavaScript console.', 'wp-php-console' ) . '</small>';
484
485
	}
486
487
488
	/**
@@ 493-505 (lines=13) @@
490
	 *
491
	 * @since 1.2.4
492
	 */
493
	public function stack_field() {
494
495
		$stack = ! empty( $this->options['stack'] );
496
497
		printf (
498
			'<input type="checkbox" id="wp-php-console-stack" name="wp_php_console[stack]" value="1" %s /> ',
499
			$stack ? 'checked="checked"' : ''
500
		);
501
		echo '<label for="wp-php-console-stack">' . esc_html__( 'Yes', 'wp-php-console' ) . '</label>';
502
		echo '<br />';
503
		echo '<small class="description">' . __( "Choose to also see the call stack when PHP Console writes to the browser's JavaScript-console.", 'wp-php-console' ) . '</small>';
504
505
	}
506
507
508
	/**
@@ 513-525 (lines=13) @@
510
	 *
511
	 * @since 1.2.4
512
	 */
513
	public function short_field() {
514
515
		$short = ! empty( $this->options['short'] );
516
517
		printf (
518
			'<input type="checkbox" id="wp-php-console-short" name="wp_php_console[short]" value="1" %s /> ',
519
			$short ? 'checked="checked"' : ''
520
		);
521
		echo '<label for="wp-php-console-short">' . esc_html__( 'Yes', 'wp-php-console' ) . '</label>';
522
		echo '<br />';
523
		echo '<small class="description">' . __( "Choose to shorten PHP Console error sources and traces paths in browser's JavaScript-console. Paths like <code>/server/path/to/document/root/WP/wp-admin/admin.php:31</code> will be displayed as <code>/W/wp-admin/admin.php:31</code>", 'wp-php-console' ) . '</small>';
524
525
	}
526
527
528
	/**