GRAYBYTE WORDPRESS FILE MANAGER2248

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/giriqfky/msenterprise.org.in/wp-content/plugins/elementskit-lite/core/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/giriqfky/msenterprise.org.in/wp-content/plugins/elementskit-lite/core//build-widgets.php
<?php
namespace ElementsKit_Lite\Core;

use ElementsKit_Lite\Libs\Framework\Attr;

defined( 'ABSPATH' ) || exit;

class Build_Widgets {

	/**
	 * Collection of default widgets.
	 *
	 * @since 1.0.0
	 * @access private
	 */
	private $widgets;

	use \ElementsKit_Lite\Traits\Singleton;

	public function __construct() {

		new \ElementsKit_Lite\Widgets\Init\Enqueue_Scripts();
		$this->widgets = \ElementsKit_Lite\Config\Widget_List::instance()->get_list( 'active' );

		// check if the widget is exists
		foreach ( $this->widgets as $widget ) {
			$this->add_widget( $widget );
		}

		add_action( 'elementor/widgets/register', array( $this, 'register_widget' ) );
	}


	public function add_widget( $widget_config ) {

		$widget_dir = (
			isset( $widget_config['path'] ) 
			? $widget_config['path'] 
			: \ElementsKit_Lite::widget_dir() . $widget_config['slug'] . '/'
		);

		include $widget_dir . $widget_config['slug'] . '.php';
		include $widget_dir . $widget_config['slug'] . '-handler.php';

		$base_class_name = (
			( isset( $widget_config['base_class_name'] ) )
			? $widget_config['base_class_name']
			: '\Elementor\ElementsKit_Widget_' . \ElementsKit_Lite\Utils::make_classname( $widget_config['slug'] )
		);

		$handler       = $base_class_name . '_Handler';
		$handler_class = new $handler();

		if ( $handler_class->scripts() != false ) {
			add_action( 'wp_enqueue_scripts', array( $handler_class, 'scripts' ) );
		}

		if ( $handler_class->styles() != false ) {
			add_action( 'wp_enqueue_scripts', array( $handler_class, 'styles' ) );
		}

		if ( $handler_class->inline_css() != false ) {
			wp_add_inline_style( 'elementskit-init-css', $handler_class->inline_css() );
		}

		if ( $handler_class->inline_js() != false ) {
			wp_add_inline_script( 'elementskit-init-js', $handler_class->inline_js() );
		}

		if ( $handler_class->register_api() != false ) {
			if ( \file_exists( $handler_class->register_api() ) ) {
				include_once $handler_class->register_api();
				$api = $base_class_name . '_Api';
				new $api();
			}
		}

		if ( $handler_class->wp_init() != false ) {
			add_action( 'init', array( $handler_class, 'wp_init' ) );
		}
	}


	public function register_widget( $widgets_manager ) {
		foreach ( $this->widgets as $widget_slug => $widget ) {
			$class_name = '\Elementor\ElementsKit_Widget_' . \ElementsKit_Lite\Utils::make_classname( $widget_slug );
			if ( class_exists( $class_name ) ) {
				$widgets_manager->register( new $class_name() );
			}
		}
	}
}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
April 16 2025 14:46:55
giriqfky / giriqfky
0755
activation-actions.php
0.904 KB
April 16 2025 14:46:55
giriqfky / giriqfky
0644
build-inline-scripts.php
1.221 KB
April 16 2025 14:46:55
giriqfky / giriqfky
0644
build-modules.php
0.97 KB
April 16 2025 14:46:55
giriqfky / giriqfky
0644
build-widgets.php
2.433 KB
April 16 2025 14:46:55
giriqfky / giriqfky
0644
config-list.php
1.544 KB
April 16 2025 14:46:55
giriqfky / giriqfky
0644
handler-api.php
0.97 KB
April 16 2025 14:46:55
giriqfky / giriqfky
0644
handler-widget.php
0.706 KB
April 16 2025 14:46:55
giriqfky / giriqfky
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF