WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

Automattic\Jetpack\Autoloader\jp9320e9b596172c2a07ab2358ea2a8e89

Shutdown_Handler::__invoke() public WC 1.0

Handles the shutdown of the autoloader.

{} Это метод класса: Shutdown_Handler{}

Хуков нет.

Возвращает

null. Ничего.

Использование

$Shutdown_Handler = new Shutdown_Handler();
$Shutdown_Handler->__invoke();

Код Shutdown_Handler::__invoke() WC 5.4.1

<?php
public function __invoke() {
	// Don't save a broken cache if an error happens during some plugin's initialization.
	if ( ! did_action( 'plugins_loaded' ) ) {
		// Ensure that the cache is emptied to prevent consecutive failures if the cache is to blame.
		if ( ! empty( $this->cached_plugins ) ) {
			$this->plugins_handler->cache_plugins( array() );
		}

		return;
	}

	// Load the active plugins fresh since the list we pulled earlier might not contain
	// plugins that were activated but did not reset the autoloader. This happens
	// when a plugin is in the cache but not "active" when the autoloader loads.
	// We also want to make sure that plugins which are deactivating are not
	// considered "active" so that they will be removed from the cache now.
	try {
		$active_plugins = $this->plugins_handler->get_active_plugins( false, ! $this->was_included_by_autoloader );
	} catch ( \Exception $ex ) {
		// When the package is deleted before shutdown it will throw an exception.
		// In the event this happens we should erase the cache.
		if ( ! empty( $this->cached_plugins ) ) {
			$this->plugins_handler->cache_plugins( array() );
		}
		return;
	}

	// The paths should be sorted for easy comparisons with those loaded from the cache.
	// Note we don't need to sort the cached entries because they're already sorted.
	sort( $active_plugins );

	// We don't want to waste time saving a cache that hasn't changed.
	if ( $this->cached_plugins === $active_plugins ) {
		return;
	}

	$this->plugins_handler->cache_plugins( $active_plugins );
}