Changeset 2473439
- Timestamp:
- 02/12/2021 01:54:02 AM (5 years ago)
- Location:
- woocommerce-admin/trunk
- Files:
-
- 2 added
- 10 deleted
- 39 edited
-
dist/navigation/style-rtl.css (deleted)
-
dist/navigation/style.css (deleted)
-
images/admin_notes/img-product-light.png (deleted)
-
languages/woocommerce-admin.pot (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
-
src/Composer/Package.php (modified) (1 diff)
-
src/FeaturePlugin.php (modified) (1 diff)
-
src/Features/Navigation/Menu.php (modified) (2 diffs)
-
vendor/autoload.php (modified) (1 diff)
-
vendor/autoload_packages.php (modified) (1 diff)
-
vendor/automattic/jetpack-autoloader/composer.json (modified) (1 diff)
-
vendor/automattic/jetpack-autoloader/src/AutoloadGenerator.php (modified) (1 diff)
-
vendor/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php (modified) (2 diffs)
-
vendor/automattic/jetpack-autoloader/src/class-autoloader-handler.php (modified) (6 diffs)
-
vendor/automattic/jetpack-autoloader/src/class-autoloader-locator.php (modified) (1 diff)
-
vendor/automattic/jetpack-autoloader/src/class-autoloader.php (modified) (6 diffs)
-
vendor/automattic/jetpack-autoloader/src/class-container.php (modified) (4 diffs)
-
vendor/automattic/jetpack-autoloader/src/class-latest-autoloader-guard.php (modified) (3 diffs)
-
vendor/automattic/jetpack-autoloader/src/class-manifest-handler.php (deleted)
-
vendor/automattic/jetpack-autoloader/src/class-path-processor.php (modified) (4 diffs)
-
vendor/automattic/jetpack-autoloader/src/class-php-autoloader.php (added)
-
vendor/automattic/jetpack-autoloader/src/class-plugin-locator.php (modified) (7 diffs)
-
vendor/automattic/jetpack-autoloader/src/class-plugins-handler.php (modified) (5 diffs)
-
vendor/automattic/jetpack-autoloader/src/class-version-selector.php (modified) (2 diffs)
-
vendor/automattic/jetpack-autoloader/src/functions.php (deleted)
-
vendor/composer/ClassLoader.php (modified) (5 diffs)
-
vendor/composer/InstalledVersions.php (deleted)
-
vendor/composer/autoload_classmap.php (modified) (1 diff)
-
vendor/composer/autoload_real.php (modified) (2 diffs)
-
vendor/composer/autoload_static.php (modified) (3 diffs)
-
vendor/composer/installed.json (modified) (1 diff)
-
vendor/composer/installed.php (deleted)
-
vendor/composer/jetpack_autoload_classmap.php (modified) (1 diff)
-
vendor/composer/jetpack_autoload_psr4.php (modified) (1 diff)
-
vendor/composer/platform_check.php (deleted)
-
vendor/jetpack-autoloader/autoload_functions.php (deleted)
-
vendor/jetpack-autoloader/class-autoloader-handler.php (modified) (6 diffs)
-
vendor/jetpack-autoloader/class-autoloader-locator.php (modified) (1 diff)
-
vendor/jetpack-autoloader/class-autoloader.php (modified) (7 diffs)
-
vendor/jetpack-autoloader/class-container.php (modified) (5 diffs)
-
vendor/jetpack-autoloader/class-hook-manager.php (modified) (1 diff)
-
vendor/jetpack-autoloader/class-latest-autoloader-guard.php (modified) (4 diffs)
-
vendor/jetpack-autoloader/class-manifest-handler.php (deleted)
-
vendor/jetpack-autoloader/class-manifest-reader.php (modified) (1 diff)
-
vendor/jetpack-autoloader/class-path-processor.php (modified) (5 diffs)
-
vendor/jetpack-autoloader/class-php-autoloader.php (added)
-
vendor/jetpack-autoloader/class-plugin-locator.php (modified) (8 diffs)
-
vendor/jetpack-autoloader/class-plugins-handler.php (modified) (6 diffs)
-
vendor/jetpack-autoloader/class-version-loader.php (modified) (1 diff)
-
vendor/jetpack-autoloader/class-version-selector.php (modified) (3 diffs)
-
woocommerce-admin.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-admin/trunk/languages/woocommerce-admin.pot
r2472837 r2473439 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: WooCommerce Admin 2.0.0\n" 6 "Report-Msgid-Bugs-To: " 7 "https://wordpress.org/support/plugin/woocommerce-admin\n" 8 "POT-Creation-Date: 2021-02-11 07:08:16+00:00\n" 5 "Project-Id-Version: WooCommerce Admin 2.0.1\n" 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/temp-wc-admin\n" 7 "POT-Creation-Date: 2021-02-12 01:04:48+00:00\n" 9 8 "MIME-Version: 1.0\n" 10 9 "Content-Type: text/plain; charset=utf-8\n" … … 2720 2719 msgstr "" 2721 2720 2722 #: src/Features/Navigation/Menu.php:74 02721 #: src/Features/Navigation/Menu.php:743 2723 2722 msgid "WordPress Dashboard" 2724 2723 msgstr "" -
woocommerce-admin/trunk/readme.txt
r2472837 r2473439 5 5 Tested up to: 5.6.0 6 6 Requires PHP: 7.0 7 Stable tag: 2.0. 07 Stable tag: 2.0.1 8 8 License: GPLv3 9 9 License URI: https://github.com/woocommerce/woocommerce-admin/blob/main/license.txt -
woocommerce-admin/trunk/src/Composer/Package.php
r2472837 r2473439 25 25 * @var string 26 26 */ 27 const VERSION = '2.0. 0';27 const VERSION = '2.0.1'; 28 28 29 29 /** -
woocommerce-admin/trunk/src/FeaturePlugin.php
r2472837 r2473439 155 155 // WARNING: Do not directly edit this version number constant. 156 156 // It is updated as part of the prebuild process from the package.json value. 157 $this->define( 'WC_ADMIN_VERSION_NUMBER', '2.0. 0' );157 $this->define( 'WC_ADMIN_VERSION_NUMBER', '2.0.1' ); 158 158 } 159 159 -
woocommerce-admin/trunk/src/Features/Navigation/Menu.php
r2472837 r2473439 90 90 add_filter( 'admin_enqueue_scripts', array( $this, 'enqueue_data' ), 20 ); 91 91 92 add_filter( 'admin_menu', array( $this, 'migrate_core_child_items' ) );93 add_filter( 'admin_menu', array( $this, 'migrate_menu_items' ), PHP_INT_MAX - 1);92 add_filter( 'admin_menu', array( $this, 'migrate_core_child_items' ), PHP_INT_MAX - 1 ); 93 add_filter( 'admin_menu', array( $this, 'migrate_menu_items' ), PHP_INT_MAX - 2 ); 94 94 } 95 95 … … 619 619 // Remove excluded submenu items 620 620 if ( isset( $submenu['woocommerce'] ) ) { 621 $submenu['woocommerce'] = array_filter( 622 $submenu['woocommerce'], 623 function ( $submenu_item ) { 624 return ! in_array( $submenu_item[2], CoreMenu::get_excluded_items(), true ); 621 foreach ( $submenu['woocommerce'] as $key => $submenu_item ) { 622 if ( in_array( $submenu_item[ self::CALLBACK ], CoreMenu::get_excluded_items(), true ) ) { 623 if ( isset( $submenu['woocommerce'][ $key ][ self::CSS_CLASSES ] ) ) { 624 $submenu['woocommerce'][ $key ][ self::CSS_CLASSES ] .= ' hide-if-js'; 625 } else { 626 $submenu['woocommerce'][ $key ][] = 'hide-if-js'; 627 } 625 628 } 626 );629 } 627 630 } 628 631 -
woocommerce-admin/trunk/vendor/autoload.php
r2472837 r2473439 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit a537f22e61b714db0c75a63174123add::getLoader();7 return ComposerAutoloaderInit38b3d38eb0faab3eda1eac718e9ae633::getLoader(); -
woocommerce-admin/trunk/vendor/autoload_packages.php
r2472837 r2473439 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp a537f22e61b714db0c75a63174123add;8 namespace Automattic\Jetpack\Autoloader\jp38b3d38eb0faab3eda1eac718e9ae633; 9 9 10 10 // phpcs:ignore -
woocommerce-admin/trunk/vendor/automattic/jetpack-autoloader/composer.json
r2472837 r2473439 18 18 } 19 19 }, 20 "extra": {21 "class": "Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin"22 },23 20 "scripts": { 24 21 "phpunit": [ 25 22 "@composer install", 26 23 "./vendor/phpunit/phpunit/phpunit --colors=always" 24 ], 25 "test-coverage": [ 26 "@composer install", 27 "phpdbg -d memory_limit=2048M -d max_execution_time=900 -qrr ./vendor/bin/phpunit --coverage-clover \"$COVERAGE_DIR/clover.xml\"" 28 ], 29 "test-php": [ 30 "@composer phpunit" 27 31 ] 28 32 }, 29 33 "minimum-stability": "dev", 30 "prefer-stable": true 34 "prefer-stable": true, 35 "extra": { 36 "class": "Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin", 37 "mirror-repo": "Automattic/jetpack-autoloader" 38 } 31 39 } -
woocommerce-admin/trunk/vendor/automattic/jetpack-autoloader/src/AutoloadGenerator.php
r2472837 r2473439 138 138 * 139 139 * @param array $packageMap The package map. 140 * 140 141 * @return array 141 142 */ -
woocommerce-admin/trunk/vendor/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php
r2472837 r2473439 99 99 */ 100 100 public function postAutoloadDump( Event $event ) { 101 // When the autoloader is not required by the root package we don't want to execute it. 102 // This prevents unwanted transitive execution that generates unused autoloaders or 103 // at worst throws fatal executions. 104 if ( ! $this->isRequiredByRoot() ) { 105 return; 106 } 107 101 108 $config = $this->composer->getConfig(); 102 109 … … 159 166 } 160 167 168 /** 169 * Checks to see whether or not the root package is the one that required the autoloader. 170 * 171 * @return bool 172 */ 173 private function isRequiredByRoot() { 174 $package = $this->composer->getPackage(); 175 $requires = $package->getRequires(); 176 if ( ! is_array( $requires ) ) { 177 $requires = array(); 178 } 179 $devRequires = $package->getDevRequires(); 180 if ( ! is_array( $devRequires ) ) { 181 $devRequires = array(); 182 } 183 $requires = array_merge( $requires, $devRequires ); 184 185 if ( empty( $requires ) ) { 186 $this->io->writeError( "\n<error>The package is not required and this should never happen?</error>", true ); 187 exit(); 188 } 189 190 foreach ( $requires as $require ) { 191 if ( 'automattic/jetpack-autoloader' === $require->getTarget() ) { 192 return true; 193 } 194 } 195 196 return false; 197 } 161 198 } -
woocommerce-admin/trunk/vendor/automattic/jetpack-autoloader/src/class-autoloader-handler.php
r2472837 r2473439 1 1 <?php 2 2 /* HEADER */ // phpcs:ignore 3 4 use Automattic\Jetpack\Autoloader\AutoloadGenerator; 3 5 4 6 /** … … 6 8 */ 7 9 class Autoloader_Handler { 10 11 /** 12 * The PHP_Autoloader instance. 13 * 14 * @var PHP_Autoloader 15 */ 16 private $php_autoloader; 8 17 9 18 /** … … 31 40 * The constructor. 32 41 * 42 * @param PHP_Autoloader $php_autoloader The PHP_Autoloader instance. 33 43 * @param Hook_Manager $hook_manager The Hook_Manager instance. 34 44 * @param Manifest_Reader $manifest_reader The Manifest_Reader instance. 35 45 * @param Version_Selector $version_selector The Version_Selector instance. 36 46 */ 37 public function __construct( $hook_manager, $manifest_reader, $version_selector ) { 47 public function __construct( $php_autoloader, $hook_manager, $manifest_reader, $version_selector ) { 48 $this->php_autoloader = $php_autoloader; 38 49 $this->hook_manager = $hook_manager; 39 50 $this->manifest_reader = $manifest_reader; … … 42 53 43 54 /** 44 * Creates an autoloader using the given plugins and activates it. 55 * Checks to see whether or not an autoloader is currently in the process of initializing. 56 * 57 * @return bool 58 */ 59 public function is_initializing() { 60 // If no version has been set it means that no autoloader has started initializing yet. 61 global $jetpack_autoloader_latest_version; 62 if ( ! isset( $jetpack_autoloader_latest_version ) ) { 63 return false; 64 } 65 66 // When the version is set but the classmap is not it ALWAYS means that this is the 67 // latest autoloader and is being included by an older one. 68 global $jetpack_packages_classmap; 69 if ( empty( $jetpack_packages_classmap ) ) { 70 return true; 71 } 72 73 // Version 2.4.0 added a new global and altered the reset semantics. We need to check 74 // the other global as well since it may also point at initialization. 75 // Note: We don't need to check for the class first because every autoloader that 76 // will set the latest version global requires this class in the classmap. 77 $replacing_version = $jetpack_packages_classmap[ AutoloadGenerator::class ]['version']; 78 if ( $this->version_selector->is_dev_version( $replacing_version ) || version_compare( $replacing_version, '2.4.0.0', '>=' ) ) { 79 global $jetpack_autoloader_loader; 80 if ( ! isset( $jetpack_autoloader_loader ) ) { 81 return true; 82 } 83 } 84 85 return false; 86 } 87 88 /** 89 * Activates an autoloader using the given plugins and activates it. 45 90 * 46 91 * @param string[] $plugins The plugins to initialize the autoloader for. 47 92 */ 48 public function create_autoloader( $plugins ) {93 public function activate_autoloader( $plugins ) { 49 94 global $jetpack_packages_psr4; 50 95 $jetpack_packages_psr4 = array(); … … 66 111 ); 67 112 68 // Activate the autoloader. 69 Autoloader::activate( $loader ); 113 $this->php_autoloader->register_autoloader( $loader ); 114 115 // Now that the autoloader is active we can load the filemap. 116 $loader->load_filemap(); 70 117 } 71 118 … … 74 121 */ 75 122 public function reset_autoloader() { 76 global $jetpack_autoloader_loader; 123 $this->php_autoloader->unregister_autoloader(); 124 $this->hook_manager->reset(); 125 126 // Clear all of the autoloader globals so that older autoloaders don't do anything strange. 77 127 global $jetpack_autoloader_latest_version; 128 $jetpack_autoloader_latest_version = null; 78 129 79 $this->hook_manager->reset(); 80 $jetpack_autoloader_loader = null; 81 $jetpack_autoloader_latest_version = null; 130 global $jetpack_packages_classmap; 131 $jetpack_packages_classmap = array(); // Must be array to avoid exceptions in old autoloaders! 132 133 global $jetpack_packages_psr4; 134 $jetpack_packages_psr4 = array(); // Must be array to avoid exceptions in old autoloaders! 135 136 global $jetpack_packages_filemap; 137 $jetpack_packages_filemap = array(); // Must be array to avoid exceptions in old autoloaders! 82 138 } 83 139 } -
woocommerce-admin/trunk/vendor/automattic/jetpack-autoloader/src/class-autoloader-locator.php
r2421790 r2473439 2 2 /* HEADER */ // phpcs:ignore 3 3 4 use \Automattic\Jetpack\Autoloader\AutoloadGenerator;4 use Automattic\Jetpack\Autoloader\AutoloadGenerator; 5 5 6 6 /** -
woocommerce-admin/trunk/vendor/automattic/jetpack-autoloader/src/class-autoloader.php
r2472837 r2473439 23 23 // phpcs:disable Generic.Commenting.DocComment.MissingShort 24 24 25 /** @var Autoloader_Handler $autoloader_handler */ 26 $autoloader_handler = $container->get( Autoloader_Handler::class ); 27 28 // If the autoloader is already initializing it means that it has included us as the latest. 29 $was_included_by_autoloader = $autoloader_handler->is_initializing(); 30 25 31 /** @var Plugin_Locator $plugin_locator */ 26 32 $plugin_locator = $container->get( Plugin_Locator::class ); … … 32 38 $current_plugin = $plugin_locator->find_current_plugin(); 33 39 40 // The active plugins are those that we were able to discover on the site. This list will not 41 // include mu-plugins, those activated by code, or those who are hidden by filtering. We also 42 // want to take care to not consider the current plugin unknown if it was included by an 43 // autoloader. This avoids the case where a plugin will be marked "active" while deactivated 44 // due to it having the latest autoloader. 45 $active_plugins = $plugins_handler->get_active_plugins( true, ! $was_included_by_autoloader ); 46 34 47 // The cached plugins are all of those that were active or discovered by the autoloader during a previous request. 35 48 // Note that it's possible this list will include plugins that have since been deactivated, but after a request … … 37 50 $cached_plugins = $plugins_handler->get_cached_plugins(); 38 51 39 // The active plugins are those that we were able to discover in on the site. This list will not include 40 // mu-plugins, those activated by code, or those who are hidden by filtering. 41 // By combining these lists we can preemptively load classes for plugins that are activated via another method. 42 // While this may result in us considering packages in deactivated plugins the request after they're removed, 43 // there shouldn't be any problems as a result and the eventual consistency is reliable enough. 44 $all_plugins = array_values( array_unique( array_merge( $plugins_handler->get_active_plugins(), $cached_plugins ) ) ); 52 // We combine the active list and cached list to preemptively load classes for plugins that are 53 // presently unknown but will be loaded during the request. While this may result in us considering packages in 54 // deactivated plugins there shouldn't be any problems as a result and the eventual consistency is sufficient. 55 $all_plugins = array_merge( $active_plugins, $cached_plugins ); 56 57 // In particular we also include the current plugin to address the case where it is the latest autoloader 58 // but also unknown (and not cached). We don't want it in the active list because we don't know that it 59 // is active but we need it in the all plugins list so that it is considered by the autoloader. 60 $all_plugins[] = $current_plugin; 61 62 // We require uniqueness in the array to avoid processing the same plugin more than once. 63 $all_plugins = array_values( array_unique( $all_plugins ) ); 45 64 46 65 /** @var Latest_Autoloader_Guard $guard */ 47 66 $guard = $container->get( Latest_Autoloader_Guard::class ); 48 if ( $guard->should_stop_init( $current_plugin, $all_plugins ) ) {67 if ( $guard->should_stop_init( $current_plugin, $all_plugins, $was_included_by_autoloader ) ) { 49 68 return; 50 69 } 51 70 52 /** @var Autoloader_Handler $autoloader_handler */53 $autoloader_handler = $container->get( Autoloader_Handler::class );54 55 71 // Initialize the autoloader using the handler now that we're ready. 56 $autoloader_handler-> create_autoloader( $all_plugins );72 $autoloader_handler->activate_autoloader( $all_plugins ); 57 73 58 74 /** @var Hook_Manager $hook_manager */ … … 64 80 $hook_manager->add_action( 65 81 'shutdown', 66 function () use ( $plugins_handler, $cached_plugins ) {82 function () use ( $plugins_handler, $cached_plugins, $was_included_by_autoloader ) { 67 83 // Don't save a broken cache if an error happens during some plugin's initialization. 68 84 if ( ! did_action( 'plugins_loaded' ) ) { … … 75 91 } 76 92 77 // Load the active plugins fresh since the list we have abovemight not contain93 // Load the active plugins fresh since the list we pulled earlier might not contain 78 94 // plugins that were activated but did not reset the autoloader. This happens 79 // because they were already included in the cache. 80 $active_plugins = $plugins_handler->get_active_plugins(); 95 // when a plugin is in the cache but not "active" when the autoloader loads. 96 // We also want to make sure that plugins which are deactivating are not 97 // considered "active" so that they will be removed from the cache now. 98 $active_plugins = $plugins_handler->get_active_plugins( false, ! $was_included_by_autoloader ); 81 99 82 100 // The paths should be sorted for easy comparisons with those loaded from the cache. … … 95 113 // phpcs:enable Generic.Commenting.DocComment.MissingShort 96 114 } 97 98 /**99 * Loads a class file if one could be found.100 *101 * @param string $class_name The name of the class to autoload.102 *103 * @return bool Indicates whether or not a class file was loaded.104 */105 public static function load_class( $class_name ) {106 global $jetpack_autoloader_loader;107 if ( ! isset( $jetpack_autoloader_loader ) ) {108 return;109 }110 111 $file = $jetpack_autoloader_loader->find_class_file( $class_name );112 if ( ! isset( $file ) ) {113 return false;114 }115 116 require $file;117 return true;118 }119 120 /**121 * Activates this autoloader and deactivates any other v2 autoloaders that may be present.122 *123 * @param Version_Loader $version_loader The version loader for our autoloader.124 */125 public static function activate( $version_loader ) {126 // Set the global autoloader to indicate that we've activated this autoloader.127 global $jetpack_autoloader_loader;128 $jetpack_autoloader_loader = $version_loader;129 130 // Remove any v2 autoloader that we've already registered.131 $autoload_chain = spl_autoload_functions();132 foreach ( $autoload_chain as $autoloader ) {133 // Jetpack autoloaders are always strings.134 if ( ! is_string( $autoloader ) ) {135 continue;136 }137 138 // We can identify a v2 autoloader using the namespace prefix without the unique suffix.139 if ( 'Automattic\\Jetpack\\Autoloader\\jp' === substr( $autoloader, 0, 32 ) ) {140 spl_autoload_unregister( $autoloader );141 continue;142 }143 }144 145 // Ensure that the autoloader is first to avoid contention with others.146 spl_autoload_register( self::class . '::load_class', true, true );147 148 // Now that we've activated the autoloader we should load the filemap.149 $jetpack_autoloader_loader->load_filemap();150 }151 115 } -
woocommerce-admin/trunk/vendor/automattic/jetpack-autoloader/src/class-container.php
r2472837 r2473439 88 88 ); 89 89 90 require_once __DIR__ . '/class-php-autoloader.php'; 91 $this->dependencies[ PHP_Autoloader::class ] = new PHP_Autoloader(); 92 90 93 require_once __DIR__ . '/class-manifest-reader.php'; 91 94 $this->dependencies[ Manifest_Reader::class ] = new Manifest_Reader( … … 101 104 require_once __DIR__ . '/class-autoloader-handler.php'; 102 105 $this->dependencies[ Autoloader_Handler::class ] = new Autoloader_Handler( 106 $this->get( PHP_Autoloader::class ), 103 107 $this->get( Hook_Manager::class ), 104 108 $this->get( Manifest_Reader::class ), … … 121 125 */ 122 126 private function initialize_globals() { 127 /* 128 * This global was retired in version 2.9. The value is set to 'false' to maintain 129 * compatibility with older versions of the autoloader. 130 */ 131 global $jetpack_autoloader_including_latest; 132 $jetpack_autoloader_including_latest = false; 133 123 134 // Not all plugins can be found using the locator. In cases where a plugin loads the autoloader 124 135 // but was not discoverable, we will record them in this array to track them as "active". … … 127 138 $jetpack_autoloader_activating_plugins_paths = array(); 128 139 } 129 130 // Since older autoloaders include newer ones, we need to be able to tell the difference between an131 // inclusion via autoloader and an inclusion via plugin file. This allows the autoloader to132 // perform special tasks for each kind of inclusion.133 global $jetpack_autoloader_including_latest;134 if ( ! isset( $jetpack_autoloader_including_latest ) ) {135 // If the latest version global has been set but the including latest hasn't, it means that an136 // older autoloader without support for the global is including us.137 global $jetpack_autoloader_latest_version;138 $jetpack_autoloader_including_latest = isset( $jetpack_autoloader_latest_version );139 }140 140 } 141 141 } -
woocommerce-admin/trunk/vendor/automattic/jetpack-autoloader/src/class-latest-autoloader-guard.php
r2472837 r2473439 46 46 * is not it. 47 47 * 48 * @param string $current_plugin The current plugin we're checking. 49 * @param string[] $plugins The active plugins to check for autoloaders in. 48 * @param string $current_plugin The current plugin we're checking. 49 * @param string[] $plugins The active plugins to check for autoloaders in. 50 * @param bool $was_included_by_autoloader Indicates whether or not this autoloader was included by another. 50 51 * 51 52 * @return bool True if we should stop initialization, otherwise false. 52 53 */ 53 public function should_stop_init( $current_plugin, $plugins ) { 54 global $jetpack_autoloader_including_latest; 54 public function should_stop_init( $current_plugin, $plugins, $was_included_by_autoloader ) { 55 55 global $jetpack_autoloader_latest_version; 56 57 // When we're being included from an older autoloader we need to58 // reset the latest version so that the new autoloader can look59 // for the latest autoloader again.60 if ( $jetpack_autoloader_including_latest ) {61 $jetpack_autoloader_latest_version = null;62 }63 56 64 57 // We need to reset the autoloader when the plugins change because … … 68 61 } 69 62 70 // Don't bother initializing the autoloader if it already has been. 71 if ( isset( $jetpack_autoloader_latest_version ) ) { 63 // When the latest autoloader has already been found we don't need to search for it again. 64 // We should take care however because this will also trigger if the autoloader has been 65 // included by an older one. 66 if ( isset( $jetpack_autoloader_latest_version ) && ! $was_included_by_autoloader ) { 72 67 return true; 73 68 } … … 75 70 $latest_plugin = $this->autoloader_locator->find_latest_autoloader( $plugins, $jetpack_autoloader_latest_version ); 76 71 if ( isset( $latest_plugin ) && $latest_plugin !== $current_plugin ) { 77 $jetpack_autoloader_including_latest = true;78 72 require $this->autoloader_locator->get_autoloader_path( $latest_plugin ); 79 $jetpack_autoloader_including_latest = false;80 73 return true; 81 74 } -
woocommerce-admin/trunk/vendor/automattic/jetpack-autoloader/src/class-path-processor.php
r2472837 r2473439 10 10 * 11 11 * @param string $path The path we want to process. 12 * 12 13 * @return string The tokenized path. 13 14 */ … … 32 33 * 33 34 * @param string $tokenized_path The path we want to process. 35 * 34 36 * @return string The expanded path. 35 37 */ … … 57 59 * @param string $file The plugin or theme file to resolve. 58 60 * @param array $directories_to_check The directories we should check for the file if it isn't an absolute path. 61 * 59 62 * @return string|false Returns the absolute path to the directory, otherwise false. 60 63 */ … … 115 118 * 116 119 * @param string $path The path to check. 120 * 117 121 * @return bool True if the path is absolute, otherwise false. 118 122 */ -
woocommerce-admin/trunk/vendor/automattic/jetpack-autoloader/src/class-plugin-locator.php
r2472837 r2473439 27 27 * 28 28 * @return string $path The path to the current plugin. 29 * 29 30 * @throws \RuntimeException If the current plugin does not have an autoloader. 30 31 */ … … 51 52 */ 52 53 public function find_using_option( $option_name, $site_option = false ) { 53 $raw = $site_option ? get_site_option( $option_name , array() ) : get_option( $option_name, array());54 if ( empty( $raw )) {54 $raw = $site_option ? get_site_option( $option_name ) : get_option( $option_name ); 55 if ( false === $raw ) { 55 56 return array(); 56 57 } … … 60 61 61 62 /** 62 * Checks for plugins that are being activated in this request and returns all that it finds. 63 * Checks for plugins in the `action` request parameter. 64 * 65 * @param string[] $allowed_actions The actions that we're allowed to return plugins for. 63 66 * 64 67 * @return array $plugin_paths The list of absolute paths we've found. 65 68 */ 66 public function find_ activating_this_request() {69 public function find_using_request_action( $allowed_actions ) { 67 70 // phpcs:disable WordPress.Security.NonceVerification.Recommended 68 71 … … 78 81 } 79 82 83 $action = isset( $_REQUEST['action'] ) ? wp_unslash( $_REQUEST['action'] ) : false; 84 if ( ! in_array( $action, $allowed_actions, true ) ) { 85 return array(); 86 } 87 80 88 $plugin_slugs = array(); 81 82 $action = isset( $_REQUEST['action'] ) ? wp_unslash( $_REQUEST['action'] ) : false;83 89 switch ( $action ) { 84 90 case 'activate': 91 case 'deactivate': 85 92 if ( empty( $_REQUEST['plugin'] ) ) { 86 93 break; … … 91 98 92 99 case 'activate-selected': 100 case 'deactivate-selected': 93 101 if ( empty( $_REQUEST['checked'] ) ) { 94 102 break; … … 99 107 } 100 108 109 // phpcs:enable WordPress.Security.NonceVerification.Recommended 101 110 return $this->convert_plugins_to_paths( $plugin_slugs ); 102 111 } … … 112 121 */ 113 122 private function convert_plugins_to_paths( $plugins ) { 123 if ( ! is_array( $plugins ) || empty( $plugins ) ) { 124 return array(); 125 } 126 114 127 // We're going to look for plugins in the standard directories. 115 128 $path_constants = array( WP_PLUGIN_DIR, WPMU_PLUGIN_DIR ); -
woocommerce-admin/trunk/vendor/automattic/jetpack-autoloader/src/class-plugins-handler.php
r2472837 r2473439 39 39 * Gets all of the active plugins we can find. 40 40 * 41 * @param bool $include_deactivating When true, plugins deactivating this request will be considered active. 42 * @param bool $record_unknown When true, the current plugin will be marked as active and recorded when unknown. 43 * 41 44 * @return string[] 42 45 */ 43 public function get_active_plugins( ) {46 public function get_active_plugins( $include_deactivating, $record_unknown ) { 44 47 global $jetpack_autoloader_activating_plugins_paths; 45 global $jetpack_autoloader_including_latest;46 48 47 49 // We're going to build a unique list of plugins from a few different sources … … 74 76 } 75 77 76 $plugins = $this->plugin_locator->find_activating_this_request(); 78 // These actions contain plugins that are being activated/deactivated during this request. 79 $plugins = $this->plugin_locator->find_using_request_action( array( 'activate', 'activate-selected', 'deactivate', 'deactivate-selected' ) ); 77 80 foreach ( $plugins as $path ) { 78 81 $active_plugins[ $path ] = $path; … … 87 90 // been changed since it was saved in the global. 88 91 $current_plugin = $this->plugin_locator->find_current_plugin(); 89 if ( ! in_array( $current_plugin, $active_plugins, true ) && ! $jetpack_autoloader_including_latest) {92 if ( $record_unknown && ! in_array( $current_plugin, $active_plugins, true ) ) { 90 93 $active_plugins[ $current_plugin ] = $current_plugin; 91 94 $jetpack_autoloader_activating_plugins_paths[] = $current_plugin; 95 } 96 97 // When deactivating plugins aren't desired we should entirely remove them from the active list. 98 if ( ! $include_deactivating ) { 99 // These actions contain plugins that are being deactivated during this request. 100 $plugins = $this->plugin_locator->find_using_request_action( array( 'deactivate', 'deactivate-selected' ) ); 101 foreach ( $plugins as $path ) { 102 unset( $active_plugins[ $path ] ); 103 } 92 104 } 93 105 … … 103 115 public function get_cached_plugins() { 104 116 $cached = get_transient( self::TRANSIENT_KEY ); 105 if ( false === $cached) {117 if ( ! is_array( $cached ) || empty( $cached ) ) { 106 118 return array(); 107 119 } … … 135 147 global $jetpack_autoloader_cached_plugin_paths; 136 148 137 // When no autoloader has executed there is nothing to have changed.138 if ( ! isset( $jetpack_autoloader_cached_plugin_paths ) ) {139 $jetpack_autoloader_cached_plugin_paths = $plugins;140 return false;141 }142 143 149 if ( $jetpack_autoloader_cached_plugin_paths !== $plugins ) { 144 150 $jetpack_autoloader_cached_plugin_paths = $plugins; -
woocommerce-admin/trunk/vendor/automattic/jetpack-autoloader/src/class-version-selector.php
r2472837 r2473439 26 26 } 27 27 28 if ( $use_dev_versions && $this->is_ package_version_dev( $selected_version ) ) {28 if ( $use_dev_versions && $this->is_dev_version( $selected_version ) ) { 29 29 return false; 30 30 } 31 31 32 if ( $this->is_ package_version_dev( $compare_version ) ) {32 if ( $this->is_dev_version( $compare_version ) ) { 33 33 if ( $use_dev_versions ) { 34 34 return true; … … 52 52 * @return bool True if the version is a dev version, else false. 53 53 */ 54 p rivate function is_package_version_dev( $version ) {54 public function is_dev_version( $version ) { 55 55 if ( 'dev-' === substr( $version, 0, 4 ) || '9999999-dev' === $version ) { 56 56 return true; -
woocommerce-admin/trunk/vendor/composer/ClassLoader.php
r2472837 r2473439 38 38 * @author Fabien Potencier <fabien@symfony.com> 39 39 * @author Jordi Boggiano <j.boggiano@seld.be> 40 * @see http s://www.php-fig.org/psr/psr-0/41 * @see http s://www.php-fig.org/psr/psr-4/40 * @see http://www.php-fig.org/psr/psr-0/ 41 * @see http://www.php-fig.org/psr/psr-4/ 42 42 */ 43 43 class ClassLoader 44 44 { 45 private $vendorDir;46 47 45 // PSR-4 48 46 private $prefixLengthsPsr4 = array(); … … 59 57 private $missingClasses = array(); 60 58 private $apcuPrefix; 61 62 private static $registeredLoaders = array();63 64 public function __construct($vendorDir = null)65 {66 $this->vendorDir = $vendorDir;67 }68 59 69 60 public function getPrefixes() … … 310 301 { 311 302 spl_autoload_register(array($this, 'loadClass'), true, $prepend); 312 313 if (null === $this->vendorDir) {314 //no-op315 } elseif ($prepend) {316 self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;317 } else {318 unset(self::$registeredLoaders[$this->vendorDir]);319 self::$registeredLoaders[$this->vendorDir] = $this;320 }321 303 } 322 304 … … 327 309 { 328 310 spl_autoload_unregister(array($this, 'loadClass')); 329 330 if (null !== $this->vendorDir) {331 unset(self::$registeredLoaders[$this->vendorDir]);332 }333 311 } 334 312 … … 388 366 389 367 return $file; 390 }391 392 /**393 * Returns the currently registered loaders indexed by their corresponding vendor directories.394 *395 * @return self[]396 */397 public static function getRegisteredLoaders()398 {399 return self::$registeredLoaders;400 368 } 401 369 -
woocommerce-admin/trunk/vendor/composer/autoload_classmap.php
r2472837 r2473439 8 8 return array( 9 9 'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php', 10 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',11 10 ); -
woocommerce-admin/trunk/vendor/composer/autoload_real.php
r2472837 r2473439 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit a537f22e61b714db0c75a63174123add5 class ComposerAutoloaderInit38b3d38eb0faab3eda1eac718e9ae633 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 require __DIR__ . '/platform_check.php'; 26 27 spl_autoload_register(array('ComposerAutoloaderInita537f22e61b714db0c75a63174123add', 'loadClassLoader'), true, true); 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); 29 spl_autoload_unregister(array('ComposerAutoloaderInita537f22e61b714db0c75a63174123add', 'loadClassLoader')); 25 spl_autoload_register(array('ComposerAutoloaderInit38b3d38eb0faab3eda1eac718e9ae633', 'loadClassLoader'), true, true); 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(); 27 spl_autoload_unregister(array('ComposerAutoloaderInit38b3d38eb0faab3eda1eac718e9ae633', 'loadClassLoader')); 30 28 31 29 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); 32 30 if ($useStaticLoader) { 33 require __DIR__ . '/autoload_static.php';31 require_once __DIR__ . '/autoload_static.php'; 34 32 35 call_user_func(\Composer\Autoload\ComposerStaticInit a537f22e61b714db0c75a63174123add::getInitializer($loader));33 call_user_func(\Composer\Autoload\ComposerStaticInit38b3d38eb0faab3eda1eac718e9ae633::getInitializer($loader)); 36 34 } else { 37 35 $map = require __DIR__ . '/autoload_namespaces.php'; -
woocommerce-admin/trunk/vendor/composer/autoload_static.php
r2472837 r2473439 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit a537f22e61b714db0c75a63174123add7 class ComposerStaticInit38b3d38eb0faab3eda1eac718e9ae633 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 36 36 public static $classMap = array ( 37 37 'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php', 38 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',39 38 ); 40 39 … … 42 41 { 43 42 return \Closure::bind(function () use ($loader) { 44 $loader->prefixLengthsPsr4 = ComposerStaticInit a537f22e61b714db0c75a63174123add::$prefixLengthsPsr4;45 $loader->prefixDirsPsr4 = ComposerStaticInit a537f22e61b714db0c75a63174123add::$prefixDirsPsr4;46 $loader->classMap = ComposerStaticInit a537f22e61b714db0c75a63174123add::$classMap;43 $loader->prefixLengthsPsr4 = ComposerStaticInit38b3d38eb0faab3eda1eac718e9ae633::$prefixLengthsPsr4; 44 $loader->prefixDirsPsr4 = ComposerStaticInit38b3d38eb0faab3eda1eac718e9ae633::$prefixDirsPsr4; 45 $loader->classMap = ComposerStaticInit38b3d38eb0faab3eda1eac718e9ae633::$classMap; 47 46 48 47 }, null, ClassLoader::class); -
woocommerce-admin/trunk/vendor/composer/installed.json
r2472837 r2473439 1 { 2 "packages": [ 3 { 4 "name": "automattic/jetpack-autoloader", 5 "version": "v2.7.1", 6 "version_normalized": "2.7.1.0", 7 "source": { 8 "type": "git", 9 "url": "https://github.com/Automattic/jetpack-autoloader.git", 10 "reference": "5437697a56aefbdf707849b9833e1b36093d7a73" 1 [ 2 { 3 "name": "automattic/jetpack-autoloader", 4 "version": "v2.9.1", 5 "version_normalized": "2.9.1.0", 6 "source": { 7 "type": "git", 8 "url": "https://github.com/Automattic/jetpack-autoloader.git", 9 "reference": "d6ca2cc26ad6963e1be19b3338a9e98f40d9bd88" 10 }, 11 "dist": { 12 "type": "zip", 13 "url": "https://api.github.com/repos/Automattic/jetpack-autoloader/zipball/d6ca2cc26ad6963e1be19b3338a9e98f40d9bd88", 14 "reference": "d6ca2cc26ad6963e1be19b3338a9e98f40d9bd88", 15 "shasum": "" 16 }, 17 "require": { 18 "composer-plugin-api": "^1.1 || ^2.0" 19 }, 20 "require-dev": { 21 "yoast/phpunit-polyfills": "0.2.0" 22 }, 23 "time": "2021-02-05T19:07:06+00:00", 24 "type": "composer-plugin", 25 "extra": { 26 "class": "Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin", 27 "mirror-repo": "Automattic/jetpack-autoloader" 28 }, 29 "installation-source": "dist", 30 "autoload": { 31 "classmap": [ 32 "src/AutoloadGenerator.php" 33 ], 34 "psr-4": { 35 "Automattic\\Jetpack\\Autoloader\\": "src" 36 } 37 }, 38 "notification-url": "https://packagist.org/downloads/", 39 "license": [ 40 "GPL-2.0-or-later" 41 ], 42 "description": "Creates a custom autoloader for a plugin or theme." 43 }, 44 { 45 "name": "composer/installers", 46 "version": "v1.9.0", 47 "version_normalized": "1.9.0.0", 48 "source": { 49 "type": "git", 50 "url": "https://github.com/composer/installers.git", 51 "reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca" 52 }, 53 "dist": { 54 "type": "zip", 55 "url": "https://api.github.com/repos/composer/installers/zipball/b93bcf0fa1fccb0b7d176b0967d969691cd74cca", 56 "reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca", 57 "shasum": "" 58 }, 59 "require": { 60 "composer-plugin-api": "^1.0 || ^2.0" 61 }, 62 "replace": { 63 "roundcube/plugin-installer": "*", 64 "shama/baton": "*" 65 }, 66 "require-dev": { 67 "composer/composer": "1.6.* || 2.0.*@dev", 68 "composer/semver": "1.0.* || 2.0.*@dev", 69 "phpunit/phpunit": "^4.8.36", 70 "sebastian/comparator": "^1.2.4", 71 "symfony/process": "^2.3" 72 }, 73 "time": "2020-04-07T06:57:05+00:00", 74 "type": "composer-plugin", 75 "extra": { 76 "class": "Composer\\Installers\\Plugin", 77 "branch-alias": { 78 "dev-master": "1.0-dev" 79 } 80 }, 81 "installation-source": "dist", 82 "autoload": { 83 "psr-4": { 84 "Composer\\Installers\\": "src/Composer/Installers" 85 } 86 }, 87 "notification-url": "https://packagist.org/downloads/", 88 "license": [ 89 "MIT" 90 ], 91 "authors": [ 92 { 93 "name": "Kyle Robinson Young", 94 "email": "kyle@dontkry.com", 95 "homepage": "https://github.com/shama" 96 } 97 ], 98 "description": "A multi-framework Composer library installer", 99 "homepage": "https://composer.github.io/installers/", 100 "keywords": [ 101 "Craft", 102 "Dolibarr", 103 "Eliasis", 104 "Hurad", 105 "ImageCMS", 106 "Kanboard", 107 "Lan Management System", 108 "MODX Evo", 109 "MantisBT", 110 "Mautic", 111 "Maya", 112 "OXID", 113 "Plentymarkets", 114 "Porto", 115 "RadPHP", 116 "SMF", 117 "Thelia", 118 "Whmcs", 119 "WolfCMS", 120 "agl", 121 "aimeos", 122 "annotatecms", 123 "attogram", 124 "bitrix", 125 "cakephp", 126 "chef", 127 "cockpit", 128 "codeigniter", 129 "concrete5", 130 "croogo", 131 "dokuwiki", 132 "drupal", 133 "eZ Platform", 134 "elgg", 135 "expressionengine", 136 "fuelphp", 137 "grav", 138 "installer", 139 "itop", 140 "joomla", 141 "known", 142 "kohana", 143 "laravel", 144 "lavalite", 145 "lithium", 146 "magento", 147 "majima", 148 "mako", 149 "mediawiki", 150 "modulework", 151 "modx", 152 "moodle", 153 "osclass", 154 "phpbb", 155 "piwik", 156 "ppi", 157 "puppet", 158 "pxcms", 159 "reindex", 160 "roundcube", 161 "shopware", 162 "silverstripe", 163 "sydes", 164 "sylius", 165 "symfony", 166 "typo3", 167 "wordpress", 168 "yawik", 169 "zend", 170 "zikula" 171 ], 172 "support": { 173 "issues": "https://github.com/composer/installers/issues", 174 "source": "https://github.com/composer/installers/tree/v1.9.0" 175 }, 176 "funding": [ 177 { 178 "url": "https://packagist.com", 179 "type": "custom" 11 180 }, 12 "dist": { 13 "type": "zip", 14 "url": "https://api.github.com/repos/Automattic/jetpack-autoloader/zipball/5437697a56aefbdf707849b9833e1b36093d7a73", 15 "reference": "5437697a56aefbdf707849b9833e1b36093d7a73", 16 "shasum": "" 17 }, 18 "require": { 19 "composer-plugin-api": "^1.1 || ^2.0" 20 }, 21 "require-dev": { 22 "yoast/phpunit-polyfills": "0.2.0" 23 }, 24 "time": "2020-12-18T22:33:59+00:00", 25 "type": "composer-plugin", 26 "extra": { 27 "class": "Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin" 28 }, 29 "installation-source": "dist", 30 "autoload": { 31 "classmap": [ 32 "src/AutoloadGenerator.php" 33 ], 34 "psr-4": { 35 "Automattic\\Jetpack\\Autoloader\\": "src" 36 } 37 }, 38 "notification-url": "https://packagist.org/downloads/", 39 "license": [ 40 "GPL-2.0-or-later" 41 ], 42 "description": "Creates a custom autoloader for a plugin or theme.", 43 "support": { 44 "source": "https://github.com/Automattic/jetpack-autoloader/tree/v2.7.1" 45 }, 46 "install-path": "../automattic/jetpack-autoloader" 47 }, 48 { 49 "name": "composer/installers", 50 "version": "v1.9.0", 51 "version_normalized": "1.9.0.0", 52 "source": { 53 "type": "git", 54 "url": "https://github.com/composer/installers.git", 55 "reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca" 56 }, 57 "dist": { 58 "type": "zip", 59 "url": "https://api.github.com/repos/composer/installers/zipball/b93bcf0fa1fccb0b7d176b0967d969691cd74cca", 60 "reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca", 61 "shasum": "" 62 }, 63 "require": { 64 "composer-plugin-api": "^1.0 || ^2.0" 65 }, 66 "replace": { 67 "roundcube/plugin-installer": "*", 68 "shama/baton": "*" 69 }, 70 "require-dev": { 71 "composer/composer": "1.6.* || 2.0.*@dev", 72 "composer/semver": "1.0.* || 2.0.*@dev", 73 "phpunit/phpunit": "^4.8.36", 74 "sebastian/comparator": "^1.2.4", 75 "symfony/process": "^2.3" 76 }, 77 "time": "2020-04-07T06:57:05+00:00", 78 "type": "composer-plugin", 79 "extra": { 80 "class": "Composer\\Installers\\Plugin", 81 "branch-alias": { 82 "dev-master": "1.0-dev" 83 } 84 }, 85 "installation-source": "dist", 86 "autoload": { 87 "psr-4": { 88 "Composer\\Installers\\": "src/Composer/Installers" 89 } 90 }, 91 "notification-url": "https://packagist.org/downloads/", 92 "license": [ 93 "MIT" 94 ], 95 "authors": [ 96 { 97 "name": "Kyle Robinson Young", 98 "email": "kyle@dontkry.com", 99 "homepage": "https://github.com/shama" 100 } 101 ], 102 "description": "A multi-framework Composer library installer", 103 "homepage": "https://composer.github.io/installers/", 104 "keywords": [ 105 "Craft", 106 "Dolibarr", 107 "Eliasis", 108 "Hurad", 109 "ImageCMS", 110 "Kanboard", 111 "Lan Management System", 112 "MODX Evo", 113 "MantisBT", 114 "Mautic", 115 "Maya", 116 "OXID", 117 "Plentymarkets", 118 "Porto", 119 "RadPHP", 120 "SMF", 121 "Thelia", 122 "Whmcs", 123 "WolfCMS", 124 "agl", 125 "aimeos", 126 "annotatecms", 127 "attogram", 128 "bitrix", 129 "cakephp", 130 "chef", 131 "cockpit", 132 "codeigniter", 133 "concrete5", 134 "croogo", 135 "dokuwiki", 136 "drupal", 137 "eZ Platform", 138 "elgg", 139 "expressionengine", 140 "fuelphp", 141 "grav", 142 "installer", 143 "itop", 144 "joomla", 145 "known", 146 "kohana", 147 "laravel", 148 "lavalite", 149 "lithium", 150 "magento", 151 "majima", 152 "mako", 153 "mediawiki", 154 "modulework", 155 "modx", 156 "moodle", 157 "osclass", 158 "phpbb", 159 "piwik", 160 "ppi", 161 "puppet", 162 "pxcms", 163 "reindex", 164 "roundcube", 165 "shopware", 166 "silverstripe", 167 "sydes", 168 "sylius", 169 "symfony", 170 "typo3", 171 "wordpress", 172 "yawik", 173 "zend", 174 "zikula" 175 ], 176 "support": { 177 "issues": "https://github.com/composer/installers/issues", 178 "source": "https://github.com/composer/installers/tree/v1.9.0" 179 }, 180 "funding": [ 181 { 182 "url": "https://packagist.com", 183 "type": "custom" 184 }, 185 { 186 "url": "https://tidelift.com/funding/github/packagist/composer/composer", 187 "type": "tidelift" 188 } 189 ], 190 "install-path": "./installers" 191 } 192 ], 193 "dev": false, 194 "dev-package-names": [] 195 } 181 { 182 "url": "https://tidelift.com/funding/github/packagist/composer/composer", 183 "type": "tidelift" 184 } 185 ] 186 } 187 ] -
woocommerce-admin/trunk/vendor/composer/jetpack_autoload_classmap.php
r2472837 r2473439 8 8 return array( 9 9 'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => array( 10 'version' => '2. 7.1.0',10 'version' => '2.9.1.0', 11 11 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php' 12 12 ), -
woocommerce-admin/trunk/vendor/composer/jetpack_autoload_psr4.php
r2472837 r2473439 12 12 ), 13 13 'Automattic\\WooCommerce\\Admin\\' => array( 14 'version' => '2.0. 0.0',14 'version' => '2.0.1.0', 15 15 'path' => array( $baseDir . '/src' ) 16 16 ), 17 17 'Automattic\\Jetpack\\Autoloader\\' => array( 18 'version' => '2. 7.1.0',18 'version' => '2.9.1.0', 19 19 'path' => array( $vendorDir . '/automattic/jetpack-autoloader/src' ) 20 20 ), -
woocommerce-admin/trunk/vendor/jetpack-autoloader/class-autoloader-handler.php
r2472837 r2473439 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp a537f22e61b714db0c75a63174123add;8 namespace Automattic\Jetpack\Autoloader\jp38b3d38eb0faab3eda1eac718e9ae633; 9 9 10 10 // phpcs:ignore 11 12 use Automattic\Jetpack\Autoloader\AutoloadGenerator; 11 13 12 14 /** … … 14 16 */ 15 17 class Autoloader_Handler { 18 19 /** 20 * The PHP_Autoloader instance. 21 * 22 * @var PHP_Autoloader 23 */ 24 private $php_autoloader; 16 25 17 26 /** … … 39 48 * The constructor. 40 49 * 50 * @param PHP_Autoloader $php_autoloader The PHP_Autoloader instance. 41 51 * @param Hook_Manager $hook_manager The Hook_Manager instance. 42 52 * @param Manifest_Reader $manifest_reader The Manifest_Reader instance. 43 53 * @param Version_Selector $version_selector The Version_Selector instance. 44 54 */ 45 public function __construct( $hook_manager, $manifest_reader, $version_selector ) { 55 public function __construct( $php_autoloader, $hook_manager, $manifest_reader, $version_selector ) { 56 $this->php_autoloader = $php_autoloader; 46 57 $this->hook_manager = $hook_manager; 47 58 $this->manifest_reader = $manifest_reader; … … 50 61 51 62 /** 52 * Creates an autoloader using the given plugins and activates it. 63 * Checks to see whether or not an autoloader is currently in the process of initializing. 64 * 65 * @return bool 66 */ 67 public function is_initializing() { 68 // If no version has been set it means that no autoloader has started initializing yet. 69 global $jetpack_autoloader_latest_version; 70 if ( ! isset( $jetpack_autoloader_latest_version ) ) { 71 return false; 72 } 73 74 // When the version is set but the classmap is not it ALWAYS means that this is the 75 // latest autoloader and is being included by an older one. 76 global $jetpack_packages_classmap; 77 if ( empty( $jetpack_packages_classmap ) ) { 78 return true; 79 } 80 81 // Version 2.4.0 added a new global and altered the reset semantics. We need to check 82 // the other global as well since it may also point at initialization. 83 // Note: We don't need to check for the class first because every autoloader that 84 // will set the latest version global requires this class in the classmap. 85 $replacing_version = $jetpack_packages_classmap[ AutoloadGenerator::class ]['version']; 86 if ( $this->version_selector->is_dev_version( $replacing_version ) || version_compare( $replacing_version, '2.4.0.0', '>=' ) ) { 87 global $jetpack_autoloader_loader; 88 if ( ! isset( $jetpack_autoloader_loader ) ) { 89 return true; 90 } 91 } 92 93 return false; 94 } 95 96 /** 97 * Activates an autoloader using the given plugins and activates it. 53 98 * 54 99 * @param string[] $plugins The plugins to initialize the autoloader for. 55 100 */ 56 public function create_autoloader( $plugins ) {101 public function activate_autoloader( $plugins ) { 57 102 global $jetpack_packages_psr4; 58 103 $jetpack_packages_psr4 = array(); … … 74 119 ); 75 120 76 // Activate the autoloader. 77 Autoloader::activate( $loader ); 121 $this->php_autoloader->register_autoloader( $loader ); 122 123 // Now that the autoloader is active we can load the filemap. 124 $loader->load_filemap(); 78 125 } 79 126 … … 82 129 */ 83 130 public function reset_autoloader() { 84 global $jetpack_autoloader_loader; 131 $this->php_autoloader->unregister_autoloader(); 132 $this->hook_manager->reset(); 133 134 // Clear all of the autoloader globals so that older autoloaders don't do anything strange. 85 135 global $jetpack_autoloader_latest_version; 136 $jetpack_autoloader_latest_version = null; 86 137 87 $this->hook_manager->reset(); 88 $jetpack_autoloader_loader = null; 89 $jetpack_autoloader_latest_version = null; 138 global $jetpack_packages_classmap; 139 $jetpack_packages_classmap = array(); // Must be array to avoid exceptions in old autoloaders! 140 141 global $jetpack_packages_psr4; 142 $jetpack_packages_psr4 = array(); // Must be array to avoid exceptions in old autoloaders! 143 144 global $jetpack_packages_filemap; 145 $jetpack_packages_filemap = array(); // Must be array to avoid exceptions in old autoloaders! 90 146 } 91 147 } -
woocommerce-admin/trunk/vendor/jetpack-autoloader/class-autoloader-locator.php
r2472837 r2473439 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp a537f22e61b714db0c75a63174123add;8 namespace Automattic\Jetpack\Autoloader\jp38b3d38eb0faab3eda1eac718e9ae633; 9 9 10 10 // phpcs:ignore 11 11 12 use \Automattic\Jetpack\Autoloader\AutoloadGenerator;12 use Automattic\Jetpack\Autoloader\AutoloadGenerator; 13 13 14 14 /** -
woocommerce-admin/trunk/vendor/jetpack-autoloader/class-autoloader.php
r2472837 r2473439 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp a537f22e61b714db0c75a63174123add;8 namespace Automattic\Jetpack\Autoloader\jp38b3d38eb0faab3eda1eac718e9ae633; 9 9 10 10 // phpcs:ignore … … 31 31 // phpcs:disable Generic.Commenting.DocComment.MissingShort 32 32 33 /** @var Autoloader_Handler $autoloader_handler */ 34 $autoloader_handler = $container->get( Autoloader_Handler::class ); 35 36 // If the autoloader is already initializing it means that it has included us as the latest. 37 $was_included_by_autoloader = $autoloader_handler->is_initializing(); 38 33 39 /** @var Plugin_Locator $plugin_locator */ 34 40 $plugin_locator = $container->get( Plugin_Locator::class ); … … 40 46 $current_plugin = $plugin_locator->find_current_plugin(); 41 47 48 // The active plugins are those that we were able to discover on the site. This list will not 49 // include mu-plugins, those activated by code, or those who are hidden by filtering. We also 50 // want to take care to not consider the current plugin unknown if it was included by an 51 // autoloader. This avoids the case where a plugin will be marked "active" while deactivated 52 // due to it having the latest autoloader. 53 $active_plugins = $plugins_handler->get_active_plugins( true, ! $was_included_by_autoloader ); 54 42 55 // The cached plugins are all of those that were active or discovered by the autoloader during a previous request. 43 56 // Note that it's possible this list will include plugins that have since been deactivated, but after a request … … 45 58 $cached_plugins = $plugins_handler->get_cached_plugins(); 46 59 47 // The active plugins are those that we were able to discover in on the site. This list will not include 48 // mu-plugins, those activated by code, or those who are hidden by filtering. 49 // By combining these lists we can preemptively load classes for plugins that are activated via another method. 50 // While this may result in us considering packages in deactivated plugins the request after they're removed, 51 // there shouldn't be any problems as a result and the eventual consistency is reliable enough. 52 $all_plugins = array_values( array_unique( array_merge( $plugins_handler->get_active_plugins(), $cached_plugins ) ) ); 60 // We combine the active list and cached list to preemptively load classes for plugins that are 61 // presently unknown but will be loaded during the request. While this may result in us considering packages in 62 // deactivated plugins there shouldn't be any problems as a result and the eventual consistency is sufficient. 63 $all_plugins = array_merge( $active_plugins, $cached_plugins ); 64 65 // In particular we also include the current plugin to address the case where it is the latest autoloader 66 // but also unknown (and not cached). We don't want it in the active list because we don't know that it 67 // is active but we need it in the all plugins list so that it is considered by the autoloader. 68 $all_plugins[] = $current_plugin; 69 70 // We require uniqueness in the array to avoid processing the same plugin more than once. 71 $all_plugins = array_values( array_unique( $all_plugins ) ); 53 72 54 73 /** @var Latest_Autoloader_Guard $guard */ 55 74 $guard = $container->get( Latest_Autoloader_Guard::class ); 56 if ( $guard->should_stop_init( $current_plugin, $all_plugins ) ) {75 if ( $guard->should_stop_init( $current_plugin, $all_plugins, $was_included_by_autoloader ) ) { 57 76 return; 58 77 } 59 78 60 /** @var Autoloader_Handler $autoloader_handler */61 $autoloader_handler = $container->get( Autoloader_Handler::class );62 63 79 // Initialize the autoloader using the handler now that we're ready. 64 $autoloader_handler-> create_autoloader( $all_plugins );80 $autoloader_handler->activate_autoloader( $all_plugins ); 65 81 66 82 /** @var Hook_Manager $hook_manager */ … … 72 88 $hook_manager->add_action( 73 89 'shutdown', 74 function () use ( $plugins_handler, $cached_plugins ) {90 function () use ( $plugins_handler, $cached_plugins, $was_included_by_autoloader ) { 75 91 // Don't save a broken cache if an error happens during some plugin's initialization. 76 92 if ( ! did_action( 'plugins_loaded' ) ) { … … 83 99 } 84 100 85 // Load the active plugins fresh since the list we have abovemight not contain101 // Load the active plugins fresh since the list we pulled earlier might not contain 86 102 // plugins that were activated but did not reset the autoloader. This happens 87 // because they were already included in the cache. 88 $active_plugins = $plugins_handler->get_active_plugins(); 103 // when a plugin is in the cache but not "active" when the autoloader loads. 104 // We also want to make sure that plugins which are deactivating are not 105 // considered "active" so that they will be removed from the cache now. 106 $active_plugins = $plugins_handler->get_active_plugins( false, ! $was_included_by_autoloader ); 89 107 90 108 // The paths should be sorted for easy comparisons with those loaded from the cache. … … 103 121 // phpcs:enable Generic.Commenting.DocComment.MissingShort 104 122 } 105 106 /**107 * Loads a class file if one could be found.108 *109 * @param string $class_name The name of the class to autoload.110 *111 * @return bool Indicates whether or not a class file was loaded.112 */113 public static function load_class( $class_name ) {114 global $jetpack_autoloader_loader;115 if ( ! isset( $jetpack_autoloader_loader ) ) {116 return;117 }118 119 $file = $jetpack_autoloader_loader->find_class_file( $class_name );120 if ( ! isset( $file ) ) {121 return false;122 }123 124 require $file;125 return true;126 }127 128 /**129 * Activates this autoloader and deactivates any other v2 autoloaders that may be present.130 *131 * @param Version_Loader $version_loader The version loader for our autoloader.132 */133 public static function activate( $version_loader ) {134 // Set the global autoloader to indicate that we've activated this autoloader.135 global $jetpack_autoloader_loader;136 $jetpack_autoloader_loader = $version_loader;137 138 // Remove any v2 autoloader that we've already registered.139 $autoload_chain = spl_autoload_functions();140 foreach ( $autoload_chain as $autoloader ) {141 // Jetpack autoloaders are always strings.142 if ( ! is_string( $autoloader ) ) {143 continue;144 }145 146 // We can identify a v2 autoloader using the namespace prefix without the unique suffix.147 if ( 'Automattic\\Jetpack\\Autoloader\\jp' === substr( $autoloader, 0, 32 ) ) {148 spl_autoload_unregister( $autoloader );149 continue;150 }151 }152 153 // Ensure that the autoloader is first to avoid contention with others.154 spl_autoload_register( self::class . '::load_class', true, true );155 156 // Now that we've activated the autoloader we should load the filemap.157 $jetpack_autoloader_loader->load_filemap();158 }159 123 } -
woocommerce-admin/trunk/vendor/jetpack-autoloader/class-container.php
r2472837 r2473439 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp a537f22e61b714db0c75a63174123add;8 namespace Automattic\Jetpack\Autoloader\jp38b3d38eb0faab3eda1eac718e9ae633; 9 9 10 10 // phpcs:ignore … … 96 96 ); 97 97 98 require_once __DIR__ . '/class-php-autoloader.php'; 99 $this->dependencies[ PHP_Autoloader::class ] = new PHP_Autoloader(); 100 98 101 require_once __DIR__ . '/class-manifest-reader.php'; 99 102 $this->dependencies[ Manifest_Reader::class ] = new Manifest_Reader( … … 109 112 require_once __DIR__ . '/class-autoloader-handler.php'; 110 113 $this->dependencies[ Autoloader_Handler::class ] = new Autoloader_Handler( 114 $this->get( PHP_Autoloader::class ), 111 115 $this->get( Hook_Manager::class ), 112 116 $this->get( Manifest_Reader::class ), … … 129 133 */ 130 134 private function initialize_globals() { 135 /* 136 * This global was retired in version 2.9. The value is set to 'false' to maintain 137 * compatibility with older versions of the autoloader. 138 */ 139 global $jetpack_autoloader_including_latest; 140 $jetpack_autoloader_including_latest = false; 141 131 142 // Not all plugins can be found using the locator. In cases where a plugin loads the autoloader 132 143 // but was not discoverable, we will record them in this array to track them as "active". … … 135 146 $jetpack_autoloader_activating_plugins_paths = array(); 136 147 } 137 138 // Since older autoloaders include newer ones, we need to be able to tell the difference between an139 // inclusion via autoloader and an inclusion via plugin file. This allows the autoloader to140 // perform special tasks for each kind of inclusion.141 global $jetpack_autoloader_including_latest;142 if ( ! isset( $jetpack_autoloader_including_latest ) ) {143 // If the latest version global has been set but the including latest hasn't, it means that an144 // older autoloader without support for the global is including us.145 global $jetpack_autoloader_latest_version;146 $jetpack_autoloader_including_latest = isset( $jetpack_autoloader_latest_version );147 }148 148 } 149 149 } -
woocommerce-admin/trunk/vendor/jetpack-autoloader/class-hook-manager.php
r2472837 r2473439 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp a537f22e61b714db0c75a63174123add;8 namespace Automattic\Jetpack\Autoloader\jp38b3d38eb0faab3eda1eac718e9ae633; 9 9 10 10 // phpcs:ignore -
woocommerce-admin/trunk/vendor/jetpack-autoloader/class-latest-autoloader-guard.php
r2472837 r2473439 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp a537f22e61b714db0c75a63174123add;8 namespace Automattic\Jetpack\Autoloader\jp38b3d38eb0faab3eda1eac718e9ae633; 9 9 10 10 // phpcs:ignore … … 54 54 * is not it. 55 55 * 56 * @param string $current_plugin The current plugin we're checking. 57 * @param string[] $plugins The active plugins to check for autoloaders in. 56 * @param string $current_plugin The current plugin we're checking. 57 * @param string[] $plugins The active plugins to check for autoloaders in. 58 * @param bool $was_included_by_autoloader Indicates whether or not this autoloader was included by another. 58 59 * 59 60 * @return bool True if we should stop initialization, otherwise false. 60 61 */ 61 public function should_stop_init( $current_plugin, $plugins ) { 62 global $jetpack_autoloader_including_latest; 62 public function should_stop_init( $current_plugin, $plugins, $was_included_by_autoloader ) { 63 63 global $jetpack_autoloader_latest_version; 64 65 // When we're being included from an older autoloader we need to66 // reset the latest version so that the new autoloader can look67 // for the latest autoloader again.68 if ( $jetpack_autoloader_including_latest ) {69 $jetpack_autoloader_latest_version = null;70 }71 64 72 65 // We need to reset the autoloader when the plugins change because … … 76 69 } 77 70 78 // Don't bother initializing the autoloader if it already has been. 79 if ( isset( $jetpack_autoloader_latest_version ) ) { 71 // When the latest autoloader has already been found we don't need to search for it again. 72 // We should take care however because this will also trigger if the autoloader has been 73 // included by an older one. 74 if ( isset( $jetpack_autoloader_latest_version ) && ! $was_included_by_autoloader ) { 80 75 return true; 81 76 } … … 83 78 $latest_plugin = $this->autoloader_locator->find_latest_autoloader( $plugins, $jetpack_autoloader_latest_version ); 84 79 if ( isset( $latest_plugin ) && $latest_plugin !== $current_plugin ) { 85 $jetpack_autoloader_including_latest = true;86 80 require $this->autoloader_locator->get_autoloader_path( $latest_plugin ); 87 $jetpack_autoloader_including_latest = false;88 81 return true; 89 82 } -
woocommerce-admin/trunk/vendor/jetpack-autoloader/class-manifest-reader.php
r2472837 r2473439 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp a537f22e61b714db0c75a63174123add;8 namespace Automattic\Jetpack\Autoloader\jp38b3d38eb0faab3eda1eac718e9ae633; 9 9 10 10 // phpcs:ignore -
woocommerce-admin/trunk/vendor/jetpack-autoloader/class-path-processor.php
r2472837 r2473439 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp a537f22e61b714db0c75a63174123add;8 namespace Automattic\Jetpack\Autoloader\jp38b3d38eb0faab3eda1eac718e9ae633; 9 9 10 10 // phpcs:ignore … … 18 18 * 19 19 * @param string $path The path we want to process. 20 * 20 21 * @return string The tokenized path. 21 22 */ … … 40 41 * 41 42 * @param string $tokenized_path The path we want to process. 43 * 42 44 * @return string The expanded path. 43 45 */ … … 65 67 * @param string $file The plugin or theme file to resolve. 66 68 * @param array $directories_to_check The directories we should check for the file if it isn't an absolute path. 69 * 67 70 * @return string|false Returns the absolute path to the directory, otherwise false. 68 71 */ … … 123 126 * 124 127 * @param string $path The path to check. 128 * 125 129 * @return bool True if the path is absolute, otherwise false. 126 130 */ -
woocommerce-admin/trunk/vendor/jetpack-autoloader/class-plugin-locator.php
r2472837 r2473439 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp a537f22e61b714db0c75a63174123add;8 namespace Automattic\Jetpack\Autoloader\jp38b3d38eb0faab3eda1eac718e9ae633; 9 9 10 10 // phpcs:ignore … … 35 35 * 36 36 * @return string $path The path to the current plugin. 37 * 37 38 * @throws \RuntimeException If the current plugin does not have an autoloader. 38 39 */ … … 59 60 */ 60 61 public function find_using_option( $option_name, $site_option = false ) { 61 $raw = $site_option ? get_site_option( $option_name , array() ) : get_option( $option_name, array());62 if ( empty( $raw )) {62 $raw = $site_option ? get_site_option( $option_name ) : get_option( $option_name ); 63 if ( false === $raw ) { 63 64 return array(); 64 65 } … … 68 69 69 70 /** 70 * Checks for plugins that are being activated in this request and returns all that it finds. 71 * Checks for plugins in the `action` request parameter. 72 * 73 * @param string[] $allowed_actions The actions that we're allowed to return plugins for. 71 74 * 72 75 * @return array $plugin_paths The list of absolute paths we've found. 73 76 */ 74 public function find_ activating_this_request() {77 public function find_using_request_action( $allowed_actions ) { 75 78 // phpcs:disable WordPress.Security.NonceVerification.Recommended 76 79 … … 86 89 } 87 90 91 $action = isset( $_REQUEST['action'] ) ? wp_unslash( $_REQUEST['action'] ) : false; 92 if ( ! in_array( $action, $allowed_actions, true ) ) { 93 return array(); 94 } 95 88 96 $plugin_slugs = array(); 89 90 $action = isset( $_REQUEST['action'] ) ? wp_unslash( $_REQUEST['action'] ) : false;91 97 switch ( $action ) { 92 98 case 'activate': 99 case 'deactivate': 93 100 if ( empty( $_REQUEST['plugin'] ) ) { 94 101 break; … … 99 106 100 107 case 'activate-selected': 108 case 'deactivate-selected': 101 109 if ( empty( $_REQUEST['checked'] ) ) { 102 110 break; … … 107 115 } 108 116 117 // phpcs:enable WordPress.Security.NonceVerification.Recommended 109 118 return $this->convert_plugins_to_paths( $plugin_slugs ); 110 119 } … … 120 129 */ 121 130 private function convert_plugins_to_paths( $plugins ) { 131 if ( ! is_array( $plugins ) || empty( $plugins ) ) { 132 return array(); 133 } 134 122 135 // We're going to look for plugins in the standard directories. 123 136 $path_constants = array( WP_PLUGIN_DIR, WPMU_PLUGIN_DIR ); -
woocommerce-admin/trunk/vendor/jetpack-autoloader/class-plugins-handler.php
r2472837 r2473439 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp a537f22e61b714db0c75a63174123add;8 namespace Automattic\Jetpack\Autoloader\jp38b3d38eb0faab3eda1eac718e9ae633; 9 9 10 10 // phpcs:ignore … … 47 47 * Gets all of the active plugins we can find. 48 48 * 49 * @param bool $include_deactivating When true, plugins deactivating this request will be considered active. 50 * @param bool $record_unknown When true, the current plugin will be marked as active and recorded when unknown. 51 * 49 52 * @return string[] 50 53 */ 51 public function get_active_plugins( ) {54 public function get_active_plugins( $include_deactivating, $record_unknown ) { 52 55 global $jetpack_autoloader_activating_plugins_paths; 53 global $jetpack_autoloader_including_latest;54 56 55 57 // We're going to build a unique list of plugins from a few different sources … … 82 84 } 83 85 84 $plugins = $this->plugin_locator->find_activating_this_request(); 86 // These actions contain plugins that are being activated/deactivated during this request. 87 $plugins = $this->plugin_locator->find_using_request_action( array( 'activate', 'activate-selected', 'deactivate', 'deactivate-selected' ) ); 85 88 foreach ( $plugins as $path ) { 86 89 $active_plugins[ $path ] = $path; … … 95 98 // been changed since it was saved in the global. 96 99 $current_plugin = $this->plugin_locator->find_current_plugin(); 97 if ( ! in_array( $current_plugin, $active_plugins, true ) && ! $jetpack_autoloader_including_latest) {100 if ( $record_unknown && ! in_array( $current_plugin, $active_plugins, true ) ) { 98 101 $active_plugins[ $current_plugin ] = $current_plugin; 99 102 $jetpack_autoloader_activating_plugins_paths[] = $current_plugin; 103 } 104 105 // When deactivating plugins aren't desired we should entirely remove them from the active list. 106 if ( ! $include_deactivating ) { 107 // These actions contain plugins that are being deactivated during this request. 108 $plugins = $this->plugin_locator->find_using_request_action( array( 'deactivate', 'deactivate-selected' ) ); 109 foreach ( $plugins as $path ) { 110 unset( $active_plugins[ $path ] ); 111 } 100 112 } 101 113 … … 111 123 public function get_cached_plugins() { 112 124 $cached = get_transient( self::TRANSIENT_KEY ); 113 if ( false === $cached) {125 if ( ! is_array( $cached ) || empty( $cached ) ) { 114 126 return array(); 115 127 } … … 143 155 global $jetpack_autoloader_cached_plugin_paths; 144 156 145 // When no autoloader has executed there is nothing to have changed.146 if ( ! isset( $jetpack_autoloader_cached_plugin_paths ) ) {147 $jetpack_autoloader_cached_plugin_paths = $plugins;148 return false;149 }150 151 157 if ( $jetpack_autoloader_cached_plugin_paths !== $plugins ) { 152 158 $jetpack_autoloader_cached_plugin_paths = $plugins; -
woocommerce-admin/trunk/vendor/jetpack-autoloader/class-version-loader.php
r2472837 r2473439 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp a537f22e61b714db0c75a63174123add;8 namespace Automattic\Jetpack\Autoloader\jp38b3d38eb0faab3eda1eac718e9ae633; 9 9 10 10 // phpcs:ignore -
woocommerce-admin/trunk/vendor/jetpack-autoloader/class-version-selector.php
r2472837 r2473439 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp a537f22e61b714db0c75a63174123add;8 namespace Automattic\Jetpack\Autoloader\jp38b3d38eb0faab3eda1eac718e9ae633; 9 9 10 10 // phpcs:ignore … … 34 34 } 35 35 36 if ( $use_dev_versions && $this->is_ package_version_dev( $selected_version ) ) {36 if ( $use_dev_versions && $this->is_dev_version( $selected_version ) ) { 37 37 return false; 38 38 } 39 39 40 if ( $this->is_ package_version_dev( $compare_version ) ) {40 if ( $this->is_dev_version( $compare_version ) ) { 41 41 if ( $use_dev_versions ) { 42 42 return true; … … 60 60 * @return bool True if the version is a dev version, else false. 61 61 */ 62 p rivate function is_package_version_dev( $version ) {62 public function is_dev_version( $version ) { 63 63 if ( 'dev-' === substr( $version, 0, 4 ) || '9999999-dev' === $version ) { 64 64 return true; -
woocommerce-admin/trunk/woocommerce-admin.php
r2472837 r2473439 8 8 * Text Domain: woocommerce-admin 9 9 * Domain Path: /languages 10 * Version: 2.0. 010 * Version: 2.0.1 11 11 * Requires at least: 5.3 12 12 * Requires PHP: 5.6.20
Note: See TracChangeset
for help on using the changeset viewer.