WPDev.one
Core Class

WP_Comment_Query

class WP_Comment_Query // Constructor: function Object() { [native code] }

Core class used for querying comments.

Methods 11 methods

Method / Return Description
__call()
(mixed

Make private/protected methods readable for backward compatibility.

Parameters: $name: mixed, $arguments: mixed
__construct()
void

Constructor.

Parameters: $query: mixed
parse_query()
void

Parse arguments passed to the comment query with default query parameters.

Parameters: $query: mixed
query()
(array

Sets up the WordPress query for retrieving comments.

Parameters: $query: mixed
get_comments()
(int

Get a list of comments matching the query vars.

get_comment_ids()
(int

Used internally to get a list of comment IDs matching the query vars.

set_found_comments()
void

Populates found_comments and max_num_pages properties for the current

fill_descendants()
array

Fetch descendants for located comments.

Parameters: $comments: mixed
get_search_sql()
string

Used internally to generate an SQL string for searching across multiple columns.

Parameters: $search: mixed, $columns: mixed
parse_orderby()
(string

Parse and sanitize 'orderby' keys passed to the comment query.

Parameters: $orderby: mixed
parse_order()
string

Parse an 'order' query variable and cast it to ASC or DESC as necessary.

Parameters: $order: mixed

Properties

Property / Type Description
$request
mixed
public
No description available.
$meta_query
mixed
public
No description available.
$meta_query_clauses
mixed
public
No description available.
$sql_clauses
mixed
public
No description available.
$filtered_where_clause
mixed
public
No description available.
$date_query
mixed
public
No description available.
$query_vars
mixed
public
No description available.
$query_var_defaults
mixed
public
No description available.
$comments
mixed
public
No description available.
$found_comments
mixed
public
No description available.
$max_num_pages
mixed
public
No description available.

Class Information

Since Version
3.1.0
Source File
wp-includes/class-wp-comment-query.php
Advertisement