@@ -26,7 +26,8 @@ discard block |
||
| 26 | 26 | if (!empty($this->hooks)) { |
| 27 | 27 | return $this->hooks; |
| 28 | 28 | } |
| 29 | - array_walk($this->entries, function (&$data) { |
|
| 29 | + array_walk($this->entries, function (&$data) |
|
| 30 | + { |
|
| 30 | 31 | $total = $this->totalTimeForHook($data); |
| 31 | 32 | $perCall = (int) round($total / $data['count']); |
| 32 | 33 | $data['per_call'] = $this->formatTime($perCall); |
@@ -113,9 +114,11 @@ discard block |
||
| 113 | 114 | } |
| 114 | 115 | } |
| 115 | 116 | $results[$priority][] = sprintf('%s::%s', $object, $method); |
| 116 | - } elseif (is_object($callback['function'])) { |
|
| 117 | + } |
|
| 118 | + elseif (is_object($callback['function'])) { |
|
| 117 | 119 | $results[$priority][] = get_class($callback['function']); |
| 118 | - } else { |
|
| 120 | + } |
|
| 121 | + else { |
|
| 119 | 122 | $results[$priority][] = $callback['function']; |
| 120 | 123 | } |
| 121 | 124 | } |
@@ -2,13 +2,19 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | <div id="glbb"> |
| 4 | 4 | <?php foreach ($modules as $module) : /* Ensure that the console entries are loaded last */ ?> |
| 5 | - <?php if (!$module->isVisible() || 'glbb-console' === $module->id()) continue; ?> |
|
| 5 | + <?php if (!$module->isVisible() || 'glbb-console' === $module->id()) { |
|
| 6 | + continue; |
|
| 7 | +} |
|
| 8 | +?> |
|
| 6 | 9 | <div id="<?= $module->id(); ?>" class="glbb-panel glbb-hidden"> |
| 7 | 10 | <?php $module->render(); ?> |
| 8 | 11 | </div> |
| 9 | 12 | <?php endforeach; ?> |
| 10 | 13 | <?php foreach ($modules as $module) : /* Ensure that the console entries are loaded last */ ?> |
| 11 | - <?php if (!$module->isVisible() || 'glbb-console' !== $module->id()) continue; ?> |
|
| 14 | + <?php if (!$module->isVisible() || 'glbb-console' !== $module->id()) { |
|
| 15 | + continue; |
|
| 16 | +} |
|
| 17 | +?> |
|
| 12 | 18 | <div id="<?= $module->id(); ?>" class="glbb-panel glbb-hidden"> |
| 13 | 19 | <?php $module->render(); ?> |
| 14 | 20 | </div> |
@@ -20,7 +26,10 @@ discard block |
||
| 20 | 26 | </span> |
| 21 | 27 | </a> |
| 22 | 28 | <?php foreach ($modules as $module) : ?> |
| 23 | - <?php if (!$module->isVisible()) continue; ?> |
|
| 29 | + <?php if (!$module->isVisible()) { |
|
| 30 | + continue; |
|
| 31 | +} |
|
| 32 | +?> |
|
| 24 | 33 | <a href="#" data-panel="<?= esc_attr($module->id()); ?>" data-info="<?= esc_attr($module->info()); ?>" class="dashicons-before <?= $module->classes(); ?>"> |
| 25 | 34 | <span><?= $module->label(); ?></span> |
| 26 | 35 | </a> |