summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/3rd-party/3rd-party.php')
-rw-r--r--plugins/jetpack/3rd-party/3rd-party.php49
1 files changed, 29 insertions, 20 deletions
diff --git a/plugins/jetpack/3rd-party/3rd-party.php b/plugins/jetpack/3rd-party/3rd-party.php
index 3af6299d..1db4fafd 100644
--- a/plugins/jetpack/3rd-party/3rd-party.php
+++ b/plugins/jetpack/3rd-party/3rd-party.php
@@ -6,26 +6,35 @@
* @package Jetpack
*/
-// Array of third-party compat files to always require.
-$compat_files = array(
- 'bbpress.php',
- 'beaverbuilder.php',
- 'bitly.php',
- 'buddypress.php',
- 'class.jetpack-amp-support.php',
- 'class.jetpack-modules-overrides.php', // Special case. Tools to be used to override module settings.
- 'debug-bar.php',
- 'domain-mapping.php',
- 'polldaddy.php',
- 'qtranslate-x.php',
- 'vaultpress.php',
- 'wpml.php',
- 'woocommerce.php',
- 'woocommerce-services.php',
-);
+namespace Automattic\Jetpack;
-foreach ( $compat_files as $file ) {
- if ( file_exists( JETPACK__PLUGIN_DIR . '/3rd-party/' . $file ) ) {
- require_once JETPACK__PLUGIN_DIR . '/3rd-party/' . $file;
+/**
+ * Loads the individual 3rd-party compat files.
+ */
+function load_3rd_party() {
+ // Array of third-party compat files to always require.
+ $compat_files = array(
+ 'bbpress.php',
+ 'beaverbuilder.php',
+ 'bitly.php',
+ 'buddypress.php',
+ 'class.jetpack-amp-support.php',
+ 'class.jetpack-modules-overrides.php', // Special case. Tools to be used to override module settings.
+ 'debug-bar.php',
+ 'domain-mapping.php',
+ 'polldaddy.php',
+ 'qtranslate-x.php',
+ 'vaultpress.php',
+ 'wpml.php',
+ 'woocommerce.php',
+ 'woocommerce-services.php',
+ );
+
+ foreach ( $compat_files as $file ) {
+ if ( file_exists( JETPACK__PLUGIN_DIR . '/3rd-party/' . $file ) ) {
+ require_once JETPACK__PLUGIN_DIR . '/3rd-party/' . $file;
+ }
}
}
+
+load_3rd_party();