initial
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
// autoload.php @generated by Composer
|
||||
|
||||
if (PHP_VERSION_ID < 50600) {
|
||||
if (!headers_sent()) {
|
||||
header('HTTP/1.1 500 Internal Server Error');
|
||||
}
|
||||
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
|
||||
if (!ini_get('display_errors')) {
|
||||
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
|
||||
fwrite(STDERR, $err);
|
||||
} elseif (!headers_sent()) {
|
||||
echo $err;
|
||||
}
|
||||
}
|
||||
throw new RuntimeException($err);
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ4_6_3::getLoader();
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
/**
|
||||
* This file was automatically generated by automattic/jetpack-autoloader.
|
||||
*
|
||||
* @package automattic/jetpack-autoloader
|
||||
*/
|
||||
|
||||
namespace Automattic\Jetpack\Autoloader\jpb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ4_6_3\al5_0_20;
|
||||
|
||||
// phpcs:ignore
|
||||
|
||||
require_once __DIR__ . '/jetpack-autoloader/class-autoloader.php';
|
||||
Autoloader::init();
|
||||
+324
@@ -0,0 +1,324 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [0.11.9] - 2026-06-08
|
||||
### Changed
|
||||
- Internal updates.
|
||||
|
||||
## [0.11.8] - 2026-06-05
|
||||
### Changed
|
||||
- Internal updates.
|
||||
|
||||
## [0.11.7] - 2026-06-01
|
||||
### Changed
|
||||
- Revert Choose plan tier recognition added in #48806; the experiment is being rolled back. [#49276]
|
||||
|
||||
## [0.11.6] - 2026-05-19
|
||||
### Changed
|
||||
- Internal updates.
|
||||
|
||||
## [0.11.5] - 2026-05-14
|
||||
### Changed
|
||||
- Add "Choose" plan slugs to `PLAN_DATA`. [#48806]
|
||||
|
||||
## [0.11.4] - 2026-05-04
|
||||
### Changed
|
||||
- Internal: No longer require automattic/jetpack-changelogger as a per-project dev dependency. [#48225]
|
||||
|
||||
## [0.11.3] - 2026-02-23
|
||||
### Changed
|
||||
- Update dependencies.
|
||||
|
||||
## [0.11.2] - 2026-02-02
|
||||
### Changed
|
||||
- Update dependencies.
|
||||
|
||||
## [0.11.1] - 2025-12-08
|
||||
### Fixed
|
||||
- Ensure proper flags are used with `json_encode()`. [#46092]
|
||||
|
||||
## [0.11.0] - 2025-12-01
|
||||
### Changed
|
||||
- Add form-webhooks support on free Jetpack plans. [#46059]
|
||||
|
||||
## [0.10.0] - 2025-08-06
|
||||
### Added
|
||||
- Plan features: add Social Image Generator [#44661]
|
||||
|
||||
## [0.9.1] - 2025-08-04
|
||||
### Changed
|
||||
- Internal updates.
|
||||
|
||||
## [0.9.0] - 2025-07-21
|
||||
### Added
|
||||
- Forms: Include multistep form in Jetpack and WordPress.com plans. [#44309]
|
||||
|
||||
## [0.8.0] - 2025-05-05
|
||||
### Added
|
||||
- Forms: Add feature/block field-file support to Personal and Complete plans. [#43177]
|
||||
|
||||
## [0.7.1] - 2025-04-28
|
||||
### Changed
|
||||
- Internal updates.
|
||||
|
||||
## [0.7.0] - 2025-03-31
|
||||
### Added
|
||||
- Add `ai-seo-enhancer` as a feature supported by the Business plan. [#42731]
|
||||
|
||||
## [0.6.1] - 2025-03-21
|
||||
### Changed
|
||||
- Internal updates.
|
||||
|
||||
## [0.6.0] - 2025-03-18
|
||||
### Changed
|
||||
- Add `Plans::get_plan_short_name()` for WordPress.com environments. [#42485]
|
||||
|
||||
## [0.5.6] - 2025-03-17
|
||||
### Changed
|
||||
- Internal updates.
|
||||
|
||||
## [0.5.5] - 2025-03-12
|
||||
### Changed
|
||||
- Internal updates.
|
||||
|
||||
## [0.5.4] - 2025-03-05
|
||||
### Changed
|
||||
- Internal updates.
|
||||
|
||||
## [0.5.3] - 2025-02-24
|
||||
### Changed
|
||||
- Update dependencies.
|
||||
|
||||
## [0.5.2] - 2025-02-03
|
||||
### Changed
|
||||
- Internal updates.
|
||||
|
||||
## [0.5.1] - 2024-11-25
|
||||
### Changed
|
||||
- Updated dependencies. [#40286]
|
||||
|
||||
## [0.5.0] - 2024-11-14
|
||||
### Removed
|
||||
- General: Update minimum PHP version to 7.2. [#40147]
|
||||
|
||||
## [0.4.13] - 2024-11-04
|
||||
### Added
|
||||
- Enable test coverage. [#39961]
|
||||
|
||||
## [0.4.12] - 2024-10-21
|
||||
### Fixed
|
||||
- Fixed the site features for Simple sites. [#39817]
|
||||
|
||||
## [0.4.11] - 2024-09-23
|
||||
### Changed
|
||||
- Update dependencies.
|
||||
|
||||
## [0.4.10] - 2024-09-05
|
||||
### Changed
|
||||
- Update dependencies.
|
||||
|
||||
## [0.4.9] - 2024-09-05
|
||||
### Changed
|
||||
- Update dependencies.
|
||||
|
||||
## [0.4.8] - 2024-08-23
|
||||
### Changed
|
||||
- Updated package dependencies. [#39004]
|
||||
|
||||
## [0.4.7] - 2024-05-06
|
||||
### Fixed
|
||||
- Correctly reference `Store_Product_List` class in `Plans::get_plans()`. [#37201]
|
||||
|
||||
## [0.4.6] - 2024-04-25
|
||||
### Changed
|
||||
- Update dependencies.
|
||||
|
||||
## [0.4.5] - 2024-04-22
|
||||
### Changed
|
||||
- Internal updates.
|
||||
|
||||
## [0.4.4] - 2024-04-08
|
||||
### Changed
|
||||
- Internal updates.
|
||||
|
||||
## [0.4.3] - 2024-03-12
|
||||
### Changed
|
||||
- Internal updates.
|
||||
|
||||
## [0.4.2] - 2024-02-12
|
||||
### Added
|
||||
- Plan features: add "sharing block" to the list of features supported in the free plan. [#35577]
|
||||
|
||||
## [0.4.1] - 2024-01-18
|
||||
### Added
|
||||
- Support the new creator plan in our plan checks [#35071]
|
||||
|
||||
## [0.4.0] - 2023-11-20
|
||||
### Changed
|
||||
- Updated required PHP version to >= 7.0. [#34192]
|
||||
|
||||
## [0.3.5] - 2023-10-24
|
||||
|
||||
- Updated package dependencies.
|
||||
|
||||
## [0.3.4] - 2023-08-23
|
||||
### Changed
|
||||
- Updated package dependencies. [#32605]
|
||||
|
||||
## [0.3.3] - 2023-06-19
|
||||
### Added
|
||||
- Add the Advanced SEO feature to the list of free features. [#31213]
|
||||
|
||||
## [0.3.2] - 2023-06-12
|
||||
### Changed
|
||||
- Remove Jetpack-the-plugin dependencies from Current Plan class. [#31207]
|
||||
|
||||
## [0.3.1] - 2023-06-05
|
||||
### Fixed
|
||||
- Revert gating removal for simple payments [#31067]
|
||||
|
||||
## [0.3.0] - 2023-05-11
|
||||
### Changed
|
||||
- Make Earn products free for all Jetpack plans [#30432]
|
||||
|
||||
## [0.2.12] - 2023-05-08
|
||||
### Changed
|
||||
- Make Premium Content accessible on Free plans. [#30398]
|
||||
|
||||
## [0.2.11] - 2023-04-10
|
||||
### Added
|
||||
- Add Jetpack Autoloader package suggestion. [#29988]
|
||||
|
||||
## [0.2.10] - 2023-02-20
|
||||
### Changed
|
||||
- Minor internal updates.
|
||||
|
||||
## [0.2.9] - 2023-01-25
|
||||
### Changed
|
||||
- Minor internal updates.
|
||||
|
||||
## [0.2.8] - 2022-12-02
|
||||
### Changed
|
||||
- Updated package dependencies. [#27688]
|
||||
|
||||
## [0.2.7] - 2022-11-22
|
||||
### Changed
|
||||
- Updated package dependencies. [#27043]
|
||||
|
||||
## [0.2.6] - 2022-11-07
|
||||
### Changed
|
||||
- Updated package dependencies. [#27278]
|
||||
|
||||
## [0.2.5] - 2022-10-25
|
||||
### Changed
|
||||
- Updated package dependencies. [#26705]
|
||||
|
||||
## [0.2.4] - 2022-09-20
|
||||
### Changed
|
||||
- Updated package dependencies.
|
||||
|
||||
## [0.2.3] - 2022-09-08
|
||||
### Changed
|
||||
- Updated package dependencies.
|
||||
|
||||
## [0.2.2] - 2022-08-30
|
||||
### Changed
|
||||
- Updated package dependencies. [#25694]
|
||||
|
||||
## [0.2.1] - 2022-08-23
|
||||
### Changed
|
||||
- Updated package dependencies. [#25628]
|
||||
|
||||
## [0.2.0] - 2022-08-16
|
||||
### Added
|
||||
- Tweaked the supports method of the plans package to refresh the plan data. [#25347]
|
||||
|
||||
## [0.1.3] - 2022-08-03
|
||||
### Changed
|
||||
- Updated package dependencies. [#25300, #25315]
|
||||
|
||||
## [0.1.2] - 2022-07-26
|
||||
### Changed
|
||||
- Add mirror repository information to package info. [#25142]
|
||||
- Updated package dependencies. [#25158]
|
||||
|
||||
## 0.1.1 - 2022-07-19
|
||||
### Changed
|
||||
- Updated package dependencies.
|
||||
|
||||
## 0.1.0 - 2022-07-06
|
||||
### Added
|
||||
- Add support for WordPress.com Starter plan. [#24496]
|
||||
- Package created. [#23503]
|
||||
|
||||
### Changed
|
||||
- Renaming master to trunk. [#24661]
|
||||
- Updated package dependencies.
|
||||
|
||||
### Deprecated
|
||||
- Moved the options class into Connection. [#24095]
|
||||
|
||||
[0.11.9]: https://github.com/Automattic/jetpack-plans/compare/v0.11.8...v0.11.9
|
||||
[0.11.8]: https://github.com/Automattic/jetpack-plans/compare/v0.11.7...v0.11.8
|
||||
[0.11.7]: https://github.com/Automattic/jetpack-plans/compare/v0.11.6...v0.11.7
|
||||
[0.11.6]: https://github.com/Automattic/jetpack-plans/compare/v0.11.5...v0.11.6
|
||||
[0.11.5]: https://github.com/Automattic/jetpack-plans/compare/v0.11.4...v0.11.5
|
||||
[0.11.4]: https://github.com/Automattic/jetpack-plans/compare/v0.11.3...v0.11.4
|
||||
[0.11.3]: https://github.com/Automattic/jetpack-plans/compare/v0.11.2...v0.11.3
|
||||
[0.11.2]: https://github.com/Automattic/jetpack-plans/compare/v0.11.1...v0.11.2
|
||||
[0.11.1]: https://github.com/Automattic/jetpack-plans/compare/v0.11.0...v0.11.1
|
||||
[0.11.0]: https://github.com/Automattic/jetpack-plans/compare/v0.10.0...v0.11.0
|
||||
[0.10.0]: https://github.com/Automattic/jetpack-plans/compare/v0.9.1...v0.10.0
|
||||
[0.9.1]: https://github.com/Automattic/jetpack-plans/compare/v0.9.0...v0.9.1
|
||||
[0.9.0]: https://github.com/Automattic/jetpack-plans/compare/v0.8.0...v0.9.0
|
||||
[0.8.0]: https://github.com/Automattic/jetpack-plans/compare/v0.7.1...v0.8.0
|
||||
[0.7.1]: https://github.com/Automattic/jetpack-plans/compare/v0.7.0...v0.7.1
|
||||
[0.7.0]: https://github.com/Automattic/jetpack-plans/compare/v0.6.1...v0.7.0
|
||||
[0.6.1]: https://github.com/Automattic/jetpack-plans/compare/v0.6.0...v0.6.1
|
||||
[0.6.0]: https://github.com/Automattic/jetpack-plans/compare/v0.5.6...v0.6.0
|
||||
[0.5.6]: https://github.com/Automattic/jetpack-plans/compare/v0.5.5...v0.5.6
|
||||
[0.5.5]: https://github.com/Automattic/jetpack-plans/compare/v0.5.4...v0.5.5
|
||||
[0.5.4]: https://github.com/Automattic/jetpack-plans/compare/v0.5.3...v0.5.4
|
||||
[0.5.3]: https://github.com/Automattic/jetpack-plans/compare/v0.5.2...v0.5.3
|
||||
[0.5.2]: https://github.com/Automattic/jetpack-plans/compare/v0.5.1...v0.5.2
|
||||
[0.5.1]: https://github.com/Automattic/jetpack-plans/compare/v0.5.0...v0.5.1
|
||||
[0.5.0]: https://github.com/Automattic/jetpack-plans/compare/v0.4.13...v0.5.0
|
||||
[0.4.13]: https://github.com/Automattic/jetpack-plans/compare/v0.4.12...v0.4.13
|
||||
[0.4.12]: https://github.com/Automattic/jetpack-plans/compare/v0.4.11...v0.4.12
|
||||
[0.4.11]: https://github.com/Automattic/jetpack-plans/compare/v0.4.10...v0.4.11
|
||||
[0.4.10]: https://github.com/Automattic/jetpack-plans/compare/v0.4.9...v0.4.10
|
||||
[0.4.9]: https://github.com/Automattic/jetpack-plans/compare/v0.4.8...v0.4.9
|
||||
[0.4.8]: https://github.com/Automattic/jetpack-plans/compare/v0.4.7...v0.4.8
|
||||
[0.4.7]: https://github.com/Automattic/jetpack-plans/compare/v0.4.6...v0.4.7
|
||||
[0.4.6]: https://github.com/Automattic/jetpack-plans/compare/v0.4.5...v0.4.6
|
||||
[0.4.5]: https://github.com/Automattic/jetpack-plans/compare/v0.4.4...v0.4.5
|
||||
[0.4.4]: https://github.com/Automattic/jetpack-plans/compare/v0.4.3...v0.4.4
|
||||
[0.4.3]: https://github.com/Automattic/jetpack-plans/compare/v0.4.2...v0.4.3
|
||||
[0.4.2]: https://github.com/Automattic/jetpack-plans/compare/v0.4.1...v0.4.2
|
||||
[0.4.1]: https://github.com/Automattic/jetpack-plans/compare/v0.4.0...v0.4.1
|
||||
[0.4.0]: https://github.com/Automattic/jetpack-plans/compare/v0.3.5...v0.4.0
|
||||
[0.3.5]: https://github.com/Automattic/jetpack-plans/compare/v0.3.4...v0.3.5
|
||||
[0.3.4]: https://github.com/Automattic/jetpack-plans/compare/v0.3.3...v0.3.4
|
||||
[0.3.3]: https://github.com/Automattic/jetpack-plans/compare/v0.3.2...v0.3.3
|
||||
[0.3.2]: https://github.com/Automattic/jetpack-plans/compare/v0.3.1...v0.3.2
|
||||
[0.3.1]: https://github.com/Automattic/jetpack-plans/compare/v0.3.0...v0.3.1
|
||||
[0.3.0]: https://github.com/Automattic/jetpack-plans/compare/v0.2.12...v0.3.0
|
||||
[0.2.12]: https://github.com/Automattic/jetpack-plans/compare/v0.2.11...v0.2.12
|
||||
[0.2.11]: https://github.com/Automattic/jetpack-plans/compare/v0.2.10...v0.2.11
|
||||
[0.2.10]: https://github.com/Automattic/jetpack-plans/compare/v0.2.9...v0.2.10
|
||||
[0.2.9]: https://github.com/Automattic/jetpack-plans/compare/v0.2.8...v0.2.9
|
||||
[0.2.8]: https://github.com/Automattic/jetpack-plans/compare/v0.2.7...v0.2.8
|
||||
[0.2.7]: https://github.com/Automattic/jetpack-plans/compare/v0.2.6...v0.2.7
|
||||
[0.2.6]: https://github.com/Automattic/jetpack-plans/compare/v0.2.5...v0.2.6
|
||||
[0.2.5]: https://github.com/Automattic/jetpack-plans/compare/v0.2.4...v0.2.5
|
||||
[0.2.4]: https://github.com/Automattic/jetpack-plans/compare/v0.2.3...v0.2.4
|
||||
[0.2.3]: https://github.com/Automattic/jetpack-plans/compare/v0.2.2...v0.2.3
|
||||
[0.2.2]: https://github.com/Automattic/jetpack-plans/compare/v0.2.1...v0.2.2
|
||||
[0.2.1]: https://github.com/Automattic/jetpack-plans/compare/v0.2.0...v0.2.1
|
||||
[0.2.0]: https://github.com/Automattic/jetpack-plans/compare/v0.1.3...v0.2.0
|
||||
[0.1.3]: https://github.com/Automattic/jetpack-plans/compare/v0.1.2...v0.1.3
|
||||
[0.1.2]: https://github.com/Automattic/jetpack-plans/compare/v0.1.1...v0.1.2
|
||||
Vendored
+443
@@ -0,0 +1,443 @@
|
||||
<?php
|
||||
/**
|
||||
* Handles fetching of the site's plan and products from WordPress.com and caching values locally.
|
||||
*
|
||||
* @package automattic/jetpack-plans
|
||||
*/
|
||||
|
||||
namespace Automattic\Jetpack;
|
||||
|
||||
use Automattic\Jetpack\Connection\Client;
|
||||
use Automattic\Jetpack\Connection\Manager;
|
||||
|
||||
/**
|
||||
* Provides methods methods for fetching the site's plan and products from WordPress.com.
|
||||
*/
|
||||
class Current_Plan {
|
||||
/**
|
||||
* A cache variable to hold the active plan for the current request.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private static $active_plan_cache;
|
||||
|
||||
/**
|
||||
* Simple Site-specific features available.
|
||||
* Their calculation can be expensive and slow, so we're caching it for the request.
|
||||
*
|
||||
* @var array Site-specific features
|
||||
*/
|
||||
private static $simple_site_specific_features = array();
|
||||
|
||||
/**
|
||||
* The name of the option that will store the site's plan.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const PLAN_OPTION = 'jetpack_active_plan';
|
||||
|
||||
/**
|
||||
* The name of the option that will store the site's products.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const SITE_PRODUCTS_OPTION = 'jetpack_site_products';
|
||||
|
||||
const PLAN_DATA = array(
|
||||
'free' => array(
|
||||
'plans' => array(
|
||||
'jetpack_free',
|
||||
),
|
||||
'supports' => array(
|
||||
'advanced-seo',
|
||||
'opentable',
|
||||
'calendly',
|
||||
'send-a-message',
|
||||
'sharing-block',
|
||||
'whatsapp-button',
|
||||
'social-previews',
|
||||
'videopress',
|
||||
'videopress/video',
|
||||
'v6-video-frame-poster',
|
||||
|
||||
'core/video',
|
||||
'core/cover',
|
||||
'core/audio',
|
||||
'multistep-form',
|
||||
'form-webhooks',
|
||||
),
|
||||
),
|
||||
'personal' => array(
|
||||
'plans' => array(
|
||||
'jetpack_personal',
|
||||
'jetpack_personal_monthly',
|
||||
'personal-bundle',
|
||||
'personal-bundle-monthly',
|
||||
'personal-bundle-2y',
|
||||
'personal-bundle-3y',
|
||||
'starter-plan',
|
||||
),
|
||||
'supports' => array(
|
||||
'akismet',
|
||||
'payments',
|
||||
'videopress',
|
||||
),
|
||||
),
|
||||
'premium' => array(
|
||||
'plans' => array(
|
||||
'jetpack_premium',
|
||||
'jetpack_premium_monthly',
|
||||
'value_bundle',
|
||||
'value_bundle-monthly',
|
||||
'value_bundle-2y',
|
||||
'value_bundle-3y',
|
||||
'jetpack_creator_yearly',
|
||||
'jetpack_creator_bi_yearly',
|
||||
'jetpack_creator_monthly',
|
||||
),
|
||||
'supports' => array(
|
||||
'simple-payments',
|
||||
'vaultpress',
|
||||
'videopress',
|
||||
'republicize',
|
||||
),
|
||||
),
|
||||
'security' => array(
|
||||
'plans' => array(
|
||||
'jetpack_security_daily',
|
||||
'jetpack_security_daily_monthly',
|
||||
'jetpack_security_realtime',
|
||||
'jetpack_security_realtime_monthly',
|
||||
'jetpack_security_t1_yearly',
|
||||
'jetpack_security_t1_monthly',
|
||||
'jetpack_security_t2_yearly',
|
||||
'jetpack_security_t2_monthly',
|
||||
),
|
||||
'supports' => array(),
|
||||
),
|
||||
'business' => array(
|
||||
'plans' => array(
|
||||
'jetpack_business',
|
||||
'jetpack_business_monthly',
|
||||
'business-bundle',
|
||||
'business-bundle-monthly',
|
||||
'business-bundle-2y',
|
||||
'business-bundle-3y',
|
||||
'ecommerce-bundle',
|
||||
'ecommerce-bundle-monthly',
|
||||
'ecommerce-bundle-2y',
|
||||
'ecommerce-bundle-3y',
|
||||
'pro-plan',
|
||||
'wp_bundle_migration_trial_monthly',
|
||||
'wp_bundle_hosting_trial_monthly',
|
||||
'ecommerce-trial-bundle-monthly',
|
||||
'wooexpress-small-bundle-yearly',
|
||||
'wooexpress-small-bundle-monthly',
|
||||
'wooexpress-medium-bundle-yearly',
|
||||
'wooexpress-medium-bundle-monthly',
|
||||
'wp_com_hundred_year_bundle_centennially',
|
||||
),
|
||||
'supports' => array(
|
||||
'ai-seo-enhancer',
|
||||
),
|
||||
),
|
||||
|
||||
'complete' => array(
|
||||
'plans' => array(
|
||||
'jetpack_complete',
|
||||
'jetpack_complete_monthly',
|
||||
'vip',
|
||||
),
|
||||
'supports' => array(
|
||||
'field-file', // Forms
|
||||
'social-image-generator',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
/**
|
||||
* Given a response to the `/sites/%d` endpoint, will parse the response and attempt to set the
|
||||
* site's plan and products from the response.
|
||||
*
|
||||
* @param array $response The response from `/sites/%d`.
|
||||
* @return bool Was the plan successfully updated?
|
||||
*/
|
||||
public static function update_from_sites_response( $response ) {
|
||||
// Bail if there was an error or malformed response.
|
||||
if ( is_wp_error( $response ) || ! is_array( $response ) || ! isset( $response['body'] ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$body = wp_remote_retrieve_body( $response );
|
||||
if ( is_wp_error( $body ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Decode the results.
|
||||
$results = json_decode( $body, true );
|
||||
|
||||
if ( ! is_array( $results ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( isset( $results['products'] ) ) {
|
||||
// Store the site's products in an option and return true if updated.
|
||||
self::store_data_in_option( self::SITE_PRODUCTS_OPTION, $results['products'] );
|
||||
}
|
||||
|
||||
if ( ! isset( $results['plan'] ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$current_plan = get_option( self::PLAN_OPTION, array() );
|
||||
|
||||
if ( ! empty( $current_plan ) && $current_plan === $results['plan'] ) {
|
||||
// Bail if the plans array hasn't changed.
|
||||
return false;
|
||||
}
|
||||
|
||||
// Store the new plan in an option and return true if updated.
|
||||
$result = self::store_data_in_option( self::PLAN_OPTION, $results['plan'] );
|
||||
|
||||
if ( $result ) {
|
||||
// Reset the cache since we've just updated the plan.
|
||||
self::$active_plan_cache = null;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Store data in an option.
|
||||
*
|
||||
* @param string $option The name of the option that will store the data.
|
||||
* @param array $data Data to be store in an option.
|
||||
* @return bool Were the subscriptions successfully updated?
|
||||
*/
|
||||
private static function store_data_in_option( $option, $data ) {
|
||||
$result = update_option( $option, $data, true );
|
||||
|
||||
// If something goes wrong with the update, so delete the current option and then update it.
|
||||
if ( ! $result ) {
|
||||
delete_option( $option );
|
||||
$result = update_option( $option, $data, true );
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make an API call to WordPress.com for plan status
|
||||
*
|
||||
* @uses Jetpack_Options::get_option()
|
||||
* @uses Client::wpcom_json_api_request_as_blog()
|
||||
* @uses update_option()
|
||||
*
|
||||
* @access public
|
||||
* @static
|
||||
*
|
||||
* @return bool True if plan is updated, false if no update
|
||||
*/
|
||||
public static function refresh_from_wpcom() {
|
||||
$site_id = Manager::get_site_id();
|
||||
if ( is_wp_error( $site_id ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Make the API request.
|
||||
|
||||
$response = Client::wpcom_json_api_request_as_blog(
|
||||
sprintf( '/sites/%d?force=wpcom', $site_id ),
|
||||
'1.1'
|
||||
);
|
||||
|
||||
return self::update_from_sites_response( $response );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the plan that this Jetpack site is currently using.
|
||||
*
|
||||
* @uses get_option()
|
||||
*
|
||||
* @access public
|
||||
* @static
|
||||
*
|
||||
* @return array Active Jetpack plan details
|
||||
*/
|
||||
public static function get() {
|
||||
// this can be expensive to compute so we cache for the duration of a request.
|
||||
if ( is_array( self::$active_plan_cache ) && ! empty( self::$active_plan_cache ) ) {
|
||||
return self::$active_plan_cache;
|
||||
}
|
||||
|
||||
$plan = get_option( self::PLAN_OPTION, array() );
|
||||
|
||||
// Set the default options.
|
||||
$plan = wp_parse_args(
|
||||
$plan,
|
||||
array(
|
||||
'product_slug' => 'jetpack_free',
|
||||
'class' => 'free',
|
||||
'features' => array(
|
||||
'active' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
list( $plan['class'], $supports ) = self::get_class_and_features( $plan['product_slug'] );
|
||||
|
||||
$modules = new Modules();
|
||||
foreach ( $modules->get_available() as $module_slug ) {
|
||||
$module = $modules->get( $module_slug );
|
||||
if ( ! isset( $module ) || ! is_array( $module ) ) {
|
||||
continue;
|
||||
}
|
||||
if ( in_array( 'free', $module['plan_classes'], true ) || in_array( $plan['class'], $module['plan_classes'], true ) ) {
|
||||
$supports[] = $module_slug;
|
||||
}
|
||||
}
|
||||
|
||||
$plan['supports'] = $supports;
|
||||
|
||||
self::$active_plan_cache = $plan;
|
||||
|
||||
return $plan;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the site's products.
|
||||
*
|
||||
* @uses get_option()
|
||||
*
|
||||
* @access public
|
||||
* @static
|
||||
*
|
||||
* @return array Active Jetpack products
|
||||
*/
|
||||
public static function get_products() {
|
||||
return get_option( self::SITE_PRODUCTS_OPTION, array() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the class of plan and a list of features it supports
|
||||
*
|
||||
* @param string $plan_slug The plan that we're interested in.
|
||||
* @return array Two item array, the plan class and the an array of features.
|
||||
*/
|
||||
private static function get_class_and_features( $plan_slug ) {
|
||||
$features = array();
|
||||
foreach ( self::PLAN_DATA as $class => $details ) {
|
||||
$features = array_merge( $features, $details['supports'] );
|
||||
if ( in_array( $plan_slug, $details['plans'], true ) ) {
|
||||
return array( $class, $features );
|
||||
}
|
||||
}
|
||||
return array( 'free', self::PLAN_DATA['free']['supports'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the minimum plan slug that supports the given feature
|
||||
*
|
||||
* @param string $feature The name of the feature.
|
||||
* @return string|bool The slug for the minimum plan that supports.
|
||||
* the feature or false if not found
|
||||
*/
|
||||
public static function get_minimum_plan_for_feature( $feature ) {
|
||||
foreach ( self::PLAN_DATA as $details ) {
|
||||
if ( in_array( $feature, $details['supports'], true ) ) {
|
||||
return $details['plans'][0];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the active plan supports a particular feature
|
||||
*
|
||||
* @uses self::get()
|
||||
*
|
||||
* @access public
|
||||
* @static
|
||||
*
|
||||
* @param string $feature The module or feature to check.
|
||||
* @param bool $refresh_from_wpcom Refresh the local plan cache from wpcom.
|
||||
*
|
||||
* @return bool True if plan supports feature, false if not
|
||||
*/
|
||||
public static function supports( $feature, $refresh_from_wpcom = false ) {
|
||||
if ( $refresh_from_wpcom ) {
|
||||
self::refresh_from_wpcom();
|
||||
}
|
||||
|
||||
// Hijack the feature eligibility check on WordPress.com sites since they are gated differently.
|
||||
$should_wpcom_gate_feature = (
|
||||
function_exists( 'wpcom_site_has_feature' ) &&
|
||||
function_exists( 'wpcom_feature_exists' ) &&
|
||||
wpcom_feature_exists( $feature )
|
||||
);
|
||||
if ( $should_wpcom_gate_feature ) {
|
||||
return wpcom_site_has_feature( $feature );
|
||||
}
|
||||
|
||||
// Search product bypasses plan feature check.
|
||||
if ( 'search' === $feature && (bool) get_option( 'has_jetpack_search_product' ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// As of Q3 2021 - a videopress free tier is available to all plans.
|
||||
if ( 'videopress' === $feature ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// As of 05 2023 - all plans support Earn features (minus 'simple-payments').
|
||||
if ( in_array( $feature, array( 'donations', 'recurring-payments', 'premium-content/container' ), true ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$plan = self::get();
|
||||
|
||||
if (
|
||||
in_array( $feature, $plan['supports'], true )
|
||||
|| in_array( $feature, $plan['features']['active'], true )
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve site-specific features for Simple sites.
|
||||
*
|
||||
* See Jetpack_Gutenberg::get_site_specific_features()
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function get_simple_site_specific_features() {
|
||||
$is_simple_site = defined( 'IS_WPCOM' ) && constant( 'IS_WPCOM' );
|
||||
|
||||
if ( ! $is_simple_site ) {
|
||||
return array(
|
||||
'active' => array(),
|
||||
'available' => array(),
|
||||
);
|
||||
}
|
||||
|
||||
$current_blog_id = get_current_blog_id();
|
||||
|
||||
// Return the cached value if it exists.
|
||||
if ( isset( self::$simple_site_specific_features[ $current_blog_id ] ) ) {
|
||||
return self::$simple_site_specific_features[ $current_blog_id ];
|
||||
}
|
||||
|
||||
if ( ! class_exists( '\Store_Product_List' ) ) {
|
||||
require WP_CONTENT_DIR . '/admin-plugins/wpcom-billing/store-product-list.php';
|
||||
}
|
||||
|
||||
$simple_site_specific_features = \Store_Product_List::get_site_specific_features_data( $current_blog_id );
|
||||
|
||||
self::$simple_site_specific_features[ $current_blog_id ] = $simple_site_specific_features;
|
||||
|
||||
return $simple_site_specific_features;
|
||||
}
|
||||
}
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
/**
|
||||
* Plans Library
|
||||
*
|
||||
* Fetch plans data from WordPress.com.
|
||||
*
|
||||
* This file was copied and adapted from the Jetpack plugin on Mar 2022.
|
||||
*
|
||||
* @package automattic/jetpack-plans
|
||||
*/
|
||||
|
||||
namespace Automattic\Jetpack;
|
||||
|
||||
use Store_Product_List;
|
||||
|
||||
/**
|
||||
* Fetch data about available Plans from WordPress.com
|
||||
*/
|
||||
class Plans {
|
||||
/**
|
||||
* Get a list of all available plans from WordPress.com
|
||||
*
|
||||
* @since-jetpack 7.7.0
|
||||
*
|
||||
* @return array The plans list
|
||||
*/
|
||||
public static function get_plans() {
|
||||
if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
|
||||
if ( ! class_exists( 'Store_Product_List' ) ) {
|
||||
require WP_CONTENT_DIR . '/admin-plugins/wpcom-billing/store-product-list.php';
|
||||
}
|
||||
|
||||
return Store_Product_List::api_only_get_active_plans_v1_4();
|
||||
}
|
||||
|
||||
// We're on Jetpack, so it's safe to use this namespace.
|
||||
$request = \Automattic\Jetpack\Connection\Client::wpcom_json_api_request_as_user(
|
||||
'/plans?_locale=' . get_user_locale(),
|
||||
// We're using version 1.5 of the endpoint rather than the default version 2
|
||||
// since the latter only returns Jetpack Plans, but we're also interested in
|
||||
// WordPress.com plans, for consumers of this method that run on WP.com.
|
||||
'1.5',
|
||||
array(
|
||||
'method' => 'GET',
|
||||
'headers' => array(
|
||||
'X-Forwarded-For' => ( new \Automattic\Jetpack\Status\Visitor() )->get_ip( true ),
|
||||
),
|
||||
),
|
||||
null,
|
||||
'rest'
|
||||
);
|
||||
|
||||
$body = wp_remote_retrieve_body( $request );
|
||||
if ( 200 === wp_remote_retrieve_response_code( $request ) ) {
|
||||
return json_decode( $body );
|
||||
} else {
|
||||
return $body;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get plan information for a plan given its slug
|
||||
*
|
||||
* @since-jetpack 7.7.0
|
||||
*
|
||||
* @param string $plan_slug Plan slug.
|
||||
*
|
||||
* @return object The plan object
|
||||
*/
|
||||
public static function get_plan( $plan_slug ) {
|
||||
$plans = self::get_plans();
|
||||
if ( ! is_array( $plans ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ( $plans as $plan ) {
|
||||
if ( $plan_slug === $plan->product_slug ) {
|
||||
return $plan;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Efficiently get the short name of a plan from a slug.
|
||||
*
|
||||
* @param string $plan_slug Plan slug.
|
||||
* @return string|null Short product name or null if not round.
|
||||
*/
|
||||
public static function get_plan_short_name( $plan_slug ) {
|
||||
if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
|
||||
if ( ! class_exists( 'Store_Product_List' ) ) {
|
||||
require WP_CONTENT_DIR . '/admin-plugins/wpcom-billing/store-product-list.php';
|
||||
}
|
||||
|
||||
// Skip additional work like processing of coupons, since we only need the plan's short name.
|
||||
$products = Store_Product_List::get();
|
||||
|
||||
foreach ( $products as $product ) {
|
||||
if ( isset( $product['product_slug'] ) && $product['product_slug'] === $plan_slug ) {
|
||||
return $product['product_name_short'] ?? null;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
// Fallback to less efficient method for Jetpack environments.
|
||||
$plan = self::get_plan( $plan_slug );
|
||||
return $plan->product_name_short ?? null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,579 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Composer.
|
||||
*
|
||||
* (c) Nils Adermann <naderman@naderman.de>
|
||||
* Jordi Boggiano <j.boggiano@seld.be>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
/**
|
||||
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
|
||||
*
|
||||
* $loader = new \Composer\Autoload\ClassLoader();
|
||||
*
|
||||
* // register classes with namespaces
|
||||
* $loader->add('Symfony\Component', __DIR__.'/component');
|
||||
* $loader->add('Symfony', __DIR__.'/framework');
|
||||
*
|
||||
* // activate the autoloader
|
||||
* $loader->register();
|
||||
*
|
||||
* // to enable searching the include path (eg. for PEAR packages)
|
||||
* $loader->setUseIncludePath(true);
|
||||
*
|
||||
* In this example, if you try to use a class in the Symfony\Component
|
||||
* namespace or one of its children (Symfony\Component\Console for instance),
|
||||
* the autoloader will first look for the class under the component/
|
||||
* directory, and it will then fallback to the framework/ directory if not
|
||||
* found before giving up.
|
||||
*
|
||||
* This class is loosely based on the Symfony UniversalClassLoader.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Jordi Boggiano <j.boggiano@seld.be>
|
||||
* @see https://www.php-fig.org/psr/psr-0/
|
||||
* @see https://www.php-fig.org/psr/psr-4/
|
||||
*/
|
||||
class ClassLoader
|
||||
{
|
||||
/** @var \Closure(string):void */
|
||||
private static $includeFile;
|
||||
|
||||
/** @var string|null */
|
||||
private $vendorDir;
|
||||
|
||||
// PSR-4
|
||||
/**
|
||||
* @var array<string, array<string, int>>
|
||||
*/
|
||||
private $prefixLengthsPsr4 = array();
|
||||
/**
|
||||
* @var array<string, list<string>>
|
||||
*/
|
||||
private $prefixDirsPsr4 = array();
|
||||
/**
|
||||
* @var list<string>
|
||||
*/
|
||||
private $fallbackDirsPsr4 = array();
|
||||
|
||||
// PSR-0
|
||||
/**
|
||||
* List of PSR-0 prefixes
|
||||
*
|
||||
* Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
|
||||
*
|
||||
* @var array<string, array<string, list<string>>>
|
||||
*/
|
||||
private $prefixesPsr0 = array();
|
||||
/**
|
||||
* @var list<string>
|
||||
*/
|
||||
private $fallbackDirsPsr0 = array();
|
||||
|
||||
/** @var bool */
|
||||
private $useIncludePath = false;
|
||||
|
||||
/**
|
||||
* @var array<string, string>
|
||||
*/
|
||||
private $classMap = array();
|
||||
|
||||
/** @var bool */
|
||||
private $classMapAuthoritative = false;
|
||||
|
||||
/**
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
private $missingClasses = array();
|
||||
|
||||
/** @var string|null */
|
||||
private $apcuPrefix;
|
||||
|
||||
/**
|
||||
* @var array<string, self>
|
||||
*/
|
||||
private static $registeredLoaders = array();
|
||||
|
||||
/**
|
||||
* @param string|null $vendorDir
|
||||
*/
|
||||
public function __construct($vendorDir = null)
|
||||
{
|
||||
$this->vendorDir = $vendorDir;
|
||||
self::initializeIncludeClosure();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, list<string>>
|
||||
*/
|
||||
public function getPrefixes()
|
||||
{
|
||||
if (!empty($this->prefixesPsr0)) {
|
||||
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, list<string>>
|
||||
*/
|
||||
public function getPrefixesPsr4()
|
||||
{
|
||||
return $this->prefixDirsPsr4;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list<string>
|
||||
*/
|
||||
public function getFallbackDirs()
|
||||
{
|
||||
return $this->fallbackDirsPsr0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list<string>
|
||||
*/
|
||||
public function getFallbackDirsPsr4()
|
||||
{
|
||||
return $this->fallbackDirsPsr4;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, string> Array of classname => path
|
||||
*/
|
||||
public function getClassMap()
|
||||
{
|
||||
return $this->classMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string, string> $classMap Class to filename map
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addClassMap(array $classMap)
|
||||
{
|
||||
if ($this->classMap) {
|
||||
$this->classMap = array_merge($this->classMap, $classMap);
|
||||
} else {
|
||||
$this->classMap = $classMap;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a set of PSR-0 directories for a given prefix, either
|
||||
* appending or prepending to the ones previously set for this prefix.
|
||||
*
|
||||
* @param string $prefix The prefix
|
||||
* @param list<string>|string $paths The PSR-0 root directories
|
||||
* @param bool $prepend Whether to prepend the directories
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function add($prefix, $paths, $prepend = false)
|
||||
{
|
||||
$paths = (array) $paths;
|
||||
if (!$prefix) {
|
||||
if ($prepend) {
|
||||
$this->fallbackDirsPsr0 = array_merge(
|
||||
$paths,
|
||||
$this->fallbackDirsPsr0
|
||||
);
|
||||
} else {
|
||||
$this->fallbackDirsPsr0 = array_merge(
|
||||
$this->fallbackDirsPsr0,
|
||||
$paths
|
||||
);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$first = $prefix[0];
|
||||
if (!isset($this->prefixesPsr0[$first][$prefix])) {
|
||||
$this->prefixesPsr0[$first][$prefix] = $paths;
|
||||
|
||||
return;
|
||||
}
|
||||
if ($prepend) {
|
||||
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
||||
$paths,
|
||||
$this->prefixesPsr0[$first][$prefix]
|
||||
);
|
||||
} else {
|
||||
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
||||
$this->prefixesPsr0[$first][$prefix],
|
||||
$paths
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a set of PSR-4 directories for a given namespace, either
|
||||
* appending or prepending to the ones previously set for this namespace.
|
||||
*
|
||||
* @param string $prefix The prefix/namespace, with trailing '\\'
|
||||
* @param list<string>|string $paths The PSR-4 base directories
|
||||
* @param bool $prepend Whether to prepend the directories
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addPsr4($prefix, $paths, $prepend = false)
|
||||
{
|
||||
$paths = (array) $paths;
|
||||
if (!$prefix) {
|
||||
// Register directories for the root namespace.
|
||||
if ($prepend) {
|
||||
$this->fallbackDirsPsr4 = array_merge(
|
||||
$paths,
|
||||
$this->fallbackDirsPsr4
|
||||
);
|
||||
} else {
|
||||
$this->fallbackDirsPsr4 = array_merge(
|
||||
$this->fallbackDirsPsr4,
|
||||
$paths
|
||||
);
|
||||
}
|
||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||
// Register directories for a new namespace.
|
||||
$length = strlen($prefix);
|
||||
if ('\\' !== $prefix[$length - 1]) {
|
||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||
}
|
||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
||||
$this->prefixDirsPsr4[$prefix] = $paths;
|
||||
} elseif ($prepend) {
|
||||
// Prepend directories for an already registered namespace.
|
||||
$this->prefixDirsPsr4[$prefix] = array_merge(
|
||||
$paths,
|
||||
$this->prefixDirsPsr4[$prefix]
|
||||
);
|
||||
} else {
|
||||
// Append directories for an already registered namespace.
|
||||
$this->prefixDirsPsr4[$prefix] = array_merge(
|
||||
$this->prefixDirsPsr4[$prefix],
|
||||
$paths
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a set of PSR-0 directories for a given prefix,
|
||||
* replacing any others previously set for this prefix.
|
||||
*
|
||||
* @param string $prefix The prefix
|
||||
* @param list<string>|string $paths The PSR-0 base directories
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function set($prefix, $paths)
|
||||
{
|
||||
if (!$prefix) {
|
||||
$this->fallbackDirsPsr0 = (array) $paths;
|
||||
} else {
|
||||
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a set of PSR-4 directories for a given namespace,
|
||||
* replacing any others previously set for this namespace.
|
||||
*
|
||||
* @param string $prefix The prefix/namespace, with trailing '\\'
|
||||
* @param list<string>|string $paths The PSR-4 base directories
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setPsr4($prefix, $paths)
|
||||
{
|
||||
if (!$prefix) {
|
||||
$this->fallbackDirsPsr4 = (array) $paths;
|
||||
} else {
|
||||
$length = strlen($prefix);
|
||||
if ('\\' !== $prefix[$length - 1]) {
|
||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||
}
|
||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Turns on searching the include path for class files.
|
||||
*
|
||||
* @param bool $useIncludePath
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUseIncludePath($useIncludePath)
|
||||
{
|
||||
$this->useIncludePath = $useIncludePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be used to check if the autoloader uses the include path to check
|
||||
* for classes.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getUseIncludePath()
|
||||
{
|
||||
return $this->useIncludePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Turns off searching the prefix and fallback directories for classes
|
||||
* that have not been registered with the class map.
|
||||
*
|
||||
* @param bool $classMapAuthoritative
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setClassMapAuthoritative($classMapAuthoritative)
|
||||
{
|
||||
$this->classMapAuthoritative = $classMapAuthoritative;
|
||||
}
|
||||
|
||||
/**
|
||||
* Should class lookup fail if not found in the current class map?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isClassMapAuthoritative()
|
||||
{
|
||||
return $this->classMapAuthoritative;
|
||||
}
|
||||
|
||||
/**
|
||||
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
|
||||
*
|
||||
* @param string|null $apcuPrefix
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setApcuPrefix($apcuPrefix)
|
||||
{
|
||||
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* The APCu prefix in use, or null if APCu caching is not enabled.
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getApcuPrefix()
|
||||
{
|
||||
return $this->apcuPrefix;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers this instance as an autoloader.
|
||||
*
|
||||
* @param bool $prepend Whether to prepend the autoloader or not
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register($prepend = false)
|
||||
{
|
||||
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
||||
|
||||
if (null === $this->vendorDir) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($prepend) {
|
||||
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
|
||||
} else {
|
||||
unset(self::$registeredLoaders[$this->vendorDir]);
|
||||
self::$registeredLoaders[$this->vendorDir] = $this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregisters this instance as an autoloader.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function unregister()
|
||||
{
|
||||
spl_autoload_unregister(array($this, 'loadClass'));
|
||||
|
||||
if (null !== $this->vendorDir) {
|
||||
unset(self::$registeredLoaders[$this->vendorDir]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the given class or interface.
|
||||
*
|
||||
* @param string $class The name of the class
|
||||
* @return true|null True if loaded, null otherwise
|
||||
*/
|
||||
public function loadClass($class)
|
||||
{
|
||||
if ($file = $this->findFile($class)) {
|
||||
$includeFile = self::$includeFile;
|
||||
$includeFile($file);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the path to the file where the class is defined.
|
||||
*
|
||||
* @param string $class The name of the class
|
||||
*
|
||||
* @return string|false The path if found, false otherwise
|
||||
*/
|
||||
public function findFile($class)
|
||||
{
|
||||
// class map lookup
|
||||
if (isset($this->classMap[$class])) {
|
||||
return $this->classMap[$class];
|
||||
}
|
||||
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
|
||||
return false;
|
||||
}
|
||||
if (null !== $this->apcuPrefix) {
|
||||
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
|
||||
if ($hit) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
|
||||
$file = $this->findFileWithExtension($class, '.php');
|
||||
|
||||
// Search for Hack files if we are running on HHVM
|
||||
if (false === $file && defined('HHVM_VERSION')) {
|
||||
$file = $this->findFileWithExtension($class, '.hh');
|
||||
}
|
||||
|
||||
if (null !== $this->apcuPrefix) {
|
||||
apcu_add($this->apcuPrefix.$class, $file);
|
||||
}
|
||||
|
||||
if (false === $file) {
|
||||
// Remember that this class does not exist.
|
||||
$this->missingClasses[$class] = true;
|
||||
}
|
||||
|
||||
return $file;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the currently registered loaders keyed by their corresponding vendor directories.
|
||||
*
|
||||
* @return array<string, self>
|
||||
*/
|
||||
public static function getRegisteredLoaders()
|
||||
{
|
||||
return self::$registeredLoaders;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $class
|
||||
* @param string $ext
|
||||
* @return string|false
|
||||
*/
|
||||
private function findFileWithExtension($class, $ext)
|
||||
{
|
||||
// PSR-4 lookup
|
||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||
|
||||
$first = $class[0];
|
||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
||||
$subPath = $class;
|
||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||
$subPath = substr($subPath, 0, $lastPos);
|
||||
$search = $subPath . '\\';
|
||||
if (isset($this->prefixDirsPsr4[$search])) {
|
||||
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||
if (file_exists($file = $dir . $pathEnd)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// PSR-4 fallback dirs
|
||||
foreach ($this->fallbackDirsPsr4 as $dir) {
|
||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
|
||||
// PSR-0 lookup
|
||||
if (false !== $pos = strrpos($class, '\\')) {
|
||||
// namespaced class name
|
||||
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
|
||||
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
|
||||
} else {
|
||||
// PEAR-like class name
|
||||
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
|
||||
}
|
||||
|
||||
if (isset($this->prefixesPsr0[$first])) {
|
||||
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
|
||||
if (0 === strpos($class, $prefix)) {
|
||||
foreach ($dirs as $dir) {
|
||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// PSR-0 fallback dirs
|
||||
foreach ($this->fallbackDirsPsr0 as $dir) {
|
||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
|
||||
// PSR-0 include paths.
|
||||
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
|
||||
return $file;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
private static function initializeIncludeClosure()
|
||||
{
|
||||
if (self::$includeFile !== null) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Scope isolated include.
|
||||
*
|
||||
* Prevents access to $this/self from included files.
|
||||
*
|
||||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
self::$includeFile = \Closure::bind(static function($file) {
|
||||
include $file;
|
||||
}, null, null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,396 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Composer.
|
||||
*
|
||||
* (c) Nils Adermann <naderman@naderman.de>
|
||||
* Jordi Boggiano <j.boggiano@seld.be>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Composer;
|
||||
|
||||
use Composer\Autoload\ClassLoader;
|
||||
use Composer\Semver\VersionParser;
|
||||
|
||||
/**
|
||||
* This class is copied in every Composer installed project and available to all
|
||||
*
|
||||
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
|
||||
*
|
||||
* To require its presence, you can require `composer-runtime-api ^2.0`
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
class InstalledVersions
|
||||
{
|
||||
/**
|
||||
* @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to
|
||||
* @internal
|
||||
*/
|
||||
private static $selfDir = null;
|
||||
|
||||
/**
|
||||
* @var mixed[]|null
|
||||
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
|
||||
*/
|
||||
private static $installed;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private static $installedIsLocalDir;
|
||||
|
||||
/**
|
||||
* @var bool|null
|
||||
*/
|
||||
private static $canGetVendors;
|
||||
|
||||
/**
|
||||
* @var array[]
|
||||
* @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
||||
*/
|
||||
private static $installedByVendor = array();
|
||||
|
||||
/**
|
||||
* Returns a list of all package names which are present, either by being installed, replaced or provided
|
||||
*
|
||||
* @return string[]
|
||||
* @psalm-return list<string>
|
||||
*/
|
||||
public static function getInstalledPackages()
|
||||
{
|
||||
$packages = array();
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
$packages[] = array_keys($installed['versions']);
|
||||
}
|
||||
|
||||
if (1 === \count($packages)) {
|
||||
return $packages[0];
|
||||
}
|
||||
|
||||
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of all package names with a specific type e.g. 'library'
|
||||
*
|
||||
* @param string $type
|
||||
* @return string[]
|
||||
* @psalm-return list<string>
|
||||
*/
|
||||
public static function getInstalledPackagesByType($type)
|
||||
{
|
||||
$packagesByType = array();
|
||||
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
foreach ($installed['versions'] as $name => $package) {
|
||||
if (isset($package['type']) && $package['type'] === $type) {
|
||||
$packagesByType[] = $name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $packagesByType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the given package is installed
|
||||
*
|
||||
* This also returns true if the package name is provided or replaced by another package
|
||||
*
|
||||
* @param string $packageName
|
||||
* @param bool $includeDevRequirements
|
||||
* @return bool
|
||||
*/
|
||||
public static function isInstalled($packageName, $includeDevRequirements = true)
|
||||
{
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
if (isset($installed['versions'][$packageName])) {
|
||||
return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the given package satisfies a version constraint
|
||||
*
|
||||
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
|
||||
*
|
||||
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
|
||||
*
|
||||
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
|
||||
* @param string $packageName
|
||||
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
|
||||
* @return bool
|
||||
*/
|
||||
public static function satisfies(VersionParser $parser, $packageName, $constraint)
|
||||
{
|
||||
$constraint = $parser->parseConstraints((string) $constraint);
|
||||
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
|
||||
|
||||
return $provided->matches($constraint);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a version constraint representing all the range(s) which are installed for a given package
|
||||
*
|
||||
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
|
||||
* whether a given version of a package is installed, and not just whether it exists
|
||||
*
|
||||
* @param string $packageName
|
||||
* @return string Version constraint usable with composer/semver
|
||||
*/
|
||||
public static function getVersionRanges($packageName)
|
||||
{
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
if (!isset($installed['versions'][$packageName])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$ranges = array();
|
||||
if (isset($installed['versions'][$packageName]['pretty_version'])) {
|
||||
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
|
||||
}
|
||||
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
|
||||
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
|
||||
}
|
||||
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
|
||||
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
|
||||
}
|
||||
if (array_key_exists('provided', $installed['versions'][$packageName])) {
|
||||
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
|
||||
}
|
||||
|
||||
return implode(' || ', $ranges);
|
||||
}
|
||||
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $packageName
|
||||
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
|
||||
*/
|
||||
public static function getVersion($packageName)
|
||||
{
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
if (!isset($installed['versions'][$packageName])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isset($installed['versions'][$packageName]['version'])) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $installed['versions'][$packageName]['version'];
|
||||
}
|
||||
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $packageName
|
||||
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
|
||||
*/
|
||||
public static function getPrettyVersion($packageName)
|
||||
{
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
if (!isset($installed['versions'][$packageName])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $installed['versions'][$packageName]['pretty_version'];
|
||||
}
|
||||
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $packageName
|
||||
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
|
||||
*/
|
||||
public static function getReference($packageName)
|
||||
{
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
if (!isset($installed['versions'][$packageName])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isset($installed['versions'][$packageName]['reference'])) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $installed['versions'][$packageName]['reference'];
|
||||
}
|
||||
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $packageName
|
||||
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
|
||||
*/
|
||||
public static function getInstallPath($packageName)
|
||||
{
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
if (!isset($installed['versions'][$packageName])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
|
||||
}
|
||||
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
|
||||
*/
|
||||
public static function getRootPackage()
|
||||
{
|
||||
$installed = self::getInstalled();
|
||||
|
||||
return $installed[0]['root'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the raw installed.php data for custom implementations
|
||||
*
|
||||
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
|
||||
* @return array[]
|
||||
* @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
|
||||
*/
|
||||
public static function getRawData()
|
||||
{
|
||||
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
|
||||
|
||||
if (null === self::$installed) {
|
||||
// only require the installed.php file if this file is loaded from its dumped location,
|
||||
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
||||
if (substr(__DIR__, -8, 1) !== 'C') {
|
||||
self::$installed = include __DIR__ . '/installed.php';
|
||||
} else {
|
||||
self::$installed = array();
|
||||
}
|
||||
}
|
||||
|
||||
return self::$installed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the raw data of all installed.php which are currently loaded for custom implementations
|
||||
*
|
||||
* @return array[]
|
||||
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
||||
*/
|
||||
public static function getAllRawData()
|
||||
{
|
||||
return self::getInstalled();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lets you reload the static array from another file
|
||||
*
|
||||
* This is only useful for complex integrations in which a project needs to use
|
||||
* this class but then also needs to execute another project's autoloader in process,
|
||||
* and wants to ensure both projects have access to their version of installed.php.
|
||||
*
|
||||
* A typical case would be PHPUnit, where it would need to make sure it reads all
|
||||
* the data it needs from this class, then call reload() with
|
||||
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
|
||||
* the project in which it runs can then also use this class safely, without
|
||||
* interference between PHPUnit's dependencies and the project's dependencies.
|
||||
*
|
||||
* @param array[] $data A vendor/composer/installed.php data set
|
||||
* @return void
|
||||
*
|
||||
* @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
|
||||
*/
|
||||
public static function reload($data)
|
||||
{
|
||||
self::$installed = $data;
|
||||
self::$installedByVendor = array();
|
||||
|
||||
// when using reload, we disable the duplicate protection to ensure that self::$installed data is
|
||||
// always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
|
||||
// so we have to assume it does not, and that may result in duplicate data being returned when listing
|
||||
// all installed packages for example
|
||||
self::$installedIsLocalDir = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
private static function getSelfDir()
|
||||
{
|
||||
if (self::$selfDir === null) {
|
||||
self::$selfDir = strtr(__DIR__, '\\', '/');
|
||||
}
|
||||
|
||||
return self::$selfDir;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array[]
|
||||
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
||||
*/
|
||||
private static function getInstalled()
|
||||
{
|
||||
if (null === self::$canGetVendors) {
|
||||
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
|
||||
}
|
||||
|
||||
$installed = array();
|
||||
$copiedLocalDir = false;
|
||||
|
||||
if (self::$canGetVendors) {
|
||||
$selfDir = self::getSelfDir();
|
||||
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
|
||||
$vendorDir = strtr($vendorDir, '\\', '/');
|
||||
if (isset(self::$installedByVendor[$vendorDir])) {
|
||||
$installed[] = self::$installedByVendor[$vendorDir];
|
||||
} elseif (is_file($vendorDir.'/composer/installed.php')) {
|
||||
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
|
||||
$required = require $vendorDir.'/composer/installed.php';
|
||||
self::$installedByVendor[$vendorDir] = $required;
|
||||
$installed[] = $required;
|
||||
if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
|
||||
self::$installed = $required;
|
||||
self::$installedIsLocalDir = true;
|
||||
}
|
||||
}
|
||||
if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
|
||||
$copiedLocalDir = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (null === self::$installed) {
|
||||
// only require the installed.php file if this file is loaded from its dumped location,
|
||||
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
||||
if (substr(__DIR__, -8, 1) !== 'C') {
|
||||
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
|
||||
$required = require __DIR__ . '/installed.php';
|
||||
self::$installed = $required;
|
||||
} else {
|
||||
self::$installed = array();
|
||||
}
|
||||
}
|
||||
|
||||
if (self::$installed !== array() && !$copiedLocalDir) {
|
||||
$installed[] = self::$installed;
|
||||
}
|
||||
|
||||
return $installed;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
|
||||
Copyright (c) Nils Adermann, Jordi Boggiano
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
@@ -0,0 +1,427 @@
|
||||
<?php
|
||||
|
||||
// autoload_classmap.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'Automattic\\Jetpack\\A8c_Mc_Stats' => $baseDir . '/jetpack_vendor/automattic/jetpack-a8c-mc-stats/src/class-a8c-mc-stats.php',
|
||||
'Automattic\\Jetpack\\Admin_UI\\Admin_Menu' => $baseDir . '/jetpack_vendor/automattic/jetpack-admin-ui/src/class-admin-menu.php',
|
||||
'Automattic\\Jetpack\\Agents_Manager\\Agents_Manager' => $baseDir . '/jetpack_vendor/automattic/jetpack-agents-manager/src/class-agents-manager.php',
|
||||
'Automattic\\Jetpack\\Agents_Manager\\Open_State_Store' => $baseDir . '/jetpack_vendor/automattic/jetpack-agents-manager/src/class-open-state-store.php',
|
||||
'Automattic\\Jetpack\\Agents_Manager\\Sidebar_Open_Preservation' => $baseDir . '/jetpack_vendor/automattic/jetpack-agents-manager/src/class-sidebar-open-preservation.php',
|
||||
'Automattic\\Jetpack\\Agents_Manager\\WP_REST_Agents_Manager_Persisted_Open_State' => $baseDir . '/jetpack_vendor/automattic/jetpack-agents-manager/src/class-wp-rest-agents-manager-persisted-open-state.php',
|
||||
'Automattic\\Jetpack\\Agents_Manager\\WP_REST_Jetpack_AI_JWT' => $baseDir . '/jetpack_vendor/automattic/jetpack-agents-manager/src/class-wp-rest-jetpack-ai-jwt.php',
|
||||
'Automattic\\Jetpack\\Assets' => $baseDir . '/jetpack_vendor/automattic/jetpack-assets/src/class-assets.php',
|
||||
'Automattic\\Jetpack\\Assets\\Logo' => $baseDir . '/jetpack_vendor/automattic/jetpack-logo/src/class-logo.php',
|
||||
'Automattic\\Jetpack\\Assets\\Script_Data' => $baseDir . '/jetpack_vendor/automattic/jetpack-assets/src/class-script-data.php',
|
||||
'Automattic\\Jetpack\\Assets\\Semver' => $baseDir . '/jetpack_vendor/automattic/jetpack-assets/src/class-semver.php',
|
||||
'Automattic\\Jetpack\\Assets\\Shared_Stores_Assets' => $baseDir . '/jetpack_vendor/automattic/jetpack-assets/src/class-shared-stores-assets.php',
|
||||
'Automattic\\Jetpack\\Autoloader\\AutoloadFileWriter' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadFileWriter.php',
|
||||
'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php',
|
||||
'Automattic\\Jetpack\\Autoloader\\AutoloadProcessor' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadProcessor.php',
|
||||
'Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin' => $vendorDir . '/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php',
|
||||
'Automattic\\Jetpack\\Autoloader\\ManifestGenerator' => $vendorDir . '/automattic/jetpack-autoloader/src/ManifestGenerator.php',
|
||||
'Automattic\\Jetpack\\Automatic_Install_Skin' => $baseDir . '/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-automatic-install-skin.php',
|
||||
'Automattic\\Jetpack\\Boost\\App\\Contracts\\Is_Dev_Feature' => $baseDir . '/app/contracts/interface-is-dev-feature.php',
|
||||
'Automattic\\Jetpack\\Boost_Core\\Contracts\\Boost_API_Client' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-core/src/contracts/boost-api-client.php',
|
||||
'Automattic\\Jetpack\\Boost_Core\\Lib\\Boost_API' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-boost-api.php',
|
||||
'Automattic\\Jetpack\\Boost_Core\\Lib\\Cacheable' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-cacheable.php',
|
||||
'Automattic\\Jetpack\\Boost_Core\\Lib\\Transient' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-transient.php',
|
||||
'Automattic\\Jetpack\\Boost_Core\\Lib\\Url' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-url.php',
|
||||
'Automattic\\Jetpack\\Boost_Core\\Lib\\Utils' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-utils.php',
|
||||
'Automattic\\Jetpack\\Boost_Core\\Lib\\WPCOM_Boost_API_Client' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-wpcom-boost-api-client.php',
|
||||
'Automattic\\Jetpack\\Boost_Speed_Score\\Jetpack_Boost_Modules' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-speed-score/src/class-jetpack-boost-modules.php',
|
||||
'Automattic\\Jetpack\\Boost_Speed_Score\\Speed_Score' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-speed-score/src/class-speed-score.php',
|
||||
'Automattic\\Jetpack\\Boost_Speed_Score\\Speed_Score_Graph_History_Request' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-speed-score/src/class-speed-score-graph-history-request.php',
|
||||
'Automattic\\Jetpack\\Boost_Speed_Score\\Speed_Score_History' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-speed-score/src/class-speed-score-history.php',
|
||||
'Automattic\\Jetpack\\Boost_Speed_Score\\Speed_Score_Request' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-speed-score/src/class-speed-score-request.php',
|
||||
'Automattic\\Jetpack\\Composer\\Manager' => $vendorDir . '/automattic/jetpack-composer-plugin/src/class-manager.php',
|
||||
'Automattic\\Jetpack\\Composer\\Plugin' => $vendorDir . '/automattic/jetpack-composer-plugin/src/class-plugin.php',
|
||||
'Automattic\\Jetpack\\Config' => $baseDir . '/jetpack_vendor/automattic/jetpack-config/src/class-config.php',
|
||||
'Automattic\\Jetpack\\Connection\\Abilities\\Connection_Abilities' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/abilities/class-connection-abilities.php',
|
||||
'Automattic\\Jetpack\\Connection\\Authorize_Json_Api' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-authorize-json-api.php',
|
||||
'Automattic\\Jetpack\\Connection\\Client' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-client.php',
|
||||
'Automattic\\Jetpack\\Connection\\Connection_Assets' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-connection-assets.php',
|
||||
'Automattic\\Jetpack\\Connection\\Connection_Health_Test_Base' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/health/class-connection-health-test-base.php',
|
||||
'Automattic\\Jetpack\\Connection\\Connection_Health_Tests' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/health/class-connection-health-tests.php',
|
||||
'Automattic\\Jetpack\\Connection\\Connection_Notice' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-connection-notice.php',
|
||||
'Automattic\\Jetpack\\Connection\\Error_Handler' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-error-handler.php',
|
||||
'Automattic\\Jetpack\\Connection\\External_Storage' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-external-storage.php',
|
||||
'Automattic\\Jetpack\\Connection\\Initial_State' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-initial-state.php',
|
||||
'Automattic\\Jetpack\\Connection\\Jetpack_Connector' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/connectors/class-jetpack-connector.php',
|
||||
'Automattic\\Jetpack\\Connection\\Manager' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-manager.php',
|
||||
'Automattic\\Jetpack\\Connection\\Manager_Interface' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/interface-manager.php',
|
||||
'Automattic\\Jetpack\\Connection\\Nonce_Handler' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-nonce-handler.php',
|
||||
'Automattic\\Jetpack\\Connection\\Package_Version' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-package-version.php',
|
||||
'Automattic\\Jetpack\\Connection\\Package_Version_Tracker' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-package-version-tracker.php',
|
||||
'Automattic\\Jetpack\\Connection\\Plugin' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-plugin.php',
|
||||
'Automattic\\Jetpack\\Connection\\Plugin_Storage' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-plugin-storage.php',
|
||||
'Automattic\\Jetpack\\Connection\\REST_Connector' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-rest-connector.php',
|
||||
'Automattic\\Jetpack\\Connection\\Rest_Authentication' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-rest-authentication.php',
|
||||
'Automattic\\Jetpack\\Connection\\SSO' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/sso/class-sso.php',
|
||||
'Automattic\\Jetpack\\Connection\\SSO\\Force_2FA' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/sso/class-force-2fa.php',
|
||||
'Automattic\\Jetpack\\Connection\\SSO\\Helpers' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/sso/class-helpers.php',
|
||||
'Automattic\\Jetpack\\Connection\\SSO\\Notices' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/sso/class-notices.php',
|
||||
'Automattic\\Jetpack\\Connection\\SSO\\User_Admin' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/sso/class-user-admin.php',
|
||||
'Automattic\\Jetpack\\Connection\\Secrets' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-secrets.php',
|
||||
'Automattic\\Jetpack\\Connection\\Server_Sandbox' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-server-sandbox.php',
|
||||
'Automattic\\Jetpack\\Connection\\Site_Health' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-site-health.php',
|
||||
'Automattic\\Jetpack\\Connection\\Storage_Provider_Interface' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/interface-storage-provider.php',
|
||||
'Automattic\\Jetpack\\Connection\\Tokens' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-tokens.php',
|
||||
'Automattic\\Jetpack\\Connection\\Tokens_Locks' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-tokens-locks.php',
|
||||
'Automattic\\Jetpack\\Connection\\Traits\\WPCOM_REST_API_Proxy_Request' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/traits/trait-wpcom-rest-api-proxy-request.php',
|
||||
'Automattic\\Jetpack\\Connection\\Urls' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-urls.php',
|
||||
'Automattic\\Jetpack\\Connection\\User_Account_Status' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-user-account-status.php',
|
||||
'Automattic\\Jetpack\\Connection\\Users_Connection_Admin' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-users-connection-admin.php',
|
||||
'Automattic\\Jetpack\\Connection\\Utils' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-utils.php',
|
||||
'Automattic\\Jetpack\\Connection\\Webhooks' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-webhooks.php',
|
||||
'Automattic\\Jetpack\\Connection\\Webhooks\\Authorize_Redirect' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/webhooks/class-authorize-redirect.php',
|
||||
'Automattic\\Jetpack\\Connection\\XMLRPC_Async_Call' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-xmlrpc-async-call.php',
|
||||
'Automattic\\Jetpack\\Connection\\XMLRPC_Connector' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-xmlrpc-connector.php',
|
||||
'Automattic\\Jetpack\\Constants' => $baseDir . '/jetpack_vendor/automattic/jetpack-constants/src/class-constants.php',
|
||||
'Automattic\\Jetpack\\CookieState' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-cookiestate.php',
|
||||
'Automattic\\Jetpack\\Current_Plan' => $vendorDir . '/automattic/jetpack-plans/src/class-current-plan.php',
|
||||
'Automattic\\Jetpack\\Device_Detection' => $baseDir . '/jetpack_vendor/automattic/jetpack-device-detection/src/class-device-detection.php',
|
||||
'Automattic\\Jetpack\\Device_Detection\\User_Agent_Info' => $baseDir . '/jetpack_vendor/automattic/jetpack-device-detection/src/class-user-agent-info.php',
|
||||
'Automattic\\Jetpack\\Errors' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-errors.php',
|
||||
'Automattic\\Jetpack\\ExPlat' => $baseDir . '/jetpack_vendor/automattic/jetpack-explat/src/class-explat.php',
|
||||
'Automattic\\Jetpack\\ExPlat\\REST_Controller' => $baseDir . '/jetpack_vendor/automattic/jetpack-explat/src/class-rest-controller.php',
|
||||
'Automattic\\Jetpack\\Files' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-files.php',
|
||||
'Automattic\\Jetpack\\Heartbeat' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-heartbeat.php',
|
||||
'Automattic\\Jetpack\\IP\\Utils' => $baseDir . '/jetpack_vendor/automattic/jetpack-ip/src/class-utils.php',
|
||||
'Automattic\\Jetpack\\IdentityCrisis\\Exception' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/identity-crisis/class-exception.php',
|
||||
'Automattic\\Jetpack\\IdentityCrisis\\REST_Endpoints' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/identity-crisis/class-rest-endpoints.php',
|
||||
'Automattic\\Jetpack\\IdentityCrisis\\UI' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/identity-crisis/class-ui.php',
|
||||
'Automattic\\Jetpack\\IdentityCrisis\\URL_Secret' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/identity-crisis/class-url-secret.php',
|
||||
'Automattic\\Jetpack\\Identity_Crisis' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/identity-crisis/class-identity-crisis.php',
|
||||
'Automattic\\Jetpack\\Image_CDN\\Image_CDN' => $baseDir . '/jetpack_vendor/automattic/jetpack-image-cdn/src/class-image-cdn.php',
|
||||
'Automattic\\Jetpack\\Image_CDN\\Image_CDN_Core' => $baseDir . '/jetpack_vendor/automattic/jetpack-image-cdn/src/class-image-cdn-core.php',
|
||||
'Automattic\\Jetpack\\Image_CDN\\Image_CDN_Image' => $baseDir . '/jetpack_vendor/automattic/jetpack-image-cdn/src/class-image-cdn-image.php',
|
||||
'Automattic\\Jetpack\\Image_CDN\\Image_CDN_Image_Sizes' => $baseDir . '/jetpack_vendor/automattic/jetpack-image-cdn/src/class-image-cdn-image-sizes.php',
|
||||
'Automattic\\Jetpack\\Image_CDN\\Image_CDN_Setup' => $baseDir . '/jetpack_vendor/automattic/jetpack-image-cdn/src/class-image-cdn-setup.php',
|
||||
'Automattic\\Jetpack\\JITMS\\JITM' => $baseDir . '/jetpack_vendor/automattic/jetpack-jitm/src/class-jitm.php',
|
||||
'Automattic\\Jetpack\\JITMS\\Post_Connection_JITM' => $baseDir . '/jetpack_vendor/automattic/jetpack-jitm/src/class-post-connection-jitm.php',
|
||||
'Automattic\\Jetpack\\JITMS\\Pre_Connection_JITM' => $baseDir . '/jetpack_vendor/automattic/jetpack-jitm/src/class-pre-connection-jitm.php',
|
||||
'Automattic\\Jetpack\\JITMS\\Rest_Api_Endpoints' => $baseDir . '/jetpack_vendor/automattic/jetpack-jitm/src/class-rest-api-endpoints.php',
|
||||
'Automattic\\Jetpack\\Licensing' => $baseDir . '/jetpack_vendor/automattic/jetpack-licensing/src/class-licensing.php',
|
||||
'Automattic\\Jetpack\\Licensing\\Endpoints' => $baseDir . '/jetpack_vendor/automattic/jetpack-licensing/src/class-endpoints.php',
|
||||
'Automattic\\Jetpack\\Modules' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-modules.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Historically_Active_Modules' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-historically-active-modules.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Hybrid_Product' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-hybrid-product.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Initializer' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Jetpack_Manage' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-jetpack-manage.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Module_Product' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-module-product.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Product' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-product.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-products.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Anti_Spam' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-anti-spam.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Backup' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-backup.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Boost' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-boost.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Complete' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-complete.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Creator' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-creator.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Crm' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-crm.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Extras' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-extras.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Growth' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-growth.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Jetpack_Ai' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-jetpack-ai.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Jetpack_Forms' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-jetpack-forms.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Newsletter' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-newsletter.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Protect' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-protect.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Related_Posts' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-related-posts.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Scan' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-scan.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Search' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Search_Stats' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search-stats.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Security' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-security.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Site_Accelerator' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-site-accelerator.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Social' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-social.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Starter' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-starter.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Stats' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-stats.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Videopress' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-videopress.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\REST_Products' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-products.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\REST_Purchases' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-purchases.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\REST_Recommendations_Evaluation' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-recommendations-evaluation.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\REST_Zendesk_Chat' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-zendesk-chat.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Red_Bubble_Notifications' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-red-bubble-notifications.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Wpcom_Products' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-wpcom-products.php',
|
||||
'Automattic\\Jetpack\\Partner' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-partner.php',
|
||||
'Automattic\\Jetpack\\Partner_Coupon' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-partner-coupon.php',
|
||||
'Automattic\\Jetpack\\Password_Checker' => $baseDir . '/jetpack_vendor/automattic/jetpack-password-checker/src/class-password-checker.php',
|
||||
'Automattic\\Jetpack\\Paths' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-paths.php',
|
||||
'Automattic\\Jetpack\\Plans' => $vendorDir . '/automattic/jetpack-plans/src/class-plans.php',
|
||||
'Automattic\\Jetpack\\Plugin_Deactivation\\Deactivation_Handler' => $baseDir . '/jetpack_vendor/automattic/jetpack-plugin-deactivation/src/class-deactivation-handler.php',
|
||||
'Automattic\\Jetpack\\Plugins_Installer' => $baseDir . '/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-plugins-installer.php',
|
||||
'Automattic\\Jetpack\\Protect_Models' => $baseDir . '/jetpack_vendor/automattic/jetpack-protect-models/src/class-protect-models.php',
|
||||
'Automattic\\Jetpack\\Protect_Models\\Extension_Model' => $baseDir . '/jetpack_vendor/automattic/jetpack-protect-models/src/class-extension-model.php',
|
||||
'Automattic\\Jetpack\\Protect_Models\\History_Model' => $baseDir . '/jetpack_vendor/automattic/jetpack-protect-models/src/class-history-model.php',
|
||||
'Automattic\\Jetpack\\Protect_Models\\Status_Model' => $baseDir . '/jetpack_vendor/automattic/jetpack-protect-models/src/class-status-model.php',
|
||||
'Automattic\\Jetpack\\Protect_Models\\Threat_Model' => $baseDir . '/jetpack_vendor/automattic/jetpack-protect-models/src/class-threat-model.php',
|
||||
'Automattic\\Jetpack\\Protect_Models\\Vulnerability_Model' => $baseDir . '/jetpack_vendor/automattic/jetpack-protect-models/src/class-vulnerability-model.php',
|
||||
'Automattic\\Jetpack\\Protect_Status\\Plan' => $baseDir . '/jetpack_vendor/automattic/jetpack-protect-status/src/class-plan.php',
|
||||
'Automattic\\Jetpack\\Protect_Status\\Protect_Status' => $baseDir . '/jetpack_vendor/automattic/jetpack-protect-status/src/class-protect-status.php',
|
||||
'Automattic\\Jetpack\\Protect_Status\\REST_Controller' => $baseDir . '/jetpack_vendor/automattic/jetpack-protect-status/src/class-rest-controller.php',
|
||||
'Automattic\\Jetpack\\Protect_Status\\Scan_Status' => $baseDir . '/jetpack_vendor/automattic/jetpack-protect-status/src/class-scan-status.php',
|
||||
'Automattic\\Jetpack\\Protect_Status\\Status' => $baseDir . '/jetpack_vendor/automattic/jetpack-protect-status/src/class-status.php',
|
||||
'Automattic\\Jetpack\\Redirect' => $baseDir . '/jetpack_vendor/automattic/jetpack-redirect/src/class-redirect.php',
|
||||
'Automattic\\Jetpack\\Roles' => $baseDir . '/jetpack_vendor/automattic/jetpack-roles/src/class-roles.php',
|
||||
'Automattic\\Jetpack\\Schema\\Modifiers\\Modifier_Fallback' => $baseDir . '/jetpack_vendor/automattic/jetpack-schema/src/modifiers/class-modifier-fallback.php',
|
||||
'Automattic\\Jetpack\\Schema\\Parser' => $baseDir . '/jetpack_vendor/automattic/jetpack-schema/src/interface-parser.php',
|
||||
'Automattic\\Jetpack\\Schema\\Schema' => $baseDir . '/jetpack_vendor/automattic/jetpack-schema/src/class-schema.php',
|
||||
'Automattic\\Jetpack\\Schema\\Schema_Context' => $baseDir . '/jetpack_vendor/automattic/jetpack-schema/src/class-schema-context.php',
|
||||
'Automattic\\Jetpack\\Schema\\Schema_Error' => $baseDir . '/jetpack_vendor/automattic/jetpack-schema/src/class-schema-error.php',
|
||||
'Automattic\\Jetpack\\Schema\\Schema_Parser' => $baseDir . '/jetpack_vendor/automattic/jetpack-schema/src/class-schema-parser.php',
|
||||
'Automattic\\Jetpack\\Schema\\Types\\Type_Any' => $baseDir . '/jetpack_vendor/automattic/jetpack-schema/src/types/class-type-any.php',
|
||||
'Automattic\\Jetpack\\Schema\\Types\\Type_Any_JSON' => $baseDir . '/jetpack_vendor/automattic/jetpack-schema/src/types/class-type-any-json.php',
|
||||
'Automattic\\Jetpack\\Schema\\Types\\Type_Array' => $baseDir . '/jetpack_vendor/automattic/jetpack-schema/src/types/class-type-array.php',
|
||||
'Automattic\\Jetpack\\Schema\\Types\\Type_Assoc_Array' => $baseDir . '/jetpack_vendor/automattic/jetpack-schema/src/types/class-type-assoc-array.php',
|
||||
'Automattic\\Jetpack\\Schema\\Types\\Type_Boolean' => $baseDir . '/jetpack_vendor/automattic/jetpack-schema/src/types/class-type-boolean.php',
|
||||
'Automattic\\Jetpack\\Schema\\Types\\Type_Enum' => $baseDir . '/jetpack_vendor/automattic/jetpack-schema/src/types/class-type-enum.php',
|
||||
'Automattic\\Jetpack\\Schema\\Types\\Type_Float' => $baseDir . '/jetpack_vendor/automattic/jetpack-schema/src/types/class-type-float.php',
|
||||
'Automattic\\Jetpack\\Schema\\Types\\Type_Literal' => $baseDir . '/jetpack_vendor/automattic/jetpack-schema/src/types/class-type-literal.php',
|
||||
'Automattic\\Jetpack\\Schema\\Types\\Type_Number' => $baseDir . '/jetpack_vendor/automattic/jetpack-schema/src/types/class-type-number.php',
|
||||
'Automattic\\Jetpack\\Schema\\Types\\Type_String' => $baseDir . '/jetpack_vendor/automattic/jetpack-schema/src/types/class-type-string.php',
|
||||
'Automattic\\Jetpack\\Schema\\Types\\Type_Void' => $baseDir . '/jetpack_vendor/automattic/jetpack-schema/src/types/class-type-void.php',
|
||||
'Automattic\\Jetpack\\Schema\\Utils' => $baseDir . '/jetpack_vendor/automattic/jetpack-schema/src/class-utils.php',
|
||||
'Automattic\\Jetpack\\Status' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-status.php',
|
||||
'Automattic\\Jetpack\\Status\\Cache' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-cache.php',
|
||||
'Automattic\\Jetpack\\Status\\Host' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-host.php',
|
||||
'Automattic\\Jetpack\\Status\\Request' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-request.php',
|
||||
'Automattic\\Jetpack\\Status\\Visitor' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-visitor.php',
|
||||
'Automattic\\Jetpack\\Sync\\Actions' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-actions.php',
|
||||
'Automattic\\Jetpack\\Sync\\Activity_Log_Event' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-activity-log-event.php',
|
||||
'Automattic\\Jetpack\\Sync\\Codec_Interface' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/interface-codec.php',
|
||||
'Automattic\\Jetpack\\Sync\\Data_Settings' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-data-settings.php',
|
||||
'Automattic\\Jetpack\\Sync\\Dedicated_Sender' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-dedicated-sender.php',
|
||||
'Automattic\\Jetpack\\Sync\\Default_Filter_Settings' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-default-filter-settings.php',
|
||||
'Automattic\\Jetpack\\Sync\\Defaults' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-defaults.php',
|
||||
'Automattic\\Jetpack\\Sync\\Functions' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-functions.php',
|
||||
'Automattic\\Jetpack\\Sync\\Health' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-health.php',
|
||||
'Automattic\\Jetpack\\Sync\\JSON_Deflate_Array_Codec' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-json-deflate-array-codec.php',
|
||||
'Automattic\\Jetpack\\Sync\\Listener' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-listener.php',
|
||||
'Automattic\\Jetpack\\Sync\\Lock' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-lock.php',
|
||||
'Automattic\\Jetpack\\Sync\\Main' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-main.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-modules.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Attachments' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-attachments.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Callables' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-callables.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Comments' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-comments.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Constants' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-constants.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync_Immediately' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync-immediately.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Import' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-import.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Menus' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-menus.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Meta' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-meta.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Module' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-module.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Network_Options' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-network-options.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Options' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-options.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Plugins' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-plugins.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Posts' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-posts.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Protect' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-protect.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Search' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-search.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Stats' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-stats.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Term_Relationships' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-term-relationships.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Terms' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-terms.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Themes' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-themes.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Updates' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-updates.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Users' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-users.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\WP_Super_Cache' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-wp-super-cache.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\WooCommerce' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-woocommerce.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\WooCommerce_HPOS_Orders' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-woocommerce-hpos-orders.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\WooCommerce_Products' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-woocommerce-products.php',
|
||||
'Automattic\\Jetpack\\Sync\\Package_Version' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-package-version.php',
|
||||
'Automattic\\Jetpack\\Sync\\Queue' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-queue.php',
|
||||
'Automattic\\Jetpack\\Sync\\Queue\\Queue_Storage_Options' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/sync-queue/class-queue-storage-options.php',
|
||||
'Automattic\\Jetpack\\Sync\\Queue\\Queue_Storage_Table' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/sync-queue/class-queue-storage-table.php',
|
||||
'Automattic\\Jetpack\\Sync\\Queue_Buffer' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-queue-buffer.php',
|
||||
'Automattic\\Jetpack\\Sync\\REST_Endpoints' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-rest-endpoints.php',
|
||||
'Automattic\\Jetpack\\Sync\\REST_Sender' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-rest-sender.php',
|
||||
'Automattic\\Jetpack\\Sync\\Replicastore' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-replicastore.php',
|
||||
'Automattic\\Jetpack\\Sync\\Replicastore\\Table_Checksum' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum.php',
|
||||
'Automattic\\Jetpack\\Sync\\Replicastore\\Table_Checksum_Usermeta' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum-usermeta.php',
|
||||
'Automattic\\Jetpack\\Sync\\Replicastore\\Table_Checksum_Users' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum-users.php',
|
||||
'Automattic\\Jetpack\\Sync\\Replicastore_Interface' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/interface-replicastore.php',
|
||||
'Automattic\\Jetpack\\Sync\\Sender' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-sender.php',
|
||||
'Automattic\\Jetpack\\Sync\\Server' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-server.php',
|
||||
'Automattic\\Jetpack\\Sync\\Settings' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-settings.php',
|
||||
'Automattic\\Jetpack\\Sync\\Simple_Codec' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-simple-codec.php',
|
||||
'Automattic\\Jetpack\\Sync\\Users' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-users.php',
|
||||
'Automattic\\Jetpack\\Sync\\Utils' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-utils.php',
|
||||
'Automattic\\Jetpack\\Terms_Of_Service' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-terms-of-service.php',
|
||||
'Automattic\\Jetpack\\Tracking' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-tracking.php',
|
||||
'Automattic\\Jetpack\\WP_Abilities\\Registrar' => $baseDir . '/jetpack_vendor/automattic/jetpack-wp-abilities/src/class-registrar.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Contracts\\Data_Sync_Action' => $baseDir . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/contracts/interface-data-sync-action.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Contracts\\Data_Sync_Entry' => $baseDir . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/contracts/interface-data-sync-entry.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Contracts\\Entry_Can_Delete' => $baseDir . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/contracts/interface-entry-can-delete.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Contracts\\Entry_Can_Get' => $baseDir . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/contracts/interface-entry-can-get.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Contracts\\Entry_Can_Merge' => $baseDir . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/contracts/interface-entry-can-merge.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Contracts\\Entry_Can_Set' => $baseDir . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/contracts/interface-entry-can-set.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Contracts\\Entry_Has_Custom_Endpoints' => $baseDir . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/contracts/interface-entry-custom-endpoint.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Contracts\\Lazy_Entry' => $baseDir . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/contracts/interface-lazy-entry.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\DS_Utils' => $baseDir . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/class-ds-utils.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Data_Sync' => $baseDir . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/class-data-sync.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Data_Sync_Entry_Adapter' => $baseDir . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/class-data-sync-entry-adapter.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Data_Sync_Option' => $baseDir . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/class-data-sync-option.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Data_Sync_Readonly' => $baseDir . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/class-data-sync-readonly.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Endpoints\\Action_Endpoint' => $baseDir . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/endpoints/class-action-endpoint.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Endpoints\\Authenticated_Nonce' => $baseDir . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/endpoints/class-authenticated-nonce.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Endpoints\\Endpoint' => $baseDir . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/endpoints/class-endpoint.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Registry' => $baseDir . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/class-registry.php',
|
||||
'Automattic\\Jetpack_Boost\\Abilities\\Boost_Abilities' => $baseDir . '/app/abilities/class-boost-abilities.php',
|
||||
'Automattic\\Jetpack_Boost\\Admin\\Admin' => $baseDir . '/app/admin/class-admin.php',
|
||||
'Automattic\\Jetpack_Boost\\Admin\\Config' => $baseDir . '/app/admin/class-config.php',
|
||||
'Automattic\\Jetpack_Boost\\Admin\\Regenerate_Admin_Notice' => $baseDir . '/app/admin/class-regenerate-admin-notice.php',
|
||||
'Automattic\\Jetpack_Boost\\Contracts\\Changes_Output_After_Activation' => $baseDir . '/app/contracts/interface-changes-output-after-activation.php',
|
||||
'Automattic\\Jetpack_Boost\\Contracts\\Changes_Output_On_Activation' => $baseDir . '/app/contracts/interface-changes-output-on-activation.php',
|
||||
'Automattic\\Jetpack_Boost\\Contracts\\Feature' => $baseDir . '/app/contracts/interface-feature.php',
|
||||
'Automattic\\Jetpack_Boost\\Contracts\\Has_Activate' => $baseDir . '/app/contracts/interface-has-activate.php',
|
||||
'Automattic\\Jetpack_Boost\\Contracts\\Has_Data_Sync' => $baseDir . '/app/contracts/interface-has-data-sync.php',
|
||||
'Automattic\\Jetpack_Boost\\Contracts\\Has_Deactivate' => $baseDir . '/app/contracts/interface-has-deactivate.php',
|
||||
'Automattic\\Jetpack_Boost\\Contracts\\Has_Setup' => $baseDir . '/app/contracts/interface-has-setup.php',
|
||||
'Automattic\\Jetpack_Boost\\Contracts\\Has_Slug' => $baseDir . '/app/contracts/interface-has-slug.php',
|
||||
'Automattic\\Jetpack_Boost\\Contracts\\Is_Always_On' => $baseDir . '/app/contracts/interface-is-always-on.php',
|
||||
'Automattic\\Jetpack_Boost\\Contracts\\Needs_To_Be_Ready' => $baseDir . '/app/contracts/interface-needs-to-be-ready.php',
|
||||
'Automattic\\Jetpack_Boost\\Contracts\\Needs_Website_To_Be_Public' => $baseDir . '/app/contracts/interface-needs-website-to-be-public.php',
|
||||
'Automattic\\Jetpack_Boost\\Contracts\\Optimization' => $baseDir . '/app/contracts/interface-optimization.php',
|
||||
'Automattic\\Jetpack_Boost\\Contracts\\Sub_Feature' => $baseDir . '/app/contracts/interface-sub-feature.php',
|
||||
'Automattic\\Jetpack_Boost\\Data_Sync\\Cornerstone_Pages_Entry' => $baseDir . '/app/data-sync/class-cornerstone-pages-entry.php',
|
||||
'Automattic\\Jetpack_Boost\\Data_Sync\\Critical_CSS_Meta_Entry' => $baseDir . '/app/data-sync/class-critical-css-meta-entry.php',
|
||||
'Automattic\\Jetpack_Boost\\Data_Sync\\Getting_Started_Entry' => $baseDir . '/app/data-sync/class-getting-started-entry.php',
|
||||
'Automattic\\Jetpack_Boost\\Data_Sync\\Mergeable_Array_Entry' => $baseDir . '/app/data-sync/class-mergeable-array-entry.php',
|
||||
'Automattic\\Jetpack_Boost\\Data_Sync\\Minify_Excludes_State_Entry' => $baseDir . '/app/data-sync/class-minify-excludes-state-entry.php',
|
||||
'Automattic\\Jetpack_Boost\\Data_Sync\\Modules_State_Entry' => $baseDir . '/app/data-sync/class-modules-state-entry.php',
|
||||
'Automattic\\Jetpack_Boost\\Data_Sync\\Performance_History_Entry' => $baseDir . '/app/data-sync/class-performance-history-entry.php',
|
||||
'Automattic\\Jetpack_Boost\\Jetpack_Boost' => $baseDir . '/app/class-jetpack-boost.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Analytics' => $baseDir . '/app/lib/class-analytics.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Assets' => $baseDir . '/app/lib/class-assets.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Boost_Health' => $baseDir . '/app/lib/class-boost-health.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\CLI' => $baseDir . '/app/lib/class-cli.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Cache_Compatibility' => $baseDir . '/app/lib/class-cache-compatibility.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Collection' => $baseDir . '/app/lib/class-collection.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Connection' => $baseDir . '/app/lib/class-connection.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Cornerstone\\Cornerstone_Pages' => $baseDir . '/app/lib/cornerstone/class-cornerstone-pages.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Cornerstone\\Cornerstone_Utils' => $baseDir . '/app/lib/cornerstone/class-cornerstone-utils.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Admin_Bar_Compatibility' => $baseDir . '/app/lib/critical-css/class-admin-bar-compatibility.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Critical_CSS_Invalidator' => $baseDir . '/app/lib/critical-css/class-critical-css-invalidator.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Critical_CSS_State' => $baseDir . '/app/lib/critical-css/class-critical-css-state.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Critical_CSS_Storage' => $baseDir . '/app/lib/critical-css/class-critical-css-storage.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Data_Sync\\Data_Sync_Schema' => $baseDir . '/app/lib/critical-css/data-sync/class-data-sync-schema.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Data_Sync_Actions\\Regenerate_CSS' => $baseDir . '/app/lib/critical-css/data-sync-actions/class-regenerate-css.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Data_Sync_Actions\\Set_Provider_CSS' => $baseDir . '/app/lib/critical-css/data-sync-actions/class-set-provider-css.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Data_Sync_Actions\\Set_Provider_Error_Dismissed' => $baseDir . '/app/lib/critical-css/data-sync-actions/class-set-provider-error-dismissed.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Data_Sync_Actions\\Set_Provider_Errors' => $baseDir . '/app/lib/critical-css/data-sync-actions/class-set-provider-errors.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Display_Critical_CSS' => $baseDir . '/app/lib/critical-css/class-display-critical-css.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Generator' => $baseDir . '/app/lib/critical-css/class-generator.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Regenerate' => $baseDir . '/app/lib/critical-css/class-regenerate.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Source_Providers\\Providers\\Archive_Provider' => $baseDir . '/app/lib/critical-css/source-providers/providers/class-archive-provider.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Source_Providers\\Providers\\Cornerstone_Provider' => $baseDir . '/app/lib/critical-css/source-providers/providers/class-cornerstone-provider.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Source_Providers\\Providers\\Post_ID_Provider' => $baseDir . '/app/lib/critical-css/source-providers/providers/class-post-id-provider.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Source_Providers\\Providers\\Provider' => $baseDir . '/app/lib/critical-css/source-providers/providers/class-provider.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Source_Providers\\Providers\\Singular_Post_Provider' => $baseDir . '/app/lib/critical-css/source-providers/providers/class-singular-post-provider.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Source_Providers\\Providers\\Taxonomy_Provider' => $baseDir . '/app/lib/critical-css/source-providers/providers/class-taxonomy-provider.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Source_Providers\\Providers\\WP_Core_Provider' => $baseDir . '/app/lib/critical-css/source-providers/providers/class-wp-core-provider.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Source_Providers\\Source_Providers' => $baseDir . '/app/lib/critical-css/source-providers/class-source-providers.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Debug' => $baseDir . '/app/lib/class-debug.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Environment_Change_Detector' => $baseDir . '/app/lib/class-environment-change-detector.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Js_Structure_Scanner' => $baseDir . '/app/lib/class-js-structure-scanner.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Minify' => $baseDir . '/app/lib/class-minify.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Minify\\Cleanup_Stored_Paths' => $baseDir . '/app/lib/minify/class-cleanup-stored-paths.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Minify\\Concatenate_CSS' => $baseDir . '/app/lib/minify/class-concatenate-css.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Minify\\Concatenate_JS' => $baseDir . '/app/lib/minify/class-concatenate-js.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Minify\\Config' => $baseDir . '/app/lib/minify/class-config.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Minify\\Dependency_Path_Mapping' => $baseDir . '/app/lib/minify/class-dependency-path-mapping.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Minify\\File_Paths' => $baseDir . '/app/lib/minify/class-file-paths.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Minify\\Utils' => $baseDir . '/app/lib/minify/class-utils.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\My_Jetpack' => $baseDir . '/app/lib/class-my-jetpack.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Nonce' => $baseDir . '/app/lib/class-nonce.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Output_Filter' => $baseDir . '/app/lib/class-output-filter.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Premium_Features' => $baseDir . '/app/lib/class-premium-features.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Premium_Pricing' => $baseDir . '/app/lib/class-premium-pricing.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Setup' => $baseDir . '/app/lib/class-setup.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Site_Health' => $baseDir . '/app/lib/class-site-health.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Site_Urls' => $baseDir . '/app/lib/class-site-urls.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Status' => $baseDir . '/app/lib/class-status.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Storage_Post_Type' => $baseDir . '/app/lib/class-storage-post-type.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Super_Cache_Config_Compatibility' => $baseDir . '/app/lib/class-super-cache-config-compatibility.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Super_Cache_Tracking' => $baseDir . '/app/lib/class-super-cache-tracking.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Features_Index' => $baseDir . '/app/modules/class-features-index.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Image_Guide\\Image_Guide' => $baseDir . '/app/modules/image-guide/class-image-guide.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Image_Guide\\Image_Guide_Proxy' => $baseDir . '/app/modules/image-guide/class-image-guide-proxy.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Module' => $baseDir . '/app/modules/class-module.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Modules_Setup' => $baseDir . '/app/modules/class-modules-setup.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Cloud_CSS\\Cloud_CSS' => $baseDir . '/app/modules/optimizations/cloud-css/class-cloud-css.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Cloud_CSS\\Cloud_CSS_Followup' => $baseDir . '/app/modules/optimizations/cloud-css/class-cloud-css-followup.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Critical_CSS\\CSS_Proxy' => $baseDir . '/app/modules/optimizations/critical-css/class-css-proxy.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Critical_CSS\\Critical_CSS' => $baseDir . '/app/modules/optimizations/critical-css/class-critical-css.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Image_CDN\\Image_CDN' => $baseDir . '/app/modules/optimizations/image-cdn/class-image-cdn.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Image_CDN\\Liar' => $baseDir . '/app/modules/optimizations/image-cdn/class-liar.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Image_CDN\\Quality_Settings' => $baseDir . '/app/modules/optimizations/image-cdn/class-quality-settings.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Lcp\\LCP_Analyzer' => $baseDir . '/app/modules/optimizations/lcp/class-lcp-analyzer.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Lcp\\LCP_Invalidator' => $baseDir . '/app/modules/optimizations/lcp/class-lcp-invalidator.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Lcp\\LCP_Optimization_Util' => $baseDir . '/app/modules/optimizations/lcp/class-lcp-optimization-util.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Lcp\\LCP_Optimize_Bg_Image' => $baseDir . '/app/modules/optimizations/lcp/class-lcp-optimize-bg-image.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Lcp\\LCP_Optimize_Img_Tag' => $baseDir . '/app/modules/optimizations/lcp/class-lcp-optimize-img-tag.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Lcp\\LCP_State' => $baseDir . '/app/modules/optimizations/lcp/class-lcp-state.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Lcp\\LCP_Storage' => $baseDir . '/app/modules/optimizations/lcp/class-lcp-storage.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Lcp\\LCP_Utils' => $baseDir . '/app/modules/optimizations/lcp/class-lcp-utils.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Lcp\\Lcp' => $baseDir . '/app/modules/optimizations/lcp/class-lcp.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Lcp\\Optimize_LCP_Endpoint' => $baseDir . '/app/modules/optimizations/lcp/class-optimize-lcp-endpoint.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Minify\\Minify_CSS' => $baseDir . '/app/modules/optimizations/minify/class-minify-css.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Minify\\Minify_Common' => $baseDir . '/app/modules/optimizations/minify/class-minify-common.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Minify\\Minify_JS' => $baseDir . '/app/modules/optimizations/minify/class-minify-js.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Cache_Preload' => $baseDir . '/app/modules/optimizations/page-cache/class-cache-preload.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Data_Sync\\Page_Cache_Entry' => $baseDir . '/app/modules/optimizations/page-cache/data-sync/class-page-cache-entry.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Data_Sync_Actions\\Clear_Page_Cache' => $baseDir . '/app/modules/optimizations/page-cache/data-sync-actions/class-clear-page-cache.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Data_Sync_Actions\\Deactivate_WPSC' => $baseDir . '/app/modules/optimizations/page-cache/data-sync-actions/class-deactivate-wpsc.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Data_Sync_Actions\\Run_Setup' => $baseDir . '/app/modules/optimizations/page-cache/data-sync-actions/class-run-setup.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Garbage_Collection' => $baseDir . '/app/modules/optimizations/page-cache/class-garbage-collection.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Page_Cache' => $baseDir . '/app/modules/optimizations/page-cache/class-page-cache.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Page_Cache_Setup' => $baseDir . '/app/modules/optimizations/page-cache/class-page-cache-setup.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Pre_WordPress\\Boost_Cache' => $baseDir . '/app/modules/optimizations/page-cache/pre-wordpress/class-boost-cache.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Pre_WordPress\\Boost_Cache_Error' => $baseDir . '/app/modules/optimizations/page-cache/pre-wordpress/class-boost-cache-error.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Pre_WordPress\\Boost_Cache_Settings' => $baseDir . '/app/modules/optimizations/page-cache/pre-wordpress/class-boost-cache-settings.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Pre_WordPress\\Boost_Cache_Utils' => $baseDir . '/app/modules/optimizations/page-cache/pre-wordpress/class-boost-cache-utils.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Pre_WordPress\\Filesystem_Utils' => $baseDir . '/app/modules/optimizations/page-cache/pre-wordpress/class-filesystem-utils.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Pre_WordPress\\Logger' => $baseDir . '/app/modules/optimizations/page-cache/pre-wordpress/class-logger.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Pre_WordPress\\Path_Actions\\Filter_Older' => $baseDir . '/app/modules/optimizations/page-cache/pre-wordpress/path-actions/class-filter-older.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Pre_WordPress\\Path_Actions\\Path_Action' => $baseDir . '/app/modules/optimizations/page-cache/pre-wordpress/path-actions/interface-path-action.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Pre_WordPress\\Path_Actions\\Rebuild_File' => $baseDir . '/app/modules/optimizations/page-cache/pre-wordpress/path-actions/class-rebuild-file.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Pre_WordPress\\Path_Actions\\Simple_Delete' => $baseDir . '/app/modules/optimizations/page-cache/pre-wordpress/path-actions/class-simple-delete.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Pre_WordPress\\Request' => $baseDir . '/app/modules/optimizations/page-cache/pre-wordpress/class-request.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Pre_WordPress\\Storage\\File_Storage' => $baseDir . '/app/modules/optimizations/page-cache/pre-wordpress/storage/class-file-storage.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Pre_WordPress\\Storage\\Storage' => $baseDir . '/app/modules/optimizations/page-cache/pre-wordpress/storage/interface-storage.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Render_Blocking_JS\\Render_Blocking_JS' => $baseDir . '/app/modules/optimizations/render-blocking-js/class-render-blocking-js.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Speculation_Rules\\Speculation_Rules' => $baseDir . '/app/modules/optimizations/speculation-rules/class-speculation-rules.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Performance_History\\Performance_History' => $baseDir . '/app/modules/performance-history/class-performance-history.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Contracts\\Endpoint' => $baseDir . '/app/rest-api/contracts/interface-endpoint.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Contracts\\Has_Always_Available_Endpoints' => $baseDir . '/app/rest-api/contracts/interface-has-always-available-endpoints.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Contracts\\Has_Endpoints' => $baseDir . '/app/rest-api/contracts/interface-has-endpoints.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Contracts\\Permission' => $baseDir . '/app/rest-api/contracts/interface-permission.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Endpoints\\List_Cornerstone_Pages' => $baseDir . '/app/rest-api/endpoints/class-list-cornerstone-pages.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Endpoints\\List_LCP_Analysis' => $baseDir . '/app/rest-api/endpoints/class-list-lcp-analysis.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Endpoints\\List_Site_Urls' => $baseDir . '/app/rest-api/endpoints/class-list-site-urls.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Endpoints\\List_Source_Providers' => $baseDir . '/app/rest-api/endpoints/class-list-source-providers.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Endpoints\\Update_Cloud_CSS' => $baseDir . '/app/rest-api/endpoints/class-update-cloud-css.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Endpoints\\Update_LCP' => $baseDir . '/app/rest-api/endpoints/class-update-lcp.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Permissions\\Current_User_Admin' => $baseDir . '/app/rest-api/permissions/class-current-user-admin.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Permissions\\Nonce' => $baseDir . '/app/rest-api/permissions/class-nonce.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Permissions\\Signed_With_Blog_Token' => $baseDir . '/app/rest-api/permissions/class-signed-with-blog-token.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\REST_API' => $baseDir . '/app/rest-api/class-rest-api.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Route' => $baseDir . '/app/rest-api/class-route.php',
|
||||
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
|
||||
'Jetpack_IXR_Client' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php',
|
||||
'Jetpack_IXR_ClientMulticall' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-clientmulticall.php',
|
||||
'Jetpack_Options' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-options.php',
|
||||
'Jetpack_Signature' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-signature.php',
|
||||
'Jetpack_Tracks_Client' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-tracks-client.php',
|
||||
'Jetpack_Tracks_Event' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-tracks-event.php',
|
||||
'Jetpack_XMLRPC_Server' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-xmlrpc-server.php',
|
||||
'MatthiasMullie\\Minify\\CSS' => $vendorDir . '/matthiasmullie/minify/src/CSS.php',
|
||||
'MatthiasMullie\\Minify\\Exception' => $vendorDir . '/matthiasmullie/minify/src/Exception.php',
|
||||
'MatthiasMullie\\Minify\\Exceptions\\BasicException' => $vendorDir . '/matthiasmullie/minify/src/Exceptions/BasicException.php',
|
||||
'MatthiasMullie\\Minify\\Exceptions\\FileImportException' => $vendorDir . '/matthiasmullie/minify/src/Exceptions/FileImportException.php',
|
||||
'MatthiasMullie\\Minify\\Exceptions\\IOException' => $vendorDir . '/matthiasmullie/minify/src/Exceptions/IOException.php',
|
||||
'MatthiasMullie\\Minify\\Exceptions\\PatternMatchException' => $vendorDir . '/matthiasmullie/minify/src/Exceptions/PatternMatchException.php',
|
||||
'MatthiasMullie\\Minify\\JS' => $vendorDir . '/matthiasmullie/minify/src/JS.php',
|
||||
'MatthiasMullie\\Minify\\Minify' => $vendorDir . '/matthiasmullie/minify/src/Minify.php',
|
||||
'MatthiasMullie\\PathConverter\\Converter' => $vendorDir . '/matthiasmullie/path-converter/src/Converter.php',
|
||||
'MatthiasMullie\\PathConverter\\ConverterInterface' => $vendorDir . '/matthiasmullie/path-converter/src/ConverterInterface.php',
|
||||
'MatthiasMullie\\PathConverter\\NoConverter' => $vendorDir . '/matthiasmullie/path-converter/src/NoConverter.php',
|
||||
);
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
// autoload_files.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'3773ef3f09c37da5478d578e32b03a4b' => $baseDir . '/jetpack_vendor/automattic/jetpack-assets/actions.php',
|
||||
'7372b7fb88a9723cf5b76d456eb0b738' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/actions.php',
|
||||
);
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
// autoload_namespaces.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
);
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
// autoload_psr4.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'MatthiasMullie\\PathConverter\\' => array($vendorDir . '/matthiasmullie/path-converter/src'),
|
||||
'MatthiasMullie\\Minify\\' => array($vendorDir . '/matthiasmullie/minify/src'),
|
||||
'Automattic\\Jetpack\\Autoloader\\' => array($vendorDir . '/automattic/jetpack-autoloader/src'),
|
||||
);
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ4_6_3
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
public static function loadClassLoader($class)
|
||||
{
|
||||
if ('Composer\Autoload\ClassLoader' === $class) {
|
||||
require __DIR__ . '/ClassLoader.php';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Composer\Autoload\ClassLoader
|
||||
*/
|
||||
public static function getLoader()
|
||||
{
|
||||
if (null !== self::$loader) {
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
require __DIR__ . '/platform_check.php';
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ4_6_3', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ4_6_3', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ4_6_3::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ4_6_3::$files;
|
||||
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
||||
require $file;
|
||||
}
|
||||
}, null, null);
|
||||
foreach ($filesToLoad as $fileIdentifier => $file) {
|
||||
$requireFile($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,471 @@
|
||||
<?php
|
||||
|
||||
// autoload_static.php @generated by Composer
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ4_6_3
|
||||
{
|
||||
public static $files = array (
|
||||
'3773ef3f09c37da5478d578e32b03a4b' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-assets/actions.php',
|
||||
'7372b7fb88a9723cf5b76d456eb0b738' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/actions.php',
|
||||
);
|
||||
|
||||
public static $prefixLengthsPsr4 = array (
|
||||
'M' =>
|
||||
array (
|
||||
'MatthiasMullie\\PathConverter\\' => 29,
|
||||
'MatthiasMullie\\Minify\\' => 22,
|
||||
),
|
||||
'A' =>
|
||||
array (
|
||||
'Automattic\\Jetpack\\Autoloader\\' => 30,
|
||||
),
|
||||
);
|
||||
|
||||
public static $prefixDirsPsr4 = array (
|
||||
'MatthiasMullie\\PathConverter\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/matthiasmullie/path-converter/src',
|
||||
),
|
||||
'MatthiasMullie\\Minify\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/matthiasmullie/minify/src',
|
||||
),
|
||||
'Automattic\\Jetpack\\Autoloader\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src',
|
||||
),
|
||||
);
|
||||
|
||||
public static $classMap = array (
|
||||
'Automattic\\Jetpack\\A8c_Mc_Stats' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-a8c-mc-stats/src/class-a8c-mc-stats.php',
|
||||
'Automattic\\Jetpack\\Admin_UI\\Admin_Menu' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-admin-ui/src/class-admin-menu.php',
|
||||
'Automattic\\Jetpack\\Agents_Manager\\Agents_Manager' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-agents-manager/src/class-agents-manager.php',
|
||||
'Automattic\\Jetpack\\Agents_Manager\\Open_State_Store' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-agents-manager/src/class-open-state-store.php',
|
||||
'Automattic\\Jetpack\\Agents_Manager\\Sidebar_Open_Preservation' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-agents-manager/src/class-sidebar-open-preservation.php',
|
||||
'Automattic\\Jetpack\\Agents_Manager\\WP_REST_Agents_Manager_Persisted_Open_State' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-agents-manager/src/class-wp-rest-agents-manager-persisted-open-state.php',
|
||||
'Automattic\\Jetpack\\Agents_Manager\\WP_REST_Jetpack_AI_JWT' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-agents-manager/src/class-wp-rest-jetpack-ai-jwt.php',
|
||||
'Automattic\\Jetpack\\Assets' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-assets/src/class-assets.php',
|
||||
'Automattic\\Jetpack\\Assets\\Logo' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-logo/src/class-logo.php',
|
||||
'Automattic\\Jetpack\\Assets\\Script_Data' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-assets/src/class-script-data.php',
|
||||
'Automattic\\Jetpack\\Assets\\Semver' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-assets/src/class-semver.php',
|
||||
'Automattic\\Jetpack\\Assets\\Shared_Stores_Assets' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-assets/src/class-shared-stores-assets.php',
|
||||
'Automattic\\Jetpack\\Autoloader\\AutoloadFileWriter' => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src/AutoloadFileWriter.php',
|
||||
'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php',
|
||||
'Automattic\\Jetpack\\Autoloader\\AutoloadProcessor' => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src/AutoloadProcessor.php',
|
||||
'Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin' => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php',
|
||||
'Automattic\\Jetpack\\Autoloader\\ManifestGenerator' => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src/ManifestGenerator.php',
|
||||
'Automattic\\Jetpack\\Automatic_Install_Skin' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-automatic-install-skin.php',
|
||||
'Automattic\\Jetpack\\Boost\\App\\Contracts\\Is_Dev_Feature' => __DIR__ . '/../..' . '/app/contracts/interface-is-dev-feature.php',
|
||||
'Automattic\\Jetpack\\Boost_Core\\Contracts\\Boost_API_Client' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-boost-core/src/contracts/boost-api-client.php',
|
||||
'Automattic\\Jetpack\\Boost_Core\\Lib\\Boost_API' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-boost-api.php',
|
||||
'Automattic\\Jetpack\\Boost_Core\\Lib\\Cacheable' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-cacheable.php',
|
||||
'Automattic\\Jetpack\\Boost_Core\\Lib\\Transient' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-transient.php',
|
||||
'Automattic\\Jetpack\\Boost_Core\\Lib\\Url' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-url.php',
|
||||
'Automattic\\Jetpack\\Boost_Core\\Lib\\Utils' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-utils.php',
|
||||
'Automattic\\Jetpack\\Boost_Core\\Lib\\WPCOM_Boost_API_Client' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-wpcom-boost-api-client.php',
|
||||
'Automattic\\Jetpack\\Boost_Speed_Score\\Jetpack_Boost_Modules' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-boost-speed-score/src/class-jetpack-boost-modules.php',
|
||||
'Automattic\\Jetpack\\Boost_Speed_Score\\Speed_Score' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-boost-speed-score/src/class-speed-score.php',
|
||||
'Automattic\\Jetpack\\Boost_Speed_Score\\Speed_Score_Graph_History_Request' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-boost-speed-score/src/class-speed-score-graph-history-request.php',
|
||||
'Automattic\\Jetpack\\Boost_Speed_Score\\Speed_Score_History' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-boost-speed-score/src/class-speed-score-history.php',
|
||||
'Automattic\\Jetpack\\Boost_Speed_Score\\Speed_Score_Request' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-boost-speed-score/src/class-speed-score-request.php',
|
||||
'Automattic\\Jetpack\\Composer\\Manager' => __DIR__ . '/..' . '/automattic/jetpack-composer-plugin/src/class-manager.php',
|
||||
'Automattic\\Jetpack\\Composer\\Plugin' => __DIR__ . '/..' . '/automattic/jetpack-composer-plugin/src/class-plugin.php',
|
||||
'Automattic\\Jetpack\\Config' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-config/src/class-config.php',
|
||||
'Automattic\\Jetpack\\Connection\\Abilities\\Connection_Abilities' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/abilities/class-connection-abilities.php',
|
||||
'Automattic\\Jetpack\\Connection\\Authorize_Json_Api' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-authorize-json-api.php',
|
||||
'Automattic\\Jetpack\\Connection\\Client' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-client.php',
|
||||
'Automattic\\Jetpack\\Connection\\Connection_Assets' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-connection-assets.php',
|
||||
'Automattic\\Jetpack\\Connection\\Connection_Health_Test_Base' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/health/class-connection-health-test-base.php',
|
||||
'Automattic\\Jetpack\\Connection\\Connection_Health_Tests' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/health/class-connection-health-tests.php',
|
||||
'Automattic\\Jetpack\\Connection\\Connection_Notice' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-connection-notice.php',
|
||||
'Automattic\\Jetpack\\Connection\\Error_Handler' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-error-handler.php',
|
||||
'Automattic\\Jetpack\\Connection\\External_Storage' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-external-storage.php',
|
||||
'Automattic\\Jetpack\\Connection\\Initial_State' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-initial-state.php',
|
||||
'Automattic\\Jetpack\\Connection\\Jetpack_Connector' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/connectors/class-jetpack-connector.php',
|
||||
'Automattic\\Jetpack\\Connection\\Manager' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-manager.php',
|
||||
'Automattic\\Jetpack\\Connection\\Manager_Interface' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/interface-manager.php',
|
||||
'Automattic\\Jetpack\\Connection\\Nonce_Handler' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-nonce-handler.php',
|
||||
'Automattic\\Jetpack\\Connection\\Package_Version' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-package-version.php',
|
||||
'Automattic\\Jetpack\\Connection\\Package_Version_Tracker' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-package-version-tracker.php',
|
||||
'Automattic\\Jetpack\\Connection\\Plugin' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-plugin.php',
|
||||
'Automattic\\Jetpack\\Connection\\Plugin_Storage' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-plugin-storage.php',
|
||||
'Automattic\\Jetpack\\Connection\\REST_Connector' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-rest-connector.php',
|
||||
'Automattic\\Jetpack\\Connection\\Rest_Authentication' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-rest-authentication.php',
|
||||
'Automattic\\Jetpack\\Connection\\SSO' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/sso/class-sso.php',
|
||||
'Automattic\\Jetpack\\Connection\\SSO\\Force_2FA' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/sso/class-force-2fa.php',
|
||||
'Automattic\\Jetpack\\Connection\\SSO\\Helpers' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/sso/class-helpers.php',
|
||||
'Automattic\\Jetpack\\Connection\\SSO\\Notices' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/sso/class-notices.php',
|
||||
'Automattic\\Jetpack\\Connection\\SSO\\User_Admin' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/sso/class-user-admin.php',
|
||||
'Automattic\\Jetpack\\Connection\\Secrets' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-secrets.php',
|
||||
'Automattic\\Jetpack\\Connection\\Server_Sandbox' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-server-sandbox.php',
|
||||
'Automattic\\Jetpack\\Connection\\Site_Health' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-site-health.php',
|
||||
'Automattic\\Jetpack\\Connection\\Storage_Provider_Interface' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/interface-storage-provider.php',
|
||||
'Automattic\\Jetpack\\Connection\\Tokens' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-tokens.php',
|
||||
'Automattic\\Jetpack\\Connection\\Tokens_Locks' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-tokens-locks.php',
|
||||
'Automattic\\Jetpack\\Connection\\Traits\\WPCOM_REST_API_Proxy_Request' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/traits/trait-wpcom-rest-api-proxy-request.php',
|
||||
'Automattic\\Jetpack\\Connection\\Urls' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-urls.php',
|
||||
'Automattic\\Jetpack\\Connection\\User_Account_Status' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-user-account-status.php',
|
||||
'Automattic\\Jetpack\\Connection\\Users_Connection_Admin' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-users-connection-admin.php',
|
||||
'Automattic\\Jetpack\\Connection\\Utils' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-utils.php',
|
||||
'Automattic\\Jetpack\\Connection\\Webhooks' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-webhooks.php',
|
||||
'Automattic\\Jetpack\\Connection\\Webhooks\\Authorize_Redirect' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/webhooks/class-authorize-redirect.php',
|
||||
'Automattic\\Jetpack\\Connection\\XMLRPC_Async_Call' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-xmlrpc-async-call.php',
|
||||
'Automattic\\Jetpack\\Connection\\XMLRPC_Connector' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-xmlrpc-connector.php',
|
||||
'Automattic\\Jetpack\\Constants' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-constants/src/class-constants.php',
|
||||
'Automattic\\Jetpack\\CookieState' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-status/src/class-cookiestate.php',
|
||||
'Automattic\\Jetpack\\Current_Plan' => __DIR__ . '/..' . '/automattic/jetpack-plans/src/class-current-plan.php',
|
||||
'Automattic\\Jetpack\\Device_Detection' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-device-detection/src/class-device-detection.php',
|
||||
'Automattic\\Jetpack\\Device_Detection\\User_Agent_Info' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-device-detection/src/class-user-agent-info.php',
|
||||
'Automattic\\Jetpack\\Errors' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-status/src/class-errors.php',
|
||||
'Automattic\\Jetpack\\ExPlat' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-explat/src/class-explat.php',
|
||||
'Automattic\\Jetpack\\ExPlat\\REST_Controller' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-explat/src/class-rest-controller.php',
|
||||
'Automattic\\Jetpack\\Files' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-status/src/class-files.php',
|
||||
'Automattic\\Jetpack\\Heartbeat' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-heartbeat.php',
|
||||
'Automattic\\Jetpack\\IP\\Utils' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-ip/src/class-utils.php',
|
||||
'Automattic\\Jetpack\\IdentityCrisis\\Exception' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/identity-crisis/class-exception.php',
|
||||
'Automattic\\Jetpack\\IdentityCrisis\\REST_Endpoints' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/identity-crisis/class-rest-endpoints.php',
|
||||
'Automattic\\Jetpack\\IdentityCrisis\\UI' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/identity-crisis/class-ui.php',
|
||||
'Automattic\\Jetpack\\IdentityCrisis\\URL_Secret' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/identity-crisis/class-url-secret.php',
|
||||
'Automattic\\Jetpack\\Identity_Crisis' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/identity-crisis/class-identity-crisis.php',
|
||||
'Automattic\\Jetpack\\Image_CDN\\Image_CDN' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-image-cdn/src/class-image-cdn.php',
|
||||
'Automattic\\Jetpack\\Image_CDN\\Image_CDN_Core' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-image-cdn/src/class-image-cdn-core.php',
|
||||
'Automattic\\Jetpack\\Image_CDN\\Image_CDN_Image' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-image-cdn/src/class-image-cdn-image.php',
|
||||
'Automattic\\Jetpack\\Image_CDN\\Image_CDN_Image_Sizes' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-image-cdn/src/class-image-cdn-image-sizes.php',
|
||||
'Automattic\\Jetpack\\Image_CDN\\Image_CDN_Setup' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-image-cdn/src/class-image-cdn-setup.php',
|
||||
'Automattic\\Jetpack\\JITMS\\JITM' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-jitm/src/class-jitm.php',
|
||||
'Automattic\\Jetpack\\JITMS\\Post_Connection_JITM' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-jitm/src/class-post-connection-jitm.php',
|
||||
'Automattic\\Jetpack\\JITMS\\Pre_Connection_JITM' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-jitm/src/class-pre-connection-jitm.php',
|
||||
'Automattic\\Jetpack\\JITMS\\Rest_Api_Endpoints' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-jitm/src/class-rest-api-endpoints.php',
|
||||
'Automattic\\Jetpack\\Licensing' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-licensing/src/class-licensing.php',
|
||||
'Automattic\\Jetpack\\Licensing\\Endpoints' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-licensing/src/class-endpoints.php',
|
||||
'Automattic\\Jetpack\\Modules' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-status/src/class-modules.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Historically_Active_Modules' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-historically-active-modules.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Hybrid_Product' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-hybrid-product.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Initializer' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Jetpack_Manage' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-jetpack-manage.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Module_Product' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-module-product.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Product' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-product.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-products.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Anti_Spam' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-anti-spam.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Backup' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-backup.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Boost' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-boost.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Complete' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-complete.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Creator' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-creator.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Crm' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-crm.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Extras' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-extras.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Growth' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-growth.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Jetpack_Ai' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-jetpack-ai.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Jetpack_Forms' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-jetpack-forms.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Newsletter' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-newsletter.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Protect' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-protect.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Related_Posts' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-related-posts.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Scan' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-scan.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Search' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Search_Stats' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search-stats.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Security' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-security.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Site_Accelerator' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-site-accelerator.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Social' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-social.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Starter' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-starter.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Stats' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-stats.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Products\\Videopress' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-videopress.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\REST_Products' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-products.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\REST_Purchases' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-purchases.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\REST_Recommendations_Evaluation' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-recommendations-evaluation.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\REST_Zendesk_Chat' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-zendesk-chat.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Red_Bubble_Notifications' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-red-bubble-notifications.php',
|
||||
'Automattic\\Jetpack\\My_Jetpack\\Wpcom_Products' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-wpcom-products.php',
|
||||
'Automattic\\Jetpack\\Partner' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-partner.php',
|
||||
'Automattic\\Jetpack\\Partner_Coupon' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-partner-coupon.php',
|
||||
'Automattic\\Jetpack\\Password_Checker' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-password-checker/src/class-password-checker.php',
|
||||
'Automattic\\Jetpack\\Paths' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-status/src/class-paths.php',
|
||||
'Automattic\\Jetpack\\Plans' => __DIR__ . '/..' . '/automattic/jetpack-plans/src/class-plans.php',
|
||||
'Automattic\\Jetpack\\Plugin_Deactivation\\Deactivation_Handler' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-plugin-deactivation/src/class-deactivation-handler.php',
|
||||
'Automattic\\Jetpack\\Plugins_Installer' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-plugins-installer.php',
|
||||
'Automattic\\Jetpack\\Protect_Models' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-protect-models/src/class-protect-models.php',
|
||||
'Automattic\\Jetpack\\Protect_Models\\Extension_Model' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-protect-models/src/class-extension-model.php',
|
||||
'Automattic\\Jetpack\\Protect_Models\\History_Model' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-protect-models/src/class-history-model.php',
|
||||
'Automattic\\Jetpack\\Protect_Models\\Status_Model' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-protect-models/src/class-status-model.php',
|
||||
'Automattic\\Jetpack\\Protect_Models\\Threat_Model' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-protect-models/src/class-threat-model.php',
|
||||
'Automattic\\Jetpack\\Protect_Models\\Vulnerability_Model' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-protect-models/src/class-vulnerability-model.php',
|
||||
'Automattic\\Jetpack\\Protect_Status\\Plan' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-protect-status/src/class-plan.php',
|
||||
'Automattic\\Jetpack\\Protect_Status\\Protect_Status' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-protect-status/src/class-protect-status.php',
|
||||
'Automattic\\Jetpack\\Protect_Status\\REST_Controller' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-protect-status/src/class-rest-controller.php',
|
||||
'Automattic\\Jetpack\\Protect_Status\\Scan_Status' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-protect-status/src/class-scan-status.php',
|
||||
'Automattic\\Jetpack\\Protect_Status\\Status' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-protect-status/src/class-status.php',
|
||||
'Automattic\\Jetpack\\Redirect' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-redirect/src/class-redirect.php',
|
||||
'Automattic\\Jetpack\\Roles' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-roles/src/class-roles.php',
|
||||
'Automattic\\Jetpack\\Schema\\Modifiers\\Modifier_Fallback' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-schema/src/modifiers/class-modifier-fallback.php',
|
||||
'Automattic\\Jetpack\\Schema\\Parser' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-schema/src/interface-parser.php',
|
||||
'Automattic\\Jetpack\\Schema\\Schema' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-schema/src/class-schema.php',
|
||||
'Automattic\\Jetpack\\Schema\\Schema_Context' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-schema/src/class-schema-context.php',
|
||||
'Automattic\\Jetpack\\Schema\\Schema_Error' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-schema/src/class-schema-error.php',
|
||||
'Automattic\\Jetpack\\Schema\\Schema_Parser' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-schema/src/class-schema-parser.php',
|
||||
'Automattic\\Jetpack\\Schema\\Types\\Type_Any' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-schema/src/types/class-type-any.php',
|
||||
'Automattic\\Jetpack\\Schema\\Types\\Type_Any_JSON' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-schema/src/types/class-type-any-json.php',
|
||||
'Automattic\\Jetpack\\Schema\\Types\\Type_Array' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-schema/src/types/class-type-array.php',
|
||||
'Automattic\\Jetpack\\Schema\\Types\\Type_Assoc_Array' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-schema/src/types/class-type-assoc-array.php',
|
||||
'Automattic\\Jetpack\\Schema\\Types\\Type_Boolean' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-schema/src/types/class-type-boolean.php',
|
||||
'Automattic\\Jetpack\\Schema\\Types\\Type_Enum' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-schema/src/types/class-type-enum.php',
|
||||
'Automattic\\Jetpack\\Schema\\Types\\Type_Float' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-schema/src/types/class-type-float.php',
|
||||
'Automattic\\Jetpack\\Schema\\Types\\Type_Literal' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-schema/src/types/class-type-literal.php',
|
||||
'Automattic\\Jetpack\\Schema\\Types\\Type_Number' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-schema/src/types/class-type-number.php',
|
||||
'Automattic\\Jetpack\\Schema\\Types\\Type_String' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-schema/src/types/class-type-string.php',
|
||||
'Automattic\\Jetpack\\Schema\\Types\\Type_Void' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-schema/src/types/class-type-void.php',
|
||||
'Automattic\\Jetpack\\Schema\\Utils' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-schema/src/class-utils.php',
|
||||
'Automattic\\Jetpack\\Status' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-status/src/class-status.php',
|
||||
'Automattic\\Jetpack\\Status\\Cache' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-status/src/class-cache.php',
|
||||
'Automattic\\Jetpack\\Status\\Host' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-status/src/class-host.php',
|
||||
'Automattic\\Jetpack\\Status\\Request' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-status/src/class-request.php',
|
||||
'Automattic\\Jetpack\\Status\\Visitor' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-status/src/class-visitor.php',
|
||||
'Automattic\\Jetpack\\Sync\\Actions' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-actions.php',
|
||||
'Automattic\\Jetpack\\Sync\\Activity_Log_Event' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-activity-log-event.php',
|
||||
'Automattic\\Jetpack\\Sync\\Codec_Interface' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/interface-codec.php',
|
||||
'Automattic\\Jetpack\\Sync\\Data_Settings' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-data-settings.php',
|
||||
'Automattic\\Jetpack\\Sync\\Dedicated_Sender' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-dedicated-sender.php',
|
||||
'Automattic\\Jetpack\\Sync\\Default_Filter_Settings' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-default-filter-settings.php',
|
||||
'Automattic\\Jetpack\\Sync\\Defaults' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-defaults.php',
|
||||
'Automattic\\Jetpack\\Sync\\Functions' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-functions.php',
|
||||
'Automattic\\Jetpack\\Sync\\Health' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-health.php',
|
||||
'Automattic\\Jetpack\\Sync\\JSON_Deflate_Array_Codec' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-json-deflate-array-codec.php',
|
||||
'Automattic\\Jetpack\\Sync\\Listener' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-listener.php',
|
||||
'Automattic\\Jetpack\\Sync\\Lock' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-lock.php',
|
||||
'Automattic\\Jetpack\\Sync\\Main' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-main.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-modules.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Attachments' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-attachments.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Callables' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-callables.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Comments' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-comments.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Constants' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-constants.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync_Immediately' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync-immediately.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Import' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-import.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Menus' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-menus.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Meta' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-meta.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Module' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-module.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Network_Options' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-network-options.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Options' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-options.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Plugins' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-plugins.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Posts' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-posts.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Protect' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-protect.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Search' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-search.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Stats' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-stats.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Term_Relationships' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-term-relationships.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Terms' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-terms.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Themes' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-themes.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Updates' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-updates.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\Users' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-users.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\WP_Super_Cache' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-wp-super-cache.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\WooCommerce' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-woocommerce.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\WooCommerce_HPOS_Orders' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-woocommerce-hpos-orders.php',
|
||||
'Automattic\\Jetpack\\Sync\\Modules\\WooCommerce_Products' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-woocommerce-products.php',
|
||||
'Automattic\\Jetpack\\Sync\\Package_Version' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-package-version.php',
|
||||
'Automattic\\Jetpack\\Sync\\Queue' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-queue.php',
|
||||
'Automattic\\Jetpack\\Sync\\Queue\\Queue_Storage_Options' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/sync-queue/class-queue-storage-options.php',
|
||||
'Automattic\\Jetpack\\Sync\\Queue\\Queue_Storage_Table' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/sync-queue/class-queue-storage-table.php',
|
||||
'Automattic\\Jetpack\\Sync\\Queue_Buffer' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-queue-buffer.php',
|
||||
'Automattic\\Jetpack\\Sync\\REST_Endpoints' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-rest-endpoints.php',
|
||||
'Automattic\\Jetpack\\Sync\\REST_Sender' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-rest-sender.php',
|
||||
'Automattic\\Jetpack\\Sync\\Replicastore' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-replicastore.php',
|
||||
'Automattic\\Jetpack\\Sync\\Replicastore\\Table_Checksum' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum.php',
|
||||
'Automattic\\Jetpack\\Sync\\Replicastore\\Table_Checksum_Usermeta' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum-usermeta.php',
|
||||
'Automattic\\Jetpack\\Sync\\Replicastore\\Table_Checksum_Users' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum-users.php',
|
||||
'Automattic\\Jetpack\\Sync\\Replicastore_Interface' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/interface-replicastore.php',
|
||||
'Automattic\\Jetpack\\Sync\\Sender' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-sender.php',
|
||||
'Automattic\\Jetpack\\Sync\\Server' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-server.php',
|
||||
'Automattic\\Jetpack\\Sync\\Settings' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-settings.php',
|
||||
'Automattic\\Jetpack\\Sync\\Simple_Codec' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-simple-codec.php',
|
||||
'Automattic\\Jetpack\\Sync\\Users' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-users.php',
|
||||
'Automattic\\Jetpack\\Sync\\Utils' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-utils.php',
|
||||
'Automattic\\Jetpack\\Terms_Of_Service' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-terms-of-service.php',
|
||||
'Automattic\\Jetpack\\Tracking' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-tracking.php',
|
||||
'Automattic\\Jetpack\\WP_Abilities\\Registrar' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-wp-abilities/src/class-registrar.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Contracts\\Data_Sync_Action' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/contracts/interface-data-sync-action.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Contracts\\Data_Sync_Entry' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/contracts/interface-data-sync-entry.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Contracts\\Entry_Can_Delete' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/contracts/interface-entry-can-delete.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Contracts\\Entry_Can_Get' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/contracts/interface-entry-can-get.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Contracts\\Entry_Can_Merge' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/contracts/interface-entry-can-merge.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Contracts\\Entry_Can_Set' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/contracts/interface-entry-can-set.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Contracts\\Entry_Has_Custom_Endpoints' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/contracts/interface-entry-custom-endpoint.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Contracts\\Lazy_Entry' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/contracts/interface-lazy-entry.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\DS_Utils' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/class-ds-utils.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Data_Sync' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/class-data-sync.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Data_Sync_Entry_Adapter' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/class-data-sync-entry-adapter.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Data_Sync_Option' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/class-data-sync-option.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Data_Sync_Readonly' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/class-data-sync-readonly.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Endpoints\\Action_Endpoint' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/endpoints/class-action-endpoint.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Endpoints\\Authenticated_Nonce' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/endpoints/class-authenticated-nonce.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Endpoints\\Endpoint' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/endpoints/class-endpoint.php',
|
||||
'Automattic\\Jetpack\\WP_JS_Data_Sync\\Registry' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/class-registry.php',
|
||||
'Automattic\\Jetpack_Boost\\Abilities\\Boost_Abilities' => __DIR__ . '/../..' . '/app/abilities/class-boost-abilities.php',
|
||||
'Automattic\\Jetpack_Boost\\Admin\\Admin' => __DIR__ . '/../..' . '/app/admin/class-admin.php',
|
||||
'Automattic\\Jetpack_Boost\\Admin\\Config' => __DIR__ . '/../..' . '/app/admin/class-config.php',
|
||||
'Automattic\\Jetpack_Boost\\Admin\\Regenerate_Admin_Notice' => __DIR__ . '/../..' . '/app/admin/class-regenerate-admin-notice.php',
|
||||
'Automattic\\Jetpack_Boost\\Contracts\\Changes_Output_After_Activation' => __DIR__ . '/../..' . '/app/contracts/interface-changes-output-after-activation.php',
|
||||
'Automattic\\Jetpack_Boost\\Contracts\\Changes_Output_On_Activation' => __DIR__ . '/../..' . '/app/contracts/interface-changes-output-on-activation.php',
|
||||
'Automattic\\Jetpack_Boost\\Contracts\\Feature' => __DIR__ . '/../..' . '/app/contracts/interface-feature.php',
|
||||
'Automattic\\Jetpack_Boost\\Contracts\\Has_Activate' => __DIR__ . '/../..' . '/app/contracts/interface-has-activate.php',
|
||||
'Automattic\\Jetpack_Boost\\Contracts\\Has_Data_Sync' => __DIR__ . '/../..' . '/app/contracts/interface-has-data-sync.php',
|
||||
'Automattic\\Jetpack_Boost\\Contracts\\Has_Deactivate' => __DIR__ . '/../..' . '/app/contracts/interface-has-deactivate.php',
|
||||
'Automattic\\Jetpack_Boost\\Contracts\\Has_Setup' => __DIR__ . '/../..' . '/app/contracts/interface-has-setup.php',
|
||||
'Automattic\\Jetpack_Boost\\Contracts\\Has_Slug' => __DIR__ . '/../..' . '/app/contracts/interface-has-slug.php',
|
||||
'Automattic\\Jetpack_Boost\\Contracts\\Is_Always_On' => __DIR__ . '/../..' . '/app/contracts/interface-is-always-on.php',
|
||||
'Automattic\\Jetpack_Boost\\Contracts\\Needs_To_Be_Ready' => __DIR__ . '/../..' . '/app/contracts/interface-needs-to-be-ready.php',
|
||||
'Automattic\\Jetpack_Boost\\Contracts\\Needs_Website_To_Be_Public' => __DIR__ . '/../..' . '/app/contracts/interface-needs-website-to-be-public.php',
|
||||
'Automattic\\Jetpack_Boost\\Contracts\\Optimization' => __DIR__ . '/../..' . '/app/contracts/interface-optimization.php',
|
||||
'Automattic\\Jetpack_Boost\\Contracts\\Sub_Feature' => __DIR__ . '/../..' . '/app/contracts/interface-sub-feature.php',
|
||||
'Automattic\\Jetpack_Boost\\Data_Sync\\Cornerstone_Pages_Entry' => __DIR__ . '/../..' . '/app/data-sync/class-cornerstone-pages-entry.php',
|
||||
'Automattic\\Jetpack_Boost\\Data_Sync\\Critical_CSS_Meta_Entry' => __DIR__ . '/../..' . '/app/data-sync/class-critical-css-meta-entry.php',
|
||||
'Automattic\\Jetpack_Boost\\Data_Sync\\Getting_Started_Entry' => __DIR__ . '/../..' . '/app/data-sync/class-getting-started-entry.php',
|
||||
'Automattic\\Jetpack_Boost\\Data_Sync\\Mergeable_Array_Entry' => __DIR__ . '/../..' . '/app/data-sync/class-mergeable-array-entry.php',
|
||||
'Automattic\\Jetpack_Boost\\Data_Sync\\Minify_Excludes_State_Entry' => __DIR__ . '/../..' . '/app/data-sync/class-minify-excludes-state-entry.php',
|
||||
'Automattic\\Jetpack_Boost\\Data_Sync\\Modules_State_Entry' => __DIR__ . '/../..' . '/app/data-sync/class-modules-state-entry.php',
|
||||
'Automattic\\Jetpack_Boost\\Data_Sync\\Performance_History_Entry' => __DIR__ . '/../..' . '/app/data-sync/class-performance-history-entry.php',
|
||||
'Automattic\\Jetpack_Boost\\Jetpack_Boost' => __DIR__ . '/../..' . '/app/class-jetpack-boost.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Analytics' => __DIR__ . '/../..' . '/app/lib/class-analytics.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Assets' => __DIR__ . '/../..' . '/app/lib/class-assets.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Boost_Health' => __DIR__ . '/../..' . '/app/lib/class-boost-health.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\CLI' => __DIR__ . '/../..' . '/app/lib/class-cli.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Cache_Compatibility' => __DIR__ . '/../..' . '/app/lib/class-cache-compatibility.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Collection' => __DIR__ . '/../..' . '/app/lib/class-collection.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Connection' => __DIR__ . '/../..' . '/app/lib/class-connection.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Cornerstone\\Cornerstone_Pages' => __DIR__ . '/../..' . '/app/lib/cornerstone/class-cornerstone-pages.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Cornerstone\\Cornerstone_Utils' => __DIR__ . '/../..' . '/app/lib/cornerstone/class-cornerstone-utils.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Admin_Bar_Compatibility' => __DIR__ . '/../..' . '/app/lib/critical-css/class-admin-bar-compatibility.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Critical_CSS_Invalidator' => __DIR__ . '/../..' . '/app/lib/critical-css/class-critical-css-invalidator.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Critical_CSS_State' => __DIR__ . '/../..' . '/app/lib/critical-css/class-critical-css-state.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Critical_CSS_Storage' => __DIR__ . '/../..' . '/app/lib/critical-css/class-critical-css-storage.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Data_Sync\\Data_Sync_Schema' => __DIR__ . '/../..' . '/app/lib/critical-css/data-sync/class-data-sync-schema.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Data_Sync_Actions\\Regenerate_CSS' => __DIR__ . '/../..' . '/app/lib/critical-css/data-sync-actions/class-regenerate-css.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Data_Sync_Actions\\Set_Provider_CSS' => __DIR__ . '/../..' . '/app/lib/critical-css/data-sync-actions/class-set-provider-css.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Data_Sync_Actions\\Set_Provider_Error_Dismissed' => __DIR__ . '/../..' . '/app/lib/critical-css/data-sync-actions/class-set-provider-error-dismissed.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Data_Sync_Actions\\Set_Provider_Errors' => __DIR__ . '/../..' . '/app/lib/critical-css/data-sync-actions/class-set-provider-errors.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Display_Critical_CSS' => __DIR__ . '/../..' . '/app/lib/critical-css/class-display-critical-css.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Generator' => __DIR__ . '/../..' . '/app/lib/critical-css/class-generator.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Regenerate' => __DIR__ . '/../..' . '/app/lib/critical-css/class-regenerate.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Source_Providers\\Providers\\Archive_Provider' => __DIR__ . '/../..' . '/app/lib/critical-css/source-providers/providers/class-archive-provider.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Source_Providers\\Providers\\Cornerstone_Provider' => __DIR__ . '/../..' . '/app/lib/critical-css/source-providers/providers/class-cornerstone-provider.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Source_Providers\\Providers\\Post_ID_Provider' => __DIR__ . '/../..' . '/app/lib/critical-css/source-providers/providers/class-post-id-provider.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Source_Providers\\Providers\\Provider' => __DIR__ . '/../..' . '/app/lib/critical-css/source-providers/providers/class-provider.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Source_Providers\\Providers\\Singular_Post_Provider' => __DIR__ . '/../..' . '/app/lib/critical-css/source-providers/providers/class-singular-post-provider.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Source_Providers\\Providers\\Taxonomy_Provider' => __DIR__ . '/../..' . '/app/lib/critical-css/source-providers/providers/class-taxonomy-provider.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Source_Providers\\Providers\\WP_Core_Provider' => __DIR__ . '/../..' . '/app/lib/critical-css/source-providers/providers/class-wp-core-provider.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Critical_CSS\\Source_Providers\\Source_Providers' => __DIR__ . '/../..' . '/app/lib/critical-css/source-providers/class-source-providers.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Debug' => __DIR__ . '/../..' . '/app/lib/class-debug.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Environment_Change_Detector' => __DIR__ . '/../..' . '/app/lib/class-environment-change-detector.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Js_Structure_Scanner' => __DIR__ . '/../..' . '/app/lib/class-js-structure-scanner.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Minify' => __DIR__ . '/../..' . '/app/lib/class-minify.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Minify\\Cleanup_Stored_Paths' => __DIR__ . '/../..' . '/app/lib/minify/class-cleanup-stored-paths.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Minify\\Concatenate_CSS' => __DIR__ . '/../..' . '/app/lib/minify/class-concatenate-css.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Minify\\Concatenate_JS' => __DIR__ . '/../..' . '/app/lib/minify/class-concatenate-js.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Minify\\Config' => __DIR__ . '/../..' . '/app/lib/minify/class-config.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Minify\\Dependency_Path_Mapping' => __DIR__ . '/../..' . '/app/lib/minify/class-dependency-path-mapping.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Minify\\File_Paths' => __DIR__ . '/../..' . '/app/lib/minify/class-file-paths.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Minify\\Utils' => __DIR__ . '/../..' . '/app/lib/minify/class-utils.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\My_Jetpack' => __DIR__ . '/../..' . '/app/lib/class-my-jetpack.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Nonce' => __DIR__ . '/../..' . '/app/lib/class-nonce.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Output_Filter' => __DIR__ . '/../..' . '/app/lib/class-output-filter.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Premium_Features' => __DIR__ . '/../..' . '/app/lib/class-premium-features.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Premium_Pricing' => __DIR__ . '/../..' . '/app/lib/class-premium-pricing.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Setup' => __DIR__ . '/../..' . '/app/lib/class-setup.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Site_Health' => __DIR__ . '/../..' . '/app/lib/class-site-health.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Site_Urls' => __DIR__ . '/../..' . '/app/lib/class-site-urls.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Status' => __DIR__ . '/../..' . '/app/lib/class-status.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Storage_Post_Type' => __DIR__ . '/../..' . '/app/lib/class-storage-post-type.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Super_Cache_Config_Compatibility' => __DIR__ . '/../..' . '/app/lib/class-super-cache-config-compatibility.php',
|
||||
'Automattic\\Jetpack_Boost\\Lib\\Super_Cache_Tracking' => __DIR__ . '/../..' . '/app/lib/class-super-cache-tracking.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Features_Index' => __DIR__ . '/../..' . '/app/modules/class-features-index.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Image_Guide\\Image_Guide' => __DIR__ . '/../..' . '/app/modules/image-guide/class-image-guide.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Image_Guide\\Image_Guide_Proxy' => __DIR__ . '/../..' . '/app/modules/image-guide/class-image-guide-proxy.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Module' => __DIR__ . '/../..' . '/app/modules/class-module.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Modules_Setup' => __DIR__ . '/../..' . '/app/modules/class-modules-setup.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Cloud_CSS\\Cloud_CSS' => __DIR__ . '/../..' . '/app/modules/optimizations/cloud-css/class-cloud-css.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Cloud_CSS\\Cloud_CSS_Followup' => __DIR__ . '/../..' . '/app/modules/optimizations/cloud-css/class-cloud-css-followup.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Critical_CSS\\CSS_Proxy' => __DIR__ . '/../..' . '/app/modules/optimizations/critical-css/class-css-proxy.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Critical_CSS\\Critical_CSS' => __DIR__ . '/../..' . '/app/modules/optimizations/critical-css/class-critical-css.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Image_CDN\\Image_CDN' => __DIR__ . '/../..' . '/app/modules/optimizations/image-cdn/class-image-cdn.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Image_CDN\\Liar' => __DIR__ . '/../..' . '/app/modules/optimizations/image-cdn/class-liar.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Image_CDN\\Quality_Settings' => __DIR__ . '/../..' . '/app/modules/optimizations/image-cdn/class-quality-settings.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Lcp\\LCP_Analyzer' => __DIR__ . '/../..' . '/app/modules/optimizations/lcp/class-lcp-analyzer.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Lcp\\LCP_Invalidator' => __DIR__ . '/../..' . '/app/modules/optimizations/lcp/class-lcp-invalidator.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Lcp\\LCP_Optimization_Util' => __DIR__ . '/../..' . '/app/modules/optimizations/lcp/class-lcp-optimization-util.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Lcp\\LCP_Optimize_Bg_Image' => __DIR__ . '/../..' . '/app/modules/optimizations/lcp/class-lcp-optimize-bg-image.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Lcp\\LCP_Optimize_Img_Tag' => __DIR__ . '/../..' . '/app/modules/optimizations/lcp/class-lcp-optimize-img-tag.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Lcp\\LCP_State' => __DIR__ . '/../..' . '/app/modules/optimizations/lcp/class-lcp-state.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Lcp\\LCP_Storage' => __DIR__ . '/../..' . '/app/modules/optimizations/lcp/class-lcp-storage.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Lcp\\LCP_Utils' => __DIR__ . '/../..' . '/app/modules/optimizations/lcp/class-lcp-utils.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Lcp\\Lcp' => __DIR__ . '/../..' . '/app/modules/optimizations/lcp/class-lcp.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Lcp\\Optimize_LCP_Endpoint' => __DIR__ . '/../..' . '/app/modules/optimizations/lcp/class-optimize-lcp-endpoint.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Minify\\Minify_CSS' => __DIR__ . '/../..' . '/app/modules/optimizations/minify/class-minify-css.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Minify\\Minify_Common' => __DIR__ . '/../..' . '/app/modules/optimizations/minify/class-minify-common.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Minify\\Minify_JS' => __DIR__ . '/../..' . '/app/modules/optimizations/minify/class-minify-js.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Cache_Preload' => __DIR__ . '/../..' . '/app/modules/optimizations/page-cache/class-cache-preload.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Data_Sync\\Page_Cache_Entry' => __DIR__ . '/../..' . '/app/modules/optimizations/page-cache/data-sync/class-page-cache-entry.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Data_Sync_Actions\\Clear_Page_Cache' => __DIR__ . '/../..' . '/app/modules/optimizations/page-cache/data-sync-actions/class-clear-page-cache.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Data_Sync_Actions\\Deactivate_WPSC' => __DIR__ . '/../..' . '/app/modules/optimizations/page-cache/data-sync-actions/class-deactivate-wpsc.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Data_Sync_Actions\\Run_Setup' => __DIR__ . '/../..' . '/app/modules/optimizations/page-cache/data-sync-actions/class-run-setup.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Garbage_Collection' => __DIR__ . '/../..' . '/app/modules/optimizations/page-cache/class-garbage-collection.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Page_Cache' => __DIR__ . '/../..' . '/app/modules/optimizations/page-cache/class-page-cache.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Page_Cache_Setup' => __DIR__ . '/../..' . '/app/modules/optimizations/page-cache/class-page-cache-setup.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Pre_WordPress\\Boost_Cache' => __DIR__ . '/../..' . '/app/modules/optimizations/page-cache/pre-wordpress/class-boost-cache.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Pre_WordPress\\Boost_Cache_Error' => __DIR__ . '/../..' . '/app/modules/optimizations/page-cache/pre-wordpress/class-boost-cache-error.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Pre_WordPress\\Boost_Cache_Settings' => __DIR__ . '/../..' . '/app/modules/optimizations/page-cache/pre-wordpress/class-boost-cache-settings.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Pre_WordPress\\Boost_Cache_Utils' => __DIR__ . '/../..' . '/app/modules/optimizations/page-cache/pre-wordpress/class-boost-cache-utils.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Pre_WordPress\\Filesystem_Utils' => __DIR__ . '/../..' . '/app/modules/optimizations/page-cache/pre-wordpress/class-filesystem-utils.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Pre_WordPress\\Logger' => __DIR__ . '/../..' . '/app/modules/optimizations/page-cache/pre-wordpress/class-logger.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Pre_WordPress\\Path_Actions\\Filter_Older' => __DIR__ . '/../..' . '/app/modules/optimizations/page-cache/pre-wordpress/path-actions/class-filter-older.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Pre_WordPress\\Path_Actions\\Path_Action' => __DIR__ . '/../..' . '/app/modules/optimizations/page-cache/pre-wordpress/path-actions/interface-path-action.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Pre_WordPress\\Path_Actions\\Rebuild_File' => __DIR__ . '/../..' . '/app/modules/optimizations/page-cache/pre-wordpress/path-actions/class-rebuild-file.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Pre_WordPress\\Path_Actions\\Simple_Delete' => __DIR__ . '/../..' . '/app/modules/optimizations/page-cache/pre-wordpress/path-actions/class-simple-delete.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Pre_WordPress\\Request' => __DIR__ . '/../..' . '/app/modules/optimizations/page-cache/pre-wordpress/class-request.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Pre_WordPress\\Storage\\File_Storage' => __DIR__ . '/../..' . '/app/modules/optimizations/page-cache/pre-wordpress/storage/class-file-storage.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Page_Cache\\Pre_WordPress\\Storage\\Storage' => __DIR__ . '/../..' . '/app/modules/optimizations/page-cache/pre-wordpress/storage/interface-storage.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Render_Blocking_JS\\Render_Blocking_JS' => __DIR__ . '/../..' . '/app/modules/optimizations/render-blocking-js/class-render-blocking-js.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Optimizations\\Speculation_Rules\\Speculation_Rules' => __DIR__ . '/../..' . '/app/modules/optimizations/speculation-rules/class-speculation-rules.php',
|
||||
'Automattic\\Jetpack_Boost\\Modules\\Performance_History\\Performance_History' => __DIR__ . '/../..' . '/app/modules/performance-history/class-performance-history.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Contracts\\Endpoint' => __DIR__ . '/../..' . '/app/rest-api/contracts/interface-endpoint.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Contracts\\Has_Always_Available_Endpoints' => __DIR__ . '/../..' . '/app/rest-api/contracts/interface-has-always-available-endpoints.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Contracts\\Has_Endpoints' => __DIR__ . '/../..' . '/app/rest-api/contracts/interface-has-endpoints.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Contracts\\Permission' => __DIR__ . '/../..' . '/app/rest-api/contracts/interface-permission.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Endpoints\\List_Cornerstone_Pages' => __DIR__ . '/../..' . '/app/rest-api/endpoints/class-list-cornerstone-pages.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Endpoints\\List_LCP_Analysis' => __DIR__ . '/../..' . '/app/rest-api/endpoints/class-list-lcp-analysis.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Endpoints\\List_Site_Urls' => __DIR__ . '/../..' . '/app/rest-api/endpoints/class-list-site-urls.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Endpoints\\List_Source_Providers' => __DIR__ . '/../..' . '/app/rest-api/endpoints/class-list-source-providers.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Endpoints\\Update_Cloud_CSS' => __DIR__ . '/../..' . '/app/rest-api/endpoints/class-update-cloud-css.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Endpoints\\Update_LCP' => __DIR__ . '/../..' . '/app/rest-api/endpoints/class-update-lcp.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Permissions\\Current_User_Admin' => __DIR__ . '/../..' . '/app/rest-api/permissions/class-current-user-admin.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Permissions\\Nonce' => __DIR__ . '/../..' . '/app/rest-api/permissions/class-nonce.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Permissions\\Signed_With_Blog_Token' => __DIR__ . '/../..' . '/app/rest-api/permissions/class-signed-with-blog-token.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\REST_API' => __DIR__ . '/../..' . '/app/rest-api/class-rest-api.php',
|
||||
'Automattic\\Jetpack_Boost\\REST_API\\Route' => __DIR__ . '/../..' . '/app/rest-api/class-route.php',
|
||||
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
||||
'Jetpack_IXR_Client' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php',
|
||||
'Jetpack_IXR_ClientMulticall' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-clientmulticall.php',
|
||||
'Jetpack_Options' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-options.php',
|
||||
'Jetpack_Signature' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-signature.php',
|
||||
'Jetpack_Tracks_Client' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-tracks-client.php',
|
||||
'Jetpack_Tracks_Event' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-tracks-event.php',
|
||||
'Jetpack_XMLRPC_Server' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-xmlrpc-server.php',
|
||||
'MatthiasMullie\\Minify\\CSS' => __DIR__ . '/..' . '/matthiasmullie/minify/src/CSS.php',
|
||||
'MatthiasMullie\\Minify\\Exception' => __DIR__ . '/..' . '/matthiasmullie/minify/src/Exception.php',
|
||||
'MatthiasMullie\\Minify\\Exceptions\\BasicException' => __DIR__ . '/..' . '/matthiasmullie/minify/src/Exceptions/BasicException.php',
|
||||
'MatthiasMullie\\Minify\\Exceptions\\FileImportException' => __DIR__ . '/..' . '/matthiasmullie/minify/src/Exceptions/FileImportException.php',
|
||||
'MatthiasMullie\\Minify\\Exceptions\\IOException' => __DIR__ . '/..' . '/matthiasmullie/minify/src/Exceptions/IOException.php',
|
||||
'MatthiasMullie\\Minify\\Exceptions\\PatternMatchException' => __DIR__ . '/..' . '/matthiasmullie/minify/src/Exceptions/PatternMatchException.php',
|
||||
'MatthiasMullie\\Minify\\JS' => __DIR__ . '/..' . '/matthiasmullie/minify/src/JS.php',
|
||||
'MatthiasMullie\\Minify\\Minify' => __DIR__ . '/..' . '/matthiasmullie/minify/src/Minify.php',
|
||||
'MatthiasMullie\\PathConverter\\Converter' => __DIR__ . '/..' . '/matthiasmullie/path-converter/src/Converter.php',
|
||||
'MatthiasMullie\\PathConverter\\ConverterInterface' => __DIR__ . '/..' . '/matthiasmullie/path-converter/src/ConverterInterface.php',
|
||||
'MatthiasMullie\\PathConverter\\NoConverter' => __DIR__ . '/..' . '/matthiasmullie/path-converter/src/NoConverter.php',
|
||||
);
|
||||
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ4_6_3::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ4_6_3::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ4_6_3::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,329 @@
|
||||
<?php return array(
|
||||
'root' => array(
|
||||
'name' => 'automattic/jetpack-boost',
|
||||
'pretty_version' => '4.6.3',
|
||||
'version' => '4.6.3.0',
|
||||
'reference' => null,
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'dev' => false,
|
||||
),
|
||||
'versions' => array(
|
||||
'automattic/jetpack-a8c-mc-stats' => array(
|
||||
'pretty_version' => 'v3.0.10',
|
||||
'version' => '3.0.10.0',
|
||||
'reference' => '1758136a8d2179b01d784b28f202f24d6c67c54a',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-a8c-mc-stats',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-admin-ui' => array(
|
||||
'pretty_version' => 'v0.9.6',
|
||||
'version' => '0.9.6.0',
|
||||
'reference' => '7e63f5684e0a70598d3e0b05805ce23fc532eac8',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-admin-ui',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-agents-manager' => array(
|
||||
'pretty_version' => 'v0.5.3',
|
||||
'version' => '0.5.3.0',
|
||||
'reference' => '68af1b58522329989c3324fad9929e63465138f2',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-agents-manager',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-assets' => array(
|
||||
'pretty_version' => 'v4.4.2',
|
||||
'version' => '4.4.2.0',
|
||||
'reference' => '6b23241c5f76fdd5532533a86a90615b71ba11ef',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-assets',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-autoloader' => array(
|
||||
'pretty_version' => 'v5.0.20',
|
||||
'version' => '5.0.20.0',
|
||||
'reference' => 'b6abf43a9ea638d6a0edc02f0dd7575703f9c2a1',
|
||||
'type' => 'composer-plugin',
|
||||
'install_path' => __DIR__ . '/../automattic/jetpack-autoloader',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-boost' => array(
|
||||
'pretty_version' => '4.6.3',
|
||||
'version' => '4.6.3.0',
|
||||
'reference' => null,
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-boost-core' => array(
|
||||
'pretty_version' => 'v0.4.8',
|
||||
'version' => '0.4.8.0',
|
||||
'reference' => '531182d753d832a587385a82d22decd82d86dff9',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-boost-core',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-boost-speed-score' => array(
|
||||
'pretty_version' => 'v0.4.18',
|
||||
'version' => '0.4.18.0',
|
||||
'reference' => 'c2d0839bbe749254ac146ec41fe3166eb899f98e',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-boost-speed-score',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-composer-plugin' => array(
|
||||
'pretty_version' => 'v4.0.8',
|
||||
'version' => '4.0.8.0',
|
||||
'reference' => 'bfbfd3302d8620c38f49e03700fb4eb195fc286d',
|
||||
'type' => 'composer-plugin',
|
||||
'install_path' => __DIR__ . '/../automattic/jetpack-composer-plugin',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-config' => array(
|
||||
'pretty_version' => 'v3.1.3',
|
||||
'version' => '3.1.3.0',
|
||||
'reference' => '8cc8329020ea15907150b167a514a35f62a0b25b',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-config',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-connection' => array(
|
||||
'pretty_version' => 'v8.7.5',
|
||||
'version' => '8.7.5.0',
|
||||
'reference' => 'cd336498a1f3ee84d4417bf9161e141b83101a4b',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-connection',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-constants' => array(
|
||||
'pretty_version' => 'v3.0.12',
|
||||
'version' => '3.0.12.0',
|
||||
'reference' => '672be0a51baadfc6eee0ffd3bf8e9db691a8ab27',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-constants',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-device-detection' => array(
|
||||
'pretty_version' => 'v3.4.5',
|
||||
'version' => '3.4.5.0',
|
||||
'reference' => '5f4ec860e13545c4a36169611ec4564180c120f4',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-device-detection',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-explat' => array(
|
||||
'pretty_version' => 'v0.4.33',
|
||||
'version' => '0.4.33.0',
|
||||
'reference' => '54177259e3afe02f1ae5402f88221967b77deac2',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-explat',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-image-cdn' => array(
|
||||
'pretty_version' => 'v0.7.29',
|
||||
'version' => '0.7.29.0',
|
||||
'reference' => '129bba4fba26b43e8a3eab525b930bb84c577f45',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-image-cdn',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-ip' => array(
|
||||
'pretty_version' => 'v0.4.14',
|
||||
'version' => '0.4.14.0',
|
||||
'reference' => '9d70e28051251cabc6f2c7323342bd5419612bd8',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-ip',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-jitm' => array(
|
||||
'pretty_version' => 'v4.3.44',
|
||||
'version' => '4.3.44.0',
|
||||
'reference' => '5b9f3a3439f04e095f1a635966241e8d8be87be8',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-jitm',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-licensing' => array(
|
||||
'pretty_version' => 'v3.1.9',
|
||||
'version' => '3.1.9.0',
|
||||
'reference' => '40d810d78bb2b0a32380ea8ed18bcb964a838424',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-licensing',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-logo' => array(
|
||||
'pretty_version' => 'v3.0.9',
|
||||
'version' => '3.0.9.0',
|
||||
'reference' => '21ef51a561bd8623834277cd18ac86de1e7b5d71',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-logo',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-my-jetpack' => array(
|
||||
'pretty_version' => 'v5.40.3',
|
||||
'version' => '5.40.3.0',
|
||||
'reference' => 'fce9aa018994e6f9e3921938e3d2b4489a240db9',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-my-jetpack',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-password-checker' => array(
|
||||
'pretty_version' => 'v0.4.14',
|
||||
'version' => '0.4.14.0',
|
||||
'reference' => 'd1c1a7313f01936db73e1f4e70f4d80d83575ae5',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-password-checker',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-plans' => array(
|
||||
'pretty_version' => 'v0.11.9',
|
||||
'version' => '0.11.9.0',
|
||||
'reference' => '8deebf32ade51ddfecf14c3a823eb1f7d4c48968',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../automattic/jetpack-plans',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-plugin-deactivation' => array(
|
||||
'pretty_version' => 'v0.3.30',
|
||||
'version' => '0.3.30.0',
|
||||
'reference' => '1f8a1304f037e033b67ef416ca6d8d955c1e32f9',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-plugin-deactivation',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-plugins-installer' => array(
|
||||
'pretty_version' => 'v0.5.11',
|
||||
'version' => '0.5.11.0',
|
||||
'reference' => '820fcc9067358a09eeaa7483af345200bb4985bb',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-plugins-installer',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-protect-models' => array(
|
||||
'pretty_version' => 'v0.6.5',
|
||||
'version' => '0.6.5.0',
|
||||
'reference' => 'c948b02305f91c37a6113a3247c562519336cd03',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-protect-models',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-protect-status' => array(
|
||||
'pretty_version' => 'v0.7.13',
|
||||
'version' => '0.7.13.0',
|
||||
'reference' => 'b060b6c60a661bf273b9d7ee6ef20730da57c8fc',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-protect-status',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-redirect' => array(
|
||||
'pretty_version' => 'v3.0.15',
|
||||
'version' => '3.0.15.0',
|
||||
'reference' => '4440f420878033f299d7eca6085a9948367fc114',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-redirect',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-roles' => array(
|
||||
'pretty_version' => 'v3.0.12',
|
||||
'version' => '3.0.12.0',
|
||||
'reference' => '2f2d3b77750455b4b4f11005a5c72d4f1579ff4f',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-roles',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-schema' => array(
|
||||
'pretty_version' => 'v0.2.8',
|
||||
'version' => '0.2.8.0',
|
||||
'reference' => '1593a33b5e1cdaa68cd7dae4d2e4f3575fdba1ec',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-schema',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-status' => array(
|
||||
'pretty_version' => 'v6.1.8',
|
||||
'version' => '6.1.8.0',
|
||||
'reference' => 'fe0bc0d426dd95386586556d94a360d3184b8a4a',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-status',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-sync' => array(
|
||||
'pretty_version' => 'v4.44.1',
|
||||
'version' => '4.44.1.0',
|
||||
'reference' => 'f1ff164bdb0e99912745ce364492b185c6e5d07c',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-sync',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-wp-abilities' => array(
|
||||
'pretty_version' => 'v0.1.5',
|
||||
'version' => '0.1.5.0',
|
||||
'reference' => 'ae1643f3c1db28cf69b2d1c1c4b85f8637f3c51c',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-wp-abilities',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'automattic/jetpack-wp-js-data-sync' => array(
|
||||
'pretty_version' => 'v0.6.9',
|
||||
'version' => '0.6.9.0',
|
||||
'reference' => '40ffd0f7f271d0998a79ca98cd843fa7631b0fd2',
|
||||
'type' => 'jetpack-library',
|
||||
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-wp-js-data-sync',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'matthiasmullie/minify' => array(
|
||||
'pretty_version' => '1.3.75',
|
||||
'version' => '1.3.75.0',
|
||||
'reference' => '76ba4a5f555fd7bf4aa408af608e991569076671',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../matthiasmullie/minify',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'matthiasmullie/path-converter' => array(
|
||||
'pretty_version' => '1.1.3',
|
||||
'version' => '1.1.3.0',
|
||||
'reference' => 'e7d13b2c7e2f2268e1424aaed02085518afa02d9',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../matthiasmullie/path-converter',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
),
|
||||
);
|
||||
+1865
File diff suppressed because it is too large
Load Diff
+17
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
// This file `jetpack_autoload_filemap.php` was auto generated by automattic/jetpack-autoloader.
|
||||
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'3773ef3f09c37da5478d578e32b03a4b' => array(
|
||||
'version' => '4.4.2.0',
|
||||
'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-assets/actions.php'
|
||||
),
|
||||
'7372b7fb88a9723cf5b76d456eb0b738' => array(
|
||||
'version' => '8.7.5.0',
|
||||
'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/actions.php'
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
// platform_check.php @generated by Composer
|
||||
|
||||
$issues = array();
|
||||
|
||||
if (!(PHP_VERSION_ID >= 70200)) {
|
||||
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.0". You are running ' . PHP_VERSION . '.';
|
||||
}
|
||||
|
||||
if ($issues) {
|
||||
if (!headers_sent()) {
|
||||
header('HTTP/1.1 500 Internal Server Error');
|
||||
}
|
||||
if (!ini_get('display_errors')) {
|
||||
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
|
||||
fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
|
||||
} elseif (!headers_sent()) {
|
||||
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
|
||||
}
|
||||
}
|
||||
throw new \RuntimeException(
|
||||
'Composer detected issues in your platform: ' . implode(' ', $issues)
|
||||
);
|
||||
}
|
||||
+147
@@ -0,0 +1,147 @@
|
||||
<?php
|
||||
/**
|
||||
* This file was automatically generated by automattic/jetpack-autoloader.
|
||||
*
|
||||
* @package automattic/jetpack-autoloader
|
||||
*/
|
||||
|
||||
namespace Automattic\Jetpack\Autoloader\jpb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ4_6_3\al5_0_20;
|
||||
|
||||
// phpcs:ignore
|
||||
|
||||
use Automattic\Jetpack\Autoloader\AutoloadGenerator;
|
||||
|
||||
/**
|
||||
* This class selects the package version for the autoloader.
|
||||
*/
|
||||
class Autoloader_Handler {
|
||||
|
||||
/**
|
||||
* The PHP_Autoloader instance.
|
||||
*
|
||||
* @var PHP_Autoloader
|
||||
*/
|
||||
private $php_autoloader;
|
||||
|
||||
/**
|
||||
* The Hook_Manager instance.
|
||||
*
|
||||
* @var Hook_Manager
|
||||
*/
|
||||
private $hook_manager;
|
||||
|
||||
/**
|
||||
* The Manifest_Reader instance.
|
||||
*
|
||||
* @var Manifest_Reader
|
||||
*/
|
||||
private $manifest_reader;
|
||||
|
||||
/**
|
||||
* The Version_Selector instance.
|
||||
*
|
||||
* @var Version_Selector
|
||||
*/
|
||||
private $version_selector;
|
||||
|
||||
/**
|
||||
* The constructor.
|
||||
*
|
||||
* @param PHP_Autoloader $php_autoloader The PHP_Autoloader instance.
|
||||
* @param Hook_Manager $hook_manager The Hook_Manager instance.
|
||||
* @param Manifest_Reader $manifest_reader The Manifest_Reader instance.
|
||||
* @param Version_Selector $version_selector The Version_Selector instance.
|
||||
*/
|
||||
public function __construct( $php_autoloader, $hook_manager, $manifest_reader, $version_selector ) {
|
||||
$this->php_autoloader = $php_autoloader;
|
||||
$this->hook_manager = $hook_manager;
|
||||
$this->manifest_reader = $manifest_reader;
|
||||
$this->version_selector = $version_selector;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks to see whether or not an autoloader is currently in the process of initializing.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function is_initializing() {
|
||||
// If no version has been set it means that no autoloader has started initializing yet.
|
||||
global $jetpack_autoloader_latest_version;
|
||||
if ( ! isset( $jetpack_autoloader_latest_version ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// When the version is set but the classmap is not it ALWAYS means that this is the
|
||||
// latest autoloader and is being included by an older one.
|
||||
global $jetpack_packages_classmap;
|
||||
if ( empty( $jetpack_packages_classmap ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Version 2.4.0 added a new global and altered the reset semantics. We need to check
|
||||
// the other global as well since it may also point at initialization.
|
||||
// Note: We don't need to check for the class first because every autoloader that
|
||||
// will set the latest version global requires this class in the classmap.
|
||||
$replacing_version = $jetpack_packages_classmap[ AutoloadGenerator::class ]['version'];
|
||||
if ( $this->version_selector->is_dev_version( $replacing_version ) || version_compare( $replacing_version, '2.4.0.0', '>=' ) ) {
|
||||
global $jetpack_autoloader_loader;
|
||||
if ( ! isset( $jetpack_autoloader_loader ) ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Activates an autoloader using the given plugins and activates it.
|
||||
*
|
||||
* @param string[] $plugins The plugins to initialize the autoloader for.
|
||||
*/
|
||||
public function activate_autoloader( $plugins ) {
|
||||
global $jetpack_packages_psr4;
|
||||
$jetpack_packages_psr4 = array();
|
||||
$this->manifest_reader->read_manifests( $plugins, 'vendor/composer/jetpack_autoload_psr4.php', $jetpack_packages_psr4 );
|
||||
|
||||
global $jetpack_packages_classmap;
|
||||
$jetpack_packages_classmap = array();
|
||||
$this->manifest_reader->read_manifests( $plugins, 'vendor/composer/jetpack_autoload_classmap.php', $jetpack_packages_classmap );
|
||||
|
||||
global $jetpack_packages_filemap;
|
||||
$jetpack_packages_filemap = array();
|
||||
$this->manifest_reader->read_manifests( $plugins, 'vendor/composer/jetpack_autoload_filemap.php', $jetpack_packages_filemap );
|
||||
|
||||
$loader = new Version_Loader(
|
||||
$this->version_selector,
|
||||
$jetpack_packages_classmap,
|
||||
$jetpack_packages_psr4,
|
||||
$jetpack_packages_filemap
|
||||
);
|
||||
|
||||
$this->php_autoloader->register_autoloader( $loader );
|
||||
|
||||
// Now that the autoloader is active we can load the filemap.
|
||||
$loader->load_filemap();
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the active autoloader and all related global state.
|
||||
*/
|
||||
public function reset_autoloader() {
|
||||
$this->php_autoloader->unregister_autoloader();
|
||||
$this->hook_manager->reset();
|
||||
|
||||
// Clear all of the autoloader globals so that older autoloaders don't do anything strange.
|
||||
global $jetpack_autoloader_latest_version;
|
||||
$jetpack_autoloader_latest_version = null;
|
||||
|
||||
global $jetpack_packages_classmap;
|
||||
$jetpack_packages_classmap = array(); // Must be array to avoid exceptions in old autoloaders!
|
||||
|
||||
global $jetpack_packages_psr4;
|
||||
$jetpack_packages_psr4 = array(); // Must be array to avoid exceptions in old autoloaders!
|
||||
|
||||
global $jetpack_packages_filemap;
|
||||
$jetpack_packages_filemap = array(); // Must be array to avoid exceptions in old autoloaders!
|
||||
}
|
||||
}
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
/**
|
||||
* This file was automatically generated by automattic/jetpack-autoloader.
|
||||
*
|
||||
* @package automattic/jetpack-autoloader
|
||||
*/
|
||||
|
||||
namespace Automattic\Jetpack\Autoloader\jpb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ4_6_3\al5_0_20;
|
||||
|
||||
// phpcs:ignore
|
||||
|
||||
use Automattic\Jetpack\Autoloader\AutoloadGenerator;
|
||||
|
||||
/**
|
||||
* This class locates autoloaders.
|
||||
*/
|
||||
class Autoloader_Locator {
|
||||
|
||||
/**
|
||||
* The object for comparing autoloader versions.
|
||||
*
|
||||
* @var Version_Selector
|
||||
*/
|
||||
private $version_selector;
|
||||
|
||||
/**
|
||||
* The constructor.
|
||||
*
|
||||
* @param Version_Selector $version_selector The version selector object.
|
||||
*/
|
||||
public function __construct( $version_selector ) {
|
||||
$this->version_selector = $version_selector;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the path to the plugin with the latest autoloader.
|
||||
*
|
||||
* @param array $plugin_paths An array of plugin paths.
|
||||
* @param string $latest_version The latest version reference. @phan-output-reference.
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function find_latest_autoloader( $plugin_paths, &$latest_version ) {
|
||||
$latest_plugin = null;
|
||||
|
||||
foreach ( $plugin_paths as $plugin_path ) {
|
||||
$version = $this->get_autoloader_version( $plugin_path );
|
||||
if ( ! $version || ! $this->version_selector->is_version_update_required( $latest_version, $version ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$latest_version = $version;
|
||||
$latest_plugin = $plugin_path;
|
||||
}
|
||||
|
||||
return $latest_plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the path to the autoloader.
|
||||
*
|
||||
* @param string $plugin_path The path to the plugin.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_autoloader_path( $plugin_path ) {
|
||||
return trailingslashit( $plugin_path ) . 'vendor/autoload_packages.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the version for the autoloader.
|
||||
*
|
||||
* @param string $plugin_path The path to the plugin.
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function get_autoloader_version( $plugin_path ) {
|
||||
$classmap = trailingslashit( $plugin_path ) . 'vendor/composer/jetpack_autoload_classmap.php';
|
||||
if ( ! file_exists( $classmap ) ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$classmap = require $classmap;
|
||||
if ( isset( $classmap[ AutoloadGenerator::class ] ) ) {
|
||||
return $classmap[ AutoloadGenerator::class ]['version'];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
/**
|
||||
* This file was automatically generated by automattic/jetpack-autoloader.
|
||||
*
|
||||
* @package automattic/jetpack-autoloader
|
||||
*/
|
||||
|
||||
namespace Automattic\Jetpack\Autoloader\jpb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ4_6_3\al5_0_20;
|
||||
|
||||
// phpcs:ignore
|
||||
|
||||
/**
|
||||
* This class handles management of the actual PHP autoloader.
|
||||
*/
|
||||
class Autoloader {
|
||||
|
||||
/**
|
||||
* Checks to see whether or not the autoloader should be initialized and then initializes it if so.
|
||||
*
|
||||
* @param Container|null $container The container we want to use for autoloader initialization. If none is given
|
||||
* then a container will be created automatically.
|
||||
*/
|
||||
public static function init( $container = null ) {
|
||||
// The container holds and manages the lifecycle of our dependencies
|
||||
// to make them easier to work with and increase flexibility.
|
||||
if ( ! isset( $container ) ) {
|
||||
require_once __DIR__ . '/class-container.php';
|
||||
$container = new Container();
|
||||
}
|
||||
|
||||
// phpcs:disable Generic.Commenting.DocComment.MissingShort
|
||||
|
||||
/** @var Autoloader_Handler $autoloader_handler */
|
||||
$autoloader_handler = $container->get( Autoloader_Handler::class );
|
||||
|
||||
// If the autoloader is already initializing it means that it has included us as the latest.
|
||||
$was_included_by_autoloader = $autoloader_handler->is_initializing();
|
||||
|
||||
/** @var Plugin_Locator $plugin_locator */
|
||||
$plugin_locator = $container->get( Plugin_Locator::class );
|
||||
|
||||
/** @var Plugins_Handler $plugins_handler */
|
||||
$plugins_handler = $container->get( Plugins_Handler::class );
|
||||
|
||||
// The current plugin is the one that we are attempting to initialize here.
|
||||
$current_plugin = $plugin_locator->find_current_plugin();
|
||||
|
||||
// The active plugins are those that we were able to discover on the site. This list will not
|
||||
// include mu-plugins, those activated by code, or those who are hidden by filtering. We also
|
||||
// want to take care to not consider the current plugin unknown if it was included by an
|
||||
// autoloader. This avoids the case where a plugin will be marked "active" while deactivated
|
||||
// due to it having the latest autoloader.
|
||||
$active_plugins = $plugins_handler->get_active_plugins( true, ! $was_included_by_autoloader );
|
||||
|
||||
// The cached plugins are all of those that were active or discovered by the autoloader during a previous request.
|
||||
// Note that it's possible this list will include plugins that have since been deactivated, but after a request
|
||||
// the cache should be updated and the deactivated plugins will be removed.
|
||||
$cached_plugins = $plugins_handler->get_cached_plugins();
|
||||
|
||||
// We combine the active list and cached list to preemptively load classes for plugins that are
|
||||
// presently unknown but will be loaded during the request. While this may result in us considering packages in
|
||||
// deactivated plugins there shouldn't be any problems as a result and the eventual consistency is sufficient.
|
||||
$all_plugins = array_merge( $active_plugins, $cached_plugins );
|
||||
|
||||
// In particular we also include the current plugin to address the case where it is the latest autoloader
|
||||
// but also unknown (and not cached). We don't want it in the active list because we don't know that it
|
||||
// is active but we need it in the all plugins list so that it is considered by the autoloader.
|
||||
$all_plugins[] = $current_plugin;
|
||||
|
||||
// We require uniqueness in the array to avoid processing the same plugin more than once.
|
||||
$all_plugins = array_values( array_unique( $all_plugins ) );
|
||||
|
||||
/** @var Latest_Autoloader_Guard $guard */
|
||||
$guard = $container->get( Latest_Autoloader_Guard::class );
|
||||
if ( $guard->should_stop_init( $current_plugin, $all_plugins, $was_included_by_autoloader ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Initialize the autoloader using the handler now that we're ready.
|
||||
$autoloader_handler->activate_autoloader( $all_plugins );
|
||||
|
||||
/** @var Hook_Manager $hook_manager */
|
||||
$hook_manager = $container->get( Hook_Manager::class );
|
||||
|
||||
// Register a shutdown handler to clean up the autoloader.
|
||||
$hook_manager->add_action( 'shutdown', new Shutdown_Handler( $plugins_handler, $cached_plugins, $was_included_by_autoloader ) );
|
||||
|
||||
// Register a plugins_loaded handler to check for conflicting autoloaders.
|
||||
$hook_manager->add_action( 'plugins_loaded', array( $guard, 'check_for_conflicting_autoloaders' ), 1 );
|
||||
|
||||
// phpcs:enable Generic.Commenting.DocComment.MissingShort
|
||||
}
|
||||
}
|
||||
+150
@@ -0,0 +1,150 @@
|
||||
<?php
|
||||
/**
|
||||
* This file was automatically generated by automattic/jetpack-autoloader.
|
||||
*
|
||||
* @package automattic/jetpack-autoloader
|
||||
*/
|
||||
|
||||
namespace Automattic\Jetpack\Autoloader\jpb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ4_6_3\al5_0_20;
|
||||
|
||||
// phpcs:ignore
|
||||
|
||||
/**
|
||||
* This class manages the files and dependencies of the autoloader.
|
||||
*/
|
||||
class Container {
|
||||
|
||||
/**
|
||||
* Since each autoloader's class files exist within their own namespace we need a map to
|
||||
* convert between the local class and a shared key. Note that no version checking is
|
||||
* performed on these dependencies and the first autoloader to register will be the
|
||||
* one that is utilized.
|
||||
*/
|
||||
const SHARED_DEPENDENCY_KEYS = array(
|
||||
Hook_Manager::class => 'Hook_Manager',
|
||||
);
|
||||
|
||||
/**
|
||||
* A map of all the dependencies we've registered with the container and created.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $dependencies;
|
||||
|
||||
/**
|
||||
* The constructor.
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->dependencies = array();
|
||||
|
||||
$this->register_shared_dependencies();
|
||||
$this->register_dependencies();
|
||||
$this->initialize_globals();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a dependency out of the container.
|
||||
*
|
||||
* @param string $class The class to fetch.
|
||||
*
|
||||
* @return mixed
|
||||
* @throws \InvalidArgumentException When a class that isn't registered with the container is fetched.
|
||||
*/
|
||||
public function get( $class ) {
|
||||
if ( ! isset( $this->dependencies[ $class ] ) ) {
|
||||
throw new \InvalidArgumentException( "Class '$class' is not registered with the container." );
|
||||
}
|
||||
|
||||
return $this->dependencies[ $class ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers all of the dependencies that are shared between all instances of the autoloader.
|
||||
*/
|
||||
private function register_shared_dependencies() {
|
||||
global $jetpack_autoloader_container_shared;
|
||||
if ( ! isset( $jetpack_autoloader_container_shared ) ) {
|
||||
$jetpack_autoloader_container_shared = array();
|
||||
}
|
||||
|
||||
$key = self::SHARED_DEPENDENCY_KEYS[ Hook_Manager::class ];
|
||||
if ( ! isset( $jetpack_autoloader_container_shared[ $key ] ) ) {
|
||||
require_once __DIR__ . '/class-hook-manager.php';
|
||||
$jetpack_autoloader_container_shared[ $key ] = new Hook_Manager();
|
||||
}
|
||||
$this->dependencies[ Hook_Manager::class ] = &$jetpack_autoloader_container_shared[ $key ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers all of the dependencies with the container.
|
||||
*/
|
||||
private function register_dependencies() {
|
||||
require_once __DIR__ . '/class-path-processor.php';
|
||||
$this->dependencies[ Path_Processor::class ] = new Path_Processor();
|
||||
|
||||
require_once __DIR__ . '/class-plugin-locator.php';
|
||||
$this->dependencies[ Plugin_Locator::class ] = new Plugin_Locator(
|
||||
$this->get( Path_Processor::class )
|
||||
);
|
||||
|
||||
require_once __DIR__ . '/class-version-selector.php';
|
||||
$this->dependencies[ Version_Selector::class ] = new Version_Selector();
|
||||
|
||||
require_once __DIR__ . '/class-autoloader-locator.php';
|
||||
$this->dependencies[ Autoloader_Locator::class ] = new Autoloader_Locator(
|
||||
$this->get( Version_Selector::class )
|
||||
);
|
||||
|
||||
require_once __DIR__ . '/class-php-autoloader.php';
|
||||
$this->dependencies[ PHP_Autoloader::class ] = new PHP_Autoloader();
|
||||
|
||||
require_once __DIR__ . '/class-manifest-reader.php';
|
||||
$this->dependencies[ Manifest_Reader::class ] = new Manifest_Reader(
|
||||
$this->get( Version_Selector::class )
|
||||
);
|
||||
|
||||
require_once __DIR__ . '/class-plugins-handler.php';
|
||||
$this->dependencies[ Plugins_Handler::class ] = new Plugins_Handler(
|
||||
$this->get( Plugin_Locator::class ),
|
||||
$this->get( Path_Processor::class )
|
||||
);
|
||||
|
||||
require_once __DIR__ . '/class-autoloader-handler.php';
|
||||
$this->dependencies[ Autoloader_Handler::class ] = new Autoloader_Handler(
|
||||
$this->get( PHP_Autoloader::class ),
|
||||
$this->get( Hook_Manager::class ),
|
||||
$this->get( Manifest_Reader::class ),
|
||||
$this->get( Version_Selector::class )
|
||||
);
|
||||
|
||||
require_once __DIR__ . '/class-latest-autoloader-guard.php';
|
||||
$this->dependencies[ Latest_Autoloader_Guard::class ] = new Latest_Autoloader_Guard(
|
||||
$this->get( Plugins_Handler::class ),
|
||||
$this->get( Autoloader_Handler::class ),
|
||||
$this->get( Autoloader_Locator::class )
|
||||
);
|
||||
|
||||
// Register any classes that we will use elsewhere.
|
||||
require_once __DIR__ . '/class-version-loader.php';
|
||||
require_once __DIR__ . '/class-shutdown-handler.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes any of the globals needed by the autoloader.
|
||||
*/
|
||||
private function initialize_globals() {
|
||||
/*
|
||||
* This global was retired in version 2.9. The value is set to 'false' to maintain
|
||||
* compatibility with older versions of the autoloader.
|
||||
*/
|
||||
global $jetpack_autoloader_including_latest;
|
||||
$jetpack_autoloader_including_latest = false;
|
||||
|
||||
// Not all plugins can be found using the locator. In cases where a plugin loads the autoloader
|
||||
// but was not discoverable, we will record them in this array to track them as "active".
|
||||
global $jetpack_autoloader_activating_plugins_paths;
|
||||
if ( ! isset( $jetpack_autoloader_activating_plugins_paths ) ) {
|
||||
$jetpack_autoloader_activating_plugins_paths = array();
|
||||
}
|
||||
}
|
||||
}
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
/**
|
||||
* This file was automatically generated by automattic/jetpack-autoloader.
|
||||
*
|
||||
* @package automattic/jetpack-autoloader
|
||||
*/
|
||||
|
||||
namespace Automattic\Jetpack\Autoloader\jpb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ4_6_3\al5_0_20;
|
||||
|
||||
// phpcs:ignore
|
||||
|
||||
/**
|
||||
* Allows the latest autoloader to register hooks that can be removed when the autoloader is reset.
|
||||
*/
|
||||
class Hook_Manager {
|
||||
|
||||
/**
|
||||
* An array containing all of the hooks that we've registered.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $registered_hooks;
|
||||
|
||||
/**
|
||||
* The constructor.
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->registered_hooks = array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an action to WordPress and registers it internally.
|
||||
*
|
||||
* @param string $tag The name of the action which is hooked.
|
||||
* @param callable $callable The function to call.
|
||||
* @param int $priority Used to specify the priority of the action.
|
||||
* @param int $accepted_args Used to specify the number of arguments the callable accepts.
|
||||
*/
|
||||
public function add_action( $tag, $callable, $priority = 10, $accepted_args = 1 ) {
|
||||
$this->registered_hooks[ $tag ][] = array(
|
||||
'priority' => $priority,
|
||||
'callable' => $callable,
|
||||
);
|
||||
|
||||
add_action( $tag, $callable, $priority, $accepted_args );
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a filter to WordPress and registers it internally.
|
||||
*
|
||||
* @param string $tag The name of the filter which is hooked.
|
||||
* @param callable $callable The function to call.
|
||||
* @param int $priority Used to specify the priority of the filter.
|
||||
* @param int $accepted_args Used to specify the number of arguments the callable accepts.
|
||||
*/
|
||||
public function add_filter( $tag, $callable, $priority = 10, $accepted_args = 1 ) {
|
||||
$this->registered_hooks[ $tag ][] = array(
|
||||
'priority' => $priority,
|
||||
'callable' => $callable,
|
||||
);
|
||||
|
||||
add_filter( $tag, $callable, $priority, $accepted_args );
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all of the registered hooks.
|
||||
*/
|
||||
public function reset() {
|
||||
foreach ( $this->registered_hooks as $tag => $hooks ) {
|
||||
foreach ( $hooks as $hook ) {
|
||||
remove_filter( $tag, $hook['callable'], $hook['priority'] );
|
||||
}
|
||||
}
|
||||
$this->registered_hooks = array();
|
||||
}
|
||||
}
|
||||
Vendored
+165
@@ -0,0 +1,165 @@
|
||||
<?php
|
||||
/**
|
||||
* This file was automatically generated by automattic/jetpack-autoloader.
|
||||
*
|
||||
* @package automattic/jetpack-autoloader
|
||||
*/
|
||||
|
||||
namespace Automattic\Jetpack\Autoloader\jpb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ4_6_3\al5_0_20;
|
||||
|
||||
// phpcs:ignore
|
||||
|
||||
/**
|
||||
* This class ensures that we're only executing the latest autoloader.
|
||||
*/
|
||||
class Latest_Autoloader_Guard {
|
||||
|
||||
/**
|
||||
* The Plugins_Handler instance.
|
||||
*
|
||||
* @var Plugins_Handler
|
||||
*/
|
||||
private $plugins_handler;
|
||||
|
||||
/**
|
||||
* The Autoloader_Handler instance.
|
||||
*
|
||||
* @var Autoloader_Handler
|
||||
*/
|
||||
private $autoloader_handler;
|
||||
|
||||
/**
|
||||
* The Autoloader_locator instance.
|
||||
*
|
||||
* @var Autoloader_Locator
|
||||
*/
|
||||
private $autoloader_locator;
|
||||
|
||||
/**
|
||||
* The constructor.
|
||||
*
|
||||
* @param Plugins_Handler $plugins_handler The Plugins_Handler instance.
|
||||
* @param Autoloader_Handler $autoloader_handler The Autoloader_Handler instance.
|
||||
* @param Autoloader_Locator $autoloader_locator The Autoloader_Locator instance.
|
||||
*/
|
||||
public function __construct( $plugins_handler, $autoloader_handler, $autoloader_locator ) {
|
||||
$this->plugins_handler = $plugins_handler;
|
||||
$this->autoloader_handler = $autoloader_handler;
|
||||
$this->autoloader_locator = $autoloader_locator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether or not the autoloader should be initialized. Note that this function
|
||||
* has the side-effect of actually loading the latest autoloader in the event that this
|
||||
* is not it.
|
||||
*
|
||||
* @param string $current_plugin The current plugin we're checking.
|
||||
* @param string[] $plugins The active plugins to check for autoloaders in.
|
||||
* @param bool $was_included_by_autoloader Indicates whether or not this autoloader was included by another.
|
||||
*
|
||||
* @return bool True if we should stop initialization, otherwise false.
|
||||
*/
|
||||
public function should_stop_init( $current_plugin, $plugins, $was_included_by_autoloader ) {
|
||||
global $jetpack_autoloader_latest_version;
|
||||
|
||||
// We need to reset the autoloader when the plugins change because
|
||||
// that means the autoloader was generated with a different list.
|
||||
if ( $this->plugins_handler->have_plugins_changed( $plugins ) ) {
|
||||
$this->autoloader_handler->reset_autoloader();
|
||||
}
|
||||
|
||||
// When the latest autoloader has already been found we don't need to search for it again.
|
||||
// We should take care however because this will also trigger if the autoloader has been
|
||||
// included by an older one.
|
||||
if ( isset( $jetpack_autoloader_latest_version ) && ! $was_included_by_autoloader ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$latest_plugin = $this->autoloader_locator->find_latest_autoloader( $plugins, $jetpack_autoloader_latest_version );
|
||||
if ( isset( $latest_plugin ) && $latest_plugin !== $current_plugin ) {
|
||||
require $this->autoloader_locator->get_autoloader_path( $latest_plugin );
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for conflicting autoloaders.
|
||||
*
|
||||
* A common source of strange and confusing problems is when another plugin
|
||||
* registers a Composer autoloader at a higher priority that us. If enabled,
|
||||
* check for this problem and warn about it.
|
||||
*
|
||||
* Called from the plugins_loaded hook.
|
||||
*
|
||||
* @since 3.1.0
|
||||
* @return void
|
||||
*/
|
||||
public function check_for_conflicting_autoloaders() {
|
||||
if ( ! defined( 'JETPACK_AUTOLOAD_DEBUG_CONFLICTING_LOADERS' ) || ! JETPACK_AUTOLOAD_DEBUG_CONFLICTING_LOADERS ) {
|
||||
return;
|
||||
}
|
||||
|
||||
global $jetpack_autoloader_loader;
|
||||
if ( ! isset( $jetpack_autoloader_loader ) ) {
|
||||
return;
|
||||
}
|
||||
$prefixes = array();
|
||||
foreach ( ( $jetpack_autoloader_loader->get_class_map() ?? array() ) as $classname => $data ) {
|
||||
$parts = explode( '\\', trim( $classname, '\\' ) );
|
||||
array_pop( $parts );
|
||||
while ( $parts ) {
|
||||
$prefixes[ implode( '\\', $parts ) . '\\' ] = true;
|
||||
array_pop( $parts );
|
||||
}
|
||||
}
|
||||
foreach ( ( $jetpack_autoloader_loader->get_psr4_map() ?? array() ) as $prefix => $data ) {
|
||||
$parts = explode( '\\', trim( $prefix, '\\' ) );
|
||||
while ( $parts ) {
|
||||
$prefixes[ implode( '\\', $parts ) . '\\' ] = true;
|
||||
array_pop( $parts );
|
||||
}
|
||||
}
|
||||
|
||||
$autoload_chain = spl_autoload_functions();
|
||||
if ( ! $autoload_chain ) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ( $autoload_chain as $autoloader ) {
|
||||
// No need to check anything after us.
|
||||
if ( is_array( $autoloader ) && is_string( $autoloader[0] ) && substr( $autoloader[0], 0, strlen( __NAMESPACE__ ) + 1 ) === __NAMESPACE__ . '\\' ) {
|
||||
break;
|
||||
}
|
||||
|
||||
// We can check Composer autoloaders easily enough.
|
||||
if ( is_array( $autoloader ) && $autoloader[0] instanceof \Composer\Autoload\ClassLoader && is_callable( array( $autoloader[0], 'getPrefixesPsr4' ) ) ) {
|
||||
$composer_autoloader = $autoloader[0];
|
||||
foreach ( $composer_autoloader->getClassMap() as $classname => $path ) {
|
||||
if ( $jetpack_autoloader_loader->find_class_file( $classname ) ) {
|
||||
$msg = "A Composer autoloader is registered with a higher priority than the Jetpack Autoloader and would also handle some of the classes we handle (e.g. $classname => $path). This may cause strange and confusing problems.";
|
||||
wp_trigger_error( '', $msg );
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
foreach ( $composer_autoloader->getPrefixesPsr4() as $prefix => $paths ) {
|
||||
if ( isset( $prefixes[ $prefix ] ) ) {
|
||||
$path = array_pop( $paths );
|
||||
$msg = "A Composer autoloader is registered with a higher priority than the Jetpack Autoloader and would also handle some of the namespaces we handle (e.g. $prefix => $path). This may cause strange and confusing problems.";
|
||||
wp_trigger_error( '', $msg );
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
foreach ( $composer_autoloader->getPrefixes() as $prefix => $paths ) {
|
||||
if ( isset( $prefixes[ $prefix ] ) ) {
|
||||
$path = array_pop( $paths );
|
||||
$msg = "A Composer autoloader is registered with a higher priority than the Jetpack Autoloader and would also handle some of the namespaces we handle (e.g. $prefix => $path). This may cause strange and confusing problems.";
|
||||
wp_trigger_error( '', $msg );
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
/**
|
||||
* This file was automatically generated by automattic/jetpack-autoloader.
|
||||
*
|
||||
* @package automattic/jetpack-autoloader
|
||||
*/
|
||||
|
||||
namespace Automattic\Jetpack\Autoloader\jpb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ4_6_3\al5_0_20;
|
||||
|
||||
// phpcs:ignore
|
||||
|
||||
/**
|
||||
* This class reads autoloader manifest files.
|
||||
*/
|
||||
class Manifest_Reader {
|
||||
|
||||
/**
|
||||
* The Version_Selector object.
|
||||
*
|
||||
* @var Version_Selector
|
||||
*/
|
||||
private $version_selector;
|
||||
|
||||
/**
|
||||
* The constructor.
|
||||
*
|
||||
* @param Version_Selector $version_selector The Version_Selector object.
|
||||
*/
|
||||
public function __construct( $version_selector ) {
|
||||
$this->version_selector = $version_selector;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads all of the manifests in the given plugin paths.
|
||||
*
|
||||
* @param array $plugin_paths The paths to the plugins we're loading the manifest in.
|
||||
* @param string $manifest_path The path that we're loading the manifest from in each plugin.
|
||||
* @param array $path_map The path map to add the contents of the manifests to.
|
||||
*
|
||||
* @return array $path_map The path map we've built using the manifests in each plugin.
|
||||
*/
|
||||
public function read_manifests( $plugin_paths, $manifest_path, &$path_map ) {
|
||||
$file_paths = array_map(
|
||||
function ( $path ) use ( $manifest_path ) {
|
||||
return trailingslashit( $path ) . $manifest_path;
|
||||
},
|
||||
$plugin_paths
|
||||
);
|
||||
|
||||
foreach ( $file_paths as $path ) {
|
||||
$this->register_manifest( $path, $path_map );
|
||||
}
|
||||
|
||||
return $path_map;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a plugin's manifest file with the path map.
|
||||
*
|
||||
* @param string $manifest_path The absolute path to the manifest that we're loading.
|
||||
* @param array $path_map The path map to add the contents of the manifest to.
|
||||
*/
|
||||
protected function register_manifest( $manifest_path, &$path_map ) {
|
||||
if ( ! is_readable( $manifest_path ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$manifest = require $manifest_path;
|
||||
if ( ! is_array( $manifest ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ( $manifest as $key => $data ) {
|
||||
$this->register_record( $key, $data, $path_map );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers an entry from the manifest in the path map.
|
||||
*
|
||||
* @param string $key The identifier for the entry we're registering.
|
||||
* @param array $data The data for the entry we're registering.
|
||||
* @param array $path_map The path map to add the contents of the manifest to.
|
||||
*/
|
||||
protected function register_record( $key, $data, &$path_map ) {
|
||||
if ( isset( $path_map[ $key ]['version'] ) ) {
|
||||
$selected_version = $path_map[ $key ]['version'];
|
||||
} else {
|
||||
$selected_version = null;
|
||||
}
|
||||
|
||||
if ( $this->version_selector->is_version_update_required( $selected_version, $data['version'] ) ) {
|
||||
$path_map[ $key ] = array(
|
||||
'version' => $data['version'],
|
||||
'path' => $data['path'],
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
+194
@@ -0,0 +1,194 @@
|
||||
<?php
|
||||
/**
|
||||
* This file was automatically generated by automattic/jetpack-autoloader.
|
||||
*
|
||||
* @package automattic/jetpack-autoloader
|
||||
*/
|
||||
|
||||
namespace Automattic\Jetpack\Autoloader\jpb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ4_6_3\al5_0_20;
|
||||
|
||||
// phpcs:ignore
|
||||
|
||||
/**
|
||||
* This class handles dealing with paths for the autoloader.
|
||||
*/
|
||||
class Path_Processor {
|
||||
/**
|
||||
* Given a path this will replace any of the path constants with a token to represent it.
|
||||
*
|
||||
* @param string $path The path we want to process.
|
||||
*
|
||||
* @return string The tokenized path.
|
||||
*/
|
||||
public function tokenize_path_constants( $path ) {
|
||||
$path = wp_normalize_path( $path );
|
||||
|
||||
$constants = $this->get_normalized_constants();
|
||||
foreach ( $constants as $constant => $constant_path ) {
|
||||
$len = strlen( $constant_path );
|
||||
if ( substr( $path, 0, $len ) !== $constant_path ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
return substr_replace( $path, '{{' . $constant . '}}', 0, $len );
|
||||
}
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a path this will replace any of the path constant tokens with the expanded path.
|
||||
*
|
||||
* @param string $tokenized_path The path we want to process.
|
||||
*
|
||||
* @return string The expanded path.
|
||||
*/
|
||||
public function untokenize_path_constants( $tokenized_path ) {
|
||||
$tokenized_path = wp_normalize_path( $tokenized_path );
|
||||
|
||||
$constants = $this->get_normalized_constants();
|
||||
foreach ( $constants as $constant => $constant_path ) {
|
||||
$constant = '{{' . $constant . '}}';
|
||||
|
||||
$len = strlen( $constant );
|
||||
if ( substr( $tokenized_path, 0, $len ) !== $constant ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
return $this->get_real_path( substr_replace( $tokenized_path, $constant_path, 0, $len ) );
|
||||
}
|
||||
|
||||
return $tokenized_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a file and an array of places it might be, this will find the absolute path and return it.
|
||||
*
|
||||
* @param string $file The plugin or theme file to resolve.
|
||||
* @param array $directories_to_check The directories we should check for the file if it isn't an absolute path.
|
||||
*
|
||||
* @return string|false Returns the absolute path to the directory, otherwise false.
|
||||
*/
|
||||
public function find_directory_with_autoloader( $file, $directories_to_check ) {
|
||||
$file = wp_normalize_path( $file );
|
||||
|
||||
if ( ! $this->is_absolute_path( $file ) ) {
|
||||
$file = $this->find_absolute_plugin_path( $file, $directories_to_check );
|
||||
if ( ! isset( $file ) ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// We need the real path for consistency with __DIR__ paths.
|
||||
$file = $this->get_real_path( $file );
|
||||
|
||||
// phpcs:disable WordPress.PHP.NoSilencedErrors.Discouraged
|
||||
$directory = @is_file( $file ) ? dirname( $file ) : $file;
|
||||
if ( ! @is_file( $directory . '/vendor/composer/jetpack_autoload_classmap.php' ) ) {
|
||||
return false;
|
||||
}
|
||||
// phpcs:enable WordPress.PHP.NoSilencedErrors.Discouraged
|
||||
|
||||
return $directory;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches an array of normalized paths keyed by the constant they came from.
|
||||
*
|
||||
* @return string[] The normalized paths keyed by the constant.
|
||||
*/
|
||||
private function get_normalized_constants() {
|
||||
$raw_constants = array(
|
||||
// Order the constants from most-specific to least-specific.
|
||||
'WP_PLUGIN_DIR',
|
||||
'WPMU_PLUGIN_DIR',
|
||||
'WP_CONTENT_DIR',
|
||||
'ABSPATH',
|
||||
);
|
||||
|
||||
$constants = array();
|
||||
foreach ( $raw_constants as $raw ) {
|
||||
if ( ! defined( $raw ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$path = wp_normalize_path( constant( $raw ) );
|
||||
if ( isset( $path ) ) {
|
||||
$constants[ $raw ] = $path;
|
||||
}
|
||||
}
|
||||
|
||||
return $constants;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether or not a path is absolute.
|
||||
*
|
||||
* @param string $path The path to check.
|
||||
*
|
||||
* @return bool True if the path is absolute, otherwise false.
|
||||
*/
|
||||
private function is_absolute_path( $path ) {
|
||||
if ( empty( $path ) || 0 === strlen( $path ) || '.' === $path[0] ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Absolute paths on Windows may begin with a drive letter.
|
||||
if ( preg_match( '/^[a-zA-Z]:[\/\\\\]/', $path ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// A path starting with / or \ is absolute; anything else is relative.
|
||||
return ( '/' === $path[0] || '\\' === $path[0] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a file and a list of directories to check, this method will try to figure out
|
||||
* the absolute path to the file in question.
|
||||
*
|
||||
* @param string $normalized_path The normalized path to the plugin or theme file to resolve.
|
||||
* @param array $directories_to_check The directories we should check for the file if it isn't an absolute path.
|
||||
*
|
||||
* @return string|null The absolute path to the plugin file, otherwise null.
|
||||
*/
|
||||
private function find_absolute_plugin_path( $normalized_path, $directories_to_check ) {
|
||||
// We're only able to find the absolute path for plugin/theme PHP files.
|
||||
if ( ! is_string( $normalized_path ) || '.php' !== substr( $normalized_path, -4 ) ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
foreach ( $directories_to_check as $directory ) {
|
||||
$normalized_check = wp_normalize_path( trailingslashit( $directory ) ) . $normalized_path;
|
||||
// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
|
||||
if ( @is_file( $normalized_check ) ) {
|
||||
return $normalized_check;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a path this will figure out the real path that we should be using.
|
||||
*
|
||||
* @param string $path The path to resolve.
|
||||
*
|
||||
* @return string The resolved path.
|
||||
*/
|
||||
private function get_real_path( $path ) {
|
||||
// We want to resolve symbolic links for consistency with __DIR__ paths.
|
||||
// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
|
||||
$real_path = @realpath( $path );
|
||||
if ( false === $real_path ) {
|
||||
// Let the autoloader deal with paths that don't exist.
|
||||
$real_path = $path;
|
||||
}
|
||||
|
||||
// Using realpath will make it platform-specific so we must normalize it after.
|
||||
if ( $path !== $real_path ) {
|
||||
$real_path = wp_normalize_path( $real_path );
|
||||
}
|
||||
|
||||
return $real_path;
|
||||
}
|
||||
}
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
/**
|
||||
* This file was automatically generated by automattic/jetpack-autoloader.
|
||||
*
|
||||
* @package automattic/jetpack-autoloader
|
||||
*/
|
||||
|
||||
namespace Automattic\Jetpack\Autoloader\jpb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ4_6_3\al5_0_20;
|
||||
|
||||
// phpcs:ignore
|
||||
|
||||
/**
|
||||
* This class handles management of the actual PHP autoloader.
|
||||
*/
|
||||
class PHP_Autoloader {
|
||||
|
||||
/**
|
||||
* Registers the autoloader with PHP so that it can begin autoloading classes.
|
||||
*
|
||||
* @param Version_Loader $version_loader The class loader to use in the autoloader.
|
||||
*/
|
||||
public function register_autoloader( $version_loader ) {
|
||||
// Make sure no other autoloaders are registered.
|
||||
$this->unregister_autoloader();
|
||||
|
||||
// Set the global so that it can be used to load classes.
|
||||
global $jetpack_autoloader_loader;
|
||||
$jetpack_autoloader_loader = $version_loader;
|
||||
|
||||
// Ensure that the autoloader is first to avoid contention with others.
|
||||
spl_autoload_register( array( self::class, 'load_class' ), true, true );
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregisters the active autoloader so that it will no longer autoload classes.
|
||||
*/
|
||||
public function unregister_autoloader() {
|
||||
// Remove any v2 autoloader that we've already registered.
|
||||
$autoload_chain = spl_autoload_functions();
|
||||
if ( ! $autoload_chain ) {
|
||||
return;
|
||||
}
|
||||
foreach ( $autoload_chain as $autoloader ) {
|
||||
// We can identify a v2 autoloader using the namespace.
|
||||
$namespace_check = null;
|
||||
|
||||
// Functions are recorded as strings.
|
||||
if ( is_string( $autoloader ) ) {
|
||||
$namespace_check = $autoloader;
|
||||
} elseif ( is_array( $autoloader ) && is_string( $autoloader[0] ) ) {
|
||||
// Static method calls have the class as the first array element.
|
||||
$namespace_check = $autoloader[0];
|
||||
} else {
|
||||
// Since the autoloader has only ever been a function or a static method we don't currently need to check anything else.
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check for the namespace without the generated suffix.
|
||||
if ( 'Automattic\\Jetpack\\Autoloader\\jp' === substr( $namespace_check, 0, 32 ) ) {
|
||||
spl_autoload_unregister( $autoloader );
|
||||
}
|
||||
}
|
||||
|
||||
// Clear the global now that the autoloader has been unregistered.
|
||||
global $jetpack_autoloader_loader;
|
||||
$jetpack_autoloader_loader = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads a class file if one could be found.
|
||||
*
|
||||
* Note: This function is static so that the autoloader can be easily unregistered. If
|
||||
* it was a class method we would have to unwrap the object to check the namespace.
|
||||
*
|
||||
* @param string $class_name The name of the class to autoload.
|
||||
*
|
||||
* @return bool Indicates whether or not a class file was loaded.
|
||||
*/
|
||||
public static function load_class( $class_name ) {
|
||||
global $jetpack_autoloader_loader;
|
||||
if ( ! isset( $jetpack_autoloader_loader ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$file = $jetpack_autoloader_loader->find_class_file( $class_name );
|
||||
if ( ! isset( $file ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// A common source of strange and confusing problems is when a vendor
|
||||
// file is autoloaded before all plugins have had a chance to register
|
||||
// with the autoloader. Detect that, if a development constant is set.
|
||||
if ( defined( 'JETPACK_AUTOLOAD_DEBUG_EARLY_LOADS' ) && JETPACK_AUTOLOAD_DEBUG_EARLY_LOADS &&
|
||||
( strpos( $file, '/vendor/' ) !== false || strpos( $file, '/jetpack_vendor/' ) !== false ) &&
|
||||
is_callable( 'did_action' ) && ! did_action( 'plugins_loaded' )
|
||||
) {
|
||||
// phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_wp_debug_backtrace_summary -- This is a debug log message.
|
||||
$msg = "Jetpack Autoloader: Autoloading `$class_name` before the plugins_loaded hook may cause strange and confusing problems. " . wp_debug_backtrace_summary( '', 1 );
|
||||
wp_trigger_error( '', $msg );
|
||||
}
|
||||
|
||||
require $file;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
+153
@@ -0,0 +1,153 @@
|
||||
<?php
|
||||
/**
|
||||
* This file was automatically generated by automattic/jetpack-autoloader.
|
||||
*
|
||||
* @package automattic/jetpack-autoloader
|
||||
*/
|
||||
|
||||
namespace Automattic\Jetpack\Autoloader\jpb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ4_6_3\al5_0_20;
|
||||
|
||||
// phpcs:ignore
|
||||
|
||||
/**
|
||||
* This class scans the WordPress installation to find active plugins.
|
||||
*/
|
||||
class Plugin_Locator {
|
||||
|
||||
/**
|
||||
* The path processor for finding plugin paths.
|
||||
*
|
||||
* @var Path_Processor
|
||||
*/
|
||||
private $path_processor;
|
||||
|
||||
/**
|
||||
* The constructor.
|
||||
*
|
||||
* @param Path_Processor $path_processor The Path_Processor instance.
|
||||
*/
|
||||
public function __construct( $path_processor ) {
|
||||
$this->path_processor = $path_processor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the path to the current plugin.
|
||||
*
|
||||
* @return string $path The path to the current plugin.
|
||||
*
|
||||
* @throws \RuntimeException If the current plugin does not have an autoloader.
|
||||
*/
|
||||
public function find_current_plugin() {
|
||||
// Escape from `vendor/__DIR__` to root plugin directory.
|
||||
$plugin_directory = dirname( __DIR__, 2 );
|
||||
|
||||
// Use the path processor to ensure that this is an autoloader we're referencing.
|
||||
$path = $this->path_processor->find_directory_with_autoloader( $plugin_directory, array() );
|
||||
if ( false === $path ) {
|
||||
throw new \RuntimeException( 'Failed to locate plugin ' . $plugin_directory );
|
||||
}
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks a given option for plugin paths.
|
||||
*
|
||||
* @param string $option_name The option that we want to check for plugin information.
|
||||
* @param bool $site_option Indicates whether or not we want to check the site option.
|
||||
*
|
||||
* @return array $plugin_paths The list of absolute paths we've found.
|
||||
*/
|
||||
public function find_using_option( $option_name, $site_option = false ) {
|
||||
$raw = $site_option ? get_site_option( $option_name ) : get_option( $option_name );
|
||||
if ( false === $raw ) {
|
||||
return array();
|
||||
}
|
||||
|
||||
return $this->convert_plugins_to_paths( $raw );
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks for plugins in the `action` request parameter.
|
||||
*
|
||||
* @param string[] $allowed_actions The actions that we're allowed to return plugins for.
|
||||
*
|
||||
* @return array $plugin_paths The list of absolute paths we've found.
|
||||
*/
|
||||
public function find_using_request_action( $allowed_actions ) {
|
||||
/**
|
||||
* Note: we're not actually checking the nonce here because it's too early
|
||||
* in the execution. The pluggable functions are not yet loaded to give
|
||||
* plugins a chance to plug their versions. Therefore we're doing the bare
|
||||
* minimum: checking whether the nonce exists and it's in the right place.
|
||||
* The request will fail later if the nonce doesn't pass the check.
|
||||
*/
|
||||
if ( empty( $_REQUEST['_wpnonce'] ) ) {
|
||||
return array();
|
||||
}
|
||||
|
||||
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Validated just below.
|
||||
$action = isset( $_REQUEST['action'] ) ? wp_unslash( $_REQUEST['action'] ) : false;
|
||||
if ( ! in_array( $action, $allowed_actions, true ) ) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$plugin_slugs = array();
|
||||
switch ( $action ) {
|
||||
case 'activate':
|
||||
case 'deactivate':
|
||||
if ( empty( $_REQUEST['plugin'] ) ) {
|
||||
break;
|
||||
}
|
||||
|
||||
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Validated by convert_plugins_to_paths.
|
||||
$plugin_slugs[] = wp_unslash( $_REQUEST['plugin'] );
|
||||
break;
|
||||
|
||||
case 'activate-selected':
|
||||
case 'deactivate-selected':
|
||||
if ( empty( $_REQUEST['checked'] ) ) {
|
||||
break;
|
||||
}
|
||||
|
||||
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Validated by convert_plugins_to_paths.
|
||||
$plugin_slugs = wp_unslash( $_REQUEST['checked'] );
|
||||
break;
|
||||
}
|
||||
|
||||
return $this->convert_plugins_to_paths( $plugin_slugs );
|
||||
}
|
||||
|
||||
/**
|
||||
* Given an array of plugin slugs or paths, this will convert them to absolute paths and filter
|
||||
* out the plugins that are not directory plugins. Note that array keys will also be included
|
||||
* if they are plugin paths!
|
||||
*
|
||||
* @param string[] $plugins Plugin paths or slugs to filter.
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
private function convert_plugins_to_paths( $plugins ) {
|
||||
if ( ! is_array( $plugins ) || empty( $plugins ) ) {
|
||||
return array();
|
||||
}
|
||||
|
||||
// We're going to look for plugins in the standard directories.
|
||||
$path_constants = array( WP_PLUGIN_DIR, WPMU_PLUGIN_DIR );
|
||||
|
||||
$plugin_paths = array();
|
||||
foreach ( $plugins as $key => $value ) {
|
||||
$path = $this->path_processor->find_directory_with_autoloader( $key, $path_constants );
|
||||
if ( $path ) {
|
||||
$plugin_paths[] = $path;
|
||||
}
|
||||
|
||||
$path = $this->path_processor->find_directory_with_autoloader( $value, $path_constants );
|
||||
if ( $path ) {
|
||||
$plugin_paths[] = $path;
|
||||
}
|
||||
}
|
||||
|
||||
return $plugin_paths;
|
||||
}
|
||||
}
|
||||
+164
@@ -0,0 +1,164 @@
|
||||
<?php
|
||||
/**
|
||||
* This file was automatically generated by automattic/jetpack-autoloader.
|
||||
*
|
||||
* @package automattic/jetpack-autoloader
|
||||
*/
|
||||
|
||||
namespace Automattic\Jetpack\Autoloader\jpb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ4_6_3\al5_0_20;
|
||||
|
||||
// phpcs:ignore
|
||||
|
||||
/**
|
||||
* This class handles locating and caching all of the active plugins.
|
||||
*/
|
||||
class Plugins_Handler {
|
||||
/**
|
||||
* The transient key for plugin paths.
|
||||
*/
|
||||
const TRANSIENT_KEY = 'jetpack_autoloader_plugin_paths';
|
||||
|
||||
/**
|
||||
* The locator for finding plugins in different locations.
|
||||
*
|
||||
* @var Plugin_Locator
|
||||
*/
|
||||
private $plugin_locator;
|
||||
|
||||
/**
|
||||
* The processor for transforming cached paths.
|
||||
*
|
||||
* @var Path_Processor
|
||||
*/
|
||||
private $path_processor;
|
||||
|
||||
/**
|
||||
* The constructor.
|
||||
*
|
||||
* @param Plugin_Locator $plugin_locator The locator for finding active plugins.
|
||||
* @param Path_Processor $path_processor The processor for transforming cached paths.
|
||||
*/
|
||||
public function __construct( $plugin_locator, $path_processor ) {
|
||||
$this->plugin_locator = $plugin_locator;
|
||||
$this->path_processor = $path_processor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all of the active plugins we can find.
|
||||
*
|
||||
* @param bool $include_deactivating When true, plugins deactivating this request will be considered active.
|
||||
* @param bool $record_unknown When true, the current plugin will be marked as active and recorded when unknown.
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function get_active_plugins( $include_deactivating, $record_unknown ) {
|
||||
global $jetpack_autoloader_activating_plugins_paths;
|
||||
|
||||
// We're going to build a unique list of plugins from a few different sources
|
||||
// to find all of our "active" plugins. While we need to return an integer
|
||||
// array, we're going to use an associative array internally to reduce
|
||||
// the amount of time that we're going to spend checking uniqueness
|
||||
// and merging different arrays together to form the output.
|
||||
$active_plugins = array();
|
||||
|
||||
// Make sure that plugins which have activated this request are considered as "active" even though
|
||||
// they probably won't be present in any option.
|
||||
if ( is_array( $jetpack_autoloader_activating_plugins_paths ) ) {
|
||||
foreach ( $jetpack_autoloader_activating_plugins_paths as $path ) {
|
||||
$active_plugins[ $path ] = $path;
|
||||
}
|
||||
}
|
||||
|
||||
// This option contains all of the plugins that have been activated.
|
||||
$plugins = $this->plugin_locator->find_using_option( 'active_plugins' );
|
||||
foreach ( $plugins as $path ) {
|
||||
$active_plugins[ $path ] = $path;
|
||||
}
|
||||
|
||||
// This option contains all of the multisite plugins that have been activated.
|
||||
if ( is_multisite() ) {
|
||||
$plugins = $this->plugin_locator->find_using_option( 'active_sitewide_plugins', true );
|
||||
foreach ( $plugins as $path ) {
|
||||
$active_plugins[ $path ] = $path;
|
||||
}
|
||||
}
|
||||
|
||||
// These actions contain plugins that are being activated/deactivated during this request.
|
||||
$plugins = $this->plugin_locator->find_using_request_action( array( 'activate', 'activate-selected', 'deactivate', 'deactivate-selected' ) );
|
||||
foreach ( $plugins as $path ) {
|
||||
$active_plugins[ $path ] = $path;
|
||||
}
|
||||
|
||||
// When the current plugin isn't considered "active" there's a problem.
|
||||
// Since we're here, the plugin is active and currently being loaded.
|
||||
// We can support this case (mu-plugins and non-standard activation)
|
||||
// by adding the current plugin to the active list and marking it
|
||||
// as an unknown (activating) plugin. This also has the benefit
|
||||
// of causing a reset because the active plugins list has
|
||||
// been changed since it was saved in the global.
|
||||
$current_plugin = $this->plugin_locator->find_current_plugin();
|
||||
if ( $record_unknown && ! in_array( $current_plugin, $active_plugins, true ) ) {
|
||||
$active_plugins[ $current_plugin ] = $current_plugin;
|
||||
$jetpack_autoloader_activating_plugins_paths[] = $current_plugin;
|
||||
}
|
||||
|
||||
// When deactivating plugins aren't desired we should entirely remove them from the active list.
|
||||
if ( ! $include_deactivating ) {
|
||||
// These actions contain plugins that are being deactivated during this request.
|
||||
$plugins = $this->plugin_locator->find_using_request_action( array( 'deactivate', 'deactivate-selected' ) );
|
||||
foreach ( $plugins as $path ) {
|
||||
unset( $active_plugins[ $path ] );
|
||||
}
|
||||
}
|
||||
|
||||
// Transform the array so that we don't have to worry about the keys interacting with other array types later.
|
||||
return array_values( $active_plugins );
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all of the cached plugins if there are any.
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function get_cached_plugins() {
|
||||
$cached = get_transient( self::TRANSIENT_KEY );
|
||||
if ( ! is_array( $cached ) || empty( $cached ) ) {
|
||||
return array();
|
||||
}
|
||||
|
||||
// We need to expand the tokens to an absolute path for this webserver.
|
||||
return array_map( array( $this->path_processor, 'untokenize_path_constants' ), $cached );
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the plugin list to the cache.
|
||||
*
|
||||
* @param array $plugins The plugin list to save to the cache.
|
||||
*/
|
||||
public function cache_plugins( $plugins ) {
|
||||
// We store the paths in a tokenized form so that that webservers with different absolute paths don't break.
|
||||
$plugins = array_map( array( $this->path_processor, 'tokenize_path_constants' ), $plugins );
|
||||
|
||||
set_transient( self::TRANSIENT_KEY, $plugins );
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks to see whether or not the plugin list given has changed when compared to the
|
||||
* shared `$jetpack_autoloader_cached_plugin_paths` global. This allows us to deal
|
||||
* with cases where the active list may change due to filtering..
|
||||
*
|
||||
* @param string[] $plugins The plugins list to check against the global cache.
|
||||
*
|
||||
* @return bool True if the plugins have changed, otherwise false.
|
||||
*/
|
||||
public function have_plugins_changed( $plugins ) {
|
||||
global $jetpack_autoloader_cached_plugin_paths;
|
||||
|
||||
if ( $jetpack_autoloader_cached_plugin_paths !== $plugins ) {
|
||||
$jetpack_autoloader_cached_plugin_paths = $plugins;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
/**
|
||||
* This file was automatically generated by automattic/jetpack-autoloader.
|
||||
*
|
||||
* @package automattic/jetpack-autoloader
|
||||
*/
|
||||
|
||||
namespace Automattic\Jetpack\Autoloader\jpb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ4_6_3\al5_0_20;
|
||||
|
||||
// phpcs:ignore
|
||||
|
||||
/**
|
||||
* This class handles the shutdown of the autoloader.
|
||||
*/
|
||||
class Shutdown_Handler {
|
||||
|
||||
/**
|
||||
* The Plugins_Handler instance.
|
||||
*
|
||||
* @var Plugins_Handler
|
||||
*/
|
||||
private $plugins_handler;
|
||||
|
||||
/**
|
||||
* The plugins cached by this autoloader.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
private $cached_plugins;
|
||||
|
||||
/**
|
||||
* Indicates whether or not this autoloader was included by another.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
private $was_included_by_autoloader;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Plugins_Handler $plugins_handler The Plugins_Handler instance to use.
|
||||
* @param string[] $cached_plugins The plugins cached by the autoloaer.
|
||||
* @param bool $was_included_by_autoloader Indicates whether or not the autoloader was included by another.
|
||||
*/
|
||||
public function __construct( $plugins_handler, $cached_plugins, $was_included_by_autoloader ) {
|
||||
$this->plugins_handler = $plugins_handler;
|
||||
$this->cached_plugins = $cached_plugins;
|
||||
$this->was_included_by_autoloader = $was_included_by_autoloader;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the shutdown of the autoloader.
|
||||
*/
|
||||
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 );
|
||||
}
|
||||
}
|
||||
+184
@@ -0,0 +1,184 @@
|
||||
<?php
|
||||
/**
|
||||
* This file was automatically generated by automattic/jetpack-autoloader.
|
||||
*
|
||||
* @package automattic/jetpack-autoloader
|
||||
*/
|
||||
|
||||
namespace Automattic\Jetpack\Autoloader\jpb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ4_6_3\al5_0_20;
|
||||
|
||||
// phpcs:ignore
|
||||
|
||||
/**
|
||||
* This class loads other classes based on given parameters.
|
||||
*/
|
||||
class Version_Loader {
|
||||
|
||||
/**
|
||||
* The Version_Selector object.
|
||||
*
|
||||
* @var Version_Selector
|
||||
*/
|
||||
private $version_selector;
|
||||
|
||||
/**
|
||||
* A map of available classes and their version and file path.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $classmap;
|
||||
|
||||
/**
|
||||
* A map of PSR-4 namespaces and their version and directory path.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $psr4_map;
|
||||
|
||||
/**
|
||||
* A map of all the files that we should load.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $filemap;
|
||||
|
||||
/**
|
||||
* The constructor.
|
||||
*
|
||||
* @param Version_Selector $version_selector The Version_Selector object.
|
||||
* @param array $classmap The verioned classmap to load using.
|
||||
* @param array $psr4_map The versioned PSR-4 map to load using.
|
||||
* @param array $filemap The versioned filemap to load.
|
||||
*/
|
||||
public function __construct( $version_selector, $classmap, $psr4_map, $filemap ) {
|
||||
$this->version_selector = $version_selector;
|
||||
$this->classmap = $classmap;
|
||||
$this->psr4_map = $psr4_map;
|
||||
$this->filemap = $filemap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch the classmap.
|
||||
*
|
||||
* @since 3.1.0
|
||||
* @return array<string, array>
|
||||
*/
|
||||
public function get_class_map() {
|
||||
return $this->classmap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch the psr-4 mappings.
|
||||
*
|
||||
* @since 3.1.0
|
||||
* @return array<string, array>
|
||||
*/
|
||||
public function get_psr4_map() {
|
||||
return $this->psr4_map;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the file path for the given class.
|
||||
*
|
||||
* @param string $class_name The class to find.
|
||||
*
|
||||
* @return string|null $file_path The path to the file if found, null if no class was found.
|
||||
*/
|
||||
public function find_class_file( $class_name ) {
|
||||
$data = $this->select_newest_file(
|
||||
$this->classmap[ $class_name ] ?? null,
|
||||
$this->find_psr4_file( $class_name )
|
||||
);
|
||||
if ( ! isset( $data ) ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $data['path'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Load all of the files in the filemap.
|
||||
*/
|
||||
public function load_filemap() {
|
||||
if ( empty( $this->filemap ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ( $this->filemap as $file_identifier => $file_data ) {
|
||||
if ( empty( $GLOBALS['__composer_autoload_files'][ $file_identifier ] ) ) {
|
||||
require_once $file_data['path'];
|
||||
|
||||
$GLOBALS['__composer_autoload_files'][ $file_identifier ] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares different class sources and returns the newest.
|
||||
*
|
||||
* @param array|null $classmap_data The classmap class data.
|
||||
* @param array|null $psr4_data The PSR-4 class data.
|
||||
*
|
||||
* @return array|null $data
|
||||
*/
|
||||
private function select_newest_file( $classmap_data, $psr4_data ) {
|
||||
if ( ! isset( $classmap_data ) ) {
|
||||
return $psr4_data;
|
||||
} elseif ( ! isset( $psr4_data ) ) {
|
||||
return $classmap_data;
|
||||
}
|
||||
|
||||
if ( $this->version_selector->is_version_update_required( $classmap_data['version'], $psr4_data['version'] ) ) {
|
||||
return $psr4_data;
|
||||
}
|
||||
|
||||
return $classmap_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the file for a given class in a PSR-4 namespace.
|
||||
*
|
||||
* @param string $class_name The class to find.
|
||||
*
|
||||
* @return array|null $data The version and path path to the file if found, null otherwise.
|
||||
*/
|
||||
private function find_psr4_file( $class_name ) {
|
||||
if ( empty( $this->psr4_map ) ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Don't bother with classes that have no namespace.
|
||||
$class_index = strrpos( $class_name, '\\' );
|
||||
if ( ! $class_index ) {
|
||||
return null;
|
||||
}
|
||||
$class_for_path = str_replace( '\\', '/', $class_name );
|
||||
|
||||
// Search for the namespace by iteratively cutting off the last segment until
|
||||
// we find a match. This allows us to check the most-specific namespaces
|
||||
// first as well as minimize the amount of time spent looking.
|
||||
for (
|
||||
$class_namespace = substr( $class_name, 0, $class_index );
|
||||
! empty( $class_namespace );
|
||||
$class_namespace = substr( $class_namespace, 0, strrpos( $class_namespace, '\\' ) )
|
||||
) {
|
||||
$namespace = $class_namespace . '\\';
|
||||
if ( ! isset( $this->psr4_map[ $namespace ] ) ) {
|
||||
continue;
|
||||
}
|
||||
$data = $this->psr4_map[ $namespace ];
|
||||
|
||||
foreach ( $data['path'] as $path ) {
|
||||
$path .= '/' . substr( $class_for_path, strlen( $namespace ) ) . '.php';
|
||||
if ( file_exists( $path ) ) {
|
||||
return array(
|
||||
'version' => $data['version'],
|
||||
'path' => $path,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/**
|
||||
* This file was automatically generated by automattic/jetpack-autoloader.
|
||||
*
|
||||
* @package automattic/jetpack-autoloader
|
||||
*/
|
||||
|
||||
namespace Automattic\Jetpack\Autoloader\jpb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ4_6_3\al5_0_20;
|
||||
|
||||
// phpcs:ignore
|
||||
|
||||
/**
|
||||
* Used to select package versions.
|
||||
*/
|
||||
class Version_Selector {
|
||||
|
||||
/**
|
||||
* Checks whether the selected package version should be updated. Composer development
|
||||
* package versions ('9999999-dev' or versions that start with 'dev-') are favored
|
||||
* when the JETPACK_AUTOLOAD_DEV constant is set to true.
|
||||
*
|
||||
* @param String $selected_version The currently selected package version.
|
||||
* @param String $compare_version The package version that is being evaluated to
|
||||
* determine if the version needs to be updated.
|
||||
*
|
||||
* @return bool Returns true if the selected package version should be updated,
|
||||
* else false.
|
||||
*/
|
||||
public function is_version_update_required( $selected_version, $compare_version ) {
|
||||
$use_dev_versions = defined( 'JETPACK_AUTOLOAD_DEV' ) && JETPACK_AUTOLOAD_DEV;
|
||||
|
||||
if ( $selected_version === null ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( $use_dev_versions && $this->is_dev_version( $selected_version ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( $this->is_dev_version( $compare_version ) ) {
|
||||
if ( $use_dev_versions ) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if ( version_compare( $selected_version, $compare_version, '<' ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the given package version is a development version.
|
||||
*
|
||||
* @param String $version The package version.
|
||||
*
|
||||
* @return bool True if the version is a dev version, else false.
|
||||
*/
|
||||
public function is_dev_version( $version ) {
|
||||
if ( 'dev-' === substr( $version, 0, 4 ) || '9999999-dev' === $version ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
Copyright (c) 2012 Matthias Mullie
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
use MatthiasMullie\Minify;
|
||||
|
||||
// command line utility to minify CSS
|
||||
if (file_exists(__DIR__ . '/../../../autoload.php')) {
|
||||
// if composer install
|
||||
require_once __DIR__ . '/../../../autoload.php';
|
||||
} else {
|
||||
require_once __DIR__ . '/../src/Minify.php';
|
||||
require_once __DIR__ . '/../src/CSS.php';
|
||||
require_once __DIR__ . '/../src/Exception.php';
|
||||
}
|
||||
|
||||
error_reporting(E_ALL);
|
||||
// check PHP setup for cli arguments
|
||||
if (!isset($_SERVER['argv']) && !isset($argv)) {
|
||||
fwrite(STDERR, 'Please enable the "register_argc_argv" directive in your php.ini' . PHP_EOL);
|
||||
exit(1);
|
||||
} elseif (!isset($argv)) {
|
||||
$argv = $_SERVER['argv'];
|
||||
}
|
||||
// check if path to file given
|
||||
if (!isset($argv[1])) {
|
||||
fwrite(STDERR, 'Argument expected: path to file' . PHP_EOL);
|
||||
exit(1);
|
||||
}
|
||||
// check if script run in cli environment
|
||||
if ('cli' !== php_sapi_name()) {
|
||||
fwrite(STDERR, $argv[1] . ' must be run in the command line' . PHP_EOL);
|
||||
exit(1);
|
||||
}
|
||||
// check if source file exists
|
||||
if (!file_exists($argv[1])) {
|
||||
fwrite(STDERR, 'Source file "' . $argv[1] . '" not found' . PHP_EOL);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
try {
|
||||
$minifier = new Minify\CSS($argv[1]);
|
||||
echo $minifier->minify();
|
||||
} catch (Exception $e) {
|
||||
fwrite(STDERR, $e->getMessage(), PHP_EOL);
|
||||
exit(1);
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
use MatthiasMullie\Minify;
|
||||
|
||||
// command line utility to minify JS
|
||||
if (file_exists(__DIR__ . '/../../../autoload.php')) {
|
||||
// if composer install
|
||||
require_once __DIR__ . '/../../../autoload.php';
|
||||
} else {
|
||||
require_once __DIR__ . '/../src/Minify.php';
|
||||
require_once __DIR__ . '/../src/JS.php';
|
||||
require_once __DIR__ . '/../src/Exception.php';
|
||||
}
|
||||
|
||||
error_reporting(E_ALL);
|
||||
// check PHP setup for cli arguments
|
||||
if (!isset($_SERVER['argv']) && !isset($argv)) {
|
||||
fwrite(STDERR, 'Please enable the "register_argc_argv" directive in your php.ini' . PHP_EOL);
|
||||
exit(1);
|
||||
} elseif (!isset($argv)) {
|
||||
$argv = $_SERVER['argv'];
|
||||
}
|
||||
// check if path to file given
|
||||
if (!isset($argv[1])) {
|
||||
fwrite(STDERR, 'Argument expected: path to file' . PHP_EOL);
|
||||
exit(1);
|
||||
}
|
||||
// check if script run in cli environment
|
||||
if ('cli' !== php_sapi_name()) {
|
||||
fwrite(STDERR, $argv[1] . ' must be run in the command line' . PHP_EOL);
|
||||
exit(1);
|
||||
}
|
||||
// check if source file exists
|
||||
if (!file_exists($argv[1])) {
|
||||
fwrite(STDERR, 'Source file "' . $argv[1] . '" not found' . PHP_EOL);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
try {
|
||||
$minifier = new Minify\JS($argv[1]);
|
||||
echo $minifier->minify();
|
||||
} catch (Exception $e) {
|
||||
fwrite(STDERR, $e->getMessage(), PHP_EOL);
|
||||
exit(1);
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "matthiasmullie/minify",
|
||||
"type": "library",
|
||||
"description": "CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.",
|
||||
"keywords": ["minify", "minifier", "css", "js", "javascript"],
|
||||
"homepage": "https://github.com/matthiasmullie/minify",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Matthias Mullie",
|
||||
"homepage": "https://www.mullie.eu",
|
||||
"email": "minify@mullie.eu",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.3.0",
|
||||
"ext-pcre": "*",
|
||||
"matthiasmullie/path-converter": "~1.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": ">=2.0",
|
||||
"matthiasmullie/scrapbook": ">=1.3",
|
||||
"phpunit/phpunit": ">=4.8"
|
||||
},
|
||||
"suggest": {
|
||||
"psr/cache-implementation": "Cache implementation to use with Minify::cache"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"MatthiasMullie\\Minify\\": "src/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"MatthiasMullie\\Minify\\Tests\\": "tests/"
|
||||
}
|
||||
},
|
||||
"bin": [
|
||||
"bin/minifycss",
|
||||
"bin/minifyjs"
|
||||
]
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
in
|
||||
public
|
||||
extends
|
||||
private
|
||||
protected
|
||||
implements
|
||||
instanceof
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
do
|
||||
in
|
||||
let
|
||||
new
|
||||
var
|
||||
case
|
||||
else
|
||||
enum
|
||||
void
|
||||
with
|
||||
class
|
||||
const
|
||||
yield
|
||||
delete
|
||||
export
|
||||
import
|
||||
public
|
||||
static
|
||||
typeof
|
||||
extends
|
||||
package
|
||||
private
|
||||
function
|
||||
protected
|
||||
implements
|
||||
instanceof
|
||||
Vendored
+63
@@ -0,0 +1,63 @@
|
||||
do
|
||||
if
|
||||
in
|
||||
for
|
||||
let
|
||||
new
|
||||
try
|
||||
var
|
||||
case
|
||||
else
|
||||
enum
|
||||
eval
|
||||
null
|
||||
this
|
||||
true
|
||||
void
|
||||
with
|
||||
break
|
||||
catch
|
||||
class
|
||||
const
|
||||
false
|
||||
super
|
||||
throw
|
||||
while
|
||||
yield
|
||||
delete
|
||||
export
|
||||
import
|
||||
public
|
||||
return
|
||||
static
|
||||
switch
|
||||
typeof
|
||||
default
|
||||
extends
|
||||
finally
|
||||
package
|
||||
private
|
||||
continue
|
||||
debugger
|
||||
function
|
||||
arguments
|
||||
interface
|
||||
protected
|
||||
implements
|
||||
instanceof
|
||||
abstract
|
||||
boolean
|
||||
byte
|
||||
char
|
||||
double
|
||||
final
|
||||
float
|
||||
goto
|
||||
int
|
||||
long
|
||||
native
|
||||
short
|
||||
synchronized
|
||||
throws
|
||||
transient
|
||||
volatile
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
+
|
||||
-
|
||||
*
|
||||
/
|
||||
%
|
||||
=
|
||||
+=
|
||||
-=
|
||||
*=
|
||||
/=
|
||||
%=
|
||||
<<=
|
||||
>>=
|
||||
>>>=
|
||||
&=
|
||||
^=
|
||||
|=
|
||||
&
|
||||
|
|
||||
^
|
||||
~
|
||||
<<
|
||||
>>
|
||||
>>>
|
||||
==
|
||||
===
|
||||
!=
|
||||
!==
|
||||
>
|
||||
<
|
||||
>=
|
||||
<=
|
||||
&&
|
||||
||
|
||||
!
|
||||
.
|
||||
[
|
||||
]
|
||||
?
|
||||
:
|
||||
,
|
||||
;
|
||||
(
|
||||
)
|
||||
{
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
+
|
||||
-
|
||||
*
|
||||
/
|
||||
%
|
||||
=
|
||||
+=
|
||||
-=
|
||||
*=
|
||||
/=
|
||||
%=
|
||||
<<=
|
||||
>>=
|
||||
>>>=
|
||||
&=
|
||||
^=
|
||||
|=
|
||||
&
|
||||
|
|
||||
^
|
||||
<<
|
||||
>>
|
||||
>>>
|
||||
==
|
||||
===
|
||||
!=
|
||||
!==
|
||||
>
|
||||
<
|
||||
>=
|
||||
<=
|
||||
&&
|
||||
||
|
||||
.
|
||||
[
|
||||
]
|
||||
?
|
||||
:
|
||||
,
|
||||
;
|
||||
(
|
||||
)
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
+
|
||||
-
|
||||
*
|
||||
/
|
||||
%
|
||||
=
|
||||
+=
|
||||
-=
|
||||
*=
|
||||
/=
|
||||
%=
|
||||
<<=
|
||||
>>=
|
||||
>>>=
|
||||
&=
|
||||
^=
|
||||
|=
|
||||
&
|
||||
|
|
||||
^
|
||||
~
|
||||
<<
|
||||
>>
|
||||
>>>
|
||||
==
|
||||
===
|
||||
!=
|
||||
!==
|
||||
>
|
||||
<
|
||||
>=
|
||||
<=
|
||||
&&
|
||||
||
|
||||
!
|
||||
.
|
||||
[
|
||||
?
|
||||
:
|
||||
,
|
||||
;
|
||||
(
|
||||
{
|
||||
@@ -0,0 +1,897 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* CSS Minifier.
|
||||
*
|
||||
* Please report bugs on https://github.com/matthiasmullie/minify/issues
|
||||
*
|
||||
* @author Matthias Mullie <minify@mullie.eu>
|
||||
* @copyright Copyright (c) 2012, Matthias Mullie. All rights reserved
|
||||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace MatthiasMullie\Minify;
|
||||
|
||||
use MatthiasMullie\Minify\Exceptions\FileImportException;
|
||||
use MatthiasMullie\Minify\Exceptions\PatternMatchException;
|
||||
use MatthiasMullie\PathConverter\Converter;
|
||||
use MatthiasMullie\PathConverter\ConverterInterface;
|
||||
|
||||
/**
|
||||
* CSS minifier.
|
||||
*
|
||||
* Please report bugs on https://github.com/matthiasmullie/minify/issues
|
||||
*
|
||||
* @author Matthias Mullie <minify@mullie.eu>
|
||||
* @author Tijs Verkoyen <minify@verkoyen.eu>
|
||||
* @copyright Copyright (c) 2012, Matthias Mullie. All rights reserved
|
||||
* @license MIT License
|
||||
*/
|
||||
class CSS extends Minify
|
||||
{
|
||||
/**
|
||||
* @var int maximum inport size in kB
|
||||
*/
|
||||
protected $maxImportSize = 5;
|
||||
|
||||
/**
|
||||
* @var string[] valid import extensions
|
||||
*/
|
||||
protected $importExtensions = array(
|
||||
'gif' => 'data:image/gif',
|
||||
'png' => 'data:image/png',
|
||||
'jpe' => 'data:image/jpeg',
|
||||
'jpg' => 'data:image/jpeg',
|
||||
'jpeg' => 'data:image/jpeg',
|
||||
'svg' => 'data:image/svg+xml',
|
||||
'woff' => 'data:application/x-font-woff',
|
||||
'woff2' => 'data:application/x-font-woff2',
|
||||
'avif' => 'data:image/avif',
|
||||
'apng' => 'data:image/apng',
|
||||
'webp' => 'data:image/webp',
|
||||
'tif' => 'image/tiff',
|
||||
'tiff' => 'image/tiff',
|
||||
'xbm' => 'image/x-xbitmap',
|
||||
);
|
||||
|
||||
/**
|
||||
* Set the maximum size if files to be imported.
|
||||
*
|
||||
* Files larger than this size (in kB) will not be imported into the CSS.
|
||||
* Importing files into the CSS as data-uri will save you some connections,
|
||||
* but we should only import relatively small decorative images so that our
|
||||
* CSS file doesn't get too bulky.
|
||||
*
|
||||
* @param int $size Size in kB
|
||||
*/
|
||||
public function setMaxImportSize($size)
|
||||
{
|
||||
$this->maxImportSize = $size;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the type of extensions to be imported into the CSS (to save network
|
||||
* connections).
|
||||
* Keys of the array should be the file extensions & respective values
|
||||
* should be the data type.
|
||||
*
|
||||
* @param string[] $extensions Array of file extensions
|
||||
*/
|
||||
public function setImportExtensions(array $extensions)
|
||||
{
|
||||
$this->importExtensions = $extensions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Move any import statements to the top.
|
||||
*
|
||||
* @param string $content Nearly finished CSS content
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function moveImportsToTop($content)
|
||||
{
|
||||
if (preg_match_all('/(;?)(@import (?<url>url\()?(?P<quotes>["\']?).+?(?P=quotes)(?(url)\)));?/', $content, $matches)) {
|
||||
// remove from content
|
||||
foreach ($matches[0] as $import) {
|
||||
$content = str_replace($import, '', $content);
|
||||
}
|
||||
|
||||
// add to top
|
||||
$content = implode(';', $matches[2]) . ';' . trim($content, ';');
|
||||
}
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Combine CSS from import statements.
|
||||
*
|
||||
* \@import's will be loaded and their content merged into the original file,
|
||||
* to save HTTP requests.
|
||||
*
|
||||
* @param string $source The file to combine imports for
|
||||
* @param string $content The CSS content to combine imports for
|
||||
* @param string[] $parents Parent paths, for circular reference checks
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @throws FileImportException
|
||||
*/
|
||||
protected function combineImports($source, $content, $parents)
|
||||
{
|
||||
$importRegexes = array(
|
||||
// @import url(xxx)
|
||||
'/
|
||||
# import statement
|
||||
@import
|
||||
|
||||
# whitespace
|
||||
\s+
|
||||
|
||||
# open url()
|
||||
url\(
|
||||
|
||||
# (optional) open path enclosure
|
||||
(?P<quotes>["\']?)
|
||||
|
||||
# fetch path
|
||||
(?P<path>.+?)
|
||||
|
||||
# (optional) close path enclosure
|
||||
(?P=quotes)
|
||||
|
||||
# close url()
|
||||
\)
|
||||
|
||||
# (optional) trailing whitespace
|
||||
\s*
|
||||
|
||||
# (optional) media statement(s)
|
||||
(?P<media>[^;]*)
|
||||
|
||||
# (optional) trailing whitespace
|
||||
\s*
|
||||
|
||||
# (optional) closing semi-colon
|
||||
;?
|
||||
|
||||
/ix',
|
||||
|
||||
// @import 'xxx'
|
||||
'/
|
||||
|
||||
# import statement
|
||||
@import
|
||||
|
||||
# whitespace
|
||||
\s+
|
||||
|
||||
# open path enclosure
|
||||
(?P<quotes>["\'])
|
||||
|
||||
# fetch path
|
||||
(?P<path>.+?)
|
||||
|
||||
# close path enclosure
|
||||
(?P=quotes)
|
||||
|
||||
# (optional) trailing whitespace
|
||||
\s*
|
||||
|
||||
# (optional) media statement(s)
|
||||
(?P<media>[^;]*)
|
||||
|
||||
# (optional) trailing whitespace
|
||||
\s*
|
||||
|
||||
# (optional) closing semi-colon
|
||||
;?
|
||||
|
||||
/ix',
|
||||
);
|
||||
|
||||
// find all relative imports in css
|
||||
$matches = array();
|
||||
foreach ($importRegexes as $importRegex) {
|
||||
if (preg_match_all($importRegex, $content, $regexMatches, PREG_SET_ORDER)) {
|
||||
$matches = array_merge($matches, $regexMatches);
|
||||
}
|
||||
}
|
||||
|
||||
$search = array();
|
||||
$replace = array();
|
||||
|
||||
// loop the matches
|
||||
foreach ($matches as $match) {
|
||||
// get the path for the file that will be imported
|
||||
$importPath = dirname($source) . '/' . $match['path'];
|
||||
|
||||
// only replace the import with the content if we can grab the
|
||||
// content of the file
|
||||
if (!$this->canImportByPath($match['path']) || !$this->canImportFile($importPath)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// check if current file was not imported previously in the same
|
||||
// import chain.
|
||||
if (in_array($importPath, $parents)) {
|
||||
throw new FileImportException('Failed to import file "' . $importPath . '": circular reference detected.');
|
||||
}
|
||||
|
||||
// grab referenced file & minify it (which may include importing
|
||||
// yet other @import statements recursively)
|
||||
$minifier = new self($importPath);
|
||||
$minifier->setMaxImportSize($this->maxImportSize);
|
||||
$minifier->setImportExtensions($this->importExtensions);
|
||||
$importContent = $minifier->execute($source, $parents);
|
||||
|
||||
// check if this is only valid for certain media
|
||||
if (!empty($match['media'])) {
|
||||
$importContent = '@media ' . $match['media'] . '{' . $importContent . '}';
|
||||
}
|
||||
|
||||
// add to replacement array
|
||||
$search[] = $match[0];
|
||||
$replace[] = $importContent;
|
||||
}
|
||||
|
||||
// replace the import statements
|
||||
return str_replace($search, $replace, $content);
|
||||
}
|
||||
|
||||
/**
|
||||
* Import files into the CSS, base64-ized.
|
||||
*
|
||||
* @url(image.jpg) images will be loaded and their content merged into the
|
||||
* original file, to save HTTP requests.
|
||||
*
|
||||
* @param string $source The file to import files for
|
||||
* @param string $content The CSS content to import files for
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function importFiles($source, $content)
|
||||
{
|
||||
$regex = '/url\((["\']?)(.+?)\\1\)/i';
|
||||
if ($this->importExtensions && preg_match_all($regex, $content, $matches, PREG_SET_ORDER)) {
|
||||
$search = array();
|
||||
$replace = array();
|
||||
|
||||
// loop the matches
|
||||
foreach ($matches as $match) {
|
||||
$extension = substr(strrchr($match[2], '.'), 1);
|
||||
if ($extension && !array_key_exists($extension, $this->importExtensions)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// get the path for the file that will be imported
|
||||
$path = $match[2];
|
||||
$path = dirname($source) . '/' . $path;
|
||||
|
||||
// only replace the import with the content if we're able to get
|
||||
// the content of the file, and it's relatively small
|
||||
if ($this->canImportFile($path) && $this->canImportBySize($path)) {
|
||||
// grab content && base64-ize
|
||||
$importContent = $this->load($path);
|
||||
$importContent = base64_encode($importContent);
|
||||
|
||||
// build replacement
|
||||
$search[] = $match[0];
|
||||
$replace[] = 'url(' . $this->importExtensions[$extension] . ';base64,' . $importContent . ')';
|
||||
}
|
||||
}
|
||||
|
||||
// replace the import statements
|
||||
$content = str_replace($search, $replace, $content);
|
||||
}
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Minify the data.
|
||||
* Perform CSS optimizations.
|
||||
*
|
||||
* @param string[optional] $path Path to write the data to
|
||||
* @param string[] $parents Parent paths, for circular reference checks
|
||||
*
|
||||
* @return string The minified data
|
||||
*
|
||||
* @throws PatternMatchException
|
||||
*/
|
||||
public function execute($path = null, $parents = array())
|
||||
{
|
||||
$content = '';
|
||||
|
||||
// loop CSS data (raw data and files)
|
||||
foreach ($this->data as $source => $css) {
|
||||
/*
|
||||
* Let's first take out strings & comments, since we can't just
|
||||
* remove whitespace anywhere. If whitespace occurs inside a string,
|
||||
* we should leave it alone. E.g.:
|
||||
* p { content: "a test" }
|
||||
*/
|
||||
$this->extractStrings();
|
||||
$this->stripComments();
|
||||
$this->extractMath();
|
||||
$this->extractCustomProperties();
|
||||
$css = $this->replace($css);
|
||||
|
||||
$css = $this->stripWhitespace($css);
|
||||
$css = $this->convertLegacyColors($css);
|
||||
$css = $this->cleanupModernColors($css);
|
||||
$css = $this->shortenHEXColors($css);
|
||||
$css = $this->shortenZeroes($css);
|
||||
$css = $this->shortenFontWeights($css);
|
||||
$css = $this->stripEmptyTags($css);
|
||||
|
||||
// restore the string we've extracted earlier
|
||||
$css = $this->restoreExtractedData($css);
|
||||
|
||||
$source = is_int($source) ? '' : $source;
|
||||
$parents = $source ? array_merge($parents, array($source)) : $parents;
|
||||
$css = $this->combineImports($source, $css, $parents);
|
||||
$css = $this->importFiles($source, $css);
|
||||
|
||||
/*
|
||||
* If we'll save to a new path, we'll have to fix the relative paths
|
||||
* to be relative no longer to the source file, but to the new path.
|
||||
* If we don't write to a file, fall back to same path so no
|
||||
* conversion happens (because we still want it to go through most
|
||||
* of the move code, which also addresses url() & @import syntax...)
|
||||
*/
|
||||
$converter = $this->getPathConverter($source, $path ?: $source);
|
||||
$css = $this->move($converter, $css);
|
||||
|
||||
// combine css
|
||||
$content .= $css;
|
||||
}
|
||||
|
||||
$content = $this->moveImportsToTop($content);
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Moving a css file should update all relative urls.
|
||||
* Relative references (e.g. ../images/image.gif) in a certain css file,
|
||||
* will have to be updated when a file is being saved at another location
|
||||
* (e.g. ../../images/image.gif, if the new CSS file is 1 folder deeper).
|
||||
*
|
||||
* @param ConverterInterface $converter Relative path converter
|
||||
* @param string $content The CSS content to update relative urls for
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function move(ConverterInterface $converter, $content)
|
||||
{
|
||||
/*
|
||||
* Relative path references will usually be enclosed by url(). @import
|
||||
* is an exception, where url() is not necessary around the path (but is
|
||||
* allowed).
|
||||
* This *could* be 1 regular expression, where both regular expressions
|
||||
* in this array are on different sides of a |. But we're using named
|
||||
* patterns in both regexes, the same name on both regexes. This is only
|
||||
* possible with a (?J) modifier, but that only works after a fairly
|
||||
* recent PCRE version. That's why I'm doing 2 separate regular
|
||||
* expressions & combining the matches after executing of both.
|
||||
*/
|
||||
$relativeRegexes = array(
|
||||
// url(xxx)
|
||||
'/
|
||||
# open url()
|
||||
url\(
|
||||
|
||||
\s*
|
||||
|
||||
# open path enclosure
|
||||
(?P<quotes>["\'])?
|
||||
|
||||
# fetch path
|
||||
(?P<path>.+?)
|
||||
|
||||
# close path enclosure
|
||||
(?(quotes)(?P=quotes))
|
||||
|
||||
\s*
|
||||
|
||||
# close url()
|
||||
\)
|
||||
|
||||
/ix',
|
||||
|
||||
// @import "xxx"
|
||||
'/
|
||||
# import statement
|
||||
@import
|
||||
|
||||
# whitespace
|
||||
\s+
|
||||
|
||||
# we don\'t have to check for @import url(), because the
|
||||
# condition above will already catch these
|
||||
|
||||
# open path enclosure
|
||||
(?P<quotes>["\'])
|
||||
|
||||
# fetch path
|
||||
(?P<path>.+?)
|
||||
|
||||
# close path enclosure
|
||||
(?P=quotes)
|
||||
|
||||
/ix',
|
||||
);
|
||||
|
||||
// find all relative urls in css
|
||||
$matches = array();
|
||||
foreach ($relativeRegexes as $relativeRegex) {
|
||||
if (preg_match_all($relativeRegex, $content, $regexMatches, PREG_SET_ORDER)) {
|
||||
$matches = array_merge($matches, $regexMatches);
|
||||
}
|
||||
}
|
||||
|
||||
$search = array();
|
||||
$replace = array();
|
||||
|
||||
// loop all urls
|
||||
foreach ($matches as $match) {
|
||||
// determine if it's a url() or an @import match
|
||||
$type = (strpos($match[0], '@import') === 0 ? 'import' : 'url');
|
||||
|
||||
$url = $match['path'];
|
||||
if ($this->canImportByPath($url)) {
|
||||
// attempting to interpret GET-params makes no sense, so let's discard them for awhile
|
||||
$params = strrchr($url, '?');
|
||||
$url = $params ? substr($url, 0, -strlen($params)) : $url;
|
||||
|
||||
// fix relative url
|
||||
$url = $converter->convert($url);
|
||||
|
||||
// now that the path has been converted, re-apply GET-params
|
||||
$url .= $params;
|
||||
}
|
||||
|
||||
/*
|
||||
* Urls with control characters above 0x7e should be quoted.
|
||||
* According to Mozilla's parser, whitespace is only allowed at the
|
||||
* end of unquoted urls.
|
||||
* Urls with `)` (as could happen with data: uris) should also be
|
||||
* quoted to avoid being confused for the url() closing parentheses.
|
||||
* And urls with a # have also been reported to cause issues.
|
||||
* Urls with quotes inside should also remain escaped.
|
||||
*
|
||||
* @see https://developer.mozilla.org/nl/docs/Web/CSS/url#The_url()_functional_notation
|
||||
* @see https://hg.mozilla.org/mozilla-central/rev/14abca4e7378
|
||||
* @see https://github.com/matthiasmullie/minify/issues/193
|
||||
*/
|
||||
$url = trim($url);
|
||||
if (preg_match('/[\s\)\'"#\x{7f}-\x{9f}]/u', $url)) {
|
||||
$url = $match['quotes'] . $url . $match['quotes'];
|
||||
}
|
||||
|
||||
// build replacement
|
||||
$search[] = $match[0];
|
||||
if ($type === 'url') {
|
||||
$replace[] = 'url(' . $url . ')';
|
||||
} elseif ($type === 'import') {
|
||||
$replace[] = '@import "' . $url . '"';
|
||||
}
|
||||
}
|
||||
|
||||
// replace urls
|
||||
return str_replace($search, $replace, $content);
|
||||
}
|
||||
|
||||
/**
|
||||
* Shorthand HEX color codes.
|
||||
* #FF0000FF -> #f00 -> red
|
||||
* #FF00FF00 -> transparent.
|
||||
*
|
||||
* @param string $content The CSS content to shorten the HEX color codes for
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function shortenHexColors($content)
|
||||
{
|
||||
// shorten repeating patterns within HEX ..
|
||||
$content = preg_replace('/(?<=[: ])#([0-9a-f])\\1([0-9a-f])\\2([0-9a-f])\\3(?:([0-9a-f])\\4)?(?=[; }])/i', '#$1$2$3$4', $content);
|
||||
|
||||
// remove alpha channel if it's pointless ..
|
||||
$content = preg_replace('/(?<=[: ])#([0-9a-f]{6})ff(?=[; }])/i', '#$1', $content);
|
||||
$content = preg_replace('/(?<=[: ])#([0-9a-f]{3})f(?=[; }])/i', '#$1', $content);
|
||||
|
||||
// replace `transparent` with shortcut ..
|
||||
$content = preg_replace('/(?<=[: ])#[0-9a-f]{6}00(?=[; }])/i', '#fff0', $content);
|
||||
|
||||
$colors = array(
|
||||
// make these more readable
|
||||
'#00f' => 'blue',
|
||||
'#dc143c' => 'crimson',
|
||||
'#0ff' => 'cyan',
|
||||
'#8b0000' => 'darkred',
|
||||
'#696969' => 'dimgray',
|
||||
'#ff69b4' => 'hotpink',
|
||||
'#0f0' => 'lime',
|
||||
'#fdf5e6' => 'oldlace',
|
||||
'#87ceeb' => 'skyblue',
|
||||
'#d8bfd8' => 'thistle',
|
||||
// we can shorten some even more by replacing them with their color name
|
||||
'#f0ffff' => 'azure',
|
||||
'#f5f5dc' => 'beige',
|
||||
'#ffe4c4' => 'bisque',
|
||||
'#a52a2a' => 'brown',
|
||||
'#ff7f50' => 'coral',
|
||||
'#ffd700' => 'gold',
|
||||
'#808080' => 'gray',
|
||||
'#008000' => 'green',
|
||||
'#4b0082' => 'indigo',
|
||||
'#fffff0' => 'ivory',
|
||||
'#f0e68c' => 'khaki',
|
||||
'#faf0e6' => 'linen',
|
||||
'#800000' => 'maroon',
|
||||
'#000080' => 'navy',
|
||||
'#808000' => 'olive',
|
||||
'#ffa500' => 'orange',
|
||||
'#da70d6' => 'orchid',
|
||||
'#cd853f' => 'peru',
|
||||
'#ffc0cb' => 'pink',
|
||||
'#dda0dd' => 'plum',
|
||||
'#800080' => 'purple',
|
||||
'#f00' => 'red',
|
||||
'#fa8072' => 'salmon',
|
||||
'#a0522d' => 'sienna',
|
||||
'#c0c0c0' => 'silver',
|
||||
'#fffafa' => 'snow',
|
||||
'#d2b48c' => 'tan',
|
||||
'#008080' => 'teal',
|
||||
'#ff6347' => 'tomato',
|
||||
'#ee82ee' => 'violet',
|
||||
'#f5deb3' => 'wheat',
|
||||
// or the other way around
|
||||
'black' => '#000',
|
||||
'fuchsia' => '#f0f',
|
||||
'magenta' => '#f0f',
|
||||
'white' => '#fff',
|
||||
'yellow' => '#ff0',
|
||||
// and also `transparent`
|
||||
'transparent' => '#fff0',
|
||||
);
|
||||
|
||||
return preg_replace_callback(
|
||||
'/(?<=[: ])(' . implode('|', array_keys($colors)) . ')(?=[; }])/i',
|
||||
function ($match) use ($colors) {
|
||||
return $colors[strtolower($match[0])];
|
||||
},
|
||||
$content
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert RGB|HSL color codes.
|
||||
* rgb(255,0,0,.5) -> rgb(255 0 0 / .5).
|
||||
* rgb(255,0,0) -> #f00.
|
||||
*
|
||||
* @param string $content The CSS content to shorten the RGB color codes for
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function convertLegacyColors($content)
|
||||
{
|
||||
/*
|
||||
https://drafts.csswg.org/css-color/#color-syntax-legacy
|
||||
https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/rgb
|
||||
https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/hsl
|
||||
*/
|
||||
|
||||
// convert legacy color syntax
|
||||
$content = preg_replace('/(rgb)a?\(\s*([0-9]{1,3}%?)\s*,\s*([0-9]{1,3}%?)\s*,\s*([0-9]{1,3}%?)\s*,\s*([0,1]?(?:\.[0-9]*)?)\s*\)/i', '$1($2 $3 $4 / $5)', $content);
|
||||
$content = preg_replace('/(rgb)a?\(\s*([0-9]{1,3}%?)\s*,\s*([0-9]{1,3}%?)\s*,\s*([0-9]{1,3}%?)\s*\)/i', '$1($2 $3 $4)', $content);
|
||||
$content = preg_replace('/(hsl)a?\(\s*([0-9]+(?:deg|grad|rad|turn)?)\s*,\s*([0-9]{1,3}%)\s*,\s*([0-9]{1,3}%)\s*,\s*([0,1]?(?:\.[0-9]*)?)\s*\)/i', '$1($2 $3 $4 / $5)', $content);
|
||||
$content = preg_replace('/(hsl)a?\(\s*([0-9]+(?:deg|grad|rad|turn)?)\s*,\s*([0-9]{1,3}%)\s*,\s*([0-9]{1,3}%)\s*\)/i', '$1($2 $3 $4)', $content);
|
||||
|
||||
// convert `rgb` to `hex`
|
||||
$dec = '([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])';
|
||||
|
||||
return preg_replace_callback(
|
||||
"/rgb\($dec $dec $dec\)/i",
|
||||
function ($match) {
|
||||
return sprintf('#%02x%02x%02x', $match[1], $match[2], $match[3]);
|
||||
},
|
||||
$content
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cleanup RGB|HSL|HWB|LCH|LAB
|
||||
* rgb(255 0 0 / 1) -> rgb(255 0 0).
|
||||
* rgb(255 0 0 / 0) -> transparent.
|
||||
*
|
||||
* @param string $content The CSS content to cleanup HSL|HWB|LCH|LAB
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function cleanupModernColors($content)
|
||||
{
|
||||
/*
|
||||
https://drafts.csswg.org/css-color/#color-syntax-modern
|
||||
https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/hwb
|
||||
https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/lch
|
||||
https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/lab
|
||||
https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/oklch
|
||||
https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/oklab
|
||||
*/
|
||||
$tag = '(rgb|hsl|hwb|(?:(?:ok)?(?:lch|lab)))';
|
||||
|
||||
// remove alpha channel if it's pointless ..
|
||||
$content = preg_replace('/' . $tag . '\(\s*([^\s)]+)\s+([^\s)]+)\s+([^\s)]+)\s+\/\s+1(?:(?:\.\d?)*|00%)?\s*\)/i', '$1($2 $3 $4)', $content);
|
||||
|
||||
// replace `transparent` with shortcut ..
|
||||
$content = preg_replace('/' . $tag . '\(\s*[^\s)]+\s+[^\s)]+\s+[^\s)]+\s+\/\s+0(?:[\.0%]*)?\s*\)/i', '#fff0', $content);
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shorten CSS font weights.
|
||||
*
|
||||
* @param string $content The CSS content to shorten the font weights for
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function shortenFontWeights($content)
|
||||
{
|
||||
$weights = array(
|
||||
'normal' => 400,
|
||||
'bold' => 700,
|
||||
);
|
||||
|
||||
$callback = function ($match) use ($weights) {
|
||||
return $match[1] . $weights[$match[2]];
|
||||
};
|
||||
|
||||
return preg_replace_callback('/(font-weight\s*:\s*)(' . implode('|', array_keys($weights)) . ')(?=[;}])/', $callback, $content);
|
||||
}
|
||||
|
||||
/**
|
||||
* Shorthand 0 values to plain 0, instead of e.g. -0em.
|
||||
*
|
||||
* @param string $content The CSS content to shorten the zero values for
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function shortenZeroes($content)
|
||||
{
|
||||
// we don't want to strip units in `calc()` expressions:
|
||||
// `5px - 0px` is valid, but `5px - 0` is not
|
||||
// `10px * 0` is valid (equates to 0), and so is `10 * 0px`, but
|
||||
// `10 * 0` is invalid
|
||||
// we've extracted calcs earlier, so we don't need to worry about this
|
||||
|
||||
// reusable bits of code throughout these regexes:
|
||||
// before & after are used to make sure we don't match lose unintended
|
||||
// 0-like values (e.g. in #000, or in http://url/1.0)
|
||||
// units can be stripped from 0 values, or used to recognize non 0
|
||||
// values (where wa may be able to strip a .0 suffix)
|
||||
$before = '(?<=[:(, ])';
|
||||
$after = '(?=[ ,);}])';
|
||||
$units = '(em|ex|%|px|cm|mm|in|pt|pc|ch|rem|vh|vw|vmin|vmax|vm)';
|
||||
|
||||
// strip units after zeroes (0px -> 0)
|
||||
// NOTE: it should be safe to remove all units for a 0 value, but in
|
||||
// practice, Webkit (especially Safari) seems to stumble over at least
|
||||
// 0%, potentially other units as well. Only stripping 'px' for now.
|
||||
// @see https://github.com/matthiasmullie/minify/issues/60
|
||||
$content = preg_replace('/' . $before . '(-?0*(\.0+)?)(?<=0)px' . $after . '/', '\\1', $content);
|
||||
|
||||
// strip 0-digits (.0 -> 0)
|
||||
$content = preg_replace('/' . $before . '\.0+' . $units . '?' . $after . '/', '0\\1', $content);
|
||||
// strip trailing 0: 50.10 -> 50.1, 50.10px -> 50.1px
|
||||
$content = preg_replace('/' . $before . '(-?[0-9]+\.[0-9]+)0+' . $units . '?' . $after . '/', '\\1\\2', $content);
|
||||
// strip trailing 0: 50.00 -> 50, 50.00px -> 50px
|
||||
$content = preg_replace('/' . $before . '(-?[0-9]+)\.0+' . $units . '?' . $after . '/', '\\1\\2', $content);
|
||||
// strip leading 0: 0.1 -> .1, 01.1 -> 1.1
|
||||
$content = preg_replace('/' . $before . '(-?)0+([0-9]*\.[0-9]+)' . $units . '?' . $after . '/', '\\1\\2\\3', $content);
|
||||
|
||||
// strip negative zeroes (-0 -> 0) & truncate zeroes (00 -> 0)
|
||||
$content = preg_replace('/' . $before . '-?0+' . $units . '?' . $after . '/', '0\\1', $content);
|
||||
|
||||
// IE doesn't seem to understand a unitless flex-basis value (correct -
|
||||
// it goes against the spec), so let's add it in again (make it `%`,
|
||||
// which is only 1 char: 0%, 0px, 0 anything, it's all just the same)
|
||||
// @see https://developer.mozilla.org/nl/docs/Web/CSS/flex
|
||||
$content = preg_replace('/flex:([0-9]+\s[0-9]+\s)0([;\}])/', 'flex:${1}0%${2}', $content);
|
||||
$content = preg_replace('/flex-basis:0([;\}])/', 'flex-basis:0%${1}', $content);
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Strip empty tags from source code.
|
||||
*
|
||||
* @param string $content
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function stripEmptyTags($content)
|
||||
{
|
||||
$content = preg_replace('/(?<=^)[^\{\};]+\{\s*\}/', '', $content);
|
||||
$content = preg_replace('/(?<=(\}|;))[^\{\};]+\{\s*\}/', '', $content);
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Strip comments from source code.
|
||||
*/
|
||||
protected function stripComments()
|
||||
{
|
||||
$this->stripMultilineComments();
|
||||
}
|
||||
|
||||
/**
|
||||
* Strip whitespace.
|
||||
*
|
||||
* @param string $content The CSS content to strip the whitespace for
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @throws PatternMatchException
|
||||
*/
|
||||
protected function stripWhitespace($content)
|
||||
{
|
||||
// remove leading & trailing whitespace
|
||||
$content = $this->pregReplace('/^\s*/m', '', $content);
|
||||
$content = $this->pregReplace('/\s*$/m', '', $content);
|
||||
|
||||
// replace newlines with a single space
|
||||
$content = $this->pregReplace('/\s+/', ' ', $content);
|
||||
|
||||
// remove whitespace around meta characters
|
||||
// inspired by stackoverflow.com/questions/15195750/minify-compress-css-with-regex
|
||||
$content = $this->pregReplace('/\s*([\*$~^|]?+=|[{};,>~]|!important\b)\s*/', '$1', $content);
|
||||
$content = $this->pregReplace('/([\[(:>\+])\s+/', '$1', $content);
|
||||
$content = $this->pregReplace('/\s+([\]\)>\+])/', '$1', $content);
|
||||
$content = $this->pregReplace('/\s+(:)(?![^\}]*\{)/', '$1', $content);
|
||||
|
||||
// whitespace around + and - can only be stripped inside some pseudo-
|
||||
// classes, like `:nth-child(3+2n)`
|
||||
// not in things like `calc(3px + 2px)`, shorthands like `3px -2px`, or
|
||||
// selectors like `div.weird- p`
|
||||
$pseudos = array('nth-child', 'nth-last-child', 'nth-last-of-type', 'nth-of-type');
|
||||
$content = $this->pregReplace('/:(' . implode('|', $pseudos) . ')\(\s*([+-]?)\s*(.+?)\s*([+-]?)\s*(.*?)\s*\)/', ':$1($2$3$4$5)', $content);
|
||||
|
||||
// remove semicolon/whitespace followed by closing bracket
|
||||
$content = str_replace(';}', '}', $content);
|
||||
|
||||
return trim($content);
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a preg_replace and check for errors.
|
||||
*
|
||||
* @param string $pattern Pattern
|
||||
* @param string $replacement Replacement
|
||||
* @param string $subject String to process
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @throws PatternMatchException
|
||||
*/
|
||||
protected function pregReplace($pattern, $replacement, $subject)
|
||||
{
|
||||
$result = preg_replace($pattern, $replacement, $subject);
|
||||
if ($result === null) {
|
||||
throw PatternMatchException::fromLastError("Failed to replace with pattern '$pattern'");
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace all occurrences of functions that may contain math, where
|
||||
* whitespace around operators needs to be preserved (e.g. calc, clamp).
|
||||
*/
|
||||
protected function extractMath()
|
||||
{
|
||||
$functions = array('calc', 'clamp', 'min', 'max');
|
||||
$pattern = '/\b(' . implode('|', $functions) . ')(\(.+?)(?=$|;|})/m';
|
||||
|
||||
// PHP only supports $this inside anonymous functions since 5.4
|
||||
$minifier = $this;
|
||||
$callback = function ($match) use ($minifier, $pattern, &$callback) {
|
||||
$function = $match[1];
|
||||
$length = strlen($match[2]);
|
||||
$expr = '';
|
||||
$opened = 0;
|
||||
|
||||
// the regular expression for extracting math has 1 significant problem:
|
||||
// it can't determine the correct closing parenthesis...
|
||||
// instead, it'll match a larger portion of code to where it's certain that
|
||||
// the calc() musts have ended, and we'll figure out which is the correct
|
||||
// closing parenthesis here, by counting how many have opened
|
||||
for ($i = 0; $i < $length; ++$i) {
|
||||
$char = $match[2][$i];
|
||||
$expr .= $char;
|
||||
if ($char === '(') {
|
||||
++$opened;
|
||||
} elseif ($char === ')' && --$opened === 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// now that we've figured out where the calc() starts and ends, extract it
|
||||
$count = count($minifier->extracted);
|
||||
$placeholder = 'math(' . $count . ')';
|
||||
$minifier->extracted[$placeholder] = $function . '(' . trim(substr($expr, 1, -1)) . ')';
|
||||
|
||||
// and since we've captured more code than required, we may have some leftover
|
||||
// calc() in here too - go recursive on the remaining but of code to go figure
|
||||
// that out and extract what is needed
|
||||
$rest = $minifier->str_replace_first($function . $expr, '', $match[0]);
|
||||
$rest = preg_replace_callback($pattern, $callback, $rest);
|
||||
|
||||
return $placeholder . $rest;
|
||||
};
|
||||
|
||||
$this->registerPattern($pattern, $callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace custom properties, whose values may be used in scenarios where
|
||||
* we wouldn't want them to be minified (e.g. inside calc).
|
||||
*/
|
||||
protected function extractCustomProperties()
|
||||
{
|
||||
// PHP only supports $this inside anonymous functions since 5.4
|
||||
$minifier = $this;
|
||||
$this->registerPattern(
|
||||
'/(?<=^|[;}{])\s*(--[^:;{}"\'\s]+)\s*:([^;{}]+)/m',
|
||||
function ($match) use ($minifier) {
|
||||
$placeholder = '--custom-' . count($minifier->extracted) . ':0';
|
||||
$minifier->extracted[$placeholder] = $match[1] . ':' . trim($match[2]);
|
||||
|
||||
return $placeholder;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if file is small enough to be imported.
|
||||
*
|
||||
* @param string $path The path to the file
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function canImportBySize($path)
|
||||
{
|
||||
return ($size = @filesize($path)) && $size <= $this->maxImportSize * 1024;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if file a file can be imported, going by the path.
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function canImportByPath($path)
|
||||
{
|
||||
return preg_match('/^(data:|https?:|\\/)/', $path) === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a converter to update relative paths to be relative to the new
|
||||
* destination.
|
||||
*
|
||||
* @param string $source
|
||||
* @param string $target
|
||||
*
|
||||
* @return ConverterInterface
|
||||
*/
|
||||
protected function getPathConverter($source, $target)
|
||||
{
|
||||
return new Converter($source, $target);
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Base Exception.
|
||||
*
|
||||
* @deprecated Use Exceptions\BasicException instead
|
||||
*
|
||||
* @author Matthias Mullie <minify@mullie.eu>
|
||||
*/
|
||||
|
||||
namespace MatthiasMullie\Minify;
|
||||
|
||||
/**
|
||||
* Base Exception Class.
|
||||
*
|
||||
* @deprecated Use Exceptions\BasicException instead
|
||||
*
|
||||
* @author Matthias Mullie <minify@mullie.eu>
|
||||
*/
|
||||
abstract class Exception extends \Exception {}
|
||||
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Basic exception.
|
||||
*
|
||||
* Please report bugs on https://github.com/matthiasmullie/minify/issues
|
||||
*
|
||||
* @author Matthias Mullie <minify@mullie.eu>
|
||||
* @copyright Copyright (c) 2012, Matthias Mullie. All rights reserved
|
||||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace MatthiasMullie\Minify\Exceptions;
|
||||
|
||||
use MatthiasMullie\Minify\Exception;
|
||||
|
||||
/**
|
||||
* Basic Exception Class.
|
||||
*
|
||||
* @author Matthias Mullie <minify@mullie.eu>
|
||||
*/
|
||||
abstract class BasicException extends Exception {}
|
||||
wp-content/plugins/jetpack-boost/vendor/matthiasmullie/minify/src/Exceptions/FileImportException.php
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* File Import Exception.
|
||||
*
|
||||
* Please report bugs on https://github.com/matthiasmullie/minify/issues
|
||||
*
|
||||
* @author Matthias Mullie <minify@mullie.eu>
|
||||
* @copyright Copyright (c) 2012, Matthias Mullie. All rights reserved
|
||||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace MatthiasMullie\Minify\Exceptions;
|
||||
|
||||
/**
|
||||
* File Import Exception Class.
|
||||
*
|
||||
* @author Matthias Mullie <minify@mullie.eu>
|
||||
*/
|
||||
class FileImportException extends BasicException {}
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* IO Exception.
|
||||
*
|
||||
* Please report bugs on https://github.com/matthiasmullie/minify/issues
|
||||
*
|
||||
* @author Matthias Mullie <minify@mullie.eu>
|
||||
* @copyright Copyright (c) 2012, Matthias Mullie. All rights reserved
|
||||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace MatthiasMullie\Minify\Exceptions;
|
||||
|
||||
/**
|
||||
* IO Exception Class.
|
||||
*
|
||||
* @author Matthias Mullie <minify@mullie.eu>
|
||||
*/
|
||||
class IOException extends BasicException {}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Pattern match exception.
|
||||
*
|
||||
* Please report bugs on https://github.com/matthiasmullie/minify/issues
|
||||
*
|
||||
* @author Ere Maijala <ere.maijala@helsinki.fi>
|
||||
* @copyright Copyright (c) 2012, Matthias Mullie. All rights reserved
|
||||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace MatthiasMullie\Minify\Exceptions;
|
||||
|
||||
/**
|
||||
* Pattern Match Exception Class.
|
||||
*
|
||||
* @author Ere Maijala <ere.maijala@helsinki.fi>
|
||||
*/
|
||||
class PatternMatchException extends BasicException
|
||||
{
|
||||
/**
|
||||
* Create an exception from preg_last_error.
|
||||
*
|
||||
* @param string $msg Error message
|
||||
*/
|
||||
public static function fromLastError($msg)
|
||||
{
|
||||
$msg .= ': Error ' . preg_last_error();
|
||||
if (PHP_MAJOR_VERSION >= 8) {
|
||||
$msg .= ' - ' . preg_last_error_msg();
|
||||
}
|
||||
|
||||
return new PatternMatchException($msg);
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
+571
@@ -0,0 +1,571 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Abstract minifier class.
|
||||
*
|
||||
* Please report bugs on https://github.com/matthiasmullie/minify/issues
|
||||
*
|
||||
* @author Matthias Mullie <minify@mullie.eu>
|
||||
* @copyright Copyright (c) 2012, Matthias Mullie. All rights reserved
|
||||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace MatthiasMullie\Minify;
|
||||
|
||||
use MatthiasMullie\Minify\Exceptions\IOException;
|
||||
use MatthiasMullie\Minify\Exceptions\PatternMatchException;
|
||||
use Psr\Cache\CacheItemInterface;
|
||||
|
||||
/**
|
||||
* Abstract minifier class.
|
||||
*
|
||||
* Please report bugs on https://github.com/matthiasmullie/minify/issues
|
||||
*
|
||||
* @author Matthias Mullie <minify@mullie.eu>
|
||||
* @copyright Copyright (c) 2012, Matthias Mullie. All rights reserved
|
||||
* @license MIT License
|
||||
*/
|
||||
abstract class Minify
|
||||
{
|
||||
/**
|
||||
* The data to be minified.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected $data = array();
|
||||
|
||||
/**
|
||||
* Array of patterns to match.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected $patterns = array();
|
||||
|
||||
/**
|
||||
* This array will hold content of strings and regular expressions that have
|
||||
* been extracted from the JS source code, so we can reliably match "code",
|
||||
* without having to worry about potential "code-like" characters inside.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
public $extracted = array();
|
||||
|
||||
/**
|
||||
* Init the minify class - optionally, code may be passed along already.
|
||||
*/
|
||||
public function __construct(/* $data = null, ... */)
|
||||
{
|
||||
// it's possible to add the source through the constructor as well ;)
|
||||
if (func_num_args()) {
|
||||
call_user_func_array(array($this, 'add'), func_get_args());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a file or straight-up code to be minified.
|
||||
*
|
||||
* @param string|string[] $data
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function add($data /* $data = null, ... */)
|
||||
{
|
||||
// bogus "usage" of parameter $data: scrutinizer warns this variable is
|
||||
// not used (we're using func_get_args instead to support overloading),
|
||||
// but it still needs to be defined because it makes no sense to have
|
||||
// this function without argument :)
|
||||
$args = array($data) + func_get_args();
|
||||
|
||||
// this method can be overloaded
|
||||
foreach ($args as $data) {
|
||||
if (is_array($data)) {
|
||||
call_user_func_array(array($this, 'add'), $data);
|
||||
continue;
|
||||
}
|
||||
|
||||
// redefine var
|
||||
$data = (string) $data;
|
||||
|
||||
// load data
|
||||
$value = $this->load($data);
|
||||
$key = ($data != $value) ? $data : count($this->data);
|
||||
|
||||
// replace CR linefeeds etc.
|
||||
// @see https://github.com/matthiasmullie/minify/pull/139
|
||||
$value = str_replace(array("\r\n", "\r"), "\n", $value);
|
||||
|
||||
// store data
|
||||
$this->data[$key] = $value;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a file to be minified.
|
||||
*
|
||||
* @param string|string[] $data
|
||||
*
|
||||
* @return static
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public function addFile($data /* $data = null, ... */)
|
||||
{
|
||||
// bogus "usage" of parameter $data: scrutinizer warns this variable is
|
||||
// not used (we're using func_get_args instead to support overloading),
|
||||
// but it still needs to be defined because it makes no sense to have
|
||||
// this function without argument :)
|
||||
$args = array($data) + func_get_args();
|
||||
|
||||
// this method can be overloaded
|
||||
foreach ($args as $path) {
|
||||
if (is_array($path)) {
|
||||
call_user_func_array(array($this, 'addFile'), $path);
|
||||
continue;
|
||||
}
|
||||
|
||||
// redefine var
|
||||
$path = (string) $path;
|
||||
|
||||
// check if we can read the file
|
||||
if (!$this->canImportFile($path)) {
|
||||
throw new IOException('The file "' . $path . '" could not be opened for reading. Check if PHP has enough permissions.');
|
||||
}
|
||||
|
||||
$this->add($path);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Minify the data & (optionally) saves it to a file.
|
||||
*
|
||||
* @param string[optional] $path Path to write the data to
|
||||
*
|
||||
* @return string The minified data
|
||||
*/
|
||||
public function minify($path = null)
|
||||
{
|
||||
$content = $this->execute($path);
|
||||
|
||||
// save to path
|
||||
if ($path !== null) {
|
||||
$this->save($content, $path);
|
||||
}
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Minify & gzip the data & (optionally) saves it to a file.
|
||||
*
|
||||
* @param string[optional] $path Path to write the data to
|
||||
* @param int[optional] $level Compression level, from 0 to 9
|
||||
*
|
||||
* @return string The minified & gzipped data
|
||||
*/
|
||||
public function gzip($path = null, $level = 9)
|
||||
{
|
||||
$content = $this->execute($path);
|
||||
$content = gzencode($content, $level, FORCE_GZIP);
|
||||
|
||||
// save to path
|
||||
if ($path !== null) {
|
||||
$this->save($content, $path);
|
||||
}
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Minify the data & write it to a CacheItemInterface object.
|
||||
*
|
||||
* @param CacheItemInterface $item Cache item to write the data to
|
||||
*
|
||||
* @return CacheItemInterface Cache item with the minifier data
|
||||
*/
|
||||
public function cache(CacheItemInterface $item)
|
||||
{
|
||||
$content = $this->execute();
|
||||
$item->set($content);
|
||||
|
||||
return $item;
|
||||
}
|
||||
|
||||
/**
|
||||
* Minify the data.
|
||||
*
|
||||
* @param string[optional] $path Path to write the data to
|
||||
*
|
||||
* @return string The minified data
|
||||
*/
|
||||
abstract public function execute($path = null);
|
||||
|
||||
/**
|
||||
* Load data.
|
||||
*
|
||||
* @param string $data Either a path to a file or the content itself
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function load($data)
|
||||
{
|
||||
// check if the data is a file
|
||||
if ($this->canImportFile($data)) {
|
||||
$data = file_get_contents($data);
|
||||
|
||||
// strip BOM, if any
|
||||
if (substr($data, 0, 3) == "\xef\xbb\xbf") {
|
||||
$data = substr($data, 3);
|
||||
}
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Save to file.
|
||||
*
|
||||
* @param string $content The minified data
|
||||
* @param string $path The path to save the minified data to
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
protected function save($content, $path)
|
||||
{
|
||||
$handler = $this->openFileForWriting($path);
|
||||
|
||||
$this->writeToFile($handler, $content);
|
||||
|
||||
@fclose($handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a pattern to execute against the source content.
|
||||
*
|
||||
* If $replacement is a string, it must be plain text. Placeholders like $1 or \2 don't work.
|
||||
* If you need that functionality, use a callback instead.
|
||||
*
|
||||
* @param string $pattern PCRE pattern
|
||||
* @param string|callable $replacement Replacement value for matched pattern
|
||||
*/
|
||||
protected function registerPattern($pattern, $replacement = '')
|
||||
{
|
||||
// study the pattern, we'll execute it more than once
|
||||
$pattern .= 'S';
|
||||
|
||||
$this->patterns[] = array($pattern, $replacement);
|
||||
}
|
||||
|
||||
/**
|
||||
* Both JS and CSS use the same form of multi-line comment, so putting the common code here.
|
||||
*/
|
||||
protected function stripMultilineComments()
|
||||
{
|
||||
$minifier = $this;
|
||||
// Pattern for matching comments that we want to preserve
|
||||
$keepPattern = '/^
|
||||
# comment content
|
||||
(?:
|
||||
# either starts with an !
|
||||
!
|
||||
|
|
||||
# or, after some number of characters which do not end the comment
|
||||
(?:(?!\*\/).)*?
|
||||
|
||||
# there is either a @license or @preserve tag
|
||||
@(?:license|preserve)
|
||||
)
|
||||
/ixs';
|
||||
$callback = function ($match) use ($minifier, $keepPattern) {
|
||||
if (preg_match($keepPattern, $match[1])) {
|
||||
// Preserve the comment
|
||||
$count = count($minifier->extracted);
|
||||
$placeholder = '/*' . $count . '*/';
|
||||
$minifier->extracted[$placeholder] = $match[0];
|
||||
} else {
|
||||
// Discard the comment but keep any single line feed
|
||||
$placeholder = strncmp($match[0], "\n", 1) === 0 || substr($match[0], -1) === "\n"
|
||||
? "\n"
|
||||
: '';
|
||||
}
|
||||
|
||||
return $placeholder;
|
||||
};
|
||||
|
||||
$this->registerPattern('/\n?\/\*(.*?)\*\/\n?/s', $callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* We can't "just" run some regular expressions against JavaScript: it's a
|
||||
* complex language. E.g. having an occurrence of // xyz would be a comment,
|
||||
* unless it's used within a string. Of you could have something that looks
|
||||
* like a 'string', but inside a comment.
|
||||
* The only way to accurately replace these pieces is to traverse the JS one
|
||||
* character at a time and try to find whatever starts first.
|
||||
*
|
||||
* @param string $content The content to replace patterns in
|
||||
*
|
||||
* @return string The (manipulated) content
|
||||
*
|
||||
* @throws PatternMatchException
|
||||
*/
|
||||
protected function replace($content)
|
||||
{
|
||||
$contentLength = strlen($content);
|
||||
$output = '';
|
||||
$processedOffset = 0;
|
||||
$positions = array_fill(0, count($this->patterns), -1);
|
||||
$matches = array();
|
||||
|
||||
while ($processedOffset < $contentLength) {
|
||||
// find first match for all patterns
|
||||
foreach ($this->patterns as $i => $pattern) {
|
||||
list($pattern, $replacement) = $pattern;
|
||||
|
||||
// we can safely ignore patterns for positions we've unset earlier,
|
||||
// because we know these won't show up anymore
|
||||
if (array_key_exists($i, $positions) == false) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// no need to re-run matches that are still in the part of the
|
||||
// content that hasn't been processed
|
||||
if ($positions[$i] >= $processedOffset) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$match = null;
|
||||
$matchResult = preg_match($pattern, $content, $match, PREG_OFFSET_CAPTURE, $processedOffset);
|
||||
if ($matchResult) {
|
||||
$matches[$i] = $match;
|
||||
|
||||
// we'll store the match position as well; that way, we
|
||||
// don't have to redo all preg_matches after changing only
|
||||
// the first (we'll still know where those others are)
|
||||
$positions[$i] = $match[0][1];
|
||||
} else {
|
||||
if ($matchResult === false) {
|
||||
throw PatternMatchException::fromLastError(
|
||||
"Failed to match pattern '$pattern' at $processedOffset"
|
||||
);
|
||||
}
|
||||
// if the pattern couldn't be matched, there's no point in
|
||||
// executing it again in later runs on this same content;
|
||||
// ignore this one until we reach end of content
|
||||
unset($matches[$i], $positions[$i]);
|
||||
}
|
||||
}
|
||||
|
||||
// no more matches to find: everything's been processed, break out
|
||||
if (!$matches) {
|
||||
// output the remaining content
|
||||
$output .= substr($content, $processedOffset);
|
||||
break;
|
||||
}
|
||||
|
||||
// see which of the patterns actually found the first thing (we'll
|
||||
// only want to execute that one, since we're unsure if what the
|
||||
// other found was not inside what the first found)
|
||||
$matchOffset = min($positions);
|
||||
$firstPattern = array_search($matchOffset, $positions);
|
||||
$match = $matches[$firstPattern];
|
||||
|
||||
// execute the pattern that matches earliest in the content string
|
||||
list(, $replacement) = $this->patterns[$firstPattern];
|
||||
|
||||
// add the part of the input between $processedOffset and the first match;
|
||||
// that content wasn't matched by anything
|
||||
$output .= substr($content, $processedOffset, $matchOffset - $processedOffset);
|
||||
// add the replacement for the match
|
||||
$output .= $this->executeReplacement($replacement, $match);
|
||||
// advance $processedOffset past the match
|
||||
$processedOffset = $matchOffset + strlen($match[0][0]);
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* If $replacement is a callback, execute it, passing in the match data.
|
||||
* If it's a string, just pass it through.
|
||||
*
|
||||
* @param string|callable $replacement Replacement value
|
||||
* @param array $match Match data, in PREG_OFFSET_CAPTURE form
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function executeReplacement($replacement, $match)
|
||||
{
|
||||
if (!is_callable($replacement)) {
|
||||
return $replacement;
|
||||
}
|
||||
// convert $match from the PREG_OFFSET_CAPTURE form to the form the callback expects
|
||||
foreach ($match as &$matchItem) {
|
||||
$matchItem = $matchItem[0];
|
||||
}
|
||||
|
||||
return $replacement($match);
|
||||
}
|
||||
|
||||
/**
|
||||
* Strings are a pattern we need to match, in order to ignore potential
|
||||
* code-like content inside them, but we just want all of the string
|
||||
* content to remain untouched.
|
||||
*
|
||||
* This method will replace all string content with simple STRING#
|
||||
* placeholder text, so we've rid all strings from characters that may be
|
||||
* misinterpreted. Original string content will be saved in $this->extracted
|
||||
* and after doing all other minifying, we can restore the original content
|
||||
* via restoreStrings().
|
||||
*
|
||||
* @param string[optional] $chars
|
||||
* @param string[optional] $placeholderPrefix
|
||||
*/
|
||||
protected function extractStrings($chars = '\'"', $placeholderPrefix = '')
|
||||
{
|
||||
// PHP only supports $this inside anonymous functions since 5.4
|
||||
$minifier = $this;
|
||||
$callback = function ($match) use ($minifier, $placeholderPrefix) {
|
||||
// check the second index here, because the first always contains a quote
|
||||
if ($match[2] === '') {
|
||||
/*
|
||||
* Empty strings need no placeholder; they can't be confused for
|
||||
* anything else anyway.
|
||||
* But we still needed to match them, for the extraction routine
|
||||
* to skip over this particular string.
|
||||
*/
|
||||
return $match[0];
|
||||
}
|
||||
|
||||
$count = count($minifier->extracted);
|
||||
$placeholder = $match[1] . $placeholderPrefix . $count . $match[1];
|
||||
$minifier->extracted[$placeholder] = $match[1] . $match[2] . $match[1];
|
||||
|
||||
return $placeholder;
|
||||
};
|
||||
|
||||
/*
|
||||
* Quantifier {0,65535} is used instead of *? to avoid exceeding
|
||||
* backtrack limit with large strings. 65535 is the maximum allowed
|
||||
* (see https://www.php.net/manual/en/regexp.reference.repetition.php)
|
||||
* and should be well sufficient for string representations here.
|
||||
*
|
||||
* The \\ messiness explained:
|
||||
* * Don't count ' or " as end-of-string if it's escaped (has backslash
|
||||
* in front of it)
|
||||
* * Unless... that backslash itself is escaped (another leading slash),
|
||||
* in which case it's no longer escaping the ' or "
|
||||
* * So there can be either no backslash, or an even number
|
||||
* * multiply all of that times 4, to account for the escaping that has
|
||||
* to be done to pass the backslash into the PHP string without it being
|
||||
* considered as escape-char (times 2) and to get it in the regex,
|
||||
* escaped (times 2)
|
||||
*/
|
||||
|
||||
$this->registerPattern('/([' . $chars . '])(.{0,65535}?(?<!\\\\)(\\\\\\\\)*+)\\1/s', $callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will restore all extracted data (strings, regexes) that were
|
||||
* replaced with placeholder text in extract*(). The original content was
|
||||
* saved in $this->extracted.
|
||||
*
|
||||
* @param string $content
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function restoreExtractedData($content)
|
||||
{
|
||||
if (!$this->extracted) {
|
||||
// nothing was extracted, nothing to restore
|
||||
return $content;
|
||||
}
|
||||
|
||||
$content = strtr($content, $this->extracted);
|
||||
|
||||
$this->extracted = array();
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the path is a regular file and can be read.
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function canImportFile($path)
|
||||
{
|
||||
$parsed = parse_url($path);
|
||||
if (
|
||||
// file is elsewhere
|
||||
isset($parsed['host'])
|
||||
// file responds to queries (may change, or need to bypass cache)
|
||||
|| isset($parsed['query'])
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
return strlen($path) < PHP_MAXPATHLEN && @is_file($path) && is_readable($path);
|
||||
}
|
||||
// catch openbasedir exceptions which are not caught by @ on is_file()
|
||||
catch (\Exception $e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to open file specified by $path for writing.
|
||||
*
|
||||
* @param string $path The path to the file
|
||||
*
|
||||
* @return resource Specifier for the target file
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
protected function openFileForWriting($path)
|
||||
{
|
||||
if ($path === '' || ($handler = @fopen($path, 'w')) === false) {
|
||||
throw new IOException('The file "' . $path . '" could not be opened for writing. Check if PHP has enough permissions.');
|
||||
}
|
||||
|
||||
return $handler;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to write $content to the file specified by $handler. $path is used for printing exceptions.
|
||||
*
|
||||
* @param resource $handler The resource to write to
|
||||
* @param string $content The content to write
|
||||
* @param string $path The path to the file (for exception printing only)
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
protected function writeToFile($handler, $content, $path = '')
|
||||
{
|
||||
if (
|
||||
!is_resource($handler)
|
||||
|| ($result = @fwrite($handler, $content)) === false
|
||||
|| ($result < strlen($content))
|
||||
) {
|
||||
throw new IOException('The file "' . $path . '" could not be written to. Check your disk space and file permissions.');
|
||||
}
|
||||
}
|
||||
|
||||
protected static function str_replace_first($search, $replace, $subject)
|
||||
{
|
||||
$pos = strpos($subject, $search);
|
||||
if ($pos !== false) {
|
||||
return substr_replace($subject, $replace, $pos, strlen($search));
|
||||
}
|
||||
|
||||
return $subject;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
Copyright (c) 2015 Matthias Mullie
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "matthiasmullie/path-converter",
|
||||
"type": "library",
|
||||
"description": "Relative path converter",
|
||||
"keywords": ["relative", "path", "converter", "paths"],
|
||||
"homepage": "http://github.com/matthiasmullie/path-converter",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Matthias Mullie",
|
||||
"homepage": "http://www.mullie.eu",
|
||||
"email": "pathconverter@mullie.eu",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.3.0",
|
||||
"ext-pcre": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.8"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"MatthiasMullie\\PathConverter\\": "src/"
|
||||
}
|
||||
}
|
||||
}
|
||||
+204
@@ -0,0 +1,204 @@
|
||||
<?php
|
||||
|
||||
namespace MatthiasMullie\PathConverter;
|
||||
|
||||
/**
|
||||
* Convert paths relative from 1 file to another.
|
||||
*
|
||||
* E.g.
|
||||
* ../../images/icon.jpg relative to /css/imports/icons.css
|
||||
* becomes
|
||||
* ../images/icon.jpg relative to /css/minified.css
|
||||
*
|
||||
* Please report bugs on https://github.com/matthiasmullie/path-converter/issues
|
||||
*
|
||||
* @author Matthias Mullie <pathconverter@mullie.eu>
|
||||
* @copyright Copyright (c) 2015, Matthias Mullie. All rights reserved
|
||||
* @license MIT License
|
||||
*/
|
||||
class Converter implements ConverterInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $from;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $to;
|
||||
|
||||
/**
|
||||
* @param string $from The original base path (directory, not file!)
|
||||
* @param string $to The new base path (directory, not file!)
|
||||
* @param string $root Root directory (defaults to `getcwd`)
|
||||
*/
|
||||
public function __construct($from, $to, $root = '')
|
||||
{
|
||||
$shared = $this->shared($from, $to);
|
||||
if ($shared === '') {
|
||||
// when both paths have nothing in common, one of them is probably
|
||||
// absolute while the other is relative
|
||||
$root = $root ?: getcwd();
|
||||
$from = strpos($from, $root) === 0 ? $from : preg_replace('/\/+/', '/', $root.'/'.$from);
|
||||
$to = strpos($to, $root) === 0 ? $to : preg_replace('/\/+/', '/', $root.'/'.$to);
|
||||
|
||||
// or traveling the tree via `..`
|
||||
// attempt to resolve path, or assume it's fine if it doesn't exist
|
||||
$from = @realpath($from) ?: $from;
|
||||
$to = @realpath($to) ?: $to;
|
||||
}
|
||||
|
||||
$from = $this->dirname($from);
|
||||
$to = $this->dirname($to);
|
||||
|
||||
$from = $this->normalize($from);
|
||||
$to = $this->normalize($to);
|
||||
|
||||
$this->from = $from;
|
||||
$this->to = $to;
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalize path.
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function normalize($path)
|
||||
{
|
||||
// deal with different operating systems' directory structure
|
||||
$path = rtrim(str_replace(DIRECTORY_SEPARATOR, '/', $path), '/');
|
||||
|
||||
// remove leading current directory.
|
||||
if (substr($path, 0, 2) === './') {
|
||||
$path = substr($path, 2);
|
||||
}
|
||||
|
||||
// remove references to current directory in the path.
|
||||
$path = str_replace('/./', '/', $path);
|
||||
|
||||
/*
|
||||
* Example:
|
||||
* /home/forkcms/frontend/cache/compiled_templates/../../core/layout/css/../images/img.gif
|
||||
* to
|
||||
* /home/forkcms/frontend/core/layout/images/img.gif
|
||||
*/
|
||||
do {
|
||||
$path = preg_replace('/[^\/]+(?<!\.\.)\/\.\.\//', '', $path, -1, $count);
|
||||
} while ($count);
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Figure out the shared path of 2 locations.
|
||||
*
|
||||
* Example:
|
||||
* /home/forkcms/frontend/core/layout/images/img.gif
|
||||
* and
|
||||
* /home/forkcms/frontend/cache/minified_css
|
||||
* share
|
||||
* /home/forkcms/frontend
|
||||
*
|
||||
* @param string $path1
|
||||
* @param string $path2
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function shared($path1, $path2)
|
||||
{
|
||||
// $path could theoretically be empty (e.g. no path is given), in which
|
||||
// case it shouldn't expand to array(''), which would compare to one's
|
||||
// root /
|
||||
$path1 = $path1 ? explode('/', $path1) : array();
|
||||
$path2 = $path2 ? explode('/', $path2) : array();
|
||||
|
||||
$shared = array();
|
||||
|
||||
// compare paths & strip identical ancestors
|
||||
foreach ($path1 as $i => $chunk) {
|
||||
if (isset($path2[$i]) && $path1[$i] == $path2[$i]) {
|
||||
$shared[] = $chunk;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return implode('/', $shared);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert paths relative from 1 file to another.
|
||||
*
|
||||
* E.g.
|
||||
* ../images/img.gif relative to /home/forkcms/frontend/core/layout/css
|
||||
* should become:
|
||||
* ../../core/layout/images/img.gif relative to
|
||||
* /home/forkcms/frontend/cache/minified_css
|
||||
*
|
||||
* @param string $path The relative path that needs to be converted
|
||||
*
|
||||
* @return string The new relative path
|
||||
*/
|
||||
public function convert($path)
|
||||
{
|
||||
// quit early if conversion makes no sense
|
||||
if ($this->from === $this->to) {
|
||||
return $path;
|
||||
}
|
||||
|
||||
$path = $this->normalize($path);
|
||||
// if we're not dealing with a relative path, just return absolute
|
||||
if (strpos($path, '/') === 0) {
|
||||
return $path;
|
||||
}
|
||||
|
||||
// normalize paths
|
||||
$path = $this->normalize($this->from.'/'.$path);
|
||||
|
||||
// strip shared ancestor paths
|
||||
$shared = $this->shared($path, $this->to);
|
||||
$path = mb_substr($path, mb_strlen($shared));
|
||||
$to = mb_substr($this->to, mb_strlen($shared));
|
||||
|
||||
// add .. for every directory that needs to be traversed to new path
|
||||
$to = str_repeat('../', count(array_filter(explode('/', $to))));
|
||||
|
||||
return $to.ltrim($path, '/');
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to get the directory name from a path.
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function dirname($path)
|
||||
{
|
||||
if (@is_file($path)) {
|
||||
return dirname($path);
|
||||
}
|
||||
|
||||
if (@is_dir($path)) {
|
||||
return rtrim($path, '/');
|
||||
}
|
||||
|
||||
// no known file/dir, start making assumptions
|
||||
|
||||
// ends in / = dir
|
||||
if (mb_substr($path, -1) === '/') {
|
||||
return rtrim($path, '/');
|
||||
}
|
||||
|
||||
// has a dot in the name, likely a file
|
||||
if (preg_match('/.*\..*$/', basename($path)) !== 0) {
|
||||
return dirname($path);
|
||||
}
|
||||
|
||||
// you're on your own here!
|
||||
return $path;
|
||||
}
|
||||
}
|
||||
Vendored
+24
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace MatthiasMullie\PathConverter;
|
||||
|
||||
/**
|
||||
* Convert file paths.
|
||||
*
|
||||
* Please report bugs on https://github.com/matthiasmullie/path-converter/issues
|
||||
*
|
||||
* @author Matthias Mullie <pathconverter@mullie.eu>
|
||||
* @copyright Copyright (c) 2015, Matthias Mullie. All rights reserved
|
||||
* @license MIT License
|
||||
*/
|
||||
interface ConverterInterface
|
||||
{
|
||||
/**
|
||||
* Convert file paths.
|
||||
*
|
||||
* @param string $path The path to be converted
|
||||
*
|
||||
* @return string The new path
|
||||
*/
|
||||
public function convert($path);
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace MatthiasMullie\PathConverter;
|
||||
|
||||
/**
|
||||
* Don't convert paths.
|
||||
*
|
||||
* Please report bugs on https://github.com/matthiasmullie/path-converter/issues
|
||||
*
|
||||
* @author Matthias Mullie <pathconverter@mullie.eu>
|
||||
* @copyright Copyright (c) 2015, Matthias Mullie. All rights reserved
|
||||
* @license MIT License
|
||||
*/
|
||||
class NoConverter implements ConverterInterface
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function convert($path)
|
||||
{
|
||||
return $path;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user