D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
proc
/
self
/
cwd
/
wp-content
/
plugins
/
aeen-core
/
elementor
/
image-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\Controls_Manager; use Elementor\Group_Control_Typography; use Elementor\Group_Control_Background; if ( ! defined( 'ABSPATH' ) ) exit; class Image_Box extends Custom_Widget_Base { public function __construct( $data = [], $args = null ){ $this->rt_name = __( 'RT Image Box', 'aeen-core' ); $this->rt_base = 'rt-image-box'; parent::__construct( $data, $args ); } public function rt_fields(){ $fields = array( array( 'id' => 'sec_image_box', 'mode' => 'section_start', 'label' => __( 'Image Box', 'aeen-core' ), ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'style', 'label' => esc_html__( 'Style', 'aeen-core' ), 'options' => array( 'style1' => esc_html__( 'Box 1', 'aeen-core' ), 'style2' => esc_html__( 'Box 2', 'aeen-core' ), 'style3' => esc_html__( 'Box 3', 'aeen-core' ), ), 'default' => 'style1', ), // Image 1 array( 'type' => Controls_Manager::MEDIA, 'id' => 'image1', 'label' => esc_html__( 'Image', 'aeen-core' ), 'default' => [ 'url' => $this->rt_placeholder_image(), ], 'description' => esc_html__( 'Recommended full image', 'aeen-core' ), ), array( 'type' => Controls_Manager::TEXT, 'id' => 'imgbox_title', 'label' => __( 'Title', 'aeen-core' ), 'default' => __( 'Banking Law', 'aeen-core' ), ), array( 'type' => Controls_Manager::TEXT, 'id' => 'imgbox_sub_title', 'label' => __( 'Sub Title', 'aeen-core' ), 'default' => __( 'Criminal Justice', 'aeen-core' ), ), array( 'type' => Controls_Manager::TEXTAREA, 'id' => 'imgbox_desc', 'label' => __( 'Description', 'aeen-core' ), 'default' => __( 'Grursus mal suada faci Lorem ipsum dolarorit more as ametion consectetur elit. Vesti at bulum odio aea the at dumm ipsumm ipsum that dolocons rsus mal suada is and fadolorit to consectetur elit.', 'aeen-core' ), ), array( 'type' => Controls_Manager::URL, 'id' => 'imgbox_btnurl', 'label' => esc_html__( 'Link', 'aeen-core' ), 'placeholder' => 'https://your-link.com', ), array( 'type' => Controls_Manager::SWITCHER, 'id' => 'imgbox_button_display', 'label' => esc_html__( 'Button Display', 'aeen-core' ), 'label_on' => esc_html__( 'On', 'aeen-core' ), 'label_off' => esc_html__( 'Off', 'aeen-core' ), 'default' => false, 'description' => esc_html__( 'Show or Hide Content. Default: off', 'aeen-core' ), ), array( 'type' => Controls_Manager::TEXT, 'id' => 'imgbox_btn_text', 'label' => __( 'Button Text', 'aeen-core' ), 'default' => __( 'Find Out More', 'aeen-core' ), 'condition' => array( 'imgbox_button_display' => array( 'yes' ) ), ), array( 'id' => 'animation_delay', 'label' =>esc_html__( 'Animation Delay', 'aeen-core' ), 'type' => Controls_Manager::NUMBER, 'default' => 0.2, 'description' =>esc_html__( 'Animation delay in second', 'aeen-core' ), ), array( 'mode' => 'section_end', ), // Style array( 'id' => 'button_style', 'mode' => 'section_start', 'tab' => Controls_Manager::TAB_STYLE, 'label' => __( 'Style', 'aeen-core' ), ), array( 'id' => 'title_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Title', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'title_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .case-study-box-layout1 .item-content .item-title a' => 'color: {{VALUE}} !important' ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'title_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .case-study-box-layout1 .item-content .item-title a', ), array( 'id' => 'sub_title_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Sub Title', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'sub_title_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .case-study-box-layout1 .item-content .item-sub-title' => 'color: {{VALUE}} !important' ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'sub_title_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .case-study-box-layout1 .item-content .item-sub-title', ), array( 'id' => 'desc_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Description', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'desce_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .case-study-box-layout1 .item-content p' => 'color: {{VALUE}} !important' ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'desc_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .case-study-box-layout1 .item-content p', ), array( 'id' => 'btn_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Button', 'aeen-core' ), 'separator' => 'before', ), array( 'name' => 'btn_bg_color', 'mode' => 'group', 'type' => Group_Control_Background::get_type(), 'label' => __( 'Background', 'aeen-core' ), 'selector' => '{{WRAPPER}} .case-study-box-layout1 .btn-fill:before', ), array( 'id' => 'btn_text_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .case-study-box-layout1 .item-content .btn-fill' => 'color: {{VALUE}} !important' ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'btn_text_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .case-study-box-layout1 .item-content .btn-fill', ), array( 'id' => 'hover_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Button Hover', 'aeen-core' ), 'separator' => 'before', ), array( 'name' => 'btn_hbg_color', 'mode' => 'group', 'type' => Group_Control_Background::get_type(), 'label' => __( 'Background', 'aeen-core' ), 'selector' => '{{WRAPPER}} .case-study-box-layout1 .item-content .btn-fill:hover', ), 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 ); } }