| 1 |
<?php |
| 2 |
namespace Elementor; |
| 3 |
|
| 4 |
if ( ! defined( 'ABSPATH' ) ) { |
| 5 |
exit; // Exit if accessed directly. |
| 6 |
} |
| 7 |
|
| 8 |
/** |
| 9 |
* Elementor hidden control. |
| 10 |
* |
| 11 |
* A base control for creating hidden control. Used to save additional data in |
| 12 |
* the database without a visual presentation in the panel. |
| 13 |
* |
| 14 |
* @since 1.0.0 |
| 15 |
*/ |
| 16 |
class Control_Hidden extends Base_Data_Control { |
| 17 |
|
| 18 |
/** |
| 19 |
* Get hidden control type. |
| 20 |
* |
| 21 |
* Retrieve the control type, in this case `hidden`. |
| 22 |
* |
| 23 |
* @since 1.0.0 |
| 24 |
* @access public |
| 25 |
* |
| 26 |
* @return string Control type. |
| 27 |
*/ |
| 28 |
public function get_type() { |
| 29 |
return 'hidden'; |
| 30 |
} |
| 31 |
|
| 32 |
/** |
| 33 |
* Render hidden control output in the editor. |
| 34 |
* |
| 35 |
* Used to generate the control HTML in the editor using Underscore JS |
| 36 |
* template. The variables for the class are available using `data` JS |
| 37 |
* object. |
| 38 |
* |
| 39 |
* @since 1.0.0 |
| 40 |
* @access public |
| 41 |
*/ |
| 42 |
public function content_template() { |
| 43 |
?> |
| 44 |
<input type="hidden" data-setting="{{{ data.name }}}" /> |
| 45 |
<?php |
| 46 |
} |
| 47 |
} |
| 48 |
|