%PDF- %PDF-
Direktori : /home/opti/public_html/stlc/wp-content/plugins/insur-addon/includes/Widgets/ |
Current File : /home/opti/public_html/stlc/wp-content/plugins/insur-addon/includes/Widgets/Sponsors.php |
<?php namespace Layerdrops\Insur\Widgets; class Sponsors extends \Elementor\Widget_Base { public function get_name() { return 'insur-sponsors'; } public function get_title() { return __('Sponsors', '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'), ] ] ); $this->end_controls_section(); $this->start_controls_section( 'content_section', [ 'label' => __('Content', 'insur-addon'), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'title', [ 'label' => __('Title', 'insur-addon'), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => __('Default Title', 'insur-addon'), 'condition' => [ 'layout_type' => 'layout_one' ] ] ); $sponsor_images = new \Elementor\Repeater(); $sponsor_images->add_control( 'image', [ 'label' => __('Add Image', 'insur-addon'), 'type' => \Elementor\Controls_Manager::MEDIA, ] ); $sponsor_images->add_control( 'link', [ 'label' => __('Add Link', 'insur-addon'), 'type' => \Elementor\Controls_Manager::TEXT, ] ); $this->add_control( 'sponsor_images', [ 'label' => __('Sponsor Items', 'insur-addon'), 'type' => \Elementor\Controls_Manager::REPEATER, 'fields' => $sponsor_images->get_controls(), 'prevent_empty' => false, ] ); $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, 'condition' => [ 'layout_type' => 'layout_one' ] ] ); insur_typo_and_color_options($this, 'Title', '{{WRAPPER}} .brand-one__title h2', ['layout_one']); $this->end_controls_section(); insur_get_elementor_carousel_options($this, ['layout_one', 'layout_two', 'layout_three']); } protected function render() { $settings = $this->get_settings_for_display(); include insur_get_template('sponsors-one.php'); } }