D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
proc
/
self
/
cwd
/
wp-content
/
plugins
/
aeen-core
/
elementor
/
cta
/
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\Utils; use Elementor\Widget_Base; use Elementor\Controls_Manager; use Elementor\Group_Control_Border; use Elementor\Group_Control_Typography; use Elementor\Group_Control_Background; if ( ! defined( 'ABSPATH' ) ) exit; class Rt_Cta extends Custom_Widget_Base { public function __construct( $data = [], $args = null ){ $this->rt_name = __( 'RT CTA', 'aeen-core' ); $this->rt_base = 'rt-cta'; parent::__construct( $data, $args ); } public function rt_fields(){ $fields = array( array( 'id' => 'sec_cta', 'mode' => 'section_start', 'label' => __( 'Call To Action', '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' ), 'style3' => esc_html__( 'Style 3', 'aeen-core' ), ), 'default' => 'style1', ), // Title array( 'id' => 'cta_title', 'type' => Controls_Manager::TEXTAREA, 'label' => __( 'Title', 'aeen-core' ), 'default' => esc_html__( 'Put Text 1 ', 'aeen-core' ), ), array( 'id' => 'cta_sub_title', 'type' => Controls_Manager::TEXT, 'label' => __( 'Sub Title', 'aeen-core' ), 'default' => esc_html__( '20 Years', 'aeen-core' ), 'label_block' => true, 'condition' => array( 'style' => 'style2' ), ), array( 'id' => 'cta_desc', 'type' => Controls_Manager::TEXTAREA, 'label' => __( 'Description', 'aeen-core' ), 'default' => __( 'Grursus mal suada faci lisis Lorem ipsum dolarorit more a ametion consectetur elit. Vesti at bulum nec odio that dolocons suada and fadolorit consectetur elit.', 'aeen-core' ), 'condition' => array( 'style' => 'style2' ), ), array( 'id' => 'cta_btn_txt', 'type' => Controls_Manager::TEXT, 'label' => __( 'Button Text', 'aeen-core' ), 'default' => __( 'Free Consultation', 'aeen-core' ), 'label_block' => true, 'condition' => array( 'style' => array( 'style1', 'style2' ) ), ), array( 'id' => 'cta_btn_link', 'type' => Controls_Manager::URL, 'label' => __( 'Link', 'aeen-core' ), 'placeholder' => 'https://your-link.com', 'condition' => array( 'style' => array( 'style1', 'style2' ) ), ), array( 'id' => 'cta_phone', 'type' => Controls_Manager::TEXT, 'label' => __( 'Phone', 'aeen-core' ), 'default' => __( '+1 (123) 1234 567', 'aeen-core' ), 'label_block' => true, 'condition' => array( 'style' => 'style3' ), ), array( 'id' => 'cta_email', 'type' => Controls_Manager::TEXT, 'label' => __( 'Email', 'aeen-core' ), 'default' => __( 'Contact@Attornasite.co', 'aeen-core' ), 'label_block' => true, 'condition' => array( 'style' => 'style3' ), ), array( 'id' => 'cta_open_time', 'type' => Controls_Manager::TEXT, 'label' => __( 'Open Time', 'aeen-core' ), 'default' => __( 'Mon – Fri 09:00-17:00', 'aeen-core' ), 'label_block' => true, 'condition' => array( 'style' => 'style3' ), ), array( 'type' => Controls_Manager::MEDIA, 'id' => 'cta_bg_image', 'label' => esc_html__( 'Background Image', 'aeen-core' ), 'description' => esc_html__( 'Recommended image Background', 'aeen-core' ), 'condition' => array( 'style' => 'style1' ), ), array( 'mode' => 'section_end', ), array( 'id' => 'cta_style', 'mode' => 'section_start', 'tab' => Controls_Manager::TAB_STYLE, 'label' => __( 'Style', 'aeen-core' ), ), // Title array( 'id' => 'txt_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Title Style', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'txt_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .call-to-action-box-layout2 .item-title span.cta_title' => 'color: {{VALUE}}', '{{WRAPPER}} .call-to-action-box-layout3 .item-title' => 'color: {{VALUE}}', '{{WRAPPER}} .call-to-action-box-layout1 .item-title' => 'color: {{VALUE}}', ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'text_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .call-to-action-box-layout2 .item-title span.cta_title, {{WRAPPER}} .call-to-action-box-layout3 .item-title, {{WRAPPER}} .call-to-action-box-layout1 .item-title', ), // Sub Title array( 'id' => 'subtitle_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Sub Title Style', 'aeen-core' ), 'separator' => 'before', 'condition' => array( 'style' => array( 'style1', 'style2' ) ), ), array( 'id' => 'subtitle_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .call-to-action-box-layout2 .item-title' => 'color: {{VALUE}}', ), 'condition' => array( 'style' => array( 'style1', 'style2' ) ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'subtitle_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .call-to-action-box-layout2 .item-title', 'condition' => array( 'style' => array( 'style1', 'style2' ) ), ), // Description array( 'id' => 'desc_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Description Style', 'aeen-core' ), 'separator' => 'before', 'condition' => array( 'style' => array( 'style1', 'style2' ) ), ), array( 'id' => 'desc_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .call-to-action-box-layout2 p' => 'color: {{VALUE}}', ), 'condition' => array( 'style' => array( 'style1', 'style2' ) ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'desc_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .call-to-action-box-layout2 p', 'condition' => array( 'style' => array( 'style1', 'style2' ) ), ), // Button array( 'id' => 'btn_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Button Style', 'aeen-core' ), 'separator' => 'before', 'condition' => array( 'style' => array( 'style1', 'style2' ) ), ), array( 'id' => 'btn_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .call-to-action-box-layout2 .btn-fill' => 'color: {{VALUE}}' ), 'condition' => array( 'style' => array( 'style1', 'style2' ) ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'btn_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .call-to-action-box-layout2 .btn-fill', 'condition' => array( 'style' => array( 'style1', 'style2' ) ), ), array( 'name' => 'btn_bgcolor', 'mode' => 'group', 'type' => Group_Control_Background::get_type(), 'label' => __( 'Background', 'aeen-core' ), 'selector' => '{{WRAPPER}} .call-to-action-box-layout2 .btn-fill', 'condition' => array( 'style' => array( 'style1', 'style2' ) ), ), array( 'name' => 'btn_border', 'mode' => 'group', 'type' => Group_Control_Border::get_type(), 'label' => __( 'Border', 'aeen-core' ), 'selector' => '{{WRAPPER}} .call-to-action-box-layout2 .btn-fill', 'condition' => array( 'style' => array( 'style1', 'style2' ) ), ), array( 'id' => 'btn_h_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Button Hover Style', 'aeen-core' ), 'separator' => 'before', 'condition' => array( 'style' => array( 'style1', 'style2' ) ), ), array( 'id' => 'btn_h_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .call-to-action-box-layout2 .btn-fill:hover' => 'color: {{VALUE}}' ), 'condition' => array( 'style' => array( 'style1', 'style2' ) ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'description_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .call-to-action-box-layout2 .btn-fill:hover', 'condition' => array( 'style' => array( 'style1', 'style2' ) ), ), array( 'name' => 'btn_h_bgcolor', 'mode' => 'group', 'type' => Group_Control_Background::get_type(), 'label' => __( 'Background', 'aeen-core' ), 'selector' => '{{WRAPPER}} .call-to-action-box-layout2 .btn-fill:hover', 'condition' => array( 'style' => array( 'style1', 'style2' ) ), ), array( 'name' => 'btn_h_border', 'mode' => 'group', 'type' => Group_Control_Border::get_type(), 'label' => __( 'Border', 'aeen-core' ), 'selector' => '{{WRAPPER}} .call-to-action-box-layout2 .btn-fill:hover', 'condition' => array( 'style' => array( 'style1', 'style2' ) ), ), // Phone Style array( 'id' => 'phone_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Phone Style', 'aeen-core' ), 'separator' => 'before', 'condition' => array( 'style' => 'style3' ), ), array( 'id' => 'phone_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .call-to-action-box-layout3 .sub-title span a' => 'color: {{VALUE}}', ), 'condition' => array( 'style' => 'style3' ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'phone_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .call-to-action-box-layout3 .sub-title span', 'condition' => array( 'style' => 'style3' ), ), // Email Style array( 'id' => 'email_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Info Style', 'aeen-core' ), 'separator' => 'before', 'condition' => array( 'style' => 'style3' ), ), array( 'id' => 'email_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .call-to-action-box-layout3 .list-info li' => 'color: {{VALUE}}', ), 'condition' => array( 'style' => 'style3' ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'email_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .call-to-action-box-layout3 .list-info li', 'condition' => array( 'style' => 'style3' ), ), array( 'mode' => 'section_end', ), ); return $fields; } protected function render() { $data = $this->get_settings(); switch ($data['style']) { case 'style2': $template = 'view-2'; break; case 'style3': $template = 'view-3'; break; default: $template = 'view-1'; break; } return $this->rt_template( $template, $data ); } }