summaryrefslogtreecommitdiff
blob: f326a46c7ad8fd94ac06e76f6b91820e3015e4d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
/**
 * Legacy global scope functions.
 *
 * @package automattic/jetpack-compat
 */

if ( ! defined( 'ABSPATH' ) ) {
	return;
}

// Add here, after the condition above, any code that should only run when WordPress is running.
// Autoload will load everything even when PHPCS is running and we don't want to run these
// in such case because they will fatal, for example, due to 'add_action' being undefined.

/**
 * Load necessary functions.
 */
function jetpack_compat_require_defined_functions() {
	jetpack_require_lib( 'tracks/client' );
}

add_action( 'plugins_loaded', 'jetpack_compat_require_defined_functions' );