diff options
Diffstat (limited to 'plugins/jetpack/jetpack.php')
-rw-r--r-- | plugins/jetpack/jetpack.php | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/plugins/jetpack/jetpack.php b/plugins/jetpack/jetpack.php index 7af5b741..c7505e45 100644 --- a/plugins/jetpack/jetpack.php +++ b/plugins/jetpack/jetpack.php @@ -5,7 +5,7 @@ * Plugin URI: https://jetpack.com * Description: Bring the power of the WordPress.com cloud to your self-hosted WordPress. Jetpack enables you to connect your blog to a WordPress.com account to use the powerful features normally only available to WordPress.com users. * Author: Automattic - * Version: 6.0 + * Version: 6.2 * Author URI: https://jetpack.com * License: GPL2+ * Text Domain: jetpack @@ -14,7 +14,7 @@ define( 'JETPACK__MINIMUM_WP_VERSION', '4.7' ); -define( 'JETPACK__VERSION', '6.0' ); +define( 'JETPACK__VERSION', '6.2' ); define( 'JETPACK_MASTER_USER', true ); define( 'JETPACK__API_VERSION', 1 ); define( 'JETPACK__PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); @@ -42,6 +42,26 @@ function jetpack_require_lib_dir() { } add_filter( 'jetpack_require_lib_dir', 'jetpack_require_lib_dir' ); +/** + * Checks if the code debug mode turned on, and returns false if it is. When Jetpack is in + * code debug mode, it shouldn't use minified assets. Note that this filter is not being used + * in every place where assets are enqueued. The filter is added at priority 9 to be overridden + * by any default priority filter that runs after it. + * + * @since 6.2.0 + * + * @return boolean + * + * @filter jetpack_should_use_minified_assets + */ +function jetpack_should_use_minified_assets() { + if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) { + return false; + } + return true; +} +add_filter( 'jetpack_should_use_minified_assets', 'jetpack_should_use_minified_assets', 9 ); + // @todo: Abstract out the admin functions, and only include them if is_admin() require_once( JETPACK__PLUGIN_DIR . 'class.jetpack.php' ); require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-network.php' ); |