Skip to content

Commit d887e72

Browse files
committed
Fixed selecting active filter.
1 parent 9903f32 commit d887e72

File tree

2 files changed

+14
-32
lines changed

2 files changed

+14
-32
lines changed

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,26 @@
77
}
88

99
// Current filter values.
10-
$current_level = $_GET['level_filter'] ?? '';
11-
$current_start_date = $_GET['start_date'] ?? '';
12-
$current_end_date = $_GET['end_date'] ?? '';
10+
$current_level = $_POST['level_filter'] ?? '';
11+
$current_start_date = $_POST['start_date'] ?? '';
12+
$current_end_date = $_POST['end_date'] ?? '';
1313

1414
$log_levels = [ 'debug', 'info', 'notice', 'warning', 'error', 'critical', 'alert', 'emergency' ];
1515
?>
1616

1717
<div class="alignleft actions" style="display: inline-flex; align-items: center; gap: 8px; margin-right: 10px;">
18-
<input type="text"
19-
name="start_date"
20-
class="wpgraphql-logging-datepicker"
21-
placeholder="Start Date"
22-
value="<?php echo esc_attr( $current_start_date ); ?>"
18+
<input type="text"
19+
name="start_date"
20+
class="wpgraphql-logging-datepicker"
21+
placeholder="Start Date"
22+
value="<?php echo esc_attr( $current_start_date ); ?>"
2323
style="width: 120px;" />
24-
25-
<input type="text"
26-
name="end_date"
27-
class="wpgraphql-logging-datepicker"
28-
placeholder="End Date"
29-
value="<?php echo esc_attr( $current_end_date ); ?>"
24+
25+
<input type="text"
26+
name="end_date"
27+
class="wpgraphql-logging-datepicker"
28+
placeholder="End Date"
29+
value="<?php echo esc_attr( $current_end_date ); ?>"
3030
style="width: 120px;" />
3131

3232
<select name="level_filter" style="width: 120px;">

plugins/wpgraphql-logging/src/Events/Events.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -61,22 +61,4 @@ final class Events {
6161
*/
6262
public const REQUEST_RESULTS = 'graphql_request_results';
6363

64-
/**
65-
* WPGraphQL filter: graphql_debug_enabled.
66-
*
67-
* Determines if GraphQL Debug is enabled. Useful for toggling logging.
68-
*
69-
* @var string
70-
*/
71-
public const DEBUG_ENABLED = 'graphql_debug_enabled';
72-
73-
/**
74-
* WPGraphQL filter: graphql_app_context_config.
75-
*
76-
* Filters the config for the AppContext. Useful for storing temporary
77-
* data for the duration of a request.
78-
*
79-
* @var string
80-
*/
81-
public const APP_CONTEXT_CONFIG = 'graphql_app_context_config';
8264
}

0 commit comments

Comments
 (0)