start_controls_section(
'clients_carousel',
[
'label' => esc_html__('Thinkai Clients Carousel', 'thinkai'),
]
);
//Layout
$this->add_control(
'layout_control',
[
'label' => esc_html__( 'Layout Style', 'thinkai' ),
'label_block' => true,
'type' => Controls_Manager::SELECT,
'default' => '1',
'options' => array(
'1' => esc_html__( 'Style One ', 'thinkai'),
'2' => esc_html__( 'Style Two ', 'thinkai'),
'3' => esc_html__( 'Style Three ', 'thinkai'),
),
]
);
//Title
$this->add_control(
'title',
[
'label' => __( 'Title', 'thinkai' ),
'label_block' => true,
'type' => Controls_Manager::TEXTAREA,
'dynamic' => [
'active' => true,
],
'placeholder' => __( 'Enter your Title', 'thinkai' ),
]
);
//Our Feature Table
$repeater = new Repeater();
$repeater->add_control(
'client_img',
[
'label' => __('Client Image', 'thinkai'),
'type' => Controls_Manager::MEDIA,
'default' => ['url' => Utils::get_placeholder_image_src(),],
]
);
$repeater->add_control(
'client_link',
[
'label' => __('External Url', 'thinkai'),
'type' => Controls_Manager::URL,
'placeholder' => __('https://your-link.com', 'plugin-domain'),
'show_external' => true,
'default' => [
'url' => '',
'is_external' => true,
'nofollow' => true,
],
]
);
$this->add_control(
'clients',
[
'label' => __('Add Clients Item', 'thinkai'),
'type' => Controls_Manager::REPEATER,
'fields' => $repeater->get_controls(),
'condition' => [
'layout_control' => ['1','2']
]
]
);
$this->end_controls_section();
//Title Style
$this->start_controls_section(
'title_style',
[
'label' => esc_html__( 'Title Style Settings', 'thinkai' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_responsive_control(
'title__margin',
[
'label' => esc_html__( 'Margin', 'thinkai' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => ['px', '%', 'em'],
'selectors' => [
'{{WRAPPER}} .te-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
],
'separator' => 'before',
]
);
$this->add_responsive_control(
'title_padding',
[
'label' => esc_html__( 'Padding', 'thinkai' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => ['px', '%', 'em'],
'selectors' => [
'{{WRAPPER}} .te-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
],
'separator' => 'before',
]
);
$this->add_group_control(
Group_Control_Background::get_type(),
[
'name' => 'title_bgtype',
'label' => __( 'Background', 'thinkai' ),
'types' => [ 'classic', 'gradient' ],
'selector' => '{{WRAPPER}} .partner-style2 .title-box .inner',
]
);
$this->add_group_control(
Group_Control_Border::get_type(),
[
'name' => 'title_border_type',
'selector' =>
'{{WRAPPER}} .te-title',
'separator' => 'before',
]
);
$this->add_group_control(
Group_Control_Box_Shadow::get_type(),
[
'name' => 'title_border_box_shadow',
'selector' =>
'{{WRAPPER}} .te-title',
'separator' => 'before',
]
);
$this->add_control(
'title_border_radius',
[
'label' => esc_html__('Border Radius', 'thinkai'),
'type' => Controls_Manager::DIMENSIONS,
'separator' => 'before',
'size_units' => ['px'],
'selectors' => [
'{{WRAPPER}} .te-title' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
],
]
);
$this->add_control(
'title_color',
[
'label' => esc_html__( 'Text Color', 'thinkai' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .te-title' => 'color: {{VALUE}} !important;',
'{{WRAPPER}} .te-title a' => 'color: {{VALUE}} !important;',
],
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'title_typography',
'label' => __('Typography', 'thinkai'),
'selector' => '{{WRAPPER}} .te-title',
]
);
$this->add_group_control(
Group_Control_Text_Shadow::get_type(),
[
'name' => 'title_text_shadow',
'selector' => '{{WRAPPER}} .te-title',
]
);
$this->end_controls_section();
}
/**
* Render button widget output on the frontend.
* Written in PHP and used to generate the final HTML.
*
* @since 1.0.0
* @access protected
*/
protected function render()
{
$settings = $this->get_settings_for_display();
$allowed_tags = wp_kses_allowed_html('post');
?>