summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/jetpack_vendor/automattic/jetpack-assets/actions.php')
-rw-r--r--plugins/jetpack/jetpack_vendor/automattic/jetpack-assets/actions.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-assets/actions.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-assets/actions.php
new file mode 100644
index 00000000..1c8becda
--- /dev/null
+++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-assets/actions.php
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Action Hooks for Jetpack Assets module.
+ *
+ * @package automattic/jetpack-assets
+ */
+
+// If WordPress's plugin API is available already, use it. If not,
+// drop data into `$wp_filter` for `WP_Hook::build_preinitialized_hooks()`.
+if ( function_exists( 'add_action' ) ) {
+ add_action( 'wp_default_scripts', array( Automattic\Jetpack\Assets::class, 'wp_default_scripts_hook' ) );
+} else {
+ global $wp_filter;
+ // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
+ $wp_filter['wp_default_scripts'][10][] = array(
+ 'accepted_args' => 1,
+ 'function' => array( Automattic\Jetpack\Assets::class, 'wp_default_scripts_hook' ),
+ );
+}