log_query_custom_data WordPress Filter Hook

The log_query_custom_data hook is used to log custom data about a WordPress query. This hook is called after the query is executed.

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.


Top ↑

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.


Top ↑

Source

File: wp-includes/wp-db.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.