← All changes
|
jetpack_vendor/automattic/jetpack-assets/src/class-assets.php
+14
-0
16.2
→
16.3
View file →
| @@ -7,8 +7,9 @@ | ||
| 7 | 7 | |
| 8 | 8 | namespace Automattic\Jetpack; |
| 9 | 9 | |
| 10 | 10 | use Automattic\Jetpack\Assets\Semver; |
| 11 | +use Automattic\Jetpack\Assets\Shared_Stores_Assets; | |
| 11 | 12 | use Automattic\Jetpack\Constants as Jetpack_Constants; |
| 12 | 13 | use InvalidArgumentException; |
| 13 | 14 | |
| 14 | 15 | /** |
| @@ -466,8 +467,21 @@ | ||
| 466 | 467 | wp_enqueue_script( $handle ); |
| 467 | 468 | if ( wp_scripts()->get_data( $handle, 'Jetpack::Assets::hascss' ) ) { |
| 468 | 469 | wp_enqueue_style( $handle ); |
| 469 | 470 | } |
| 471 | + } | |
| 472 | + | |
| 473 | + /** | |
| 474 | + * Re-hook the bootstraps an older copy's `actions.php` did not know about. See JETPACK-2649. | |
| 475 | + * | |
| 476 | + * Static callables only: `add_action()` dedupes those, but closures and object callables would | |
| 477 | + * register twice. Callers must run before `wp_loaded`. | |
| 478 | + * | |
| 479 | + * @access private | |
| 480 | + * @since 5.0.5 | |
| 481 | + */ | |
| 482 | + public static function ensure_package_bootstrap() { | |
| 483 | + Shared_Stores_Assets::configure(); | |
| 470 | 484 | } |
| 471 | 485 | |
| 472 | 486 | /** |
| 473 | 487 | * 'wp_default_scripts' action handler. |