diff options
Diffstat (limited to 'plugins/jetpack/modules/custom-css.php')
-rw-r--r-- | plugins/jetpack/modules/custom-css.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/jetpack/modules/custom-css.php b/plugins/jetpack/modules/custom-css.php index ede1f529..8e2999d5 100644 --- a/plugins/jetpack/modules/custom-css.php +++ b/plugins/jetpack/modules/custom-css.php @@ -52,7 +52,18 @@ function custom_css_loaded() { } function custom_css_configuration_load() { - wp_safe_redirect( admin_url( 'themes.php?page=editcss#settingsdiv' ) ); + // Redirect to Core's CSS editor in the customizer if the feature is available. + if ( function_exists( 'wp_get_custom_css' ) ) { + $configuration_link = Jetpack_Custom_CSS_Enhancements::customizer_link( + array( + 'return_url' => wp_get_referer(), + ) + ); + } else { + $configuration_link = admin_url( 'themes.php?page=editcss#settingsdiv' ); + } + + wp_safe_redirect( $configuration_link ); exit; } |