filtrod 5.3.0
log_query_custom_data
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
| Parametr | Typ | Opis |
|---|---|---|
$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. |
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
}
// 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