HEX
Server: Apache/2
System: Linux bq-e705.pointdnshere.com 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User: wellmix (1103)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/wellmix/public_html/wp-content/plugins/elementskit/widgets/init/enqueue-scripts.php
<?php
namespace ElementsKit\Widgets\Init;

defined( 'ABSPATH' ) || exit;

class Enqueue_Scripts{

	public function __construct() {
		add_action( 'wp_enqueue_scripts', [$this, 'frontend_js']);
		add_action( 'wp_enqueue_scripts', [$this, 'frontend_css'], 99 );

		add_action( 'elementor/frontend/before_enqueue_scripts', [$this, 'elementor_js'] );
	}

	public function elementor_js() {
		wp_enqueue_script( 'elementskit-elementor-pro', \ElementsKit::widget_url() . 'init/assets/js/elementor.js',array( 'jquery', 'elementor-frontend', 'elementskit-elementor' ), \ElementsKit::version(), true );
	}

	public function frontend_js() {
		if(is_admin()){
			return;
		}
		// your normal frontend js goes here
	}

	public function frontend_css() {
		if(!is_admin()){
			wp_enqueue_style( 'ekit-widget-styles-pro', \ElementsKit::widget_url() . 'init/assets/css/widget-styles-pro.css', ['ekit-widget-styles'], \ElementsKit::version() );
		};
	}
}