403Webshell
Server IP : 192.158.238.246  /  Your IP : 18.119.131.79
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/7779/cwd/themes/personalias/functions/kirki/kirki-packages/compatibility/src/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/7779/cwd/themes/personalias/functions/kirki/kirki-packages/compatibility/src//Scripts.php
<?php
/**
 * Registers scripts for WordPress Compatibility with versions prior to WP5.0
 *
 * @package   Kirki
 * @category  Core
 * @author    Themeum
 * @copyright Copyright (c) 2023, Themeum
 * @license   https://opensource.org/licenses/MIT
 * @since     0.1
 */

namespace Kirki\Compatibility;

use Kirki\URL;

/**
 * Adds scripts for backwards-compatibility
 *
 * @since 0.1
 */
class Scripts {

	/**
	 * Constructor.
	 *
	 * @access public
	 * @since 0.1
	 */
	public function __construct() {
		global $wp_version;

		/**
		 * Check if the WordPress version is lower than 5.0
		 * If lower then we need to enqueue the backported scripts.
		 */
		if ( version_compare( $GLOBALS['wp_version'], '5.0', '<' ) ) {
			add_action( 'wp_enqueue_scripts', [ $this, 'register_scripts' ] );
			add_action( 'admin_register_scripts', [ $this, 'register_scripts' ] );
			add_action( 'customize_controls_enqueue_scripts', [ $this, 'register_scripts' ] );
		}
	}

	/**
	 * Enqueue missing WP scripts.
	 *
	 * @access public
	 * @since 0.1
	 * @return void
	 */
	public function register_scripts() {
		$folder_url = trailingslashit( URL::get_from_path( __DIR__ ) );
		wp_register_script( 'wp-polyfill', $folder_url . 'scripts/wp-polyfill.js', [], '7.0.0', false );
		wp_register_script( 'wp-hooks', $folder_url . 'scripts/hooks.js', [ 'wp-polyfill' ], '2.2.0', false );
		wp_register_script( 'wp-i18n', $folder_url . 'scripts/i18n.js', [ 'wp-polyfill' ], '3.3.0', false );
	}

}

Youez - 2016 - github.com/yon3zu
LinuXploit