/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/tab-titles.php (8635B)
start_controls_section(
'content_section',
[
'label' => __( 'Titles', 'engitech' ),
]
);
$repeater = new Repeater();
$repeater->add_control(
'icon_font',
[
'label' => __( 'Icon', 'engitech' ),
'type' => Controls_Manager::ICONS,
'label_block' => true,
'fa4compatibility' => 'icon',
'default' => [
'value' => 'fas fa-star',
'library' => 'fa-solid',
],
]
);
$repeater->add_control(
'titles',
[
'label' => __( 'Title', 'engitech' ),
'type' => Controls_Manager::TEXTAREA,
'default' => 'Collaborate',
]
);
$repeater->add_control(
'des',
[
'label' => __( 'Description', 'engitech' ),
'type' => Controls_Manager::TEXTAREA,
'default' => 'Work as a team to help your customers get all the answers',
]
);
$repeater->add_control(
'title_link',
[
'label' => __( 'Link to ID Content', 'engitech' ),
'type' => Controls_Manager::TEXT,
'default' => '#tab-1',
]
);
$this->add_control(
'title_boxes',
[
'label' => '',
'type' => Controls_Manager::REPEATER,
'show_label' => false,
'fields' => $repeater->get_controls(),
'title_field' => '{{{titles}}}',
]
);
$this->end_controls_section();
//Styling
$this->start_controls_section(
'style_section',
[
'label' => __( 'General', 'engitech' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_responsive_control(
'titles_space',
[
'label' => __( 'Spacing', 'engitech' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'px' => [
'min' => 0,
'max' => 150,
],
],
'selectors' => [
'{{WRAPPER}} .tab-titles .title-item' => 'margin-bottom: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_responsive_control(
'padding_titles',
[
'label' => __( 'Padding', 'engitech' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%' ],
'selectors' => [
'{{WRAPPER}} .title-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->add_control(
'radius_titles',
[
'label' => __( 'Border Radius', 'engitech' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%' ],
'selectors' => [
'{{WRAPPER}} .title-item' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->add_control(
'titles_bcolor',
[
'label' => __( 'Border Color', 'engitech' ),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} .title-item' => 'border-color: {{VALUE}};',
],
]
);
$this->add_control(
'titles_hbcolor',
[
'label' => __( 'Border Hover Color', 'engitech' ),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} .title-item:hover' => 'border-color: {{VALUE}};',
],
]
);
$this->end_controls_section();
$this->start_controls_section(
'icon_section',
[
'label' => __( 'Icon', 'engitech' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_responsive_control(
'icon_size',
[
'label' => __( 'Size', 'engitech' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'px' => [
'min' => 0,
'max' => 200,
],
],
'selectors' => [
'{{WRAPPER}} .icon-main i' => 'font-size: {{SIZE}}{{UNIT}};',
'{{WRAPPER}} .icon-main svg' => 'width: {{SIZE}}{{UNIT}};'
],
]
);
$this->add_responsive_control(
'icon_space',
[
'label' => __( 'Spacing', 'engitech' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'px' => [
'min' => 0,
'max' => 100,
],
],
'selectors' => [
'{{WRAPPER}} .icon-main' => 'margin-right: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_control(
'icon_color',
[
'label' => __( 'Color', 'engitech' ),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} .icon-main i' => 'color: {{VALUE}};',
'{{WRAPPER}} .icon-main svg' => 'fill: {{VALUE}};',
],
]
);
$this->end_controls_section();
$this->start_controls_section(
'texts_section',
[
'label' => __( 'Texts', 'engitech' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
//Title
$this->add_control(
'heading_title',
[
'label' => __( 'Title', 'engitech' ),
'type' => Controls_Manager::HEADING,
'separator' => 'before',
]
);
$this->add_responsive_control(
'title_space',
[
'label' => __( 'Spacing', 'engitech' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'px' => [
'min' => 0,
'max' => 100,
],
],
'selectors' => [
'{{WRAPPER}} .title-item h5' => 'margin-bottom: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_control(
'title_color',
[
'label' => __( 'Color', 'engitech' ),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} .title-item h5' => 'color: {{VALUE}};',
]
]
);
$this->add_control(
'title_hcolor',
[
'label' => __( 'Hover Color', 'engitech' ),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} .title-item:hover h5' => 'color: {{VALUE}};',
]
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'title_typography',
'selector' => '{{WRAPPER}} .title-item h5',
]
);
//Des
$this->add_control(
'heading_des',
[
'label' => __( 'Description', 'engitech' ),
'type' => Controls_Manager::HEADING,
'separator' => 'before',
]
);
$this->add_control(
'des_color',
[
'label' => __( 'Color', 'engitech' ),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} .title-item .long-text' => 'color: {{VALUE}};',
]
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'des_typography',
'selector' => '{{WRAPPER}} .title-item .long-text',
]
);
$this->end_controls_section();
}
protected function render() {
$settings = $this->get_settings_for_display();
?>
'true' ] ); ?>
'.$box['des'].''; } ?>
widgets_manager->register_widget_type( new Engitech_Tab_Titles() );