PluginProbe
Elementor Website Builder – more than just a page builder / 3.35.6
Elementor Website Builder – more than just a page builder v3.35.6
4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 All 452 releases
elementor / vendor / elementor / wp-one-package / runner.php

runner.php in Elementor Website Builder – more than just a page builder 3.35.6, at vendor/elementor/wp-one-package/runner.php

55 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 global $__composer_autoload_files, $wp_one_package_versions;
4
5 /**
6 * Allow this file to be executed multiple times across different plugin instances.
7 *
8 * This package may be bundled with multiple plugins, and each plugin needs to register
9 * its version. By default, Composer's autoloader prevents the same file from being loaded
10 * more than once. To enable re-execution, we remove this file from Composer's global
11 * registry of loaded files ($__composer_autoload_files).
12 *
13 * Process:
14 * 1. Locate the vendor directory (2 levels up when installed as a Composer package)
15 * 2. Load Composer's autoload files map (hash => file path mappings)
16 * 3. Find this file's unique hash ID in the map
17 * 4. Remove the hash from the loaded files registry to allow subsequent executions
18 */
19 $vendor_dir = dirname( __DIR__, 2 );
20 $autoload_files_path = $vendor_dir . '/composer/autoload_files.php';
21
22 if ( file_exists( $autoload_files_path ) ) {
23 $autoload_files_map = require $autoload_files_path;
24 $autoload_files_id = array_search( __FILE__, $autoload_files_map, true );
25
26 if ( false !== $autoload_files_id && isset( $__composer_autoload_files[ $autoload_files_id ] ) ) {
27 unset( $__composer_autoload_files[ $autoload_files_id ] );
28 }
29 }
30
31 $pattern = '#/([^/]+)/vendor/elementor/#';
32 if ( preg_match( $pattern, __DIR__, $matches ) ) {
33 $wp_one_package_versions[ $matches[1] ] = '1.0.55';
34 }
35
36 if ( ! function_exists( 'elementor_one_register_1_dot_0_dot_55' ) && function_exists( 'add_action' ) ) {
37
38 if ( ! class_exists( '\ElementorOne\Versions', false ) ) {
39 require_once __DIR__ . '/src/Versions.php';
40 add_action( 'plugins_loaded', [ \ElementorOne\Versions::class, 'initialize_latest_version' ], -15, 0 );
41 }
42
43 add_action( 'plugins_loaded', 'elementor_one_register_1_dot_0_dot_55', -20, 0 );
44
45 function elementor_one_register_1_dot_0_dot_55() {
46 $versions = \ElementorOne\Versions::instance();
47 $versions->register( '1.0.55', 'elementor_one_initialize_1_dot_0_dot_55' );
48 }
49
50 function elementor_one_initialize_1_dot_0_dot_55() {
51 // The Loader class will be autoloaded from the highest version source
52 \ElementorOne\Loader::init();
53 }
54 }
55