Skip to content

Commit 5c637ad

Browse files
committed
Small template tweaks. Moved templates up a directory as they are not all list templates.
1 parent f7dd72e commit 5c637ad

File tree

7 files changed

+12
-5
lines changed

7 files changed

+12
-5
lines changed

plugins/wpgraphql-logging/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
],
2828
"require": {
2929
"php": "^8.1",
30-
"league/csv": "^9.9",
30+
"league/csv": "^9",
3131
"monolog/monolog": "^3.9"
3232
},
3333
"minimum-stability": "dev",

plugins/wpgraphql-logging/src/Admin/Settings/Templates/admin.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@
9696
break;
9797
}
9898
?>
99+
<a href="<?php echo esc_url( admin_url( 'admin.php?page=' . \WPGraphQL\Logging\Admin\View_Logs_Page::ADMIN_PAGE_SLUG ) ); ?>" class="button">
100+
<?php esc_html_e( 'View Logs', 'wpgraphql-logging' ); ?>
101+
</a>
99102
</div>
100103
</div>
101104

plugins/wpgraphql-logging/src/Admin/View/List/List_Table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ protected function extra_tablenav( $which ): void {
393393
if ( 'top' !== $which ) {
394394
return;
395395
}
396-
$template = apply_filters( 'wpgraphql_logging_filters_template', __DIR__ . '/Templates/wpgraphql-logger-filters.php' );
396+
$template = apply_filters( 'wpgraphql_logging_filters_template', __DIR__ . '/../Templates/wpgraphql-logger-filters.php' );
397397
require_once $template; // @phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingVariable
398398
}
399399
}

plugins/wpgraphql-logging/src/Admin/View/List/Templates/wpgraphql-logger-filters.php renamed to plugins/wpgraphql-logging/src/Admin/View/Templates/wpgraphql-logger-filters.php

File renamed without changes.

plugins/wpgraphql-logging/src/Admin/View/List/Templates/wpgraphql-logger-list.php renamed to plugins/wpgraphql-logging/src/Admin/View/Templates/wpgraphql-logger-list.php

File renamed without changes.

plugins/wpgraphql-logging/src/Admin/View/List/Templates/wpgraphql-logger-view.php renamed to plugins/wpgraphql-logging/src/Admin/View/Templates/wpgraphql-logger-view.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,15 @@
4545
</tr>
4646
<tr>
4747
<th><?php esc_html_e( 'Level', 'wpgraphql-logging' ); ?></th>
48+
<td><?php echo (int) $log->get_level(); ?></td>
49+
</tr>
50+
<tr>
51+
<th><?php esc_html_e( 'Level Name', 'wpgraphql-logging' ); ?></th>
4852
<td><?php echo esc_html( (string) $log->get_level_name() ); ?></td>
4953
</tr>
5054
<tr>
5155
<th><?php esc_html_e( 'Message', 'wpgraphql-logging' ); ?></th>
52-
<td><code><?php echo esc_html( (string) $log->get_message() ); ?></code></td>
56+
<td><?php echo esc_html( (string) $log->get_message() ); ?></td>
5357
</tr>
5458
<tr>
5559
<th><?php esc_html_e( 'Context', 'wpgraphql-logging' ); ?></th>

plugins/wpgraphql-logging/src/Admin/View_Logs_Page.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ protected function render_list_page(): void {
185185
$list_table = new List_Table( new LogsRepository() ); // @phpcs:ignore SlevomatCodingStandard.Variables.UnusedVariable.UnusedVariable
186186
$list_template = apply_filters(
187187
'wpgraphql_logging_list_template',
188-
__DIR__ . '/View/List/Templates/wpgraphql-logger-list.php'
188+
__DIR__ . '/View/Templates/wpgraphql-logger-list.php'
189189
);
190190
require_once $list_template; // @phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingVariable
191191
}
@@ -224,7 +224,7 @@ protected function render_view_page(): void {
224224

225225
$log_template = apply_filters(
226226
'wpgraphql_logging_view_template',
227-
__DIR__ . '/View/List/Templates/wpgraphql-logger-view.php'
227+
__DIR__ . '/View/Templates/wpgraphql-logger-view.php'
228228
);
229229

230230
require_once $log_template; // @phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingVariable

0 commit comments

Comments
 (0)