Nessuna descrizione

debug-bar.php 733B

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