D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
cwd
/
wp-content
/
plugins
/
aeen-core
/
elementor
/
main-slider
/
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_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 = __( 'About Box', 'aeen-core' ); $this->rt_base = 'rt-about-box'; parent::__construct( $data, $args ); } public function rt_fields(){ $fields = array( array( 'id' => 'sec_about_box', 'mode' => 'section_start', 'label' => __( 'About Box', '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', ), // Title array( 'id' => 'title', 'type' => Controls_Manager::TEXT, 'label' => __( 'Title', 'aeen-core' ), 'default' => 'Title', 'label_block' => true, ), array( 'id' => 'text', 'type' => Controls_Manager::TEXTAREA, 'label' => __( 'Text', 'aeen-core' ), 'default' => 'Grursus mal suada faci Lorem ipsum the dolarorit the more a ametion area at consectetur elit.', 'label_block' => true, ), array( 'id' => 'link_text', 'type' => Controls_Manager::TEXT, 'label' => __( 'Link Text', 'aeen-core' ), 'default' => 'Read More', 'label_block' => true, ), array( 'id' => 'url', 'type' => Controls_Manager::URL, 'label' => __( 'Link', 'aeen-core' ), 'placeholder' => 'https://your-link.com', ), array( 'id' => 'align', 'mode' => 'responsive', 'type' => Controls_Manager::CHOOSE, 'label' => __( 'Alignment', 'aeen-core' ), 'options' => $this->rt_alignment_options(), 'default' => 'left', 'selectors' => [ '{{WRAPPER}} .section-heading' => 'text-align: {{VALUE}};', ], ), array( 'mode' => 'section_end', ), array( 'id' => 'sec_style', 'mode' => 'section_start', 'tab' => Controls_Manager::TAB_STYLE, 'label' => __( '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}} .common-about .item-title' => 'color: {{VALUE}}' ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'title_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .common-about .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}} .common-about p' => 'color: {{VALUE}}' ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'text_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .common-about 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', ), ); 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 ); } }