Sindbad~EG File Manager

Current Path : /home/copmadinaarea/thecopmadinaarea.org/wp-content/plugins/deeds-plugin/elementor/
Upload File :
Current File : /home/copmadinaarea/thecopmadinaarea.org/wp-content/plugins/deeds-plugin/elementor/elementor.php

<?php

namespace deedsPLUGIN\Element;


class Elementor {
	static $widgets = array(
		'template',
		'carousel',
		'bottom_menu',
		'comments_and_form',
		'author_box',
	);

	static function init() {
		add_action( 'elementor/init', array( __CLASS__, 'loader' ) );
		add_action( 'elementor/elements/categories_registered', array( __CLASS__, 'register_cats' ) );
	}

	static function loader() {

		foreach ( self::$widgets as $widget ) {

			$file = deedsPLUGIN_PLUGIN_PATH . '/elementor/' . $widget . '.php';
			if ( file_exists( $file ) ) {
				require_once $file;
			}

			add_action( 'elementor/widgets/widgets_registered', array( __CLASS__, 'register' ) );
		}
	}

	static function register( $elemntor ) {
		foreach ( self::$widgets as $widget ) {
			$class = '\\deedsPLUGIN\\Element\\' . ucwords( $widget );

			if ( class_exists( $class ) ) {
				$elemntor->register_widget_type( new $class );
			}
		}
	}

	static function register_cats( $elements_manager ) {

		$elements_manager->add_category(
			'webinane',
			[
				'title' => esc_html__( 'Webinane', 'fixkar' ),
				'icon'  => 'fa fa-plug',
			]
		);

	}
}

Elementor::init();

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists