WP HOOKS
filtrod 5.3.0

log_query_custom_data

Args 5Plik wp-includes/class-wpdb.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the custom data to log alongside a query.

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.

Parametry

ParametrTypOpis
$query_dataarrayCustom query data.
$querystringThe query's SQL.
$query_timefloatTotal time spent on the query, in seconds.
$query_callstackstringComma-separated list of the calling functions.
$query_startfloatUnix timestamp of the time at the start of the query.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'log_query_custom_data', 'twoja_funkcja', 10, 5 );

function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5) {
	// Twój kod
}

Popularne w tej kategorii