D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
proc
/
self
/
cwd
/
wp-content
/
plugins
/
aeen-core
/
elementor
/
button
/
Filename :
class.php
back
Copy
<?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 Button extends Custom_Widget_Base { public function __construct( $data = [], $args = null ){ $this->rt_name = esc_html__( 'RT Button', 'aeen-core' ); $this->rt_base = 'rt-button'; parent::__construct( $data, $args ); } public function rt_fields(){ $fields = array( array( 'mode' => 'section_start', 'id' => 'sec_general', 'label' => __( 'General', 'aeen-core' ), ), array( 'type' => Controls_Manager::CHOOSE, 'id' => 'content_align', 'mode' => 'responsive', 'label' => esc_html__( 'Alignment', 'salion-core' ), 'options' => array( 'left' => array( 'title' => __( 'Left', 'elementor' ), 'icon' => 'eicon-text-align-left', ), 'center' => array( 'title' => __( 'Center', 'elementor' ), 'icon' => 'eicon-text-align-center', ), 'right' => array( 'title' => __( 'Right', 'elementor' ), 'icon' => 'eicon-text-align-right', ), 'justify' => array( 'title' => __( 'Justified', 'elementor' ), 'icon' => 'eicon-text-align-justify', ), ), 'default' => '', 'selectors' => array( '{{WRAPPER}}' => 'text-align: {{VALUE}};', ), ), array( 'type' => Controls_Manager::TEXT, 'id' => 'btntext', 'label' => __( 'Text', 'aeen-core' ), 'default' => __( 'Contact Us', 'aeen-core' ), ), array( 'type' => Controls_Manager::URL, 'id' => 'url', 'label' => __( 'Link', 'aeen-core' ), 'placeholder' => 'https://your-link.com', ), array( 'mode' => 'section_end', ), array( 'id' => 'button_style', 'mode' => 'section_start', 'tab' => Controls_Manager::TAB_STYLE, 'label' => __( 'Style', 'aeen-core' ), ), array( 'id' => 'normal_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Normal', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'text_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .btn-fill-lg' => 'color: {{VALUE}} !important' ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'button_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .btn-fill-lg', ), array( 'name' => 'btn_bg_color', 'mode' => 'group', 'type' => Group_Control_Background::get_type(), 'label' => __( 'Background', 'aeen-core' ), 'selector' => '{{WRAPPER}} .btn-fill-lg', ), array( 'id' => 'hover_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Hover', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'text_h_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .btn-fill-lg:hover' => 'color: {{VALUE}} !important' ), ), array( 'name' => 'btn_hbg_color', 'mode' => 'group', 'type' => Group_Control_Background::get_type(), 'label' => __( 'Background', 'aeen-core' ), 'selector' => '{{WRAPPER}} .btn-fill-lg:hover', ), array( 'mode' => 'section_end', ), ); return $fields; } protected function render() { $data = $this->get_settings(); $template = 'view'; return $this->rt_template( $template, $data ); } }