blob: 45f20dc93251189b726f2ea2e20a7768a0426307 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<?php
/**
* 3rd Party integration for Debug Bar.
*
* @package automattic/jetpack
*/
/**
* Checks if the search module is active, and if so, will initialize the singleton instance
* of Jetpack_Search_Debug_Bar and add it to the array of debug bar panels.
*
* @param array $panels The array of debug bar panels.
* @return array $panel The array of debug bar panels with our added panel.
*/
function init_jetpack_search_debug_bar( $panels ) {
if ( ! Jetpack::is_module_active( 'search' ) ) {
return $panels;
}
require_once __DIR__ . '/debug-bar/class-jetpack-search-debug-bar.php';
$panels[] = Jetpack_Search_Debug_Bar::instance();
return $panels;
}
add_filter( 'debug_bar_panels', 'init_jetpack_search_debug_bar' );
|