File "class-autoloader.php"
Full path: /home/kosmetik/public_html/wp-content/plugins/woocommerce/vendor/automattic/jetpack-autoloader/src/class-autoloader.php
File
size: 1.35 B
MIME-type: text/x-php
Charset: utf-8
Download Open Edit Advanced Editor Back
<?php
class Autoloader
{
public static function init($container = null)
{
if (!isset($container)) {
require_once __DIR__ . '/class-container.php';
$container = new Container();
}
$autoloader_handler = $container->get(Autoloader_Handler::class);
$was_included_by_autoloader = $autoloader_handler->is_initializing();
$plugin_locator = $container->get(Plugin_Locator::class);
$plugins_handler = $container->get(Plugins_Handler::class);
$current_plugin = $plugin_locator->find_current_plugin();
$active_plugins = $plugins_handler->get_active_plugins(true, !$was_included_by_autoloader);
$cached_plugins = $plugins_handler->get_cached_plugins();
$all_plugins = array_merge($active_plugins, $cached_plugins);
$all_plugins[] = $current_plugin;
$all_plugins = array_values(array_unique($all_plugins));
$guard = $container->get(Latest_Autoloader_Guard::class);
if ($guard->should_stop_init($current_plugin, $all_plugins, $was_included_by_autoloader)) {
return;
}
$autoloader_handler->activate_autoloader($all_plugins);
$hook_manager = $container->get(Hook_Manager::class);
$hook_manager->add_action('shutdown', new Shutdown_Handler($plugins_handler, $cached_plugins, $was_included_by_autoloader));
}
}