@@ -3,20 +3,20 @@ |
||
3 | 3 | defined('WPINC') || exit; |
4 | 4 | |
5 | 5 | spl_autoload_register(function ($className) { |
6 | - $namespaces = [ |
|
7 | - 'GeminiLabs\\BlackBar\\' => __DIR__.'/plugin/', |
|
8 | - 'GeminiLabs\\BlackBar\\Tests\\' => __DIR__.'/tests/', |
|
9 | - ]; |
|
10 | - foreach ($namespaces as $prefix => $baseDir) { |
|
11 | - $len = strlen($prefix); |
|
12 | - if (0 !== strncmp($prefix, $className, $len)) { |
|
13 | - continue; |
|
14 | - } |
|
15 | - $file = $baseDir.str_replace('\\', '/', substr($className, $len)).'.php'; |
|
16 | - if (!file_exists($file)) { |
|
17 | - continue; |
|
18 | - } |
|
19 | - require $file; |
|
20 | - break; |
|
21 | - } |
|
6 | + $namespaces = [ |
|
7 | + 'GeminiLabs\\BlackBar\\' => __DIR__.'/plugin/', |
|
8 | + 'GeminiLabs\\BlackBar\\Tests\\' => __DIR__.'/tests/', |
|
9 | + ]; |
|
10 | + foreach ($namespaces as $prefix => $baseDir) { |
|
11 | + $len = strlen($prefix); |
|
12 | + if (0 !== strncmp($prefix, $className, $len)) { |
|
13 | + continue; |
|
14 | + } |
|
15 | + $file = $baseDir.str_replace('\\', '/', substr($className, $len)).'.php'; |
|
16 | + if (!file_exists($file)) { |
|
17 | + continue; |
|
18 | + } |
|
19 | + require $file; |
|
20 | + break; |
|
21 | + } |
|
22 | 22 | }); |
@@ -1,19 +1,19 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -defined('WPINC') || exit; |
|
3 | +defined( 'WPINC' ) || exit; |
|
4 | 4 | |
5 | -spl_autoload_register(function ($className) { |
|
5 | +spl_autoload_register( function( $className ) { |
|
6 | 6 | $namespaces = [ |
7 | - 'GeminiLabs\\BlackBar\\' => __DIR__.'/plugin/', |
|
8 | - 'GeminiLabs\\BlackBar\\Tests\\' => __DIR__.'/tests/', |
|
7 | + 'GeminiLabs\\BlackBar\\' => __DIR__ . '/plugin/', |
|
8 | + 'GeminiLabs\\BlackBar\\Tests\\' => __DIR__ . '/tests/', |
|
9 | 9 | ]; |
10 | - foreach ($namespaces as $prefix => $baseDir) { |
|
11 | - $len = strlen($prefix); |
|
12 | - if (0 !== strncmp($prefix, $className, $len)) { |
|
10 | + foreach( $namespaces as $prefix => $baseDir ) { |
|
11 | + $len = strlen( $prefix ); |
|
12 | + if( 0 !== strncmp( $prefix, $className, $len ) ) { |
|
13 | 13 | continue; |
14 | 14 | } |
15 | - $file = $baseDir.str_replace('\\', '/', substr($className, $len)).'.php'; |
|
16 | - if (!file_exists($file)) { |
|
15 | + $file = $baseDir . str_replace( '\\', '/', substr( $className, $len ) ) . '.php'; |
|
16 | + if( !file_exists( $file ) ) { |
|
17 | 17 | continue; |
18 | 18 | } |
19 | 19 | require $file; |
@@ -2,7 +2,8 @@ |
||
2 | 2 | |
3 | 3 | defined('WPINC') || exit; |
4 | 4 | |
5 | -spl_autoload_register(function ($className) { |
|
5 | +spl_autoload_register(function ($className) |
|
6 | +{ |
|
6 | 7 | $namespaces = [ |
7 | 8 | 'GeminiLabs\\BlackBar\\' => __DIR__.'/plugin/', |
8 | 9 | 'GeminiLabs\\BlackBar\\Tests\\' => __DIR__.'/tests/', |
@@ -1,13 +1,13 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -defined('WPINC') || exit; |
|
3 | +defined( 'WPINC' ) || exit; |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * @return array |
7 | 7 | * @see https://docs.gravityforms.com/gform_noconflict_scripts/ |
8 | 8 | */ |
9 | -add_filter('gform_noconflict_scripts', function (array $scripts) { |
|
10 | - $scripts[] = 'blackbar'; |
|
9 | +add_filter( 'gform_noconflict_scripts', function( array $scripts ) { |
|
10 | + $scripts[ ] = 'blackbar'; |
|
11 | 11 | return $scripts; |
12 | 12 | }); |
13 | 13 | |
@@ -15,8 +15,8 @@ discard block |
||
15 | 15 | * @return array |
16 | 16 | * @see https://docs.gravityforms.com/gform_noconflict_styles/ |
17 | 17 | */ |
18 | -add_filter('gform_noconflict_styles', function (array $styles) { |
|
19 | - $styles[] = 'blackbar'; |
|
20 | - $styles[] = 'blackbar-syntax'; |
|
18 | +add_filter( 'gform_noconflict_styles', function( array $styles ) { |
|
19 | + $styles[ ] = 'blackbar'; |
|
20 | + $styles[ ] = 'blackbar-syntax'; |
|
21 | 21 | return $styles; |
22 | 22 | }); |
@@ -1,14 +1,14 @@ discard block |
||
1 | -<?php defined('WPINC') || exit; ?> |
|
1 | +<?php defined( 'WPINC' ) || exit; ?> |
|
2 | 2 | |
3 | 3 | <div id="glbb"> |
4 | - <?php foreach ($modules as $module) : /* Ensure that the console entries are loaded last */ ?> |
|
5 | - <?php if (!$module->isVisible() || 'glbb-console' === $module->id()) continue; ?> |
|
4 | + <?php foreach( $modules as $module ) : /* Ensure that the console entries are loaded last */ ?> |
|
5 | + <?php if( !$module->isVisible() || 'glbb-console' === $module->id() ) continue; ?> |
|
6 | 6 | <div id="<?= $module->id(); ?>" class="glbb-panel glbb-hidden"> |
7 | 7 | <?php $module->render(); ?> |
8 | 8 | </div> |
9 | 9 | <?php endforeach; ?> |
10 | - <?php foreach ($modules as $module) : /* Ensure that the console entries are loaded last */ ?> |
|
11 | - <?php if (!$module->isVisible() || 'glbb-console' !== $module->id()) continue; ?> |
|
10 | + <?php foreach( $modules as $module ) : /* Ensure that the console entries are loaded last */ ?> |
|
11 | + <?php if( !$module->isVisible() || 'glbb-console' !== $module->id() ) continue; ?> |
|
12 | 12 | <div id="<?= $module->id(); ?>" class="glbb-panel glbb-hidden"> |
13 | 13 | <?php $module->render(); ?> |
14 | 14 | </div> |
@@ -16,19 +16,19 @@ discard block |
||
16 | 16 | <div class="glbb-panel-links"> |
17 | 17 | <a href="#" class="dashicons-before glbb-toggle"> |
18 | 18 | <span class="screen-reader-text"> |
19 | - <?= esc_html__('Toggle', 'blackbar'); ?> |
|
19 | + <?= esc_html__( 'Toggle', 'blackbar' ); ?> |
|
20 | 20 | </span> |
21 | 21 | </a> |
22 | - <?php foreach ($modules as $module) : ?> |
|
23 | - <?php if (!$module->isVisible()) continue; ?> |
|
24 | - <a href="#" data-panel="<?= esc_attr($module->id()); ?>" data-info="<?= esc_attr($module->info()); ?>" class="dashicons-before <?= $module->classes(); ?>"> |
|
22 | + <?php foreach( $modules as $module ) : ?> |
|
23 | + <?php if( !$module->isVisible() ) continue; ?> |
|
24 | + <a href="#" data-panel="<?= esc_attr( $module->id() ); ?>" data-info="<?= esc_attr( $module->info() ); ?>" class="dashicons-before <?= $module->classes(); ?>"> |
|
25 | 25 | <span><?= $module->label(); ?></span> |
26 | 26 | </a> |
27 | 27 | <?php endforeach; ?> |
28 | 28 | <div> |
29 | 29 | <a href="#" class="dashicons-before glbb-close"> |
30 | 30 | <span class="screen-reader-text"> |
31 | - <?= esc_html__('Close', 'blackbar'); ?> |
|
31 | + <?= esc_html__( 'Close', 'blackbar' ); ?> |
|
32 | 32 | </span> |
33 | 33 | </a> |
34 | 34 | </div> |
@@ -1,19 +1,19 @@ |
||
1 | -<?php defined('WPINC') || exit; ?> |
|
1 | +<?php defined( 'WPINC' ) || exit; ?> |
|
2 | 2 | |
3 | 3 | <table class="glbb-grid"> |
4 | 4 | <thead> |
5 | 5 | <tr> |
6 | - <th><?= esc_html__('Timer Name', 'blackbar'); ?></th> |
|
7 | - <th><?= esc_html__('Memory Used', 'blackbar'); ?></th> |
|
8 | - <th><?= esc_html__('Total Time', 'blackbar'); ?></th> |
|
6 | + <th><?= esc_html__( 'Timer Name', 'blackbar' ); ?></th> |
|
7 | + <th><?= esc_html__( 'Memory Used', 'blackbar' ); ?></th> |
|
8 | + <th><?= esc_html__( 'Total Time', 'blackbar' ); ?></th> |
|
9 | 9 | </tr> |
10 | 10 | </thead> |
11 | 11 | <tbody> |
12 | - <?php foreach ($module->entries() as $entry) : ?> |
|
12 | + <?php foreach( $module->entries() as $entry ) : ?> |
|
13 | 13 | <tr> |
14 | - <td><?= esc_html($entry['name']); ?></td> |
|
15 | - <td><?= (string) size_format($entry['memory'], 2); ?></td> |
|
16 | - <td><?= esc_html($entry['time']); ?></td> |
|
14 | + <td><?= esc_html( $entry[ 'name' ] ); ?></td> |
|
15 | + <td><?= (string) size_format( $entry[ 'memory' ], 2 ); ?></td> |
|
16 | + <td><?= esc_html( $entry[ 'time' ] ); ?></td> |
|
17 | 17 | </tr> |
18 | 18 | <?php endforeach; ?> |
19 | 19 | </tbody> |
@@ -1,45 +1,45 @@ |
||
1 | -<?php defined('WPINC') || exit; ?> |
|
1 | +<?php defined( 'WPINC' ) || exit; ?> |
|
2 | 2 | |
3 | -<?php if (!$module->hasEntries()) : ?> |
|
3 | +<?php if( !$module->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_hooks_callback" placeholder="<?= esc_attr__('Find callbacks containing', 'blackbar'); ?>"> |
|
14 | - <input type="text" id="glbb_hooks_min_time" placeholder="<?= esc_attr__('Minimum total time', 'blackbar'); ?>"> |
|
13 | + <input type="text" id="glbb_hooks_callback" placeholder="<?= esc_attr__( 'Find callbacks containing', 'blackbar' ); ?>"> |
|
14 | + <input type="text" id="glbb_hooks_min_time" placeholder="<?= esc_attr__( 'Minimum total time', 'blackbar' ); ?>"> |
|
15 | 15 | <select id="glbb_hooks_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 ($module->entries() as $hook => $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($hook); ?></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($data['per_call']); ?>"><?= esc_html($data['per_call']); ?></td> |
|
37 | - <td data-total="<?= esc_attr($data['total']); ?>"><?= esc_html($data['total_formatted']); ?></td> |
|
31 | + <?php foreach( $module->entries() as $hook => $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( $hook ); ?></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( $data[ 'per_call' ] ); ?>"><?= esc_html( $data[ 'per_call' ] ); ?></td> |
|
37 | + <td data-total="<?= esc_attr( $data[ 'total' ] ); ?>"><?= esc_html( $data[ 'total_formatted' ] ); ?></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> |
@@ -1,11 +1,11 @@ discard block |
||
1 | -<?php defined('WPINC') || exit; ?> |
|
1 | +<?php defined( 'WPINC' ) || exit; ?> |
|
2 | 2 | |
3 | -<?php if (!$module->hasEntries()) : ?> |
|
3 | +<?php if( !$module->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 ($module->entries() as $entry) : ?> |
|
18 | - <tr data-errname="<?= esc_attr($entry['errname']); ?>"> |
|
17 | + <?php foreach( $module->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; ?> |
@@ -1,32 +1,32 @@ |
||
1 | -<?php defined('WPINC') || exit; ?> |
|
1 | +<?php defined( 'WPINC' ) || exit; ?> |
|
2 | 2 | |
3 | -<?php if (!defined('SAVEQUERIES') || !SAVEQUERIES) : ?> |
|
3 | +<?php if( !defined( 'SAVEQUERIES' ) || !SAVEQUERIES ) : ?> |
|
4 | 4 | <table> |
5 | 5 | <tbody> |
6 | 6 | <tr> |
7 | - <td><a href="https://wordpress.org/documentation/article/debugging-in-wordpress/#savequeries" target="_blank">SAVEQUERIES</a> <?= esc_html_x('must be enabled to view SQL queries', 'SAVEQUERIES', 'blackbar'); ?>.</td> |
|
7 | + <td><a href="https://wordpress.org/documentation/article/debugging-in-wordpress/#savequeries" target="_blank">SAVEQUERIES</a> <?= esc_html_x( 'must be enabled to view SQL queries', 'SAVEQUERIES', 'blackbar' ); ?>.</td> |
|
8 | 8 | </tr> |
9 | 9 | </tbody> |
10 | 10 | </table> |
11 | 11 | <?php else : ?> |
12 | 12 | <form> |
13 | - <input type="text" id="glbb_queries_sql" placeholder="<?= esc_attr__('Find SQL containing', 'blackbar'); ?>"> |
|
14 | - <input type="text" id="glbb_queries_min_time" placeholder="<?= esc_attr__('Minimum execution time', 'blackbar'); ?>"> |
|
13 | + <input type="text" id="glbb_queries_sql" placeholder="<?= esc_attr__( 'Find SQL containing', 'blackbar' ); ?>"> |
|
14 | + <input type="text" id="glbb_queries_min_time" placeholder="<?= esc_attr__( 'Minimum execution time', 'blackbar' ); ?>"> |
|
15 | 15 | <select id="glbb_queries_sort_by"> |
16 | - <option value><?= esc_html__('Sort by execution time', 'blackbar'); ?></option> |
|
17 | - <option value="order"><?= esc_html__('Sort by execution order', 'blackbar'); ?></option> |
|
16 | + <option value><?= esc_html__( 'Sort by execution 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 | <tbody> |
22 | - <?php foreach ($module->entries() as $entry) : ?> |
|
23 | - <tr class="glbb-row-collapsed" data-index="<?= esc_attr($entry['index']); ?>" data-time="<?= esc_attr($entry['time']); ?>"> |
|
24 | - <td data-time="<?= esc_attr($entry['time_formatted']); ?>"><div class="glbb-row-toggle dashicons-before dashicons-arrow-right"><?= esc_html($entry['time_formatted']); ?></div></td> |
|
25 | - <td data-sql><pre><code class="language-sql"><?= esc_html($entry['sql']); ?></code></pre></td> |
|
22 | + <?php foreach( $module->entries() as $entry ) : ?> |
|
23 | + <tr class="glbb-row-collapsed" data-index="<?= esc_attr( $entry[ 'index' ] ); ?>" data-time="<?= esc_attr( $entry[ 'time' ] ); ?>"> |
|
24 | + <td data-time="<?= esc_attr( $entry[ 'time_formatted' ] ); ?>"><div class="glbb-row-toggle dashicons-before dashicons-arrow-right"><?= esc_html( $entry[ 'time_formatted' ] ); ?></div></td> |
|
25 | + <td data-sql><pre><code class="language-sql"><?= esc_html( $entry[ 'sql' ] ); ?></code></pre></td> |
|
26 | 26 | <td class="glbb-row-details"> |
27 | 27 | <ol> |
28 | - <?php foreach ($entry['trace'] as $index => $line) : ?> |
|
29 | - <li value="<?= esc_attr($index + 1); ?>"><?= esc_html($line); ?></li> |
|
28 | + <?php foreach( $entry[ 'trace' ] as $index => $line ) : ?> |
|
29 | + <li value="<?= esc_attr( $index + 1 ); ?>"><?= esc_html( $line ); ?></li> |
|
30 | 30 | <?php endforeach; ?> |
31 | 31 | </ol> |
32 | 32 | </td> |
@@ -1,13 +1,13 @@ |
||
1 | -<?php defined('WPINC') || exit; ?> |
|
1 | +<?php defined( 'WPINC' ) || exit; ?> |
|
2 | 2 | |
3 | -<?php if ($module->hasEntries()) : ?> |
|
3 | +<?php if( $module->hasEntries() ) : ?> |
|
4 | 4 | <table class="glbb-grid"> |
5 | 5 | <tbody> |
6 | - <?php foreach ($module->entries() as $entry) : ?> |
|
6 | + <?php foreach( $module->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,12 +1,12 @@ |
||
1 | -<?php defined('WPINC') || exit; ?> |
|
1 | +<?php defined( 'WPINC' ) || exit; ?> |
|
2 | 2 | |
3 | 3 | <table class="glbb-grid"> |
4 | 4 | <tbody> |
5 | - <?php foreach ($module->entries() as $index => $template) : ?> |
|
5 | + <?php foreach( $module->entries() as $index => $template ) : ?> |
|
6 | 6 | <tr> |
7 | 7 | <td> |
8 | 8 | <ol> |
9 | - <li value="<?= esc_attr($index + 1); ?>"><?= esc_html($template); ?></li> |
|
9 | + <li value="<?= esc_attr( $index + 1 ); ?>"><?= esc_html( $template ); ?></li> |
|
10 | 10 | </ol> |
11 | 11 | </td> |
12 | 12 | </tr> |