PluginProbe
Elementor Website Builder – more than just a page builder / 3.35.0-dev4
Elementor Website Builder – more than just a page builder v3.35.0-dev4
4.3.2 4.3.1 4.3.0 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 All 455 releases
elementor / vendor / elementor / wp-one-package / runner.php

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

58 lines 2.2 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 if ( defined( 'WP_PLUGIN_DIR' ) ) {
32 $pattern = '#^' . preg_quote( WP_PLUGIN_DIR, '#' ) . '/([^\\/]+)#';
33 $plugin_slug = preg_match( $pattern, __DIR__, $matches ) ? $matches[1] : null;
34 if ( $plugin_slug ) {
35 $wp_one_package_versions[ $plugin_slug ] = '1.0.47';
36 }
37 }
38
39 if ( ! function_exists( 'elementor_one_register_1_dot_0_dot_47' ) && function_exists( 'add_action' ) ) {
40
41 if ( ! class_exists( '\ElementorOne\Versions', false ) ) {
42 require_once __DIR__ . '/src/Versions.php';
43 add_action( 'plugins_loaded', [ \ElementorOne\Versions::class, 'initialize_latest_version' ], -15, 0 );
44 }
45
46 add_action( 'plugins_loaded', 'elementor_one_register_1_dot_0_dot_47', -20, 0 );
47
48 function elementor_one_register_1_dot_0_dot_47() {
49 $versions = \ElementorOne\Versions::instance();
50 $versions->register( '1.0.47', 'elementor_one_initialize_1_dot_0_dot_47' );
51 }
52
53 function elementor_one_initialize_1_dot_0_dot_47() {
54 // The Loader class will be autoloaded from the highest version source
55 \ElementorOne\Loader::init();
56 }
57 }
58