public function action_plugins_loaded()
 {
     # Register additional collectors:
     foreach (apply_filters('qm/collectors', array(), $this) as $collector) {
         QM_Collectors::add($collector);
     }
     # Dispatchers:
     QM_Util::include_files($this->plugin_path('dispatchers'));
     # Register built-in and additional dispatchers:
     foreach (apply_filters('qm/dispatchers', array(), $this) as $dispatcher) {
         QM_Dispatchers::add($dispatcher);
     }
 }
Example #2
0
 public function before_output()
 {
     require_once $this->qm->plugin_path('output/Headers.php');
     QM_Util::include_files($this->qm->plugin_path('output/headers'));
 }
Example #3
0
 public function before_output()
 {
     require_once $this->qm->plugin_path('output/Html.php');
     QM_Util::include_files($this->qm->plugin_path('output/html'));
     $class = array('qm-no-js');
     if (!is_admin()) {
         $absolute = function_exists('twentyfifteen_setup');
         if (apply_filters('qm/output/absolute_position', $absolute)) {
             $class[] = 'qm-absolute';
         }
     }
     if (!is_admin_bar_showing()) {
         $class[] = 'qm-show';
     }
     echo '<div id="qm" class="' . implode(' ', $class) . '">';
     echo '<div id="qm-wrapper">';
     echo '<p>' . __('Query Monitor', 'query-monitor') . '</p>';
 }