403Webshell
Server IP : 192.64.112.168  /  Your IP : 3.128.168.219
Web Server : Apache
System : Linux nc-ph-2300-85.bluforrest.com 4.18.0-513.9.1.el8_9.x86_64 #1 SMP Sat Dec 2 05:23:44 EST 2023 x86_64
User : expressoneac ( 1128)
PHP Version : 8.0.30
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/expressoneac/www/wp-content/plugins/elementskit-lite/libs/template-library/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/expressoneac/www/wp-content/plugins/elementskit-lite/libs/template-library/init.php
<?php 
namespace ElementsKit_Lite\Libs\Template_Library;

defined( 'ABSPATH' ) || exit;

/**
 * Class Init
 * 
 * Initializes the Template Library of the ElementsKit Lite plugin.
 */
class Init {
	/**
	 * Initializes the Init class.
	 * 
	 * Includes necessary files.
	 */
	public function __construct() {
		add_action('activate_gutenkit-blocks-addon/gutenkit-blocks-addon.php', array( $this, 'load_gutenkit_plugin' ), 9999);
		add_action( 'enqueue_block_editor_assets', array( $this, 'library_enqueue_block_editor_assets' ) );
	}

	/**
	 * Retrieves the URL of the Template Library.
	 * 
	 * @return string The URL of the Template Library.
	 * @since 3.1.4
	 */
	public static function get_url() {
		return \ElementsKit_Lite::lib_url() . 'template-library/';
	}

	/**
	 * Retrieves the directory of the Template Library.
	 * 
	 * @return string The directory of the Template Library.
	 * @since 3.1.4
	 */
	public static function get_dir() {
		return \ElementsKit_Lite::lib_dir() . 'template-library/';
	}

	/**
	 * Loads the GutenKit plugin.
	 * @since 3.1.4
	 * Deletes the 'gutenkit_do_activation_redirect' option.
	 */
	public function load_gutenkit_plugin() {
		delete_option( 'gutenkit_do_activation_redirect' );
	}

	/**
	 * Enqueue scripts and styles for the template library in the admin area.
	 *
	 * @param string $screen The current admin screen.
	 * @since 3.1.4
	 */
	public function library_enqueue_block_editor_assets() {
		// Enqueue block editor only JavaScript and CSS.
		if ( file_exists( self::get_dir() . 'assets/library/editor-template-library.asset.php' ) ) {
			$editor_template_library = include self::get_dir() . 'assets/library/editor-template-library.asset.php';
			wp_enqueue_script(
				'extra-editor-template-library',
				self::get_url() . 'assets/library/editor-template-library.js',
				$editor_template_library['dependencies'],
				$editor_template_library['version'],
				true
			);

			wp_enqueue_style(
				'extra-editor-template-library',
				self::get_url() . 'assets/library/editor-template-library.css',
				array(),
				$editor_template_library['version']
			);

			// Google Roboto Font
			wp_enqueue_style(
				'extra-google-fonts',
				'https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap'
			);
		}
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit