Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
2.44% covered (danger)
2.44%
1 / 41
100.00% covered (success)
100.00%
1 / 1
CRAP
n/a
0 / 0
jetpack_should_use_minified_assets
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
2
1<?php
2/**
3 * Load all Jetpack files that do not get loaded via the autoloader.
4 *
5 * @package automattic/jetpack
6 */
7
8if ( ! defined( 'ABSPATH' ) ) {
9    exit( 0 );
10}
11
12/**
13 * Checks if the code debug mode turned on, and returns false if it is. When Jetpack is in
14 * code debug mode, it shouldn't use minified assets. Note that this filter is not being used
15 * in every place where assets are enqueued. The filter is added at priority 9 to be overridden
16 * by any default priority filter that runs after it.
17 *
18 * @since 6.2.0
19 *
20 * @return boolean
21 *
22 * @filter jetpack_should_use_minified_assets
23 */
24function jetpack_should_use_minified_assets() {
25    return ! defined( 'SCRIPT_DEBUG' ) || ! SCRIPT_DEBUG;
26}
27add_filter( 'jetpack_should_use_minified_assets', 'jetpack_should_use_minified_assets', 9 );
28
29// @todo: Abstract out the admin functions, and only include them if is_admin()
30require_once JETPACK__PLUGIN_DIR . 'class.jetpack.php';
31require_once JETPACK__PLUGIN_DIR . 'class.jetpack-network.php';
32require_once JETPACK__PLUGIN_DIR . 'class.jetpack-client-server.php';
33require_once JETPACK__PLUGIN_DIR . 'class.jetpack-user-agent.php';
34require_once JETPACK__PLUGIN_DIR . 'class.jetpack-post-images.php';
35require_once JETPACK__PLUGIN_DIR . 'class.jetpack-heartbeat.php';
36require_once JETPACK__PLUGIN_DIR . 'class.photon.php';
37require_once JETPACK__PLUGIN_DIR . 'functions.photon.php';
38require_once JETPACK__PLUGIN_DIR . 'functions.global.php';
39require_once JETPACK__PLUGIN_DIR . 'functions.compat.php';
40require_once JETPACK__PLUGIN_DIR . 'class-jetpack-gallery-settings.php';
41require_once JETPACK__PLUGIN_DIR . 'functions.cookies.php';
42require_once JETPACK__PLUGIN_DIR . 'class.jetpack-autoupdate.php';
43require_once JETPACK__PLUGIN_DIR . 'class.frame-nonce-preview.php';
44require_once JETPACK__PLUGIN_DIR . 'modules/module-headings.php';
45require_once JETPACK__PLUGIN_DIR . 'class.jetpack-plan.php';
46// Used by the API endpoints or used in an odd number of places.
47require_once JETPACK__PLUGIN_DIR . 'modules/seo-tools/class-jetpack-seo-utils.php';
48require_once JETPACK__PLUGIN_DIR . 'modules/seo-tools/class-jetpack-seo-titles.php';
49require_once JETPACK__PLUGIN_DIR . 'modules/seo-tools/class-jetpack-seo-posts.php';
50require_once JETPACK__PLUGIN_DIR . 'modules/verification-tools/verification-tools-utils.php';
51require_once JETPACK__PLUGIN_DIR . 'modules/shortcodes/shortcode-utils.php'; // Shortcodes are often referenced in other modules, so making it available early.
52
53require_once JETPACK__PLUGIN_DIR . 'class-jetpack-xmlrpc-methods.php';
54Jetpack_XMLRPC_Methods::init();
55
56require_once JETPACK__PLUGIN_DIR . 'class-jetpack-connection-status.php';
57Jetpack_Connection_Status::init();
58
59require_once JETPACK__PLUGIN_DIR . '_inc/lib/class-jetpack-recommendations.php';
60
61if ( is_admin() ) {
62    require_once JETPACK__PLUGIN_DIR . 'class.jetpack-admin.php';
63    require_once JETPACK__PLUGIN_DIR . '_inc/lib/debugger.php';
64}
65
66// Play nice with https://wp-cli.org/.
67if ( defined( 'WP_CLI' ) && WP_CLI ) {
68    require_once JETPACK__PLUGIN_DIR . 'class.jetpack-cli.php';
69}
70
71require_once JETPACK__PLUGIN_DIR . '_inc/lib/class.core-rest-api-endpoints.php';
72require_once JETPACK__PLUGIN_DIR . '_inc/blogging-prompts.php';
73
74add_action( 'updating_jetpack_version', array( 'Jetpack', 'do_version_bump' ), 10, 2 );
75add_filter( 'is_jetpack_site', '__return_true' );
76
77require_once JETPACK__PLUGIN_DIR . '3rd-party/3rd-party.php';
78
79Jetpack::init();