apply_filters( 'log_query_custom_data', array $query_data, string $query, float $query_time, string $query_callstack, float $query_start )

Filters the custom data to log alongside a query.

Description

Caution should be used when modifying any of this data, it is recommended that any additional information you need to store about a query be added as a new associative array element.

Parameters

$query_data

(array) Custom query data.

$query

(string) The query's SQL.

$query_time

(float) Total time spent on the query, in seconds.

$query_callstack

(string) Comma-separated list of the calling functions.

$query_start

(float) Unix timestamp of the time at the start of the query.

Source

File: wp-includes/wp-db.php

View on Trac

Changelog

Version Description
5.3.0 Introduced.

© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/log_query_custom_data