LSX_Customize_Core_Control   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 17
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A render_content() 0 14 3
1
<?php
2
/**
3
 * LSX functions and definitions - Customizer - Core.
4
 *
5
 * @package    lsx
6
 * @subpackage customizer
7
 * @category   core
8
 */
9
10
if ( ! defined( 'ABSPATH' ) ) {
11
	exit;
12
}
13
14
if ( ! class_exists( 'WP_Customize_Control' ) ) {
15
	return;
16
}
17
18
if ( ! class_exists( 'LSX_Customize_Core_Control' ) ) :
19
20
	/**
21
	 * LSX_Customize_Core_Control Class
22
	 *
23
	 * @package    lsx
24
	 * @subpackage customizer
25
	 * @category   core
26
	 */
27
	class LSX_Customize_Core_Control extends WP_Customize_Control {
28
29
		public $type = 'core';
0 ignored issues
show
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
30
31
		/**
32
		 * Render output.
33
		 */
34
		public function render_content() {
35
			?>
36
			<label>
37
				<?php
38
				if ( ! empty( $this->label ) ) {
39
					?>
40
						<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
41
					<?php
42
				}
43
				if ( ! empty( $this->description ) ) {
44
					?>
45
					<span class="description customize-control-description"><?php echo esc_html( $this->description ); ?></span>
46
				<?php } ?>
47
				<input <?php $this->link(); ?> type="checkbox" value="<?php echo esc_attr( $this->value() ); ?>" <?php $this->input_attrs(); ?>>
48
			</label>
49
			<?php
50
		}
51
52
	}
53
54
endif;
55