PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.2
Jetpack – WP Security, Backup, Speed, & Growth v16.2
16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 14.1.1 14.2.2 All 502 releases
jetpack / 3rd-party / 3rd-party.php

3rd-party.php in Jetpack – WP Security, Backup, Speed, & Growth 16.2, at 3rd-party/3rd-party.php

104 lines 3.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 automattic/jetpack
7 */
8
9 namespace Automattic\Jetpack;
10
11 use Automattic\Jetpack\Status\Host;
12
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit( 0 );
15 }
16
17 add_action( 'plugins_loaded', __NAMESPACE__ . '\load_3rd_party_compat_filters', 11 );
18 /**
19 * Loads the individual 3rd-party compat functions.
20 *
21 * This is a refactor of load_3rd_party() to load the individual compat files only when needed instead of universally.
22 */
23 function load_3rd_party_compat_filters() {
24
25 // ActivityPub
26 if ( Constants::is_defined( 'ACTIVITYPUB_PLUGIN_VERSION' ) ) {
27 require_once JETPACK__PLUGIN_DIR . '/3rd-party/activitypub.php';
28 }
29
30 // bbPress
31 if ( function_exists( 'bbpress' ) ) {
32 require_once JETPACK__PLUGIN_DIR . '/3rd-party/bbpress.php';
33 }
34
35 // Beaver Builder
36 if ( class_exists( 'FLBuilder' ) ) {
37 require_once JETPACK__PLUGIN_DIR . '/3rd-party/beaverbuilder.php';
38 }
39
40 // Bitly
41 if ( class_exists( 'Bitly' ) ) {
42 require_once JETPACK__PLUGIN_DIR . '/3rd-party/bitly.php';
43 }
44
45 // BuddyPress
46 if ( class_exists( 'BuddyPress' ) ) {
47 require_once JETPACK__PLUGIN_DIR . '/3rd-party/buddypress.php';
48 }
49
50 // AMP. AMP__DIR__ is defined in the AMP plugin since the very first version.
51 if ( Constants::is_defined( 'AMP__DIR__' ) ) {
52 require_once JETPACK__PLUGIN_DIR . '/3rd-party/amp.php';
53 }
54
55 // Domain Mapping. All assume multisite, so it's an easy check.
56 if ( Constants::is_defined( 'SUNRISE' ) ) {
57 require_once JETPACK__PLUGIN_DIR . '/3rd-party/class-domain-mapping.php';
58 }
59
60 // Debug Bar
61 if ( class_exists( 'Debug_Bar' ) ) {
62 require_once JETPACK__PLUGIN_DIR . '/3rd-party/debug-bar.php';
63 }
64
65 // Letting these always load since it handles somethings upon plugin activation.
66 require_once JETPACK__PLUGIN_DIR . '/3rd-party/creative-mail.php';
67 require_once JETPACK__PLUGIN_DIR . '/3rd-party/jetpack-backup.php';
68 require_once JETPACK__PLUGIN_DIR . '/3rd-party/jetpack-boost.php';
69 require_once JETPACK__PLUGIN_DIR . '/3rd-party/woocommerce-services.php';
70
71 // qTranslate. Plugin closed in 2021, but leaving support for now to allow sites to drop it.
72 if ( Constants::is_defined( 'QTX_VERSION' ) ) {
73 require_once JETPACK__PLUGIN_DIR . '/3rd-party/qtranslate-x.php';
74 }
75
76 // VaultPress.
77 if ( Constants::is_defined( 'VAULTPRESS__VERSION' ) || class_exists( 'VaultPress' ) ) {
78 require_once JETPACK__PLUGIN_DIR . '/3rd-party/vaultpress.php';
79 }
80
81 // Web Stories
82 if ( Constants::is_defined( 'WEBSTORIES_VERSION' ) ) {
83 require_once JETPACK__PLUGIN_DIR . '/3rd-party/web-stories.php';
84 }
85
86 // WooCommerce
87 if ( class_exists( 'WooCommerce' ) ) {
88 require_once JETPACK__PLUGIN_DIR . '/3rd-party/woocommerce.php';
89 }
90
91 // Atomic Weekly
92 if ( ( new Host() )->is_atomic_platform() ) {
93 require_once JETPACK__PLUGIN_DIR . '/3rd-party/atomic.php';
94 }
95
96 // WordPress.com Reader
97 require_once JETPACK__PLUGIN_DIR . '/3rd-party/wpcom-reader.php';
98
99 // WPML
100 if ( defined( 'ICL_SITEPRESS_VERSION' ) ) {
101 require_once JETPACK__PLUGIN_DIR . '/3rd-party/wpml.php';
102 }
103 }
104