D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
proc
/
self
/
cwd
/
wp-content
/
plugins
/
aeen-core
/
elementor
/
banner
/
Filename :
class.php
back
Copy
<?php /** * This file can be overridden by copying it to yourtheme/elementor-custom/title/class.php * * @author RadiusTheme * @since 1.0 * @version 1.0 */ namespace radiustheme\Aeen_Core; use Elementor\Widget_Base; use Elementor\Controls_Manager; use Elementor\Group_Control_Typography; use Elementor\Group_Control_Background; if ( ! defined( 'ABSPATH' ) ) exit; class Banner extends Custom_Widget_Base { public function __construct( $data = [], $args = null ){ $this->rt_name = __( 'Banner', 'aeen-core' ); $this->rt_base = 'rt-banner'; parent::__construct( $data, $args ); } public function rt_fields(){ $fields = array( array( 'id' => 'sec_general', 'mode' => 'section_start', 'label' => __( 'Banner', 'aeen-core' ), ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'style', 'label' => esc_html__( 'Style', 'aeen-core' ), 'options' => array( 'style1' => esc_html__( 'Style 1', 'aeen-core' ), 'style2' => esc_html__( 'Style 2', 'aeen-core' ), ), 'default' => 'style1', ), array( 'name' => 'bgcolor', 'mode' => 'group', 'type' => Group_Control_Background::get_type(), 'label' => __( 'Background Color', 'aeen-core' ), 'types' => [ 'classic', 'gradient', 'video' ], 'selector' => '{{WRAPPER}} .main-banner-layout4.primary-bg-4', 'condition' => array( 'style' => array( 'style2' ) ), ), // Background Image 1 array( 'type' => Controls_Manager::MEDIA, 'id' => 'bg_image1', 'label' => esc_html__( 'Image 1', 'aeen-core' ), 'default' => [ 'url' => $this->rt_placeholder_image(), ], 'description' => esc_html__( 'Recommended full image', 'aeen-core' ), 'condition' => array( 'style' => array( 'style2' ) ), ), // Background Image 2 array( 'type' => Controls_Manager::MEDIA, 'id' => 'bg_image2', 'label' => esc_html__( 'Image 2', 'aeen-core' ), 'default' => [ 'url' => $this->rt_placeholder_image(), ], 'description' => esc_html__( 'Recommended full image', 'aeen-core' ), 'condition' => array( 'style' => array( 'style2' ) ), ), // Title array( 'id' => 'title', 'type' => Controls_Manager::TEXTAREA, 'label' => __( 'Title', 'aeen-core' ), 'default' => __( 'Law Theme', 'aeen-core' ), 'label_block' => true, ), // Sub Title array( 'id' => 'sub_title', 'type' => Controls_Manager::TEXT, 'label' => __( 'Sub Title', 'aeen-core' ), 'default' => __( 'PROFESSIONAL', 'aeen-core' ), 'label_block' => true, 'condition' => array( 'style' => array( 'style1' ) ), ), // Description array( 'id' => 'desc', 'type' => Controls_Manager::TEXTAREA, 'label' => __( 'Description', 'aeen-core' ), 'default' => __( 'Grursus mal suada faci lisis Lorem ipsum dolarorit more a ametion consectetu dolocons mal consectetur elit.', 'aeen-core') ), // Button array( 'type' => Controls_Manager::TEXT, 'id' => 'btntext', 'label' => __( 'Button Text', 'aeen-core' ), 'default' => __( 'Free Consultation', 'aeen-core' ), 'label_block' => true, ), array( 'type' => Controls_Manager::URL, 'id' => 'url', 'label' => __( 'Button Link', 'aeen-core' ), 'placeholder' => 'https://your-link.com', ), // Phone array( 'id' => 'phone', 'type' => Controls_Manager::TEXT, 'label' => __( 'Phone', 'aeen-core' ), 'default' => __( '018 451 756 8499', 'aeen-core' ), 'label_block' => true, 'condition' => array( 'style' => array( 'style1' ) ), ), array( 'type' => Controls_Manager::ICONS, 'id' => 'icon', 'label' => esc_html__( 'Icon', 'aeen-core' ), 'default' => [ 'value' => 'fas fa-phone', 'library' => 'fa-solid', ], 'condition' => array( 'style' => array( 'style1' ) ), ), // Phone array( 'id' => 'email', 'type' => Controls_Manager::TEXT, 'label' => __( 'Email', 'aeen-core' ), 'default' => __( 'info@company.com', 'aeen-core' ), 'label_block' => true, 'condition' => array( 'style' => array( 'style1' ) ), ), array( 'mode' => 'section_end', ), array( 'id' => 'sec_title_style', 'mode' => 'section_start', 'tab' => Controls_Manager::TAB_STYLE, 'label' => __( 'Title', 'aeen-core' ), ), array( 'id' => 'title_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .main-banner-layout3 .banner-content-3 .main-title' => 'color: {{VALUE}}', '{{WRAPPER}} .main-banner-layout4 .content-box-4 h1' => 'color: {{VALUE}}', ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'title_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .main-banner-layout3 .banner-content-3 .main-title{{WRAPPER}}, .main-banner-layout4 .content-box-4 h1', ), array( 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'id' => 'title_padding', 'mode' => 'responsive', 'label' => esc_html__( 'Padding', 'salion-core' ), 'selectors' => array( '{{WRAPPER}} .main-banner-layout3 .banner-content-3 .main-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', '{{WRAPPER}} .main-banner-layout4 .content-box-4 h1' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ), 'separator' => 'before', ), array( 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'mode' => 'responsive', 'id' => 'title_margin', 'label' => esc_html__( 'Margin', 'salion-core' ), 'selectors' => array( '{{WRAPPER}} .main-banner-layout3 .banner-content-3 .main-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', '{{WRAPPER}} .main-banner-layout4 .content-box-4 h1' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ), 'separator' => 'before', ), array( 'mode' => 'section_end', ), array( 'id' => 'sub_title_style', 'mode' => 'section_start', 'tab' => Controls_Manager::TAB_STYLE, 'label' => __( 'Sub Title', 'aeen-core' ), 'condition' => array( 'style' => array( 'style1' ) ), ), array( 'id' => 'sub_title_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .main-banner-layout3 .banner-content-3 .sub-title' => 'color: {{VALUE}}' ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'sub_title_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .main-banner-layout3 .banner-content-3 .sub-title', ), array( 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'id' => 'sub_title_padding', 'mode' => 'responsive', 'label' => esc_html__( 'Padding', 'salion-core' ), 'selectors' => array( '{{WRAPPER}} .main-banner-layout3 .banner-content-3 .sub-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ), 'separator' => 'before', ), array( 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'mode' => 'responsive', 'id' => 'sub_title_margin', 'label' => esc_html__( 'Margin', 'salion-core' ), 'selectors' => array( '{{WRAPPER}} .main-banner-layout3 .banner-content-3 .sub-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ), 'separator' => 'before', ), array( 'mode' => 'section_end', ), array( 'id' => 'sec_desc_style', 'mode' => 'section_start', 'tab' => Controls_Manager::TAB_STYLE, 'label' => __( 'Description', 'aeen-core' ), ), array( 'id' => 'desc_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'default' => '', 'selectors' => array( '{{WRAPPER}} .main-banner-layout1 .banner-content .banner-paragraph' => 'color: {{VALUE}}' ), 'selectors' => array( '{{WRAPPER}} .main-banner-layout4 .content-box-4 p' => 'color: {{VALUE}}' ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'desc_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .main-banner-layout1 .banner-content .banner-paragraph, {{WRAPPER}} .main-banner-layout4 .content-box-4 p', ), array( 'mode' => 'section_end', ), array( 'id' => 'phone_email_style', 'mode' => 'section_start', 'tab' => Controls_Manager::TAB_STYLE, 'label' => __( 'Phone & Email', 'aeen-core' ), 'condition' => array( 'style' => array( 'style1' ) ), ), array( 'id' => 'phone_email_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .hero-company-info ul li a' => 'color: {{VALUE}}' ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'phone_email_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .hero-company-info ul li a', ), array( 'id' => 'phone_icon_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Icon Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .hero-company-info ul li i' => 'color: {{VALUE}}' ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'phone_icon_typo', 'label' => __( 'Icon Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .hero-company-info ul li i', ), array( 'mode' => 'section_end', ), array( 'id' => 'button_style', 'mode' => 'section_start', 'tab' => Controls_Manager::TAB_STYLE, 'label' => __( 'Button', 'aeen-core' ), ), array( 'id' => 'normal_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Normal', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'text_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .main-banner-layout3 .btn-fill' => 'color: {{VALUE}} !important', '{{WRAPPER}} .main-banner-layout4 .btn-fill' => 'color: {{VALUE}} !important', ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'button_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .main-banner-layout3 .btn-fill, {{WRAPPER}} .main-banner-layout4 .btn-fill', ), array( 'name' => 'btn_bg_color', 'mode' => 'group', 'type' => Group_Control_Background::get_type(), 'label' => __( 'Background', 'aeen-core' ), 'selector' => '{{WRAPPER}} .main-banner-layout3 .btn-fill, {{WRAPPER}} .main-banner-layout4 .btn-fill', ), array( 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'id' => 'button_padding', 'mode' => 'responsive', 'label' => esc_html__( 'Padding', 'salion-core' ), 'selectors' => array( '{{WRAPPER}} .main-banner-layout3 .btn-fill' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', '{{WRAPPER}} .main-banner-layout4 .btn-fill' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ), 'separator' => 'before', ), array( 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'mode' => 'responsive', 'id' => 'button_margin', 'label' => esc_html__( 'Margin', 'salion-core' ), 'selectors' => array( '{{WRAPPER}} .main-banner-layout3 .btn-fill' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', '{{WRAPPER}} .main-banner-layout4 .btn-fill' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ), 'separator' => 'before', ), array( 'id' => 'hover_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Hover', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'text_h_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .main-banner-layout3 .banner-content .btn-fill:hover' => 'color: {{VALUE}} !important', '{{WRAPPER}} .main-banner-layout4 .btn-fill:hover' => 'color: {{VALUE}} !important', ), ), array( 'name' => 'btn_hbg_color', 'mode' => 'group', 'type' => Group_Control_Background::get_type(), 'label' => __( 'Background', 'aeen-core' ), 'selector' => '{{WRAPPER}} .main-banner-layout3 .banner-content .btn-fill:before, {{WRAPPER}} .main-banner-layout4 .btn-fill:before', ), array( 'mode' => 'section_end', ), ); return $fields; } protected function render() { $data = $this->get_settings(); switch ($data['style']) { case 'style2': $template = 'view-2'; break; default: $template = 'view-1'; break; } return $this->rt_template( $template, $data ); } }