Passed
Push — master ( e51c9a...41921a )
by Chris
04:16
created

LSX_Customize_Core_Control   A

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' ) ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
11
	exit;
12
}
13
14
if ( ! class_exists( 'WP_Customize_Control' ) ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
15
	return;
16
}
17
18
if ( ! class_exists( 'LSX_Customize_Core_Control' ) ) :
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
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() {
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines before function; 1 found
Loading history...
35
			?>
36
			<label>
37
				<?php
38
				if ( ! empty( $this->label ) ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
39
					?>
40
						<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
41
					<?php
42
				}
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
43
				if ( ! empty( $this->description ) ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
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
		}
0 ignored issues
show
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
51
52
	}
53
54
endif;
55