diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2020-01-06 14:32:30 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2020-01-06 14:32:30 -0500 |
commit | 10ef81bf85ad0a4bad0d204838e14c99ca2526f7 (patch) | |
tree | b4bb36a326d41de12d1a6181d2a2baf34696ac24 /plugins/jetpack/modules/theme-tools/site-logo/inc/class-site-logo-control.php | |
parent | Updating script for Update (diff) | |
download | blogs-gentoo-10ef81bf85ad0a4bad0d204838e14c99ca2526f7.tar.gz blogs-gentoo-10ef81bf85ad0a4bad0d204838e14c99ca2526f7.tar.bz2 blogs-gentoo-10ef81bf85ad0a4bad0d204838e14c99ca2526f7.zip |
Update jetpack 8.0
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'plugins/jetpack/modules/theme-tools/site-logo/inc/class-site-logo-control.php')
-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 ); } |