Server IP : 162.0.217.223 / Your IP : 216.73.216.150 Web Server : LiteSpeed System : Linux premium269.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : mypckeys ( 1539) PHP Version : 8.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/mypckeys/tu-international.com/wp-content/plugins/themesflat-core/widgets/ |
Upload File : |
<?php class TFIconBox_Widget extends \Elementor\Widget_Base { public function get_name() { return 'tficonbox'; } public function get_title() { return esc_html__( 'TF Icon Box', 'themesflat-elementor' ); } public function get_icon() { return 'eicon-icon-box'; } public function get_categories() { return [ 'themesflat_addons' ]; } public function get_style_depends() { return ['tf-iconbox']; } public function get_script_depends() { return [ 'appear','anime' ]; } protected function _register_controls() { // Start Icon Box Setting $this->start_controls_section( 'section_tficonbox', [ 'label' => esc_html__('Icon Box', 'themesflat-elementor'), ] ); $this->add_control( 'icon_style', [ 'label' => esc_html__( 'Icon Style', 'themesflat-core' ), 'type' => \Elementor\Controls_Manager::CHOOSE, 'options' => [ 'none' => [ 'title' => esc_html__( 'None', 'themesflat-core' ), 'icon' => 'fa fa-ban', ], 'icon' => [ 'title' => esc_html__( 'Icon', 'themesflat-core' ), 'icon' => 'fa fa-paint-brush', ], 'image' => [ 'title' => esc_html__( 'Image', 'themesflat-core' ), 'icon' => 'eicon-image', ], ], 'default' => 'icon', 'toggle' => false, ] ); $this->add_control( 'icon', [ 'label' => esc_html__( 'Icon', 'themesflat-core' ), 'type' => \Elementor\Controls_Manager::ICONS, 'default' => [ 'value' => 'icon-motorx-car', 'library' => 'theme_icon', ], 'condition' => [ 'icon_style' => 'icon', ], ] ); $this->add_control( 'image', [ 'label' => esc_html__( 'Choose Image', 'themesflat-core' ), 'type' => \Elementor\Controls_Manager::MEDIA, 'default' => [ 'url' => URL_THEMESFLAT_ADDONS_ELEMENTOR_THEME."assets/img/placeholder.jpg", ], 'condition' => [ 'icon_style' => 'image', ], ] ); $this->add_group_control( \Elementor\Group_Control_Image_Size::get_type(), [ 'name' => 'thumbnail', 'include' => [], 'default' => 'large', ] ); $this->add_control( 'title_text', [ 'label' => esc_html__( 'Title', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::TEXT, 'label_block' => true, 'default' => esc_html__( 'Trusted Car Dealership', 'themesflat-elementor' ), ] ); $this->add_control( 'description_text', [ 'label' => 'Description', 'type' => \Elementor\Controls_Manager::WYSIWYG, 'default' => esc_html__( 'Lorem ipsum dolor sit amet, consect adipiscing elit.', 'themesflat-elementor' ), ] ); $this->add_control( 'position', [ 'label' => esc_html__( 'Icon Position', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::CHOOSE, 'default' => 'top', 'options' => [ 'left' => [ 'title' => esc_html__( 'Left', 'themesflat-elementor' ), 'icon' => 'eicon-h-align-left', ], 'top' => [ 'title' => esc_html__( 'Top', 'themesflat-elementor' ), 'icon' => 'eicon-v-align-top', ], 'right' => [ 'title' => esc_html__( 'Right', 'themesflat-elementor' ), 'icon' => 'eicon-h-align-right', ], ], ] ); $this->end_controls_section(); // /.End Icon Box Setting // Start General $this->start_controls_section( 'section_style_general', [ 'label' => esc_html__( 'General', 'themesflat-elementor' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'text_align', [ 'label' => esc_html__( 'Alignment', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => esc_html__( 'Left', 'themesflat-elementor' ), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => esc_html__( 'Center', 'themesflat-elementor' ), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => esc_html__( 'Right', 'themesflat-elementor' ), 'icon' => 'eicon-text-align-right', ], 'justify' => [ 'title' => esc_html__( 'Justified', 'themesflat-elementor' ), 'icon' => 'eicon-text-align-justify', ], ], 'selectors' => [ '{{WRAPPER}} .tficonbox' => 'text-align: {{VALUE}};', ], ] ); $this->add_responsive_control( 'padding_general', [ 'label' => esc_html__( 'Padding', 'themesflat-core' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .tficonbox' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'margin_general', [ 'label' => esc_html__( 'Margin', 'themesflat-core' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .tficonbox' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); // /.End General // Start Image Style $this->start_controls_section( 'section_style_image', [ 'label' => esc_html__( 'image', 'themesflat-elementor' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, 'condition' => [ 'icon_style' => 'image', ], ] ); $this->add_control( 'image_size_height', [ 'label' => esc_html__( 'Width', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 300, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, 'step' => 1, ], ], 'selectors' => [ '{{WRAPPER}} .tficonbox .wrap-image img ' => 'max-width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'image_padding', [ 'label' => esc_html__( 'Padding', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .tficonbox .wrap-image' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'image_margin', [ 'label' => esc_html__( 'Margin', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .tficonbox .wrap-image' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); // /.End Image // Start Icon Style $this->start_controls_section( 'section_style_icon', [ 'label' => esc_html__( 'Icon', 'themesflat-elementor' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, 'condition' => [ 'icon_style' => 'icon', ], ] ); $this->add_control( 'icon_vertical_style', [ 'label' => esc_html__( 'Vertical Align', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::SELECT, 'options' => [ 'start' => esc_html__( 'Top', 'themesflat-elementor' ), 'center' => esc_html__( 'Center', 'themesflat-elementor' ), 'end' => esc_html__( 'Bottom', 'themesflat-elementor' ), ], 'selectors' => [ '{{WRAPPER}} .tficonbox' => '-webkit-box-align: {{VALUE}};', '{{WRAPPER}} .tficonbox' => '-webkit-align-items: {{VALUE}};', '{{WRAPPER}} .tficonbox' => '-ms-flex-align: {{VALUE}};', '{{WRAPPER}} .tficonbox' => 'align-items: {{VALUE}};', ], 'condition' => [ 'position!' => 'top', ], ] ); $this->add_control( 'icon_line', [ 'label' => esc_html__( 'Line', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::SELECT, 'options' => [ 'block' => esc_html__( 'Show', 'themesflat-elementor' ), 'none' => esc_html__( 'Hide', 'themesflat-elementor' ), ], 'default' => 'none', 'selectors' => [ '{{WRAPPER}} .tficonbox .wrap-icon::after ' => 'display: {{VALUE}};', ], 'condition' => [ 'position!' => 'top', ], ] ); $this->add_control( 'icon_line_size_height', [ 'label' => esc_html__( 'Height', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 300, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, 'step' => 1, ], ], 'selectors' => [ '{{WRAPPER}} .tficonbox .wrap-icon::after ' => 'height: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'icon_line' => 'block', ], ] ); $this->add_control( 'icon_line_size', [ 'label' => esc_html__( 'Line Spacing', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => -300, 'max' => 300, 'step' => 1, ], ], 'selectors' => [ '{{WRAPPER}} .tficonbox .wrap-icon::after ' => 'right: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'icon_line' => 'block', ], ] ); $this->add_control( 'icon_line_color', [ 'label' => esc_html__( 'Color', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .tficonbox .wrap-icon::after' => 'background-color: {{VALUE}};', ], 'condition' => [ 'icon_line' => 'block', ], ] ); $this->add_control( 'icon_showcase', [ 'label' => esc_html__( 'Type', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::SELECT, 'options' => [ 'default' => esc_html__( 'Default', 'themesflat-elementor' ), 'circle' => esc_html__( 'Circle', 'themesflat-elementor' ), 'square' => esc_html__( 'Square', 'themesflat-elementor' ), 'circle-outline' => esc_html__( 'Circle Outline', 'themesflat-elementor' ), 'square-outline' => esc_html__( 'Square Outline', 'themesflat-elementor' ), ], 'default' => 'default', 'condition' => [ 'icon[value]!' => '', ], ] ); $this->add_control( 'icon_size', [ 'label' => esc_html__( 'Size', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 300, 'step' => 1, ], ], 'default' => [ 'unit' => 'px', 'size' => 55, ], 'selectors' => [ '{{WRAPPER}} .tficonbox .wrap-icon-inner i' => 'font-size: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .tficonbox .wrap-icon-inner svg,{{WRAPPER}} .tficonbox .wrap-icon-inner img' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'wrap_icon_size', [ 'label' => esc_html__( 'Wrap Icon Size', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 300, 'step' => 1, ], ], 'default' => [ 'unit' => 'px', 'size' => 100, ], 'selectors' => [ '{{WRAPPER}} .tficonbox .wrap-icon-inner' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .tficonbox .wrap-icon.square .wrap-icon-inner, {{WRAPPER}} .tficonbox .wrap-icon.square-outline .wrap-icon-inner' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'icon_showcase!' => 'default' ], ] ); $this->add_control( 'rotate', [ 'label' => esc_html__( 'Rotate', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'default' => [ 'size' => 0, 'unit' => 'deg', ], 'selectors' => [ '{{WRAPPER}} .tficonbox .wrap-icon-inner' => 'transform: rotate({{SIZE}}{{UNIT}});', ], ] ); $this->add_control( 'rotate_icon', [ 'label' => esc_html__( 'Rotate Icon', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'default' => [ 'size' => 0, 'unit' => 'deg', ], 'selectors' => [ '{{WRAPPER}} .tficonbox .wrap-icon-inner i, {{WRAPPER}} .tficonbox .wrap-icon-inner svg' => 'transform: rotate({{SIZE}}{{UNIT}});', '{{WRAPPER}} .tficonbox .wrap-icon-inner img' => 'transform: rotate({{SIZE}}{{UNIT}});', ], ] ); $this->add_control( 'icon_border_width', [ 'label' => esc_html__( 'Border Width', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 20, 'step' => 1, ], ], 'default' => [ 'unit' => 'px', 'size' => 3, ], 'selectors' => [ '{{WRAPPER}} .tficonbox .wrap-icon-inner' => 'border-width: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .tficonbox .wrap-icon-spin-around:before' => 'width: calc(100% + 2 * {{SIZE}}{{UNIT}}); height: calc(100% + 2 * {{SIZE}}{{UNIT}}); border-width: {{SIZE}}{{UNIT}}; top: -{{SIZE}}{{UNIT}}; left: -{{SIZE}}{{UNIT}};', ], 'condition' => [ 'icon_showcase' => array('circle-outline','square-outline') ], ] ); $this->add_control( 'border_radius', [ 'label' => esc_html__( 'Border Radius', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'selectors' => [ '{{WRAPPER}} .tficonbox .wrap-icon-inner, {{WRAPPER}} .tficonbox .wrap-icon-spin-around:before' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'icon_showcase!' => 'default', ], ] ); $this->add_responsive_control( 'icon_margin', [ 'label' => esc_html__( 'Margin', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .tficonbox .wrap-icon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->start_controls_tabs( 'icon_tabs' ); $this->start_controls_tab( 'icon_normal_tab', [ 'label' => esc_html__( 'Normal', 'themesflat-elementor' ), ] ); $this->add_control( 'icon_color', [ 'label' => esc_html__( 'Icon Color', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::COLOR, 'default' => '#D01818', 'selectors' => [ '{{WRAPPER}} .tficonbox .wrap-icon-inner, {{WRAPPER}} .tficonbox .wrap-icon-inner svg' => 'color: {{VALUE}}; fill: {{VALUE}}', '{{WRAPPER}} .tficonbox .wrap-icon .wrap-icon-inner svg path' => 'stroke: {{VALUE}};', '{{WRAPPER}} .tficonbox .wrap-icon .wrap-icon-inner svg path.fill' => 'fill: {{VALUE}};', ], ] ); $this->add_group_control( \Elementor\Group_Control_Background::get_type(), [ 'name' => 'icon_background', 'label' => esc_html__( 'Background', 'themesflat-elementor' ), 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .tficonbox .wrap-icon.circle .wrap-icon-inner, {{WRAPPER}} .tficonbox .wrap-icon.square .wrap-icon-inner, {{WRAPPER}} .tficonbox .wrap-icon-spin-around:before', 'condition' => [ 'icon_showcase' => ['circle','square'] ] ] ); $this->add_control( 'border_icon_color', [ 'label' => esc_html__( 'Border Color', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .tficonbox .wrap-icon.circle-outline .wrap-icon-inner, {{WRAPPER}} .tficonbox .wrap-icon.square-outline .wrap-icon-inner, {{WRAPPER}} .tficonbox .wrap-icon-spin-around:before' => 'border-color: {{VALUE}}', ], 'condition' => [ 'icon_showcase' => ['circle-outline','square-outline'] ] ] ); $this->add_control( 'border_style_icon', [ 'label' => esc_html__( 'Border Type', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'solid', 'options' => [ 'solid' => esc_html__( 'Solid', 'themesflat-elementor' ), 'double' => esc_html__( 'Double', 'themesflat-elementor' ), 'dotted' => esc_html__( 'Dotted', 'themesflat-elementor' ), 'dashed' => esc_html__( 'Dashed', 'themesflat-elementor' ), 'groove' => esc_html__( 'Groove', 'themesflat-elementor' ), ], 'selectors' => [ '{{WRAPPER}} .tficonbox .wrap-icon.circle-outline .wrap-icon-inner, {{WRAPPER}} .tficonbox .wrap-icon.square-outline .wrap-icon-inner, {{WRAPPER}} .tficonbox .wrap-icon-spin-around:before' => 'border-style: {{VALUE}}', ], 'condition' => [ 'icon_showcase' => ['circle-outline','square-outline'] ] ] ); $this->add_group_control( \Elementor\Group_Control_Box_Shadow::get_type(), [ 'name' => 'icon_box_shadow', 'label' => esc_html__( 'Box Shadow', 'themesflat-elementor' ), 'selector' => '{{WRAPPER}} .tficonbox .wrap-icon .wrap-icon-inner', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'icon_hover_tab', [ 'label' => esc_html__( 'Hover', 'themesflat-elementor' ), ] ); $this->add_control( 'icon_color_hover', [ 'label' => esc_html__( 'Icon Color', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .tficonbox:hover .wrap-icon-inner' => 'color: {{VALUE}}; fill: {{VALUE}}', '{{WRAPPER}} .tficonbox:hover .wrap-icon .wrap-icon-inner svg path' => 'stroke: {{VALUE}};', '{{WRAPPER}} .tficonbox:hover .wrap-icon .wrap-icon-inner svg path.fill' => 'fill: {{VALUE}};', ], ] ); $this->add_group_control( \Elementor\Group_Control_Background::get_type(), [ 'name' => 'icon_background_hover', 'label' => esc_html__( 'Background', 'themesflat-elementor' ), 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .tficonbox:hover .wrap-icon.circle .wrap-icon-inner, {{WRAPPER}} .tficonbox:hover .wrap-icon.square .wrap-icon-inner, {{WRAPPER}} .tficonbox:hover .wrap-icon-spin-around:before', 'condition' => [ 'icon_showcase' => ['circle','square'] ] ] ); $this->add_control( 'border_icon_color_hover', [ 'label' => esc_html__( 'Border Color', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .tficonbox:hover .wrap-icon.circle-outline .wrap-icon-inner, {{WRAPPER}} .tficonbox:hover .wrap-icon.square-outline .wrap-icon-inner, {{WRAPPER}} .tficonbox:hover .wrap-icon-spin-around:before' => 'border-color: {{VALUE}}', ], 'condition' => [ 'icon_showcase' => ['circle-outline','square-outline'] ] ] ); $this->add_control( 'border_style_icon_hover', [ 'label' => esc_html__( 'Border Type', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'solid', 'options' => [ 'solid' => esc_html__( 'Solid', 'themesflat-elementor' ), 'double' => esc_html__( 'Double', 'themesflat-elementor' ), 'dotted' => esc_html__( 'Dotted', 'themesflat-elementor' ), 'dashed' => esc_html__( 'Dashed', 'themesflat-elementor' ), 'groove' => esc_html__( 'Groove', 'themesflat-elementor' ), ], 'selectors' => [ '{{WRAPPER}} .tficonbox:hover .wrap-icon.circle-outline .wrap-icon-inner, {{WRAPPER}} .tficonbox:hover .wrap-icon.square-outline .wrap-icon-inner, {{WRAPPER}} .tficonbox .wrap-icon-spin-around:before' => 'border-style: {{VALUE}}', ], 'condition' => [ 'icon_showcase' => ['circle-outline','square-outline'] ] ] ); $this->add_group_control( \Elementor\Group_Control_Box_Shadow::get_type(), [ 'name' => 'icon_hover_box_shadow', 'label' => esc_html__( 'Box Shadow', 'themesflat-elementor' ), 'selector' => '{{WRAPPER}} .tficonbox:hover .wrap-icon .wrap-icon-inner', ] ); $this->add_control( 'icon_animation', [ 'label' => esc_html__( 'Hover Animation', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'default', 'options' => [ 'default' => esc_html__( 'Default', 'themesflat-elementor' ), 'right-to-left' => esc_html__( 'Right To Left', 'themesflat-elementor' ), 'left-to-right' => esc_html__( 'Left To Right', 'themesflat-elementor' ), 'top-to-bottom' => esc_html__( 'Top To Bottom', 'themesflat-elementor' ), 'bottom-to-top' => esc_html__( 'Bottom To Top', 'themesflat-elementor' ), 'spin-around' => esc_html__( 'Spin Around', 'themesflat-elementor' ), 'wrap-icon-spin-around' => esc_html__( 'Wrap Icon Spin Around', 'themesflat-elementor' ), 'wrap-icon-pop' => esc_html__( 'Wrap Icon Pop', 'themesflat-elementor' ), ] ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); // /.End Icon Style // Start Content Style $this->start_controls_section( 'section_style_content', [ 'label' => esc_html__( 'Content', 'themesflat-elementor' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'heading_title', [ 'label' => esc_html__( 'Title', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'title_typography', 'selector' => '{{WRAPPER}} .tficonbox .content .title', ] ); $this->add_control( 'title_color', [ 'label' => esc_html__( 'Color', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::COLOR, 'default' => '#121212', 'selectors' => [ '{{WRAPPER}} .tficonbox .content .title, {{WRAPPER}} .tficonbox .content .title a' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'title_tag', [ 'label' => esc_html__( 'Title Tag', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'h3', 'options' => [ 'h1' => esc_html__( 'H1', 'themesflat-elementor' ), 'h2' => esc_html__( 'H2', 'themesflat-elementor' ), 'h3' => esc_html__( 'H3', 'themesflat-elementor' ), 'h4' => esc_html__( 'H4', 'themesflat-elementor' ), 'h5' => esc_html__( 'H5', 'themesflat-elementor' ), 'h6' => esc_html__( 'H6', 'themesflat-elementor' ), ], ] ); $this->add_control( 'title_margin', [ 'label' => esc_html__( 'Margin', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .tficonbox .content .title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'title_color_hover', [ 'label' => esc_html__( 'Color Hover', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .tficonbox .content .title a:hover' => 'color: {{VALUE}};', ], 'condition' => [ 'link[url]!' => '' ], ] ); $this->add_control( 'heading_description', [ 'label' => esc_html__( 'Description', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'description_typography', 'selector' => '{{WRAPPER}} .tficonbox .content .description', ] ); $this->add_control( 'description_color', [ 'label' => esc_html__( 'Color', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::COLOR, 'default' => '#64666C', 'selectors' => [ '{{WRAPPER}} .tficonbox .content .description' => 'color: {{VALUE}};', ] ] ); $this->add_responsive_control( 'desc_margin', [ 'label' => esc_html__( 'Margin', 'themesflat-elementor' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .tficonbox .content .description' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); // /.End Content Style } protected function render($instance = []) { $settings = $this->get_settings_for_display(); if (!empty($settings['link'])) { $target = $settings['link']['is_external'] ? ' target="_blank"' : ''; $nofollow = $settings['link']['nofollow'] ? ' rel="nofollow"' : ''; } $migrated = isset( $settings['__fa4_migrated']['icon_button'] ); $is_new = empty( $settings['icon_bt'] ); if ($settings['image'] != '') { $url = esc_attr($settings['image']['url']); $image = sprintf( '<img src="%1s" alt="image">',$url); } ?> <div class="tficonbox <?php echo esc_attr($settings['position']); ?>"> <?php if ($settings['icon_style'] == 'icon'): ?> <div class="wrap-icon <?php echo esc_attr($settings['icon_showcase']); ?>"> <div class="wrap-icon-inner <?php echo esc_attr($animation_icon); ?> <?php echo esc_attr($settings['icon_style']); ?> <?php echo esc_attr($settings['icon_animation']); ?>"> <?php \Elementor\Icons_Manager::render_icon( $settings['icon'], [ 'aria-hidden' => 'true' ] ); ?> </div> </div> <?php elseif($settings['icon_style'] == 'image'): ?> <div class="wrap-image"> <?php echo $image; ?> </div> <?php endif; ?> <div class="content"> <div class="inner"> <<?php echo esc_attr($settings['title_tag']);?> class="title"><?php echo esc_attr($settings['title_text']); ?></<?php echo esc_attr($settings['title_tag']);?>> <?php echo sprintf('<div class="description">%s</div>', $settings['description_text']); ?> </div> </div> </div> <?php } }