groups
9 months ago
alert.php
2 years ago
animation.php
1 year ago
base-data.php
1 year ago
base-icon-font.php
1 year ago
base-multiple.php
1 year ago
base-ui.php
3 years ago
base-units.php
2 years ago
base.php
3 years ago
box-shadow.php
3 years ago
button.php
3 years ago
choose.php
11 months ago
code.php
3 years ago
color.php
3 years ago
date-time.php
3 years ago
deprecated-notice.php
3 years ago
dimensions.php
1 year ago
divider.php
2 years ago
exit-animation.php
1 year ago
font.php
3 years ago
gallery.php
4 months ago
gaps.php
1 year ago
heading.php
3 years ago
hidden.php
3 years ago
hover-animation.php
1 year ago
icon.php
2 years ago
icons.php
11 months ago
image-dimensions.php
3 years ago
media.php
4 months ago
notice.php
1 year ago
number.php
6 months ago
popover-toggle.php
3 years ago
raw-html.php
3 years ago
repeater.php
11 months ago
section.php
9 months ago
select.php
3 years ago
select2.php
2 years ago
slider.php
3 years ago
structure.php
2 years ago
switcher.php
3 years ago
tab.php
2 years ago
tabs.php
2 years ago
text-shadow.php
3 years ago
text.php
11 months ago
textarea.php
3 years ago
url.php
11 months ago
visual-choice.php
11 months ago
wp-widget.php
3 years ago
wysiwyg.php
3 years ago
heading.php
67 lines
| 1 | <?php |
| 2 | namespace Elementor; |
| 3 | |
| 4 | if ( ! defined( 'ABSPATH' ) ) { |
| 5 | exit; // Exit if accessed directly. |
| 6 | } |
| 7 | |
| 8 | /** |
| 9 | * Elementor heading control. |
| 10 | * |
| 11 | * A base control for creating heading control. Displays a text heading between |
| 12 | * controls in the panel. |
| 13 | * |
| 14 | * @since 1.0.0 |
| 15 | */ |
| 16 | class Control_Heading extends Base_UI_Control { |
| 17 | |
| 18 | /** |
| 19 | * Get heading control type. |
| 20 | * |
| 21 | * Retrieve the control type, in this case `heading`. |
| 22 | * |
| 23 | * @since 1.0.0 |
| 24 | * @access public |
| 25 | * |
| 26 | * @return string Control type. |
| 27 | */ |
| 28 | public function get_type() { |
| 29 | return 'heading'; |
| 30 | } |
| 31 | |
| 32 | /** |
| 33 | * Get heading control default settings. |
| 34 | * |
| 35 | * Retrieve the default settings of the heading control. Used to return the |
| 36 | * default settings while initializing the heading control. |
| 37 | * |
| 38 | * @since 1.0.0 |
| 39 | * @access protected |
| 40 | * |
| 41 | * @return array Control default settings. |
| 42 | */ |
| 43 | protected function get_default_settings() { |
| 44 | return [ |
| 45 | 'label_block' => true, |
| 46 | ]; |
| 47 | } |
| 48 | |
| 49 | /** |
| 50 | * Render heading control output in the editor. |
| 51 | * |
| 52 | * Used to generate the control HTML in the editor using Underscore JS |
| 53 | * template. The variables for the class are available using `data` JS |
| 54 | * object. |
| 55 | * |
| 56 | * @since 1.0.0 |
| 57 | * @access public |
| 58 | */ |
| 59 | public function content_template() { |
| 60 | ?> |
| 61 | <div class="elementor-control-field"> |
| 62 | <h3 class="elementor-control-title">{{{ data.label }}}</h3> |
| 63 | </div> |
| 64 | <?php |
| 65 | } |
| 66 | } |
| 67 |