jetpack
Last commit date
3rd-party
2 years ago
_inc
2 years ago
css
2 years ago
extensions
2 years ago
images
2 years ago
jetpack_vendor
1 year ago
json-endpoints
2 years ago
modules
2 years ago
sal
2 years ago
src
2 years ago
vendor
2 years ago
views
3 years ago
CHANGELOG.md
2 years ago
LICENSE.txt
5 years ago
SECURITY.md
2 years ago
class-jetpack-connection-status.php
2 years ago
class-jetpack-gallery-settings.php
3 years ago
class-jetpack-pre-connection-jitms.php
2 years ago
class-jetpack-stats-dashboard-widget.php
2 years ago
class-jetpack-xmlrpc-methods.php
2 years ago
class.frame-nonce-preview.php
4 years ago
class.jetpack-admin.php
2 years ago
class.jetpack-affiliate.php
2 years ago
class.jetpack-autoupdate.php
2 years ago
class.jetpack-bbpress-json-api.compat.php
2 years ago
class.jetpack-cli.php
2 years ago
class.jetpack-client-server.php
2 years ago
class.jetpack-gutenberg.php
2 years ago
class.jetpack-heartbeat.php
2 years ago
class.jetpack-modules-list-table.php
2 years ago
class.jetpack-network-sites-list-table.php
2 years ago
class.jetpack-network.php
2 years ago
class.jetpack-plan.php
2 years ago
class.jetpack-post-images.php
2 years ago
class.jetpack-twitter-cards.php
2 years ago
class.jetpack-user-agent.php
2 years ago
class.jetpack.php
2 years ago
class.json-api-endpoints.php
2 years ago
class.json-api.php
2 years ago
class.photon.php
3 years ago
composer.json
2 years ago
enhanced-open-graph.php
3 years ago
functions.compat.php
2 years ago
functions.cookies.php
2 years ago
functions.global.php
2 years ago
functions.is-mobile.php
2 years ago
functions.opengraph.php
2 years ago
functions.photon.php
2 years ago
jetpack.php
1 year ago
json-api-config.php
3 years ago
json-endpoints.php
2 years ago
load-jetpack.php
2 years ago
locales.php
4 years ago
readme.txt
1 year ago
uninstall.php
2 years ago
wpml-config.xml
3 years ago
load-jetpack.php
75 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Load all Jetpack files that do not get loaded via the autoloader. |
| 4 | * |
| 5 | * @package automattic/jetpack |
| 6 | */ |
| 7 | |
| 8 | /** |
| 9 | * Checks if the code debug mode turned on, and returns false if it is. When Jetpack is in |
| 10 | * code debug mode, it shouldn't use minified assets. Note that this filter is not being used |
| 11 | * in every place where assets are enqueued. The filter is added at priority 9 to be overridden |
| 12 | * by any default priority filter that runs after it. |
| 13 | * |
| 14 | * @since 6.2.0 |
| 15 | * |
| 16 | * @return boolean |
| 17 | * |
| 18 | * @filter jetpack_should_use_minified_assets |
| 19 | */ |
| 20 | function jetpack_should_use_minified_assets() { |
| 21 | return ! defined( 'SCRIPT_DEBUG' ) || ! SCRIPT_DEBUG; |
| 22 | } |
| 23 | add_filter( 'jetpack_should_use_minified_assets', 'jetpack_should_use_minified_assets', 9 ); |
| 24 | |
| 25 | // @todo: Abstract out the admin functions, and only include them if is_admin() |
| 26 | require_once JETPACK__PLUGIN_DIR . 'class.jetpack.php'; |
| 27 | require_once JETPACK__PLUGIN_DIR . 'class.jetpack-network.php'; |
| 28 | require_once JETPACK__PLUGIN_DIR . 'class.jetpack-client-server.php'; |
| 29 | require_once JETPACK__PLUGIN_DIR . 'class.jetpack-user-agent.php'; |
| 30 | require_once JETPACK__PLUGIN_DIR . 'class.jetpack-post-images.php'; |
| 31 | require_once JETPACK__PLUGIN_DIR . 'class.jetpack-heartbeat.php'; |
| 32 | require_once JETPACK__PLUGIN_DIR . 'class.photon.php'; |
| 33 | require_once JETPACK__PLUGIN_DIR . 'functions.photon.php'; |
| 34 | require_once JETPACK__PLUGIN_DIR . 'functions.global.php'; |
| 35 | require_once JETPACK__PLUGIN_DIR . 'functions.compat.php'; |
| 36 | require_once JETPACK__PLUGIN_DIR . 'class-jetpack-gallery-settings.php'; |
| 37 | require_once JETPACK__PLUGIN_DIR . 'functions.cookies.php'; |
| 38 | require_once JETPACK__PLUGIN_DIR . 'class.jetpack-autoupdate.php'; |
| 39 | require_once JETPACK__PLUGIN_DIR . 'class.frame-nonce-preview.php'; |
| 40 | require_once JETPACK__PLUGIN_DIR . 'modules/module-headings.php'; |
| 41 | require_once JETPACK__PLUGIN_DIR . 'class.jetpack-plan.php'; |
| 42 | // Used by the API endpoints. |
| 43 | require_once JETPACK__PLUGIN_DIR . 'modules/seo-tools/class-jetpack-seo-utils.php'; |
| 44 | require_once JETPACK__PLUGIN_DIR . 'modules/seo-tools/class-jetpack-seo-titles.php'; |
| 45 | require_once JETPACK__PLUGIN_DIR . 'modules/seo-tools/class-jetpack-seo-posts.php'; |
| 46 | require_once JETPACK__PLUGIN_DIR . 'modules/verification-tools/verification-tools-utils.php'; |
| 47 | |
| 48 | require_once JETPACK__PLUGIN_DIR . 'class-jetpack-xmlrpc-methods.php'; |
| 49 | Jetpack_XMLRPC_Methods::init(); |
| 50 | |
| 51 | require_once JETPACK__PLUGIN_DIR . 'class-jetpack-connection-status.php'; |
| 52 | Jetpack_Connection_Status::init(); |
| 53 | |
| 54 | require_once JETPACK__PLUGIN_DIR . '_inc/lib/class-jetpack-recommendations.php'; |
| 55 | |
| 56 | if ( is_admin() ) { |
| 57 | require_once JETPACK__PLUGIN_DIR . 'class.jetpack-admin.php'; |
| 58 | require_once JETPACK__PLUGIN_DIR . '_inc/lib/debugger.php'; |
| 59 | } |
| 60 | |
| 61 | // Play nice with https://wp-cli.org/. |
| 62 | if ( defined( 'WP_CLI' ) && WP_CLI ) { |
| 63 | require_once JETPACK__PLUGIN_DIR . 'class.jetpack-cli.php'; |
| 64 | } |
| 65 | |
| 66 | require_once JETPACK__PLUGIN_DIR . '_inc/lib/class.core-rest-api-endpoints.php'; |
| 67 | require_once JETPACK__PLUGIN_DIR . '_inc/blogging-prompts.php'; |
| 68 | |
| 69 | add_action( 'updating_jetpack_version', array( 'Jetpack', 'do_version_bump' ), 10, 2 ); |
| 70 | add_filter( 'is_jetpack_site', '__return_true' ); |
| 71 | |
| 72 | require_once JETPACK__PLUGIN_DIR . '3rd-party/3rd-party.php'; |
| 73 | |
| 74 | Jetpack::init(); |
| 75 |