log_query_custom_data хук-фильтр . WP 5.3.0
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.
Использование
add_filter( 'log_query_custom_data', 'filter_function_name_1367', 10, 5 ); function filter_function_name_1367( $query_data, $query, $query_time, $query_callstack, $query_start ){ // filter... return $query_data; }
- $query_data(массив)
- Custom query data.
- $query(строка)
- The query's SQL.
- $query_time(float)
- Total time spent on the query, in seconds.
- $query_callstack(строка)
- Comma-separated list of the calling functions.
- $query_start(float)
- Unix timestamp of the time at the start of the query.
Список изменений
С версии 5.3.0 | Введена. |
Где вызывается хук
log_query_custom_data
wp-includes/wp-db.php 2099
$query_data = apply_filters( 'log_query_custom_data', $query_data, $query, $query_time, $query_callstack, $query_start );