%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/DownloadApp.php |
<?php namespace Layerdrops\Insur\Widgets; class DownloadApp extends \Elementor\Widget_Base { public function get_name() { return 'insur-download-app'; } public function get_title() { return __('Download App', '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, 'condition' => [ 'layout_type' => 'layout_one' ] ] ); $this->add_control( 'title', [ 'label' => __('Title', 'insur-addon'), 'type' => \Elementor\Controls_Manager::TEXTAREA, 'placeholder' => __('Add Title', 'insur-addon'), 'default' => __('Download our application', 'insur-addon'), ] ); $this->add_control( 'sub_title', [ 'label' => __('Sub Title', 'insur-addon'), 'type' => \Elementor\Controls_Manager::TEXTAREA, 'placeholder' => __('Add Sub Title', 'insur-addon'), 'default' => __('Get our application free now! Protect yourself', 'insur-addon'), ] ); $button = new \Elementor\Repeater(); $button->add_control( 'button_title', [ 'label' => __('Button Title', 'insur-addon'), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => __(' Google Play', 'insur-addon'), 'label_block' => true, ] ); $button->add_control( 'button_sub_title', [ 'label' => __('Button Title', 'insur-addon'), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => __('Available on', 'insur-addon'), 'label_block' => true, ] ); $button->add_control( 'button_url', [ 'label' => __('Button Url', 'insur-addon'), 'type' => \Elementor\Controls_Manager::URL, 'placeholder' => __('#', 'insur-addon'), 'show_external' => true, 'default' => [ 'url' => '#', 'is_external' => true, 'nofollow' => true, ], 'show_label' => false, ] ); $button->add_control( 'icon', [ 'label' => __('Icon', 'insur-addon'), 'type' => \Elementor\Controls_Manager::ICONS, 'default' => [ 'value' => 'fa fa-play', 'library' => 'font-awesome', ], ] ); $this->add_control( 'button', [ 'label' => __('Button', 'insur-addon'), 'type' => \Elementor\Controls_Manager::REPEATER, 'fields' => $button->get_controls(), 'prevent_empty' => false, 'title_field' => '{{{ button_title }}}', ] ); $this->add_control( 'download_image', [ 'label' => __('Download Image', 'insur-addon'), 'type' => \Elementor\Controls_Manager::MEDIA, 'default' => [], ] ); $this->add_control( 'download_badge', [ 'label' => __('Download badge', 'insur-addon'), 'type' => \Elementor\Controls_Manager::MEDIA, 'default' => [], ] ); $this->add_control( 'bg_image', [ 'label' => __('Background Image', 'insur-addon'), 'type' => \Elementor\Controls_Manager::MEDIA, 'default' => [], ] ); $this->add_control( 'shape_one', [ 'label' => __('Shape One', 'insur-addon'), 'type' => \Elementor\Controls_Manager::MEDIA, 'default' => [], ] ); $this->add_control( 'shape_two', [ 'label' => __('Shape Two', 'insur-addon'), 'type' => \Elementor\Controls_Manager::MEDIA, 'default' => [], ] ); $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, 'Title', '{{WRAPPER}} .download__title', ['layout_one']); insur_typo_and_color_options($this, 'Sub Title', '{{WRAPPER}} .download__sub-title', ['layout_one']); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); include insur_get_template('download-app-one.php'); } }