2019-08-11 11:08:52 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Customizer Control: image.
|
|
|
|
*
|
|
|
|
* @package Kirki
|
|
|
|
* @subpackage Controls
|
2020-07-12 11:16:15 +02:00
|
|
|
* @copyright Copyright (c) 2020, David Vongries
|
2020-02-25 16:44:51 +01:00
|
|
|
* @license https://opensource.org/licenses/MIT
|
2019-08-11 11:08:52 +02:00
|
|
|
* @since 3.0.23
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Adds the image control.
|
|
|
|
*/
|
|
|
|
class Kirki_Control_Upload extends WP_Customize_Upload_Control {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Whitelisting the "required" argument.
|
|
|
|
*
|
|
|
|
* @since 3.0.17
|
|
|
|
* @access public
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
public $required = array();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Refresh the parameters passed to the JavaScript via JSON.
|
|
|
|
*
|
|
|
|
* @since 3.0.23
|
|
|
|
*
|
|
|
|
* @uses WP_Customize_Media_Control::to_json()
|
|
|
|
*/
|
|
|
|
public function to_json() {
|
|
|
|
parent::to_json();
|
|
|
|
$this->json['required'] = $this->required;
|
|
|
|
}
|
|
|
|
}
|