Completed
Push — update/package-release-managem... ( 7f9196...940e6c )
by Jeremy
82:11 queued 75:34
created

3rd-party.php ➔ load_3rd_party()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 25

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
nc 3
nop 0
dl 0
loc 25
rs 9.52
c 0
b 0
f 0
1
<?php
2
/**
3
 * Compatibility files for third-party plugins.
4
 * This is used to improve compatibility of specific Jetpack features with third-party plugins.
5
 *
6
 * @package Jetpack
7
 */
8
9
namespace Automattic\Jetpack;
10
11
/**
12
 * Loads the individual 3rd-party compat files.
13
 */
14
function load_3rd_party() {
15
	// Array of third-party compat files to always require.
16
	$compat_files = array(
17
		'bbpress.php',
18
		'beaverbuilder.php',
19
		'bitly.php',
20
		'buddypress.php',
21
		'class.jetpack-amp-support.php',
22
		'class.jetpack-modules-overrides.php', // Special case. Tools to be used to override module settings.
23
		'debug-bar.php',
24
		'domain-mapping.php',
25
		'polldaddy.php',
26
		'qtranslate-x.php',
27
		'vaultpress.php',
28
		'wpml.php',
29
		'woocommerce.php',
30
		'woocommerce-services.php',
31
	);
32
33
	foreach ( $compat_files as $file ) {
34
		if ( file_exists( JETPACK__PLUGIN_DIR . '/3rd-party/' . $file ) ) {
35
			require_once JETPACK__PLUGIN_DIR . '/3rd-party/' . $file;
36
		}
37
	}
38
}
39
40
load_3rd_party();
41