Kirki_Control_Upload   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 4
dl 0
loc 21
rs 10
c 1
b 1
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A to_json() 0 3 1
1
<?php
2
/**
3
 * Customizer Control: image.
4
 *
5
 * @package     Kirki
6
 * @subpackage  Controls
7
 * @copyright   Copyright (c) 2017, Aristeides Stathopoulos
8
 * @license    https://opensource.org/licenses/MIT
9
 * @since       3.0.23
10
 */
11
12
/**
13
 * Adds the image control.
14
 */
15
class Kirki_Control_Upload extends WP_Customize_Upload_Control {
16
17
	/**
18
	 * Whitelisting the "required" argument.
19
	 *
20
	 * @since 3.0.17
21
	 * @access public
22
	 * @var array
23
	 */
24
	public $required = array();
25
26
	/**
27
	 * Refresh the parameters passed to the JavaScript via JSON.
28
	 *
29
	 * @since 3.0.23
30
	 *
31
	 * @uses WP_Customize_Media_Control::to_json()
32
	 */
33
	public function to_json() {
34
		parent::to_json();
35
		$this->json['required'] = $this->required;
36
	}
37
}
38