Skip to content

Commit

Permalink
Add docblock
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccahum committed Nov 26, 2024
1 parent ef9f723 commit 6f94523
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion includes/classes/Elasticsearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -1735,7 +1735,15 @@ public function add_elasticpress_version_to_user_agent( $user_agent ) {
* @param array $query Query to log.
*/
protected function add_query_log( $query ) {
if ( apply_filters( 'ep_disable_query_logging', false ) && ( ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ||
/**
* Filter query logging. Don't log anything to the queries property when true.
*
* @hook ep_disable_query_logging
* @param {bool} Whether to log to the queries property. Defaults to false.
* @return {bool} New value
* @since 5.2.0
*/
if ( apply_filters( 'ep_disable_query_logging', false ) && ( ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ||
( defined( 'WP_EP_DEBUG' ) && WP_EP_DEBUG ) ) ) {
$this->queries[] = $query;
}
Expand Down

0 comments on commit 6f94523

Please sign in to comment.