summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/3rd-party/debug-bar/class.jetpack-search-debug-bar.php')
-rw-r--r--plugins/jetpack/3rd-party/debug-bar/class.jetpack-search-debug-bar.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/jetpack/3rd-party/debug-bar/class.jetpack-search-debug-bar.php b/plugins/jetpack/3rd-party/debug-bar/class.jetpack-search-debug-bar.php
index 5d00c5a0..c32d7e01 100644
--- a/plugins/jetpack/3rd-party/debug-bar/class.jetpack-search-debug-bar.php
+++ b/plugins/jetpack/3rd-party/debug-bar/class.jetpack-search-debug-bar.php
@@ -26,6 +26,8 @@ class Jetpack_Search_Debug_Bar extends Debug_Bar_Panel {
$this->title( esc_html__( 'Jetpack Search', 'jetpack' ) );
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
+ add_action( 'login_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
+ add_action( 'enqueue_embed_scripts', array( $this, 'enqueue_scripts' ) );
}
/**
@@ -46,6 +48,11 @@ class Jetpack_Search_Debug_Bar extends Debug_Bar_Panel {
* @return void
*/
public function enqueue_scripts() {
+ // Do not enqueue scripts if we haven't already enqueued Debug Bar or Query Monitor styles.
+ if ( ! wp_style_is( 'debug-bar' ) && ! wp_style_is( 'query-monitor' ) ) {
+ return;
+ }
+
wp_enqueue_style(
'jetpack-search-debug-bar',
plugins_url( '3rd-party/debug-bar/debug-bar.css', JETPACK__PLUGIN_FILE )