Server IP : 104.21.14.48 / Your IP : 18.217.183.211 [ Web Server : Apache System : Linux b70eb322-3aee-0c53-7c82-0db91281f2c6.secureserver.net 6.1.90-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 2 12:09:22 EDT 2024 x86_64 User : root ( 0) PHP Version : 8.0.30.2 Disable Function : NONE Domains : 0 Domains MySQL : ON | cURL : ON | WGET : ON | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/wp-content/plugins/profile-builder/assets/misc/elementor/ |
Upload File : |
<?php // Exit if accessed directly if ( ! defined( 'ABSPATH' ) ) exit; use Elementor\Controls_Manager; class PB_Elementor { private static $_instance = null; public $locations = array( array( 'element' => 'common', 'action' => '_section_style', ), array( 'element' => 'section', 'action' => 'section_advanced', ) ); public $section_name = 'pb_section_visibility_settings'; /** * Register plugin action hooks and filters */ public function __construct() { // Add category add_action( 'elementor/elements/categories_registered', array( $this, 'add_category' ) ); // Register widgets add_action( 'elementor/widgets/widgets_registered', array( $this, 'register_widgets' ) ); } /** * * Ensures only one instance of the class is loaded or can be loaded. * * @return PB_Elementor An instance of the class. */ public static function instance() { if ( is_null( self::$_instance ) ) self::$_instance = new self(); return self::$_instance; } /** * Include Widgets files */ private function include_widgets_files() { require_once(__DIR__ . '/widgets/class-pb-widget-epf.php'); require_once(__DIR__ . '/widgets/class-pb-widget-l.php'); require_once(__DIR__ . '/widgets/class-pb-widget-rp.php'); require_once(__DIR__ . '/widgets/class-pb-widget-rf.php'); require_once(__DIR__ . '/widgets/class-pb-widget-ul.php'); } /** * Register Widgets */ public function register_widgets() { $this->include_widgets_files(); if( version_compare( ELEMENTOR_VERSION, '3.5,', '>=' ) ){ \Elementor\Plugin::instance()->widgets_manager->register( new PB_Elementor_Edit_Profile_Widget() ); \Elementor\Plugin::instance()->widgets_manager->register( new PB_Elementor_Login_Widget() ); \Elementor\Plugin::instance()->widgets_manager->register( new PB_Elementor_Recover_Password_Widget() ); \Elementor\Plugin::instance()->widgets_manager->register( new PB_Elementor_Register_Widget() ); if( defined( 'WPPB_PAID_PLUGIN_DIR' ) && file_exists( WPPB_PAID_PLUGIN_DIR . '/add-ons/user-listing/userlisting.php' ) ){ \Elementor\Plugin::instance()->widgets_manager->register( new PB_Elementor_User_Listing_Widget() ); } } else { \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new PB_Elementor_Edit_Profile_Widget() ); \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new PB_Elementor_Login_Widget() ); \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new PB_Elementor_Recover_Password_Widget() ); \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new PB_Elementor_Register_Widget() ); if( defined( 'WPPB_PAID_PLUGIN_DIR' ) && file_exists( WPPB_PAID_PLUGIN_DIR . '/add-ons/user-listing/userlisting.php' ) ){ \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new PB_Elementor_User_Listing_Widget() ); } } } public function add_category( $elements_manager ) { $elements_manager->add_category( 'profile-builder', array( 'title' => __( 'Profile Builder Forms', 'profile-builder' ), 'icon' => 'fa fa-plug', ) ); } } // Instantiate Plugin Class PB_Elementor::instance();