55 lines
		
	
	
		
			938 B
		
	
	
	
		
			PHP
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			55 lines
		
	
	
		
			938 B
		
	
	
	
		
			PHP
		
	
	
		
			Executable File
		
	
	
	
	
| <?php
 | |
| /**
 | |
|  * The Measure customize control extends the WP_Customize_Control class.
 | |
|  *
 | |
|  * @package customizer-controls
 | |
|  */
 | |
| 
 | |
| if ( ! class_exists( 'WP_Customize_Control' ) ) {
 | |
| 	return;
 | |
| }
 | |
| 
 | |
| 
 | |
| /**
 | |
|  * Class Kadence_Control_Measure
 | |
|  *
 | |
|  * @access public
 | |
|  */
 | |
| class Kadence_Control_Measure extends WP_Customize_Control {
 | |
| 	/**
 | |
| 	 * Control type
 | |
| 	 *
 | |
| 	 * @var string
 | |
| 	 */
 | |
| 	public $type = 'kadence_measure_control';
 | |
| 
 | |
| 	/**
 | |
| 	 * Additional arguments passed to JS.
 | |
| 	 *
 | |
| 	 * @var array
 | |
| 	 */
 | |
| 	public $default = array();
 | |
| 
 | |
| 	/**
 | |
| 	 * Additional arguments passed to JS.
 | |
| 	 *
 | |
| 	 * @var array
 | |
| 	 */
 | |
| 	public $input_attrs = array();
 | |
| 
 | |
| 	/**
 | |
| 	 * Send to JS.
 | |
| 	 */
 | |
| 	public function to_json() {
 | |
| 		parent::to_json();
 | |
| 		$this->json['input_attrs'] = $this->input_attrs;
 | |
| 		$this->json['default']     = $this->default;
 | |
| 	}
 | |
| 	/**
 | |
| 	 * Empty Render Function to prevent errors.
 | |
| 	 */
 | |
| 	public function render_content() {
 | |
| 	}
 | |
| }
 | |
| $wp_customize->register_control_type( 'Kadence_Control_Measure' );
 |