diff options
Diffstat (limited to 'plugins/jetpack/modules/theme-tools/site-logo/inc')
-rw-r--r-- | plugins/jetpack/modules/theme-tools/site-logo/inc/class-site-logo-control.php | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/plugins/jetpack/modules/theme-tools/site-logo/inc/class-site-logo-control.php b/plugins/jetpack/modules/theme-tools/site-logo/inc/class-site-logo-control.php index 5e23507d..209cc000 100644 --- a/plugins/jetpack/modules/theme-tools/site-logo/inc/class-site-logo-control.php +++ b/plugins/jetpack/modules/theme-tools/site-logo/inc/class-site-logo-control.php @@ -54,8 +54,27 @@ class Site_Logo_Image_Control extends WP_Customize_Control { // Enqueues all needed media resources. wp_enqueue_media(); - // Enqueue our control script and styles. - wp_enqueue_style( 'site-logo-control', plugins_url( '../css/site-logo-control.css', __FILE__ ) ); + /* + * Enqueue our control script and styles. + */ + + // We only enqueue a minified version of the file on prod. Jetpack. + $min = ( + ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) + || ( defined( 'IS_WPCOM' ) && IS_WPCOM ) + ) + ? '' + : '.min'; + + wp_enqueue_style( + 'site-logo-control', + plugins_url( '../css/site-logo-control.css', __FILE__ ), + array(), + JETPACK__VERSION + ); + wp_style_add_data( 'site-logo-control', 'rtl', 'replace' ); + wp_style_add_data( 'site-logo-control', 'suffix', $min ); + wp_enqueue_script( 'site-logo-control', plugins_url( '../js/site-logo-control.js', __FILE__ ), array( 'media-views', 'customize-controls', 'underscore' ), '', true ); } |