/home/techb158/public_html/wp-content/themes/engitech/inc/backend/elementor-widgets
Edit: /home/techb158/public_html/wp-content/themes/engitech/inc/backend/elementor-widgets/heading.php (6623B)
start_controls_section(
'content_section',
[
'label' => __( 'Content', 'engitech' ),
]
);
$this->add_control(
'iheading_title',
[
'label' => __( 'Subtitle & Title', 'engitech' ),
'type' => Controls_Manager::HEADING,
]
);
$this->add_control(
'sub',
[
'label' => '',
'type' => Controls_Manager::TEXT,
'default' => __( '// our service', 'engitech' ),
'placeholder' => __( 'Enter your subtitle', 'engitech' ),
'label_block' => true,
'show_label' => false,
]
);
$this->add_control(
'title',
[
'label' => '',
'type' => Controls_Manager::TEXTAREA,
'default' => __( 'What we do', 'engitech' ),
'placeholder' => __( 'Enter your title', 'engitech' ),
'show_label' => false,
'label_block' => true,
]
);
$this->add_responsive_control(
'text_align',
[
'label' => __( 'Alignment', 'engitech' ),
'type' => Controls_Manager::CHOOSE,
'options' => [
'left' => [
'title' => __( 'Left', 'engitech' ),
'icon' => 'fa fa-align-left',
],
'center' => [
'title' => __( 'Center', 'engitech' ),
'icon' => 'fa fa-align-center',
],
'right' => [
'title' => __( 'Right', 'engitech' ),
'icon' => 'fa fa-align-right',
],
],
// 'prefix_class' => 'engitech%s-align-',
'selectors' => [
'{{WRAPPER}}' => 'text-align: {{VALUE}};',
],
]
);
$this->add_control(
'tag',
[
'label' => __( 'HTML Tag', 'elementor' ),
'type' => Controls_Manager::SELECT,
'options' => [
'h1' => 'H1',
'h2' => 'H2',
'h3' => 'H3',
'h4' => 'H4',
'h5' => 'H5',
'h6' => 'H6',
'div' => 'div',
'p' => 'p',
],
'default' => 'h2',
]
);
$this->end_controls_section();
//Style
$this->start_controls_section(
'style_section',
[
'label' => __( 'Heading', 'engitech' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
//Subtitle
$this->add_control(
'heading_stitle',
[
'label' => __( 'Subtitle', 'engitech' ),
'type' => Controls_Manager::HEADING,
'separator' => 'before',
]
);
$this->add_control(
'stitle_color',
[
'label' => __( 'Color', 'engitech' ),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} .ot-heading > span' => 'color: {{VALUE}};',
]
]
);
$this->add_control(
'stitle_bg',
[
'label' => __( 'Background', 'engitech' ),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} .ot-heading > span' => 'background: {{VALUE}};',
]
]
);
$this->add_control(
'stitle_padd',
[
'label' => __( 'Padding', 'engitech' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px' ],
'selectors' => [
'{{WRAPPER}} .ot-heading > span' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
'condition' => [
'stitle_bg!' => '',
]
]
);
$this->add_control(
'stitle_radius',
[
'label' => __( 'Border Radius', 'engitech' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px' ],
'selectors' => [
'{{WRAPPER}} .ot-heading > span' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
'condition' => [
'stitle_bg!' => '',
]
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'stitle_typography',
'selector' => '{{WRAPPER}} .ot-heading > span',
]
);
$this->add_responsive_control(
'stitle_bottom_space',
[
'label' => __( 'Spacing', 'engitech' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'px' => [
'min' => 0,
'max' => 100,
],
],
'selectors' => [
'{{WRAPPER}} .ot-heading > span' => 'margin-bottom: {{SIZE}}{{UNIT}};',
],
]
);
//Title
$this->add_control(
'heading_title',
[
'label' => __( 'Title', 'engitech' ),
'type' => Controls_Manager::HEADING,
'separator' => 'before',
]
);
$this->add_control(
'title_color',
[
'label' => __( 'Color', 'engitech' ),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} .ot-heading .main-heading' => 'color: {{VALUE}};',
]
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'title_typography',
'selector' => '{{WRAPPER}} .ot-heading .main-heading',
]
);
$this->end_controls_section();
}
protected function render() {
$settings = $this->get_settings_for_display();
?>
'.$settings['title'].''.$settings['tag'].'>' ?>
widgets_manager->register_widget_type( new Engitech_Heading() );