Carbon_Breadcrumb_Admin_Settings_Field_Checkbox   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 1
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A render() 0 7 1
1
<?php
2
/**
3
 * Main breadcrumb administration - checkbox settings field.
4
 *
5
 * @package carbon-breadcrumbs
6
 */
7
8
/**
9
 * Manages and renders a checkbox settings field.
10
 *
11
 * @uses Carbon_Breadcrumb_Admin_Settings_Field
12
 */
13
class Carbon_Breadcrumb_Admin_Settings_Field_Checkbox extends Carbon_Breadcrumb_Admin_Settings_Field {
14
15
	/**
16
	 * Render this field.
17
	 *
18
	 * @access public
19
	 */
20
	public function render() {
21
		$checked = checked( 1, $this->get_value(), false );
22
		?>
23
		<input name="<?php echo esc_attr( $this->get_id() ); ?>" id="<?php echo esc_attr( $this->get_id() ); ?>" type="checkbox" value="1" class="code" <?php echo esc_html( $checked ); ?> />
24
		<?php
25
		$this->render_help();
26
	}
27
28
}
29