D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
proc
/
self
/
cwd
/
wp-content
/
plugins
/
aeen-core
/
elementor
/
video
/
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_Border; use Elementor\Group_Control_Typography; use Elementor\Group_Control_Background; if ( ! defined( 'ABSPATH' ) ) exit; class Video_Button extends Custom_Widget_Base { public function __construct( $data = [], $args = null ){ $this->rt_name = __( 'RT Video', 'aeen-core' ); $this->rt_base = 'rt-video-button'; parent::__construct( $data, $args ); } public function rt_fields(){ $fields = array( array( 'id' => 'video_button', 'mode' => 'section_start', 'label' => __( 'Video Button', '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( 'type' => Controls_Manager::URL, 'id' => 'videourl', 'label' => esc_html__( 'Video URL', 'aeen-core' ), 'placeholder' => 'https://your-link.com', ), array( 'type' => Controls_Manager::MEDIA, 'id' => 'video_image', 'label' => esc_html__( 'Background Image', 'aeen-core' ), ), array( 'type' => Controls_Manager::COLOR, 'id' => 'bag_color', 'label' => esc_html__( 'Image Overlay Color', 'salion-core' ), 'default' => '', 'selectors' => array( '{{WRAPPER}} .video-area:before' => 'background: {{VALUE}}', ), 'condition' => array( 'style' => array( 'style2' ) ), ), 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 ); } }