-
Notifications
You must be signed in to change notification settings - Fork 800
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
3rd party tools: update the way the files are required (#12026)
* 3rd party tools: update the way the files are required This change: - makes it easier to add new files to that list in the future. - allows us to sync that file with WordPress.com. On WordPress.com, since some of the compat files do not exist, they just won't be required. - orders the list alphabetically - fixes all phpcs warnings * Add 3rd party loading file to phpcs whitelist.
- Loading branch information
Showing
2 changed files
with
27 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,31 @@ | ||
<?php | ||
|
||
/** | ||
* Placeholder to load 3rd party plugin tweaks until a legit system | ||
* is architected | ||
* Compatibility files for third-party plugins. | ||
* This is used to improve compatibility of specific Jetpack features with third-party plugins. | ||
* | ||
* @package Jetpack | ||
*/ | ||
|
||
require_once( JETPACK__PLUGIN_DIR . '3rd-party/buddypress.php' ); | ||
require_once( JETPACK__PLUGIN_DIR . '3rd-party/wpml.php' ); | ||
require_once( JETPACK__PLUGIN_DIR . '3rd-party/bitly.php' ); | ||
require_once( JETPACK__PLUGIN_DIR . '3rd-party/bbpress.php' ); | ||
require_once( JETPACK__PLUGIN_DIR . '3rd-party/woocommerce.php' ); | ||
require_once( JETPACK__PLUGIN_DIR . '3rd-party/domain-mapping.php' ); | ||
require_once( JETPACK__PLUGIN_DIR . '3rd-party/qtranslate-x.php' ); | ||
require_once( JETPACK__PLUGIN_DIR . '3rd-party/vaultpress.php' ); | ||
require_once( JETPACK__PLUGIN_DIR . '3rd-party/beaverbuilder.php' ); | ||
require_once( JETPACK__PLUGIN_DIR . '3rd-party/debug-bar.php' ); | ||
require_once( JETPACK__PLUGIN_DIR . '3rd-party/class.jetpack-modules-overrides.php' ); | ||
// 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', | ||
); | ||
|
||
// We can't load this conditionally since polldaddy add the call in class constuctor. | ||
require_once( JETPACK__PLUGIN_DIR . '3rd-party/polldaddy.php' ); | ||
require_once( JETPACK__PLUGIN_DIR . '3rd-party/woocommerce-services.php' ); | ||
require_once( JETPACK__PLUGIN_DIR . '3rd-party/class.jetpack-amp-support.php' ); | ||
foreach ( $compat_files as $file ) { | ||
if ( file_exists( JETPACK__PLUGIN_DIR . '/3rd-party/' . $file ) ) { | ||
require_once JETPACK__PLUGIN_DIR . '/3rd-party/' . $file; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters