Server IP : 162.213.251.208 / Your IP : 3.17.79.169 Web Server : LiteSpeed System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : jmoroovq ( 1890) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/jmoroovq/expressmedicalbillingservices.com/wp-content/plugins/bdthemes-element-pack/includes/ |
Upload File : |
<?php namespace ElementPack; use ElementPack\Admin\ModuleService; if ( !defined('ABSPATH') ) { exit; } // Exit if accessed directly final class Manager { public function register_module_and_assets() { ModuleService::get_widget_settings(function ($settings) { $core_widgets = $settings['settings_fields']['element_pack_active_modules']; $extensions = $settings['settings_fields']['element_pack_elementor_extend']; $third_party_widgets = $settings['settings_fields']['element_pack_third_party_widget']; /** * Our Widget */ foreach ( $core_widgets as $widget ) { if ( element_pack_is_widget_enabled($widget['name']) ) { $this->load_module_instance($widget); } } /** * Extension */ foreach ( $extensions as $extension ) { if ( element_pack_is_extend_enabled($extension['name']) ) { $this->load_module_instance($extension); } } /** * Third Party Widget */ foreach ( $third_party_widgets as $widget ) { if ( element_pack_is_third_party_enabled($widget['name']) ) { if ( isset($widget['plugin_path']) && ModuleService::is_plugin_active($widget['plugin_path']) ) { $this->load_module_instance($widget); } } } // Static module if need $this->load_module_instance(['name' => 'elementor']); }); } public function load_module_instance($module) { $direction = is_rtl() ? '.rtl' : ''; $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min'; $module_id = $module['name']; $class_name = str_replace('-', ' ', $module_id); $class_name = str_replace(' ', '', ucwords($class_name)); $class_name = __NAMESPACE__ . '\\Modules\\' . $class_name . '\\Module'; if ( !element_pack_is_asset_optimization_enabled() ) { if ( !element_pack_is_preview() ) { // register widgets css if ( ModuleService::has_module_style($module_id) ) { wp_register_style('ep-' . $module_id, BDTEP_URL . 'assets/css/ep-' . $module_id . $direction . '.css', [], BDTEP_VER); } // register widget JS if ( ModuleService::has_module_script($module_id) ) { wp_register_script('ep-' . $module_id, BDTEP_URL . 'assets/js/modules/ep-' . $module_id . $suffix . '.js', ['jquery', 'bdt-uikit', 'elementor-frontend'], BDTEP_VER, true); } } } if(class_exists($class_name)){ $class_name::instance(); } } public function __construct() { $this->register_module_and_assets(); } }