D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
proc
/
thread-self
/
cwd
/
wp-content
/
plugins
/
aeen-core
/
elementor
/
price
/
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\Controls_Manager; use Elementor\Group_Control_Border; use Elementor\Group_Control_Typography; use Elementor\Group_Control_Background; if ( ! defined( 'ABSPATH' ) ) exit; class Rt_Price extends Custom_Widget_Base { public function __construct( $data = [], $args = null ){ $this->rt_name = __( 'RT Pricing Table', 'aeen-core' ); $this->rt_base = 'rt-price'; parent::__construct( $data, $args ); } public function rt_fields(){ $repeater = new \Elementor\Repeater(); $repeater->add_control( 'offer_name', [ 'type' => Controls_Manager::TEXT, 'label' => esc_html__( 'Offer Name', 'aeen-core' ), 'default' => __( '3 Full Courses', 'aeen-core' ), 'label_block' => true, ] ); $fields = array( array( 'id' => 'sec_rt_price', 'mode' => 'section_start', 'label' => esc_html__( 'Pricing Table', 'aeen-core' ), ), array( 'type' => Controls_Manager::TEXT, 'id' => 'title', 'label' => esc_html__( 'Title', 'aeen-core' ), 'default' => __( 'Basic Plan', 'aeen-core' ), 'label_block' => true, ), array( 'type' => Controls_Manager::TEXT, 'id' => 'price', 'label' => esc_html__( 'Price', 'aeen-core' ), 'default' => esc_html__( '20.00', 'aeen-core' ), 'description' => esc_html__( 'Put your price with currency', 'aeen-core' ), ), array( 'type' => Controls_Manager::TEXT, 'id' => 'price_symbol', 'label' => esc_html__( 'Price Symbol', 'aeen-core' ), 'default' => '$', ), array ( 'type' => Controls_Manager::REPEATER, 'id' => 'offers', 'label' => esc_html__( 'Add as many offer list as you want', 'aeen-core' ), 'fields' => $repeater->get_controls(), 'default' => [ ['offer_name' => __( 'Established', 'aeen-core' ) ], ['offer_name' => __( 'Lifetime free support', 'aeen-core' ) ], ['offer_name' => __( 'Upgrade options', 'aeen-core' ) ], ['offer_name' => __( '9 Days Time', 'aeen-core' ) ], ] ), array( 'type' => Controls_Manager::TEXT, 'id' => 'buttontext', 'label' => esc_html__( 'Button Text', 'aeen-core' ), 'default' => __( 'Choose Plan', 'aeen-core' ), 'label_block' => true, ), array( 'type' => Controls_Manager::URL, 'id' => 'buttonurl', 'label' => esc_html__( 'Link (Optional)', 'clenix-core' ), 'placeholder' => 'https://your-link.com', ), 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' => 'pricing_table_style', 'mode' => 'section_start', 'tab' => Controls_Manager::TAB_STYLE, 'label' => __( 'Style', 'aeen-core' ), ), array( 'id' => 'name_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Full Table Background', 'aeen-core' ), 'separator' => 'before', ), array( 'name' => 'pricing_table_bgcolor', 'mode' => 'group', 'type' => Group_Control_Background::get_type(), 'label' => __( 'Background', 'aeen-core' ), 'selector' => '{{WRAPPER}} .pricing-box-layout1', ), array( 'mode' => 'section_end', ), array( 'id' => 'hoverbg_style', 'mode' => 'section_start', 'tab' => Controls_Manager::TAB_STYLE, 'label' => __( 'Full Table Hover Background', 'aeen-core' ), ), array( 'id' => 'hoverbg_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Full Table Hover', 'aeen-core' ), 'separator' => 'before', ), array( 'type' => Controls_Manager::COLOR, 'id' => 'ptable_h_bg', 'label' => __( 'BG Color', 'aeen-core' ), 'default' => '', 'selectors' => array( '{{WRAPPER}} .pricing-box-layout1:after' => 'background-color: {{VALUE}}', ) ), array( 'mode' => 'section_end', ), array( 'id' => 'title_style', 'mode' => 'section_start', 'tab' => Controls_Manager::TAB_STYLE, 'label' => __( 'Title and Offer', '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}} .pricing-box-layout1 .item-header .item-title' => 'color: {{VALUE}}' ), ), array( 'id' => 'title_hover_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Hover Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .pricing-box-layout1:hover .item-header .item-title' => 'color: {{VALUE}}' ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'title_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .pricing-box-layout1 .item-header .item-title', ), array( 'id' => 'offer_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Offer List', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'offer_list_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .pricing-box-layout1 .item-body ul.item-info li' => 'color: {{VALUE}}', '{{WRAPPER}} .pricing-box-layout1 .item-body ul.item-info li:before' => 'color: {{VALUE}}', ), ), array( 'id' => 'offer_list_hover_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Hover Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .pricing-box-layout1:hover .item-body ul.item-info li' => 'color: {{VALUE}}', '{{WRAPPER}} .pricing-box-layout1:hover .item-body ul.item-info li:before' => 'color: {{VALUE}}', ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'offer_list_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .pricing-box-layout1 .item-body ul.item-info li', ), array( 'mode' => 'section_end', ), array( 'id' => 'table_price_style', 'mode' => 'section_start', 'tab' => Controls_Manager::TAB_STYLE, 'label' => __( 'Pricing', 'aeen-core' ), ), array( 'id' => 'price_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Price', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'price_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .pricing-box-layout1 .item-header .item-price' => 'color: {{VALUE}}' ), ), array( 'id' => 'price_hover_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Hover Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .pricing-box-layout1:hover .item-header .item-price' => 'color: {{VALUE}}' ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'price_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .pricing-box-layout1 .item-header .item-price', ), array( 'id' => 'duration_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Duration', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'duration_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .pricing-box-layout1 .item-header .duration' => 'color: {{VALUE}}' ), ), array( 'id' => 'durationh_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Hover Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .pricing-box-layout1:hover .item-header .duration' => 'color: {{VALUE}}' ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'duration_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .pricing-box-layout1 .item-header .duration', ), array( 'mode' => 'section_end', ), // // Button array( 'id' => 'table_btn_style', 'mode' => 'section_start', 'tab' => Controls_Manager::TAB_STYLE, 'label' => __( 'Button', 'aeen-core' ), ), array( 'id' => 'price_btn_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .pricing-box-layout1 .item-footer .btn-fill' => 'color: {{VALUE}}' ), ), array( 'name' => 'pricing_btn_bgcolor', 'mode' => 'group', 'type' => Group_Control_Background::get_type(), 'label' => __( 'Background', 'aeen-core' ), 'selector' => '{{WRAPPER}} .pricing-box-layout1 .item-footer .btn-fill', ), array( 'id' => 'pricing_btn_h_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Hover', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'pricing_btn_h_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .pricing-box-layout1:hover .item-footer .btn-fill' => 'color: {{VALUE}}' ), ), array( 'id' => 'pricing_btnh_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Hover Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .pricing-box-layout1:hover .item-footer .btn-fill:hover' => 'color: {{VALUE}}' ), ), array( 'name' => 'pricing_btn_h_bgcolor', 'mode' => 'group', 'type' => Group_Control_Background::get_type(), 'label' => __( 'Background', 'aeen-core' ), 'selector' => '{{WRAPPER}} .pricing-box-layout1:hover .item-footer .btn-fill', ), array( 'id' => 'pricing_btnh_bg_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Hover Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .pricing-box-layout1:hover .item-footer .btn-fill:before' => 'background-color: {{VALUE}}' ), ), array( 'name' => 'hbtn_border', 'mode' => 'group', 'type' => Group_Control_Border::get_type(), 'label' => __( 'Border', 'aeen-core' ), 'selector' => '{{WRAPPER}} .pricing-box-layout1:hover .item-footer .btn-fill', ), array( 'mode' => 'section_end', ), ); return $fields; } protected function render() { $data = $this->get_settings(); $template = 'view'; return $this->rt_template( $template, $data ); } }