WordPress at a glance
функция не описана

wpdb::log_query() public WP 5.3.0

Logs query data.

It's a method of the class: wpdb{}

Hooks from the method
Возвращает

Null. Ничего.

Использование

$wpdb = new wpdb();
$wpdb->log_query( $query, $query_time, $query_callstack, $query_start, $query_data );
$query(string) (required)
The query's SQL.
$query_time(float) (required)
Total time spent on the query, in seconds.
$query_callstack(string) (required)
Comma-separated list of the calling functions.
$query_start(float) (required)
Unix timestamp of the time at the start of the query.
$query_data(array) (required)
Custom query data.

Changelog

Since 5.3.0 Introduced.

Код wpdb::log_query() WP 5.5.1

<?php
public function log_query( $query, $query_time, $query_callstack, $query_start, $query_data ) {
	/**
	 * Filters the custom query data being logged.
	 *
	 * 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 entry to the fourth
	 * element $query_data.
	 *
	 * @since 5.3.0
	 *
	 * @param array  $query_data      Custom query data.
	 * @param string $query           The query's SQL.
	 * @param float  $query_time      Total time spent on the query, in seconds.
	 * @param string $query_callstack Comma-separated list of the calling functions.
	 * @param float  $query_start     Unix timestamp of the time at the start of the query.
	 */
	$query_data = apply_filters( 'log_query_custom_data', $query_data, $query, $query_time, $query_callstack, $query_start );

	$this->queries[] = array(
		$query,
		$query_time,
		$query_callstack,
		$query_start,
		$query_data,
	);
}