%PDF- %PDF-
Direktori : /home/opti/www/stlc/wp-content/plugins/insur-addon/includes/Widgets/ |
Current File : /home/opti/www/stlc/wp-content/plugins/insur-addon/includes/Widgets/Team.php |
<?php namespace Layerdrops\Insur\Widgets; class Team extends \Elementor\Widget_Base { public function get_name() { return 'insur-team'; } public function get_title() { return __('Team', 'insur-addon'); } public function get_icon() { return 'eicon-cogs'; } public function get_categories() { return ['insur-category']; } protected function register_controls() { $this->start_controls_section( 'layout_section', [ 'label' => __('Layout', 'insur-addon'), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'layout_type', [ 'label' => __('Select Layout', 'insur-addon'), 'type' => \Elementor\Controls_Manager::SELECT2, 'default' => 'layout_one', 'options' => [ 'layout_one' => __('Layout One', 'insur-addon'), 'layout_two' => __('Layout Two', 'insur-addon'), 'layout_three' => __('Layout Three', 'insur-addon'), 'layout_four' => __('Layout Four', 'insur-addon'), 'layout_five' => __('Layout Five', 'insur-addon'), ] ] ); $this->end_controls_section(); $this->start_controls_section( 'section_content', [ 'label' => __('Content', 'insur-addon'), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, 'condition' => [ 'layout_type' => ['layout_one', 'layout_two', 'layout_three', 'layout_four'] ] ] ); $this->add_control( 'sec_title', [ 'label' => __('Section Title', 'insur-addon'), 'type' => \Elementor\Controls_Manager::TEXTAREA, 'placeholder' => __('Add Title', 'insur-addon'), 'default' => __('Awesome Title', 'insur-addon'), 'condition' => [ 'layout_type' => ['layout_one', 'layout_two'] ] ] ); $this->add_control( 'sec_sub_title', [ 'label' => __('Section Sub Title', 'insur-addon'), 'type' => \Elementor\Controls_Manager::TEXTAREA, 'placeholder' => __('Add Sub Title', 'insur-addon'), 'default' => __('Awesome Sub Title', 'insur-addon'), 'condition' => [ 'layout_type' => ['layout_one', 'layout_two'] ] ] ); $this->add_control( 'sub_title_left_shape', [ 'label' => __('Sub Title Left Shape', 'insur-addon'), 'type' => \Elementor\Controls_Manager::MEDIA, 'default' => [], ] ); $this->add_control( 'sub_title_right_shape', [ 'label' => __('Sub Title Right Shape', 'insur-addon'), 'type' => \Elementor\Controls_Manager::MEDIA, 'default' => [], ] ); $team = new \Elementor\Repeater(); $team->add_control( 'name', [ 'label' => __('Name', 'insur-addon'), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => __('Thomas Jakson', 'insur-addon'), 'label_block' => true, ] ); $team->add_control( 'url', [ 'label' => __('Url', 'insur-addon'), 'type' => \Elementor\Controls_Manager::URL, 'placeholder' => __('#', 'insur-addon'), 'show_external' => true, 'default' => [ 'url' => '#', 'is_external' => true, 'nofollow' => true, ], 'show_label' => false, ] ); $team->add_control( 'designation', [ 'label' => __('Designation', 'insur-addon'), 'type' => \Elementor\Controls_Manager::TEXT, 'label_block' => true, 'default' => __('MANAGER', 'insur-addon'), ] ); $team->add_control( 'image', [ 'label' => __('Image', 'insur-addon'), 'type' => \Elementor\Controls_Manager::MEDIA, 'default' => [], ] ); $team->add_control( 'social_network', [ 'label' => __('Social NetWork', 'insur-addon'), 'type' => \Elementor\Controls_Manager::CODE, 'label_block' => true, 'default' => wp_kses('<li><a href="#"><i class="fab fa-facebook-f"></i></a></li>', 'insur_allowed_tags') ] ); $this->add_control( 'team_items', [ 'label' => __('Team', 'insur-addon'), 'type' => \Elementor\Controls_Manager::REPEATER, 'fields' => $team->get_controls(), 'prevent_empty' => false, 'title_field' => '{{{ name }}}', ] ); $this->add_control( 'bottom_content', [ 'label' => __('Bottom Content', 'insur-addon'), 'type' => \Elementor\Controls_Manager::TEXTAREA, 'placeholder' => __('Add Bottom Content', 'insur-addon'), 'default' => wp_kses(__('Contact Our Expert Team Memeber To Take Our <span>Best Policies</span>', 'insur-addon'), 'insur_allowed_tags'), 'condition' => [ 'layout_type' => 'layout_one' ] ] ); $this->end_controls_section(); $this->start_controls_section( 'section_background', [ 'label' => __('Background', 'insur-addon'), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, 'condition' => [ 'layout_type' => 'layout_one' ] ] ); $this->add_control( 'shape', [ 'label' => esc_html__('Shape', 'insur-addon'), 'type' => \Elementor\Controls_Manager::MEDIA, 'default' => [], ] ); $this->end_controls_section(); $this->start_controls_section( 'layout_five_section_content', [ 'label' => __('Content', 'insur-addon'), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, 'condition' => [ 'layout_type' => 'layout_five' ] ] ); $this->add_control( 'layout_five_name', [ 'label' => __('Name', 'insur-addon'), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => __('Jessica Brown', 'insur-addon'), 'label_block' => true, ] ); $this->add_control( 'layout_five_designation', [ 'label' => __('Designation', 'insur-addon'), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => __('Co founder & CEO ', 'insur-addon'), 'label_block' => true, ] ); $this->add_control( 'layout_five_highlighted_text', [ 'label' => __('Highlighted Text', 'insur-addon'), 'type' => \Elementor\Controls_Manager::TEXTAREA, 'default' => __('Add Highlighted Text', 'insur-addon'), 'label_block' => true, ] ); $this->add_control( 'layout_five_content', [ 'label' => __('Content', 'insur-addon'), 'type' => \Elementor\Controls_Manager::TEXTAREA, 'default' => __('Default Content', 'insur-addon'), 'label_block' => true, ] ); $this->add_control( 'layout_five_big_text', [ 'label' => __('Big Text', 'insur-addon'), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => __('JESSICA', 'insur-addon'), 'label_block' => true, ] ); $this->add_control( 'layout_five_image', [ 'label' => esc_html__('Image', 'insur-addon'), 'type' => \Elementor\Controls_Manager::MEDIA, 'default' => [], ] ); $layout_five_social_icons = new \Elementor\Repeater(); $layout_five_social_icons->add_control( 'social_icon', [ 'label' => __('Select Icon', 'insur-addon'), 'type' => \Elementor\Controls_Manager::ICONS, 'default' => [ 'value' => 'fab fa-facebook-f', 'library' => 'brands', ], ] ); $layout_five_social_icons->add_control( 'social_url', [ 'label' => __('Add Url', 'insur-addon'), 'type' => \Elementor\Controls_Manager::URL, 'placeholder' => __('#', 'insur-addon'), 'show_external' => true, 'default' => [ 'url' => '#', 'is_external' => true, 'nofollow' => true, ], 'show_label' => false, ] ); $this->add_control( 'layout_five_social_icons', [ 'label' => __('Social Icons', 'insur-addon'), 'type' => \Elementor\Controls_Manager::REPEATER, 'fields' => $layout_five_social_icons->get_controls(), 'prevent_empty' => false, 'default' => [ [ 'social_url' => [ 'url' => '#', 'is_external' => true, 'nofollow' => true, ], ], ], ] ); $this->end_controls_section(); //General style $this->start_controls_section( 'general_style', [ 'label' => esc_html__('Style Options', 'insur-addon'), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); insur_typo_and_color_options($this, 'Section Title', '{{WRAPPER}} .section-title__title', ['layout_one', 'layout_two']); insur_typo_and_color_options($this, 'Section Sub Title', '{{WRAPPER}} .section-sub-title', ['layout_one', 'layout_two']); insur_typo_and_color_options($this, 'Name', '{{WRAPPER}} .team-one__name a, {{WRAPPER}} .team-details__top-name', ['layout_one', 'layout_two', 'layout_three', 'layout_four', 'layout_five']); insur_typo_and_color_options($this, 'Designation', '{{WRAPPER}} .team-one__sub-title, {{WRAPPER}} .team-details__top-title', ['layout_one', 'layout_two', 'layout_three', 'layout_four', 'layout_five']); insur_typo_and_color_options($this, 'Highlighted Text', '{{WRAPPER}} .team-details__top-text-1', ['layout_five']); insur_typo_and_color_options($this, 'Content', '{{WRAPPER}} .team-details__top-text-2, {{WRAPPER}} .team-details__top-text-3', ['layout_five']); insur_typo_and_color_options($this, 'Bottom Content', '{{WRAPPER}} .team-one__bottom-text', ['layout_one']); $this->end_controls_section(); insur_get_elementor_carousel_options($this, ['layout_four']); } protected function render() { $settings = $this->get_settings_for_display(); include insur_get_template('team-one.php'); include insur_get_template('team-two.php'); include insur_get_template('team-three.php'); include insur_get_template('team-four.php'); include insur_get_template('team-five.php'); } }