| 1 |
<?php |
| 2 |
namespace Elementor; |
| 3 |
|
| 4 |
if ( ! defined( 'ABSPATH' ) ) { |
| 5 |
exit; // Exit if accessed directly. |
| 6 |
} |
| 7 |
|
| 8 |
/** |
| 9 |
* Elementor divider control. |
| 10 |
* |
| 11 |
* A base control for creating divider control. Displays horizontal line in |
| 12 |
* the panel. |
| 13 |
* |
| 14 |
* @since 2.0.0 |
| 15 |
*/ |
| 16 |
class Control_Divider extends Base_UI_Control { |
| 17 |
|
| 18 |
/** |
| 19 |
* Get divider control type. |
| 20 |
* |
| 21 |
* Retrieve the control type, in this case `divider`. |
| 22 |
* |
| 23 |
* @since 2.0.0 |
| 24 |
* @access public |
| 25 |
* |
| 26 |
* @return string Control type. |
| 27 |
*/ |
| 28 |
public function get_type() { |
| 29 |
return 'divider'; |
| 30 |
} |
| 31 |
|
| 32 |
/** |
| 33 |
* Get divider control default settings. |
| 34 |
* |
| 35 |
* Retrieve the default settings of the divider control. Used to |
| 36 |
* return the default settings while initializing the divider |
| 37 |
* control. |
| 38 |
* |
| 39 |
* @since 2.0.0 |
| 40 |
* @access protected |
| 41 |
* |
| 42 |
* @return array Control default settings. |
| 43 |
*/ |
| 44 |
protected function get_default_settings() { |
| 45 |
return [ |
| 46 |
'separator' => 'none', |
| 47 |
]; |
| 48 |
} |
| 49 |
|
| 50 |
/** |
| 51 |
* Render divider control output in the editor. |
| 52 |
* |
| 53 |
* Used to generate the control HTML in the editor using Underscore JS |
| 54 |
* template. The variables for the class are available using `data` JS |
| 55 |
* object. |
| 56 |
* |
| 57 |
* @since 2.0.0 |
| 58 |
* @access public |
| 59 |
*/ |
| 60 |
public function content_template() {} |
| 61 |
} |
| 62 |
|