Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3rd party tools: update the way the files are required #12026

Merged
merged 2 commits into from
Apr 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 26 additions & 18 deletions 3rd-party/3rd-party.php
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;
}
}
1 change: 1 addition & 0 deletions bin/phpcs-whitelist.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// If the file path starts with anything like in the array below, it should be linted.
module.exports = [
'3rd-party/3rd-party.php',
'class.jetpack-gutenberg.php',
'class.jetpack-plan.php',
'extensions/',
Expand Down