Completed
Pull Request — master (#1653)
by Aristeides
06:50 queued 04:37
created

Kirki_Control_Select::content_template()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 36
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 36
rs 8.8571
c 0
b 0
f 0
1
<?php
2
/**
3
 * Customizer Control: kirki-select.
4
 *
5
 * @package     Kirki
6
 * @subpackage  Controls
7
 * @copyright   Copyright (c) 2017, Aristeides Stathopoulos
8
 * @license     http://opensource.org/licenses/https://opensource.org/licenses/MIT
9
 * @since       1.0
10
 */
11
12
// Exit if accessed directly.
13
if ( ! defined( 'ABSPATH' ) ) {
14
	exit;
15
}
16
17
/**
18
 * Select control.
19
 */
20
class Kirki_Control_Select extends Kirki_Control_Base {
21
22
	/**
23
	 * The control type.
24
	 *
25
	 * @access public
26
	 * @var string
27
	 */
28
	public $type = 'kirki-select';
29
30
	/**
31
	 * Maximum number of options the user will be able to select.
32
	 * Set to 1 for single-select.
33
	 *
34
	 * @access public
35
	 * @var int
36
	 */
37
	public $multiple = 1;
38
39
	/**
40
	 * Refresh the parameters passed to the JavaScript via JSON.
41
	 *
42
	 * @see WP_Customize_Control::to_json()
43
	 */
44
	public function to_json() {
45
		parent::to_json();
46
47
		$this->json['multiple'] = $this->multiple;
48
	}
49
}
50