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

Automattic\Jetpack\Autoloader\jpcd4dc500be73992154ab94f06c9d1b27

Autoloader_Handler::should_autoloader_reset() public WC 1.0

Checks whether the autoloader should be reset. The autoloader should be reset:

  • When a plugin is activated via a method other than a request, for example using WP-CLI.
  • When the active plugins list changes between autoloader checks, for example when filtered by a plugin.

We perform this reset because the manifest files for the plugin will have been initially unknown when selecting versions for classes and files.

If the current plugin is not already known, this method will add it to the $jetpack_autoloader_activating_plugins_paths global. The $jetpack_autoloader_cached_plugin_paths global will store a cache of the active plugin paths when last changed.

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

Хуков нет.

Возвращает

true/false. True if the autoloader must be reset, else false.

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

$Autoloader_Handler = new Autoloader_Handler();
$Autoloader_Handler->should_autoloader_reset();

Код Autoloader_Handler::should_autoloader_reset() WC 5.0.0

<?php
public function should_autoloader_reset() {
	global $jetpack_autoloader_activating_plugins_paths;
	global $jetpack_autoloader_cached_plugin_paths;

	$plugin_unknown = ! in_array( $this->current_plugin_path, $this->active_plugin_paths, true );
	if ( $plugin_unknown ) {
		if ( ! isset( $jetpack_autoloader_activating_plugins_paths ) ) {
			$jetpack_autoloader_activating_plugins_paths = array();
		}

		// If the current plugin isn't known, add it to the activating plugins list.
		$jetpack_autoloader_activating_plugins_paths[] = $this->current_plugin_path;
		$this->active_plugin_paths[]                   = $this->current_plugin_path;
	}

	$cache_invalidated = $jetpack_autoloader_cached_plugin_paths !== $this->active_plugin_paths;
	if ( $cache_invalidated ) {
		$jetpack_autoloader_cached_plugin_paths = $this->active_plugin_paths;
	}

	return $plugin_unknown || $cache_invalidated;
}