PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3
Jetpack – WP Security, Backup, Speed, & Growth v16.3
16.3 16.3-beta 16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 All 508 releases
← All changes | jetpack_vendor/automattic/jetpack-assets/src/class-shared-stores-assets.php +41 -0 16.2-beta → 16.3 View file →
@@ -1,0 +1,41 @@
1 +<?php
2 +/**
3 + * Jetpack shared stores assets.
4 + *
5 + * @package automattic/jetpack-assets
6 + */
7 +
8 +namespace Automattic\Jetpack\Assets;
9 +
10 +use Automattic\Jetpack\Assets;
11 +
12 +/**
13 + * Registers the externalized jetpack-shared-stores bundle so that consuming
14 + * packages can declare it as a WordPress script dependency. Loading the bundle
15 + * once ensures the contained data stores register exactly once per page.
16 + */
17 +class Shared_Stores_Assets {
18 +
19 + const SCRIPT_HANDLE = 'jetpack-shared-stores';
20 +
21 + /**
22 + * Configure.
23 + */
24 + public static function configure() {
25 + add_action( 'wp_loaded', array( self::class, 'register_assets' ) );
26 + }
27 +
28 + /**
29 + * Register assets.
30 + */
31 + public static function register_assets() {
32 + Assets::register_script(
33 + self::SCRIPT_HANDLE,
34 + '../build/jetpack-shared-stores.js',
35 + __FILE__,
36 + array(
37 + 'in_footer' => true,
38 + )
39 + );
40 + }
41 +}