@@ -1,13 +1,13 @@ |
||
1 | -<?php defined('WPINC') || die; ?> |
|
1 | +<?php defined( 'WPINC' ) || die; ?> |
|
2 | 2 | |
3 | -<?php if ($globals->hasEntries()) : ?> |
|
3 | +<?php if( $globals->hasEntries() ) : ?> |
|
4 | 4 | <table class="glbb-grid"> |
5 | 5 | <tbody> |
6 | - <?php foreach ($globals->entries() as $entry) : ?> |
|
6 | + <?php foreach( $globals->entries() as $entry ) : ?> |
|
7 | 7 | <tr class="glbb-row-collapsed"> |
8 | - <td><div class="glbb-row-toggle dashicons-before dashicons-arrow-right"><?= esc_html($entry['name']); ?></div></td> |
|
8 | + <td><div class="glbb-row-toggle dashicons-before dashicons-arrow-right"><?= esc_html( $entry[ 'name' ] ); ?></div></td> |
|
9 | 9 | <td class="glbb-row-details"> |
10 | - <pre><code><?= esc_html($entry['value']); ?></code></pre></td> |
|
10 | + <pre><code><?= esc_html( $entry[ 'value' ] ); ?></code></pre></td> |
|
11 | 11 | </tr> |
12 | 12 | </tr> |
13 | 13 | <?php endforeach; ?> |
@@ -1,10 +1,10 @@ discard block |
||
1 | -<?php defined('WPINC') || die; ?> |
|
1 | +<?php defined( 'WPINC' ) || die; ?> |
|
2 | 2 | |
3 | 3 | <table> |
4 | - <?php if (!$profiler->hasEntries()) : ?> |
|
4 | + <?php if( !$profiler->hasEntries() ) : ?> |
|
5 | 5 | <tbody> |
6 | 6 | <tr> |
7 | - <td><?= __('No entries found.', 'blackbar'); ?></td> |
|
7 | + <td><?= __( 'No entries found.', 'blackbar' ); ?></td> |
|
8 | 8 | </tr> |
9 | 9 | </tbody> |
10 | 10 | <?php else : ?> |
@@ -18,13 +18,13 @@ discard block |
||
18 | 18 | </tr> |
19 | 19 | </thead> |
20 | 20 | <tbody> |
21 | - <?php foreach ($profiler->entries() as $entry) : ?> |
|
21 | + <?php foreach( $profiler->entries() as $entry ) : ?> |
|
22 | 22 | <tr> |
23 | - <td><?= esc_html($entry['name']); ?></td> |
|
24 | - <td style="text-align: right;"><?= esc_html($entry['memory']); ?> KB</td> |
|
25 | - <td style="text-align: right;"><?= esc_html($entry['start']); ?></td> |
|
26 | - <td style="text-align: right;"><?= esc_html($entry['stop']); ?></td> |
|
27 | - <td style="text-align: right;"><?= esc_html($entry['time']); ?></td> |
|
23 | + <td><?= esc_html( $entry[ 'name' ] ); ?></td> |
|
24 | + <td style="text-align: right;"><?= esc_html( $entry[ 'memory' ] ); ?> KB</td> |
|
25 | + <td style="text-align: right;"><?= esc_html( $entry[ 'start' ] ); ?></td> |
|
26 | + <td style="text-align: right;"><?= esc_html( $entry[ 'stop' ] ); ?></td> |
|
27 | + <td style="text-align: right;"><?= esc_html( $entry[ 'time' ] ); ?></td> |
|
28 | 28 | </tr> |
29 | 29 | <?php endforeach; ?> |
30 | 30 | </tbody> |
@@ -7,7 +7,8 @@ discard block |
||
7 | 7 | <td><?= __('No entries found.', 'blackbar'); ?></td> |
8 | 8 | </tr> |
9 | 9 | </tbody> |
10 | - <?php else : ?> |
|
10 | + <?php else { |
|
11 | + : ?> |
|
11 | 12 | <thead> |
12 | 13 | <tr> |
13 | 14 | <th>Timer Name</th> |
@@ -20,7 +21,9 @@ discard block |
||
20 | 21 | <tbody> |
21 | 22 | <?php foreach ($profiler->entries() as $entry) : ?> |
22 | 23 | <tr> |
23 | - <td><?= esc_html($entry['name']); ?></td> |
|
24 | + <td><?= esc_html($entry['name']); |
|
25 | +} |
|
26 | +?></td> |
|
24 | 27 | <td style="text-align: right;"><?= esc_html($entry['memory']); ?> KB</td> |
25 | 28 | <td style="text-align: right;"><?= esc_html($entry['start']); ?></td> |
26 | 29 | <td style="text-align: right;"><?= esc_html($entry['stop']); ?></td> |
@@ -1,45 +1,45 @@ |
||
1 | -<?php defined('WPINC') || die; ?> |
|
1 | +<?php defined( 'WPINC' ) || die; ?> |
|
2 | 2 | |
3 | -<?php if (!$actions->hasEntries()) : ?> |
|
3 | +<?php if( !$actions->hasEntries() ) : ?> |
|
4 | 4 | <table> |
5 | 5 | <tbody> |
6 | 6 | <tr> |
7 | - <td><?= esc_html__('Please deactivate the Debug Bar Slow Actions plugin.', 'blackbar'); ?></td> |
|
7 | + <td><?= esc_html__( 'Please deactivate the Debug Bar Slow Actions plugin.', 'blackbar' ); ?></td> |
|
8 | 8 | </tr> |
9 | 9 | </tbody> |
10 | 10 | </table> |
11 | 11 | <?php else : ?> |
12 | 12 | <form> |
13 | - <input type="text" id="glbb_actions_callback" placeholder="<?= esc_attr__('Find callbacks containing', 'blackbar'); ?>"> |
|
14 | - <input type="text" id="glbb_actions_min_time" placeholder="<?= esc_attr__('Minimum total time', 'blackbar'); ?>"> |
|
13 | + <input type="text" id="glbb_actions_callback" placeholder="<?= esc_attr__( 'Find callbacks containing', 'blackbar' ); ?>"> |
|
14 | + <input type="text" id="glbb_actions_min_time" placeholder="<?= esc_attr__( 'Minimum total time', 'blackbar' ); ?>"> |
|
15 | 15 | <select id="glbb_actions_sort_by"> |
16 | - <option value><?= esc_html__('Sort by total time', 'blackbar'); ?></option> |
|
17 | - <option value="order"><?= esc_html__('Sort by execution order', 'blackbar'); ?></option> |
|
16 | + <option value><?= esc_html__( 'Sort by total time', 'blackbar' ); ?></option> |
|
17 | + <option value="order"><?= esc_html__( 'Sort by execution order', 'blackbar' ); ?></option> |
|
18 | 18 | </select> |
19 | 19 | </form> |
20 | 20 | <table class="glbb-grid"> |
21 | 21 | <thead> |
22 | 22 | <tr> |
23 | - <th><?= esc_html__('Action or Filter (Slowest 50)', 'blackbar'); ?></th> |
|
24 | - <th><?= esc_html__('Callbacks', 'blackbar'); ?></th> |
|
25 | - <th><?= esc_html__('Calls', 'blackbar'); ?></th> |
|
26 | - <th><?= esc_html__('Per Call', 'blackbar'); ?></th> |
|
27 | - <th><?= esc_html__('Total', 'blackbar'); ?></th> |
|
23 | + <th><?= esc_html__( 'Action or Filter (Slowest 50)', 'blackbar' ); ?></th> |
|
24 | + <th><?= esc_html__( 'Callbacks', 'blackbar' ); ?></th> |
|
25 | + <th><?= esc_html__( 'Calls', 'blackbar' ); ?></th> |
|
26 | + <th><?= esc_html__( 'Per Call', 'blackbar' ); ?></th> |
|
27 | + <th><?= esc_html__( 'Total', 'blackbar' ); ?></th> |
|
28 | 28 | </tr> |
29 | 29 | </thead> |
30 | 30 | <tbody> |
31 | - <?php foreach ($actions->entries() as $action => $data) : ?> |
|
32 | - <tr class="glbb-row-collapsed" data-index="<?= esc_attr($data['index']); ?>" data-time="<?= esc_attr($data['total']); ?>"> |
|
33 | - <td><div class="glbb-row-toggle dashicons-before dashicons-arrow-right"><?= esc_html($action); ?></div></td> |
|
34 | - <td data-callbacks="<?= esc_attr($data['callbacks_count']); ?>"><?= esc_html($data['callbacks_count']); ?></td> |
|
35 | - <td data-calls="<?= esc_attr($data['count']); ?>"><?= esc_html($data['count']); ?></td> |
|
36 | - <td data-percall="<?= esc_attr(sprintf('%.2f', $data['total'] / $data['count'])); ?>"><?= esc_html(sprintf('%.2f ms', $data['total'] / $data['count'])); ?></td> |
|
37 | - <td data-total="<?= esc_attr($data['total']); ?>"><?= esc_html(sprintf('%.2f ms', $data['total'])); ?></td> |
|
31 | + <?php foreach( $actions->entries() as $action => $data ) : ?> |
|
32 | + <tr class="glbb-row-collapsed" data-index="<?= esc_attr( $data[ 'index' ] ); ?>" data-time="<?= esc_attr( $data[ 'total' ] ); ?>"> |
|
33 | + <td><div class="glbb-row-toggle dashicons-before dashicons-arrow-right"><?= esc_html( $action ); ?></div></td> |
|
34 | + <td data-callbacks="<?= esc_attr( $data[ 'callbacks_count' ] ); ?>"><?= esc_html( $data[ 'callbacks_count' ] ); ?></td> |
|
35 | + <td data-calls="<?= esc_attr( $data[ 'count' ] ); ?>"><?= esc_html( $data[ 'count' ] ); ?></td> |
|
36 | + <td data-percall="<?= esc_attr( sprintf( '%.2f', $data[ 'total' ] / $data[ 'count' ] ) ); ?>"><?= esc_html( sprintf( '%.2f ms', $data[ 'total' ] / $data[ 'count' ] ) ); ?></td> |
|
37 | + <td data-total="<?= esc_attr( $data[ 'total' ] ); ?>"><?= esc_html( sprintf( '%.2f ms', $data[ 'total' ] ) ); ?></td> |
|
38 | 38 | <td class="glbb-row-details"> |
39 | 39 | <ol> |
40 | - <?php foreach ($data['callbacks'] as $priority => $callbacks) : ?> |
|
41 | - <?php foreach ($callbacks as $callback) : ?> |
|
42 | - <li value="<?= esc_attr($priority); ?>"><?= esc_html($callback); ?></li> |
|
40 | + <?php foreach( $data[ 'callbacks' ] as $priority => $callbacks ) : ?> |
|
41 | + <?php foreach( $callbacks as $callback ) : ?> |
|
42 | + <li value="<?= esc_attr( $priority ); ?>"><?= esc_html( $callback ); ?></li> |
|
43 | 43 | <?php endforeach; ?> |
44 | 44 | <?php endforeach; ?> |
45 | 45 | </ol> |
@@ -8,9 +8,12 @@ |
||
8 | 8 | </tr> |
9 | 9 | </tbody> |
10 | 10 | </table> |
11 | -<?php else : ?> |
|
11 | +<?php else { |
|
12 | + : ?> |
|
12 | 13 | <form> |
13 | - <input type="text" id="glbb_actions_callback" placeholder="<?= esc_attr__('Find callbacks containing', 'blackbar'); ?>"> |
|
14 | + <input type="text" id="glbb_actions_callback" placeholder="<?= esc_attr__('Find callbacks containing', 'blackbar'); |
|
15 | +} |
|
16 | +?>"> |
|
14 | 17 | <input type="text" id="glbb_actions_min_time" placeholder="<?= esc_attr__('Minimum total time', 'blackbar'); ?>"> |
15 | 18 | <select id="glbb_actions_sort_by"> |
16 | 19 | <option value><?= esc_html__('Sort by total time', 'blackbar'); ?></option> |
@@ -1,13 +1,13 @@ |
||
1 | -<?php defined('WPINC') || die; ?> |
|
1 | +<?php defined( 'WPINC' ) || die; ?> |
|
2 | 2 | |
3 | -<?php if ($templates->hasEntries()) : ?> |
|
3 | +<?php if( $templates->hasEntries() ) : ?> |
|
4 | 4 | <table class="glbb-grid"> |
5 | 5 | <tbody> |
6 | - <?php foreach ($templates->entries() as $index => $template) : ?> |
|
6 | + <?php foreach( $templates->entries() as $index => $template ) : ?> |
|
7 | 7 | <tr> |
8 | 8 | <td> |
9 | 9 | <ol> |
10 | - <li value="<?= esc_attr($index + 1); ?>"><?= esc_html($template); ?></li> |
|
10 | + <li value="<?= esc_attr( $index + 1 ); ?>"><?= esc_html( $template ); ?></li> |
|
11 | 11 | </ol> |
12 | 12 | </td> |
13 | 13 | </tr> |
@@ -1,11 +1,11 @@ discard block |
||
1 | -<?php defined('WPINC') || die; ?> |
|
1 | +<?php defined( 'WPINC' ) || die; ?> |
|
2 | 2 | |
3 | -<?php if (!$console->hasEntries()) : ?> |
|
3 | +<?php if( !$console->hasEntries() ) : ?> |
|
4 | 4 | <div> |
5 | 5 | <table> |
6 | 6 | <tbody> |
7 | 7 | <tr> |
8 | - <td><?= esc_html__('No entries found.', 'blackbar'); ?></td> |
|
8 | + <td><?= esc_html__( 'No entries found.', 'blackbar' ); ?></td> |
|
9 | 9 | </tr> |
10 | 10 | </tbody> |
11 | 11 | </table> |
@@ -14,13 +14,13 @@ discard block |
||
14 | 14 | <div> |
15 | 15 | <table class="glbb-grid"> |
16 | 16 | <tbody> |
17 | - <?php foreach ($console->entries() as $entry) : ?> |
|
18 | - <tr data-errname="<?= esc_attr__($entry['errname']); ?>"> |
|
17 | + <?php foreach( $console->entries() as $entry ) : ?> |
|
18 | + <tr data-errname="<?= esc_attr__( $entry[ 'errname' ] ); ?>"> |
|
19 | 19 | <td> |
20 | - <span class="glbb-info glbb-<?= $entry['errname']; ?>"><?= esc_html($entry['name']); ?></span> |
|
20 | + <span class="glbb-info glbb-<?= $entry[ 'errname' ]; ?>"><?= esc_html( $entry[ 'name' ] ); ?></span> |
|
21 | 21 | </td> |
22 | 22 | <td> |
23 | - <pre><code><?= esc_html($entry['message']); ?></code></pre> |
|
23 | + <pre><code><?= esc_html( $entry[ 'message' ] ); ?></code></pre> |
|
24 | 24 | </td> |
25 | 25 | </tr> |
26 | 26 | <?php endforeach; ?> |
@@ -28,12 +28,12 @@ discard block |
||
28 | 28 | </table> |
29 | 29 | </div> |
30 | 30 | <form> |
31 | - <label><input type="checkbox" value="debug"> <?= esc_html__('Debug', 'blackbar'); ?></label> |
|
32 | - <label><input type="checkbox" value="info"> <?= esc_html__('Info', 'blackbar'); ?></label> |
|
33 | - <label><input type="checkbox" value="deprecated"> <?= esc_html__('Deprecated', 'blackbar'); ?></label> |
|
34 | - <label><input type="checkbox" value="notice"> <?= esc_html__('Notice', 'blackbar'); ?></label> |
|
35 | - <label><input type="checkbox" value="strict"> <?= esc_html__('Strict', 'blackbar'); ?></label> |
|
36 | - <label><input type="checkbox" value="warning"> <?= esc_html__('Warning', 'blackbar'); ?></label> |
|
37 | - <label><input type="checkbox" value="error"> <?= esc_html__('Error', 'blackbar'); ?></label> |
|
31 | + <label><input type="checkbox" value="debug"> <?= esc_html__( 'Debug', 'blackbar' ); ?></label> |
|
32 | + <label><input type="checkbox" value="info"> <?= esc_html__( 'Info', 'blackbar' ); ?></label> |
|
33 | + <label><input type="checkbox" value="deprecated"> <?= esc_html__( 'Deprecated', 'blackbar' ); ?></label> |
|
34 | + <label><input type="checkbox" value="notice"> <?= esc_html__( 'Notice', 'blackbar' ); ?></label> |
|
35 | + <label><input type="checkbox" value="strict"> <?= esc_html__( 'Strict', 'blackbar' ); ?></label> |
|
36 | + <label><input type="checkbox" value="warning"> <?= esc_html__( 'Warning', 'blackbar' ); ?></label> |
|
37 | + <label><input type="checkbox" value="error"> <?= esc_html__( 'Error', 'blackbar' ); ?></label> |
|
38 | 38 | </form> |
39 | 39 | <?php endif; ?> |
@@ -10,12 +10,15 @@ |
||
10 | 10 | </tbody> |
11 | 11 | </table> |
12 | 12 | </div> |
13 | -<?php else : ?> |
|
13 | +<?php else { |
|
14 | + : ?> |
|
14 | 15 | <div> |
15 | 16 | <table class="glbb-grid"> |
16 | 17 | <tbody> |
17 | 18 | <?php foreach ($console->entries() as $entry) : ?> |
18 | - <tr data-errname="<?= esc_attr__($entry['errname']); ?>"> |
|
19 | + <tr data-errname="<?= esc_attr__($entry['errname']); |
|
20 | +} |
|
21 | +?>"> |
|
19 | 22 | <td> |
20 | 23 | <span class="glbb-info glbb-<?= $entry['errname']; ?>"><?= esc_html($entry['name']); ?></span> |
21 | 24 | </td> |