Server : Apache System : Linux ls31.server.ly 3.10.0-962.3.2.lve1.5.68.el7.x86_64 #1 SMP Wed Apr 6 11:12:23 UTC 2022 x86_64 User : medchoco ( 2906) PHP Version : 8.3.16 Disable Function : mail Directory : /home/medchoco/www/wp-content/themes/puca/inc/vendors/elementor/elements/general/ |
Upload File : |
<?php if ( ! defined( 'ABSPATH' ) || function_exists('Puca_Elementor_Social_Icons') ) { exit; // Exit if accessed directly. } use Elementor\Controls_Manager; /** * Elementor tabs widget. * * Elementor widget that displays vertical or horizontal tabs with different * pieces of content. * * @since 1.0.0 */ class Puca_Elementor_Social_Icons extends Puca_Elementor_Widget_Base{ /** * Get widget name. * * Retrieve tabs widget name. * * @since 1.0.0 * @access public * * @return string Widget name. */ public function get_name() { return 'tbay-social-icons'; } /** * Get widget title. * * Retrieve tabs widget title. * * @since 1.0.0 * @access public * * @return string Widget title. */ public function get_title() { return esc_html__( 'Puca Social Icons', 'puca' ); } /** * Get widget icon. * * Retrieve tabs widget icon. * * @since 1.0.0 * @access public * * @return string Widget icon. */ public function get_icon() { return 'eicon-social-icons'; } /** * Register tabs widget controls. * * Adds different input fields to allow the user to change and customize the widget settings. * * @since 1.0.0 * @access protected */ protected function register_controls() { $this->register_controls_heading(); $this->register_remove_heading_element(); $this->start_controls_section( 'section_general', [ 'label' => esc_html__( 'General', 'puca' ), ] ); $repeater = new \Elementor\Repeater(); $repeater->add_control( 'social_icon', [ 'label' => esc_html__( 'Icon', 'puca' ), 'type' => Controls_Manager::ICONS, 'fa4compatibility' => 'social', 'label_block' => true, 'default' => [ 'value' => 'fab fa-wordpress', 'library' => 'fa-brands', ], 'recommended' => [ 'fa-brands' => [ 'android', 'apple', 'behance', 'bitbucket', 'codepen', 'delicious', 'deviantart', 'digg', 'dribbble', 'puca', 'facebook', 'flickr', 'foursquare', 'free-code-camp', 'github', 'gitlab', 'globe', 'houzz', 'instagram', 'jsfiddle', 'linkedin', 'medium', 'meetup', 'mixcloud', 'odnoklassniki', 'pinterest', 'product-hunt', 'reddit', 'shopping-cart', 'skype', 'slideshare', 'snapchat', 'soundcloud', 'spotify', 'stack-overflow', 'steam', 'stumbleupon', 'telegram', 'thumb-tack', 'tripadvisor', 'tumblr', 'twitch', 'twitter', 'viber', 'vimeo', 'vk', 'weibo', 'weixin', 'whatsapp', 'wordpress', 'xing', 'yelp', 'youtube', '500px', ], 'fa-solid' => [ 'envelope', 'link', 'rss', ], ], ] ); $repeater->add_control( 'link', [ 'label' => esc_html__( 'Link', 'puca' ), 'type' => Controls_Manager::URL, 'label_block' => true, 'default' => [ 'is_external' => 'true', ], 'placeholder' => esc_html__( 'https://your-link.com', 'puca' ), ] ); $this->add_control( 'social_icon_list', [ 'label' => esc_html__( 'Social Icons', 'puca' ), 'type' => Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'default' => [ [ 'social_icon' => [ 'value' => 'fab fa-facebook', 'library' => 'fa-brands', ], ], [ 'social_icon' => [ 'value' => 'fab fa-twitter', 'library' => 'fa-brands', ], ], [ 'social_icon' => [ 'value' => 'fab fa-youtube', 'library' => 'fa-brands', ], ], ], ] ); $this->add_control( 'icon_size', [ 'label' => esc_html__('Font Size Icon', 'puca'), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 10, 'max' => 80, ], ], 'selectors' => [ '{{WRAPPER}} .social > li a' => 'font-size: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'styles', [ 'label' => esc_html__( 'Style', 'puca' ), 'type' => Controls_Manager::SELECT, 'default' => 'style1', 'options' => [ 'style1' => esc_html__( 'Style 1', 'puca' ), 'style2' => esc_html__( 'Style 2', 'puca' ), ], ] ); $this->add_control( 'view', [ 'label' => esc_html__( 'View', 'puca' ), 'type' => Controls_Manager::HIDDEN, 'default' => 'traditional', ] ); $this->end_controls_section(); } } $widgets_manager->register(new Puca_Elementor_Social_Icons());