summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2020-01-06 14:32:30 -0500
committerAnthony G. Basile <blueness@gentoo.org>2020-01-06 14:32:30 -0500
commit10ef81bf85ad0a4bad0d204838e14c99ca2526f7 (patch)
treeb4bb36a326d41de12d1a6181d2a2baf34696ac24 /plugins/jetpack/vendor/automattic/jetpack-compat/functions.php
parentUpdating script for Update (diff)
downloadblogs-gentoo-10ef81bf85ad0a4bad0d204838e14c99ca2526f7.tar.gz
blogs-gentoo-10ef81bf85ad0a4bad0d204838e14c99ca2526f7.tar.bz2
blogs-gentoo-10ef81bf85ad0a4bad0d204838e14c99ca2526f7.zip
Update jetpack 8.0
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'plugins/jetpack/vendor/automattic/jetpack-compat/functions.php')
-rw-r--r--plugins/jetpack/vendor/automattic/jetpack-compat/functions.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/plugins/jetpack/vendor/automattic/jetpack-compat/functions.php b/plugins/jetpack/vendor/automattic/jetpack-compat/functions.php
new file mode 100644
index 00000000..f326a46c
--- /dev/null
+++ b/plugins/jetpack/vendor/automattic/jetpack-compat/functions.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Legacy global scope functions.
+ *
+ * @package automattic/jetpack-compat
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ return;
+}
+
+// Add here, after the condition above, any code that should only run when WordPress is running.
+// Autoload will load everything even when PHPCS is running and we don't want to run these
+// in such case because they will fatal, for example, due to 'add_action' being undefined.
+
+/**
+ * Load necessary functions.
+ */
+function jetpack_compat_require_defined_functions() {
+ jetpack_require_lib( 'tracks/client' );
+}
+
+add_action( 'plugins_loaded', 'jetpack_compat_require_defined_functions' );
+
+