File: /home/tvypkwena2lu/public_html/wp-content/plugins/widgets/ele-heading.php
<?php
/**
* Elementor oEmbed Widget.
*
* Elementor widget that inserts an embbedable content into the page, from any given URL.
*
* @since 1.0.0
*/
class Elementor_ThemeHeading_Widget extends \Elementor\Widget_Base {
public function get_name() {
return 'ele-theme-heading';
}
public function get_title() {
return __( 'Theme Section Heading', 'plugin-name' );
}
public function get_icon() {
return 'eicon-post-content';
}
public function get_categories() {
return [ 'theme-specific-category' ];
}
protected function _register_controls() {
$this->start_controls_section(
'content_section',
[
'label' => __( 'Content', 'plugin-name' ),
'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
]
);
$this->add_control(
'title',
[
'label' => __( 'Title', 'plugin-name' ),
'type' => \Elementor\Controls_Manager::TEXT,
'input_type' => 'text',
'default' => __( 'Professional', 'plugin-name' ),
]
);
$this->add_control(
'subtitle',
[
'label' => __( 'Sub Title', 'plugin-name' ),
'type' => \Elementor\Controls_Manager::TEXT,
'input_type' => 'text',
'default' => __( 'Learning', 'plugin-name' ),
]
);
$this->add_responsive_control(
'align',
[
'label' => __( 'Alignment', 'elementor' ),
'type' => \Elementor\Controls_Manager::CHOOSE,
'options' => [
'left' => [
'title' => __( 'Left', 'elementor' ),
'icon' => 'fa fa-align-left',
],
'center' => [
'title' => __( 'Center', 'elementor' ),
'icon' => 'fa fa-align-center',
],
'right' => [
'title' => __( 'Right', 'elementor' ),
'icon' => 'fa fa-align-right',
],
'justify' => [
'title' => __( 'Justified', 'elementor' ),
'icon' => 'fa fa-align-justify',
],
],
'default' => '',
'selectors' => [
'{{WRAPPER}}' => 'text-align: {{VALUE}};',
],
]
);
$this->end_controls_section();
}
protected function render() {
$settings = $this->get_settings_for_display();
//$target = $settings['website_link']['is_external'] ? ' target="_blank"' : '';
//$nofollow = $settings['website_link']['nofollow'] ? ' rel="nofollow"' : '';
//var_dump($settings);
echo '
<div class="main-heading mb-4"><h2 class="">'.($settings['title'] ? $settings['title'] : '' ).' <span>'.($settings['subtitle'] ? $settings['subtitle'] : '' ).'</span></h2></div>
';
}
}