PluginProbe
ElasticPress / 5.3.5
ElasticPress v5.3.5
5.3.5 5.3.4 3.6.5 3.6.6 4.0.0 4.0.1 4.1.0 4.2.0 4.2.1 4.2.2 4.3.0 4.3.1 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.6.0 4.6.1 4.7.0 4.7.1 4.7.2 5.0.0 5.0.1 5.0.2 All 108 releases
← All changes | includes/classes/StatusReport/FailedQueries.php +6 -6 5.0.2 → 5.3.5 View file →
@@ -7,10 +7,10 @@
7 7 */
8 8
9 9 namespace ElasticPress\StatusReport;
10 10
11 -use \ElasticPress\QueryLogger;
12 -use \ElasticPress\Utils;
11 +use ElasticPress\QueryLogger;
12 +use ElasticPress\Utils;
13 13
14 14 defined( 'ABSPATH' ) || exit;
15 15
16 16 /**
@@ -40,9 +40,9 @@
40 40 * Return the report title
41 41 *
42 42 * @return string
43 43 */
44 - public function get_title() : string {
44 + public function get_title(): string {
45 45 return __( 'Failed Queries', 'elasticpress' );
46 46 }
47 47
48 48 /**
@@ -49,9 +49,9 @@
49 49 * Return the report fields
50 50 *
51 51 * @return array
52 52 */
53 - public function get_groups() : array {
53 + public function get_groups(): array {
54 54 $this->maybe_clear_logs();
55 55
56 56 $logs = $this->query_logger->get_logs( false );
57 57
@@ -107,9 +107,9 @@
107 107 * Return the output of a button to clear the logged queries
108 108 *
109 109 * @return string
110 110 */
111 - public function get_actions() : array {
111 + public function get_actions(): array {
112 112 global $wp;
113 113
114 114 $logs = $this->query_logger->get_logs( false );
115 115
@@ -131,9 +131,9 @@
131 131 /**
132 132 * If a nonce is present, clear the logs
133 133 */
134 134 protected function maybe_clear_logs() {
135 - if ( empty( $_GET['_wpnonce'] ) || ! wp_verify_nonce( sanitize_key( $_GET['_wpnonce'] ), 'ep-clear-logged-queries' ) ) { // phpcs:ignore WordPress.Security.NonceVerification
135 + if ( empty( $_GET['_wpnonce'] ) || ! wp_verify_nonce( sanitize_key( $_GET['_wpnonce'] ), 'ep-clear-logged-queries' ) ) {
136 136 return;
137 137 }
138 138
139 139 $this->query_logger->clear_logs();