D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
proc
/
self
/
cwd
/
wp-content
/
plugins
/
aeen-core
/
elementor
/
about-box
/
Filename :
class.php
back
Copy
<?php /** * This file can be overridden by copying it to yourtheme/elementor-custom/about-box/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 About_Box extends Custom_Widget_Base { public function __construct( $data = [], $args = null ){ $this->rt_name = __( 'RT About Info', 'aeen-core' ); $this->rt_base = 'rt-about-box'; parent::__construct( $data, $args ); } public function rt_fields(){ $repeater = new \Elementor\Repeater(); $repeater->add_control( 'skill_title', [ 'type' => Controls_Manager::TEXT, 'label' => esc_html__( 'Skill Name', 'aeen-core' ), 'default' => esc_html__( 'Business Law', 'aeen-core' ), ] ); $repeater->add_control( 'skill_number', [ 'type' => Controls_Manager::NUMBER, 'label' => esc_html__( 'Counter Number', 'aeen-core' ), 'default' => 75, ] ); $fields = array( array( 'mode' => 'section_start', 'id' => 'sec_general', 'label' => esc_html__( 'General', 'aeen-core' ), ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'style', 'label' => esc_html__( 'About Info', 'aeen-core' ), 'options' => array( 'style1' => esc_html__( 'About Info 1' , 'aeen-core' ), 'style2' => esc_html__( 'About Info 2' , 'aeen-core' ), ), 'default' => 'style1', ), array( 'type' => Controls_Manager::TEXT, 'id' => 'title', 'label' => esc_html__( 'Title', 'aeen-core' ), 'default' => esc_html__( 'Welcome to Lawzone Lawyers', 'aeen-core' ), ), array( 'type' => Controls_Manager::TEXT, 'id' => 'sub_title', 'label' => esc_html__( 'Sub Title', 'aeen-core' ), 'default' => esc_html__( 'About me', 'aeen-core' ), ), array( 'type' => Controls_Manager::TEXT, 'id' => 'name', 'label' => esc_html__( 'Name', 'aeen-core' ), 'default' => 'David Leeu', ), array( 'type' => Controls_Manager::MEDIA, 'id' => 'image', 'label' => __( 'Image', 'aeen-core' ), 'description' => __( 'Recommended image size is 530x745 px', 'aeen-core' ), ), array( 'type' => Controls_Manager::WYSIWYG, 'id' => 'content', 'label' => esc_html__( 'Content', 'aeen-core' ), 'default' => esc_html__('Grursus mal suada faci lisis Lorem dolarorit more the as ametion consectetur elit. Vesti at bulum odio aea the dumm ipsumm ipsum that dolocons rsus mal more the consectetur elit. All the that Lorem Ipsum generators Internet tend repeat predefined chunks as necessary.', 'aeen-core' ), ), array( 'type' => Controls_Manager::MEDIA, 'id' => 'signature_image', 'label' => __( 'Signature Image', 'aeen-core' ), 'description' => __( 'Recommended image size is 151x48 px', 'aeen-core' ), ), array( 'type' => Controls_Manager::TEXT, 'id' => 'author_name', 'label' => esc_html__( 'Author Name', 'aeen-core' ), 'default' => esc_html__( 'Michael Holmes', 'aeen-core' ), ), array( 'type' => Controls_Manager::TEXT, 'id' => 'designation', 'label' => esc_html__( 'Designation', 'aeen-core' ), 'default' => 'Ceo, Ab Tact', ), array( 'mode' => 'section_end', ), array( 'mode' => 'section_start', 'id' => 'sec_skills', 'label' => esc_html__( 'Skills', 'aeen-core' ), ), array( 'type' => Controls_Manager::TEXT, 'id' => 'skill_title', 'label' => esc_html__( 'Title', 'aeen-core' ), 'default' => esc_html__( 'Lawzone Skills', 'aeen-core' ), ), array( 'type' => Controls_Manager::TEXTAREA, 'id' => 'skill_content', 'label' => esc_html__( 'Content', 'aeen-core' ), 'default' => esc_html__( 'Grursus mal suada faci lisis Lorem dolarorit more the as ametion consectetur elit.', 'aeen-core' ), ), // Skills Repeater array ( 'type' => Controls_Manager::REPEATER, 'id' => 'skills', 'label' => esc_html__( 'Add as many boxes as you want', 'aeen-core' ), 'fields' => $repeater->get_controls(), 'default' => [ ['skill_title' => __( 'Business Law', 'aeen-core' ) ], ['skill_title' => __( 'Family Law', 'aeen-core' ) ], ['skill_title' => __( 'Traffic Law', 'aeen-core' ) ], ['skill_title' => __( 'Property law', 'aeen-core' ) ], ], ), array( 'mode' => 'section_end', ), // Skill options array( 'mode' => 'section_start', 'id' => 'sec_options', 'label' => esc_html__( 'Slide Options', 'aeen-core' ), ), array( 'type' => Controls_Manager::NUMBER, 'id' => 'animation_delay', 'label' => esc_html__( 'Animation Delay', 'aeen-core' ), 'default' => 1, 'description' => esc_html__( 'Animation Delay in Seconds. Default: 1s', 'aeen-core' ), ), array( 'type' => Controls_Manager::NUMBER, 'id' => 'duration', 'label' => esc_html__( 'Animation Duration', 'aeen-core' ), 'default' => 1.5, 'description' => esc_html__( 'Animation Duration in Seconds. Default: 1.5s', 'aeen-core' ), ), array( 'mode' => 'section_end', ), array( 'id' => 'sec_style', 'mode' => 'section_start', 'tab' => Controls_Manager::TAB_STYLE, 'label' => __( 'About Info Style', 'aeen-core' ), ), array( 'id' => 'title_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Title Style', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'title_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .about-box-layout6 h2.item-title' => 'color: {{VALUE}}' ), ), array( 'id' => 'title_name_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Title Name Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .about-box-layout6 .item-title span' => 'color: {{VALUE}}' ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'title_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .about-box-layout6 h2.item-title', ), array( 'id' => 'text_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Sub Title Style', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'text_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .about-box-layout6 .sub-title' => 'color: {{VALUE}}' ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'text_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .about-box-layout6 .sub-title', ), array( 'id' => 'abcon_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Content Style', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'desc_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .about-box-layout6 > p' => 'color: {{VALUE}}' ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'desc_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .about-box-layout6 > p', ), array( 'id' => 'link_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Link', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'link_text_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .common-about .common-link' => 'color: {{VALUE}}' ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'link_text_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .common-about .common-link', ), array( 'mode' => 'section_end', ), array( 'id' => 'signature_style', 'mode' => 'section_start', 'tab' => Controls_Manager::TAB_STYLE, 'label' => __( 'Signature Style', 'aeen-core' ), ), array( 'id' => 'sig_name_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Name Style', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'sig_name_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .about-box-layout6 .about-info .item-title' => 'color: {{VALUE}}' ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'sig_name_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .about-box-layout6 .about-info .item-title', ), array( 'id' => 'sig_des_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Designation Style', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'sig_des_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .about-box-layout6 .about-info p' => 'color: {{VALUE}}' ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'sig_des_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .about-box-layout6 .about-info p', ), array( 'mode' => 'section_end', ), array( 'id' => 'skills_style', 'mode' => 'section_start', 'tab' => Controls_Manager::TAB_STYLE, 'label' => __( 'Skills Style', 'aeen-core' ), ), array( 'id' => 'skills_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Title Style', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'skills_title_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .about-box-layout7 .item-title' => 'color: {{VALUE}}' ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'skills_title_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .about-box-layout7 .item-title', ), array( 'id' => 'skills_con_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Content Style', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'skills_con_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .about-box-layout7 p' => 'color: {{VALUE}}' ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'skills_con_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .about-box-layout7 p', ), array( 'mode' => 'section_end', ), array( 'id' => 'bar_style', 'mode' => 'section_start', 'tab' => Controls_Manager::TAB_STYLE, 'label' => __( 'Bar Style', 'aeen-core' ), ), array( 'id' => 'bar_title_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Title Style', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'bar_title_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .about-box-layout7 .about-skill .progress .lead' => 'color: {{VALUE}}' ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'bar_title_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .about-box-layout7 .about-skill .progress .lead', ), array( 'id' => 'bar_percent_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Percent Style', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'bar_percent_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .about-box-layout7 .about-skill .progress-bar > span' => 'color: {{VALUE}}' ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'bar_percent_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .about-box-layout7 .about-skill .progress-bar > span', ), array( 'id' => 'bar_bg_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Bar Background', 'aeen-core' ), 'separator' => 'before', ), array( 'name' => 'bar_border', 'mode' => 'group', 'type' => Group_Control_Border::get_type(), 'label' => __( 'Border', 'aeen-core' ), 'selector' => '{{WRAPPER}} .about-box-layout7 .about-skill .progress', ), array( 'id' => 'bar_bg', 'type' => Controls_Manager::COLOR, 'label' => __( 'Background color', 'aeen-core' ), 'default' => '', 'selectors' => array( '{{WRAPPER}} .about-box-layout7 .about-skill .progress-bar' => 'background-color: {{VALUE}}', ), ), 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 ); } }