D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
proc
/
self
/
cwd
/
wp-content
/
plugins
/
aeen-core
/
elementor
/
social
/
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 RT_Social extends Custom_Widget_Base { public function __construct( $data = [], $args = null ){ $this->rt_name = __( 'RT Social', 'aeen-core' ); $this->rt_base = 'rt-social'; parent::__construct( $data, $args ); } public function rt_fields(){ $repeater = new \Elementor\Repeater(); $repeater->add_control( 'social_icon', [ 'type' => Controls_Manager::ICONS, 'label' => esc_html__( 'Icon', 'aeen-core' ), 'description' => esc_html__( 'Select icon', 'aeen-core' ), 'default' => [ 'value' => 'fab fa-facebook-f', 'library' => 'fa-solid', ], ] ); $repeater->add_control( 'social_url', [ 'type' => Controls_Manager::URL, 'label' => __( 'Link', 'aeen-core' ), 'placeholder' => __( 'https://your-link.com', 'aeen-core' ), 'show_external' => true, 'default' => [ 'url' => '#', 'is_external' => true, 'nofollow' => true, ], ] ); $repeater->add_control( 'icon_class', [ 'type' => Controls_Manager::TEXT, 'label' => esc_html__( 'Icon Class', 'aeen-core' ), 'default' => 'facebook', 'label_block' => true, ] ); $fields = array( array( 'id' => 'rt_social', 'mode' => 'section_start', 'label' => __( 'Social', 'aeen-core' ), ), array( 'type' => Controls_Manager::TEXT, 'id' => 'social_title', 'label' => esc_html__( 'Title', 'aeen-core' ), 'default' => 'Social Icon', 'label_block' => true, ), array ( 'type' => Controls_Manager::REPEATER, 'id' => 'social_box', 'label' => esc_html__( 'Add as many social icon as you want', 'aeen-core' ), 'fields' => $repeater->get_controls(), 'default' => [ ['social_icon' => 'fab fa-facebook-f' ], ['social_icon' => 'fab fa-twitter' ], ['social_icon' => 'fab fa-linkedin-in' ], ['social_icon' => 'fab fa-youtube' ], ['social_icon' => 'fab fa-instagram' ], ['social_icon' => 'fab fa-google-plus-g' ], ['social_icon' => 'fab fa-pinterest-p' ], ['social_icon' => 'fab fa-skype' ], ['social_icon' => 'fab fa-tumblr' ], ['social_icon' => 'fas fa-hashtag' ], ] ), array( 'mode' => 'section_end', ), array( 'id' => 'social_style', 'mode' => 'section_start', 'tab' => Controls_Manager::TAB_STYLE, 'label' => __( 'Title', 'aeen-core' ), ), // Title array( 'id' => 'title_txt_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Title Style', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'title_txt_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .template-sidebar .social.widget-section-heading.heading-dark .item-heading' => 'color: {{VALUE}}', ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'title_text_typo', 'label' => __( 'Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .template-sidebar .social.widget-section-heading.heading-dark .item-heading', ), array( 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'id' => 'title_padding', 'mode' => 'responsive', 'label' => esc_html__( 'Padding', 'salion-core' ), 'selectors' => array( '{{WRAPPER}} .template-sidebar .social.widget-section-heading.heading-dark .item-heading' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ), 'separator' => 'before', ), array( 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'mode' => 'responsive', 'id' => 'title_margin', 'label' => esc_html__( 'Margin', 'salion-core' ), 'selectors' => array( '{{WRAPPER}} .template-sidebar .social.widget-section-heading.heading-dark .item-heading' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ), 'separator' => 'before', ), array( 'mode' => 'section_end', ), array( 'id' => 'social_icon_style', 'mode' => 'section_start', 'tab' => Controls_Manager::TAB_STYLE, 'label' => __( 'Icon', 'aeen-core' ), ), // Icon array( 'id' => 'icon_bg_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Icon Background Color', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'icon_bg_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .template-sidebar .widget-social li a' => 'background-color: {{VALUE}}', ), ), array( 'id' => 'icon_bg_hover_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Hover Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .template-sidebar .widget-social li a:hover' => 'background: {{VALUE}} !important', ), ), // Icon array( 'id' => 'icon_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Icon Color', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'icon_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .template-sidebar .widget-social a i' => 'color: {{VALUE}}', ), ), array( 'id' => 'icon_hover_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Hover Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .template-sidebar .widget-social a:hover i' => 'color: {{VALUE}}', ), ), ); return $fields; } protected function render() { $data = $this->get_settings(); $template = 'view'; return $this->rt_template( $template, $data ); } }