ActionScheduler_wpCommentLogger::filter_comment_queries() public WC 1.0
{} It's a method of the class: ActionScheduler_wpCommentLogger{}
No Hooks.
Return
Null. Nothing.
Usage
$ActionScheduler_wpCommentLogger = new ActionScheduler_wpCommentLogger(); $ActionScheduler_wpCommentLogger->filter_comment_queries( $query );
- $query(WP_Comment_Query) (required)
- -
Code of ActionScheduler_wpCommentLogger::filter_comment_queries() ActionScheduler wpCommentLogger::filter comment queries WC 5.0.0
public function filter_comment_queries( $query ) {
foreach ( array('ID', 'parent', 'post_author', 'post_name', 'post_parent', 'type', 'post_type', 'post_id', 'post_ID') as $key ) {
if ( !empty($query->query_vars[$key]) ) {
return; // don't slow down queries that wouldn't include action_log comments anyway
}
}
$query->query_vars['action_log_filter'] = TRUE;
add_filter( 'comments_clauses', array( $this, 'filter_comment_query_clauses' ), 10, 2 );
}