HEX
Server: Apache
System: Linux sg241.singhost.net 2.6.32-896.16.1.lve1.4.51.el6.x86_64 #1 SMP Wed Jan 17 13:19:23 EST 2018 x86_64
User: honghock (909)
PHP: 8.0.30
Disabled: passthru,system,shell_exec,show_source,exec,popen,proc_open
Upload Files
File: /home/honghock/public_html/wp-content/plugins/wp-whatsapp-chat/lib/controllers/class-components.php
<?php

namespace QuadLayers\QLWAPP\Controllers;

class Components {

	protected static $instance;

	private function __construct() {
		add_action( 'admin_enqueue_scripts', array( $this, 'register_scripts' ) );
	}

	public function register_scripts() {
		$components = include QLWAPP_PLUGIN_DIR . 'build/components/js/index.asset.php';

		/**
		 * Register components assets
		 */
		wp_register_script(
			'qlwapp-components',
			plugins_url( '/build/components/js/index.js', QLWAPP_PLUGIN_FILE ),
			$components['dependencies'],
			$components['version'],
			true
		);

		wp_register_style(
			'qlwapp-components',
			plugins_url( '/build/components/css/style.css', QLWAPP_PLUGIN_FILE ),
			array(
				'wp-components',
				'media-views',
			),
			QLWAPP_PLUGIN_VERSION
		);
	}

	public static function instance() {
		if ( is_null( self::$instance ) ) {
			self::$instance = new self();
		}
		return self::$instance;
	}
}