Changeset 34548
- Timestamp:
- 09/25/2015 03:24:15 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-comment-query.php
r34546 r34548 145 145 * Optional. Array or query string of comment query parameters. Default empty. 146 146 * 147 * @type string $author_email Comment author email address. Default empty. 148 * @type array $author__in Array of author IDs to include comments for. Default empty. 149 * @type array $author__not_in Array of author IDs to exclude comments for. Default empty. 150 * @type array $comment__in Array of comment IDs to include. Default empty. 151 * @type array $comment__not_in Array of comment IDs to exclude. Default empty. 152 * @type bool $count Whether to return a comment count (true) or array of comment 153 * objects (false). Default false. 154 * @type array $date_query Date query clauses to limit comments by. See WP_Date_Query. 155 * Default null. 156 * @type string $fields Comment fields to return. Accepts 'ids' for comment IDs only or 157 * empty for all fields. Default empty. 158 * @type int $ID Currently unused. 159 * @type array $include_unapproved Array of IDs or email addresses of users whose unapproved comments 160 * will be returned by the query regardless of `$status`. Default empty. 161 * @type int $karma Karma score to retrieve matching comments for. Default empty. 162 * @type string $meta_key Include comments with a matching comment meta key. Default empty. 163 * @type string $meta_value Include comments with a matching comment meta value. Requires 164 * `$meta_key` to be set. Default empty. 165 * @type array $meta_query Meta query clauses to limit retrieved comments by. 166 * See WP_Meta_Query. Default empty. 167 * @type int $number Maximum number of comments to retrieve. Default null (no limit). 168 * @type int $offset Number of comments to offset the query. Used to build LIMIT clause. 169 * Default 0. 170 * @type bool $no_found_rows Whether to disable the `SQL_CALC_FOUND_ROWS` query. 171 * Default: true. 172 * @type string|array $orderby Comment status or array of statuses. To use 'meta_value' or 173 * 'meta_value_num', `$meta_key` must also be defined. To sort by 174 * a specific `$meta_query` clause, use that clause's array key. 175 * Accepts 'comment_agent', 'comment_approved', 'comment_author', 176 * 'comment_author_email', 'comment_author_IP', 177 * 'comment_author_url', 'comment_content', 'comment_date', 178 * 'comment_date_gmt', 'comment_ID', 'comment_karma', 179 * 'comment_parent', 'comment_post_ID', 'comment_type', 'user_id', 180 * 'comment__in', 'meta_value', 'meta_value_num', the value of $meta_key, and the 181 * array keys of `$meta_query`. Also accepts false, an empty array, 182 * or 'none' to disable `ORDER BY` clause. 183 * Default: 'comment_date_gmt'. 184 * @type string $order How to order retrieved comments. Accepts 'ASC', 'DESC'. 185 * Default: 'DESC'. 186 * @type int $parent Parent ID of comment to retrieve children of. Default empty. 187 * @type array $parent__in Array of parent IDs of comments to retrieve children for. Default empty. 188 * @type array $parent__not_in Array of parent IDs of comments *not* to retrieve children for. Default empty. 189 * @type array $post_author__in Array of author IDs to retrieve comments for. Default empty. 190 * @type array $post_author__not_in Array of author IDs *not* to retrieve comments for. Default empty. 191 * @type int $post_ID Currently unused. 192 * @type int $post_id Limit results to those affiliated with a given post ID. Default 0. 193 * @type array $post__in Array of post IDs to include affiliated comments for. Default empty. 194 * @type array $post__not_in Array of post IDs to exclude affiliated comments for. Default empty. 195 * @type int $post_author Comment author ID to limit results by. Default empty. 196 * @type string $post_status Post status to retrieve affiliated comments for. Default empty. 197 * @type string $post_type Post type to retrieve affiliated comments for. Default empty. 198 * @type string $post_name Post name to retrieve affiliated comments for. Default empty. 199 * @type int $post_parent Post parent ID to retrieve affiliated comments for. Default empty. 200 * @type string $search Search term(s) to retrieve matching comments for. Default empty. 201 * @type string $status Comment status to limit results by. Accepts 'hold' 202 * (`comment_status=0`), 'approve' (`comment_status=1`), 'all', or a 203 * custom comment status. Default 'all'. 204 * @type string|array $type Include comments of a given type, or array of types. Accepts 205 * 'comment', 'pings' (includes 'pingback' and 'trackback'), or any 206 * custom type string. Default empty. 207 * @type array $type__in Include comments from a given array of comment types. Default empty. 208 * @type array $type__not_in Exclude comments from a given array of comment types. Default empty. 209 * @type int $user_id Include comments for a specific user ID. Default empty. 210 * @type bool|string $hierarchical Whether to include comment descendants in the results. 211 * 'threaded' returns a tree, with each comment's children stored 212 * in a `children` property on the `WP_Comment` object. 'flat' 213 * returns a flat array of found comments plus their children. 214 * Pass `false` to leave out descendants. The parameter is ignored 215 * (forced to `false`) when `$fields` is 'ids' or 'counts'. 216 * Accepts 'threaded', 'flat', or false. Default: false. 147 * @type string $author_email Comment author email address. Default empty. 148 * @type array $author__in Array of author IDs to include comments for. Default empty. 149 * @type array $author__not_in Array of author IDs to exclude comments for. Default empty. 150 * @type array $comment__in Array of comment IDs to include. Default empty. 151 * @type array $comment__not_in Array of comment IDs to exclude. Default empty. 152 * @type bool $count Whether to return a comment count (true) or array of 153 * comment objects (false). Default false. 154 * @type array $date_query Date query clauses to limit comments by. See WP_Date_Query. 155 * Default null. 156 * @type string $fields Comment fields to return. Accepts 'ids' for comment IDs 157 * only or empty for all fields. Default empty. 158 * @type int $ID Currently unused. 159 * @type array $include_unapproved Array of IDs or email addresses of users whose unapproved 160 * comments will be returned by the query regardless of 161 * `$status`. Default empty. 162 * @type int $karma Karma score to retrieve matching comments for. 163 * Default empty. 164 * @type string $meta_key Include comments with a matching comment meta key. 165 * Default empty. 166 * @type string $meta_value Include comments with a matching comment meta value. 167 * Requires `$meta_key` to be set. Default empty. 168 * @type array $meta_query Meta query clauses to limit retrieved comments by. 169 * See WP_Meta_Query. Default empty. 170 * @type int $number Maximum number of comments to retrieve. 171 * Default null (no limit). 172 * @type int $offset Number of comments to offset the query. Used to build 173 * LIMIT clause. Default 0. 174 * @type bool $no_found_rows Whether to disable the `SQL_CALC_FOUND_ROWS` query. 175 * Default: true. 176 * @type string|array $orderby Comment status or array of statuses. To use 'meta_value' 177 * or 'meta_value_num', `$meta_key` must also be defined. 178 * To sort by a specific `$meta_query` clause, use that 179 * clause's array key. Accepts 'comment_agent', 180 * 'comment_approved', 'comment_author', 181 * 'comment_author_email', 'comment_author_IP', 182 * 'comment_author_url', 'comment_content', 'comment_date', 183 * 'comment_date_gmt', 'comment_ID', 'comment_karma', 184 * 'comment_parent', 'comment_post_ID', 'comment_type', 185 * 'user_id', 'comment__in', 'meta_value', 'meta_value_num', 186 * the value of $meta_key, and the array keys of 187 * `$meta_query`. Also accepts false, an empty array, or 188 * 'none' to disable `ORDER BY` clause. 189 * Default: 'comment_date_gmt'. 190 * @type string $order How to order retrieved comments. Accepts 'ASC', 'DESC'. 191 * Default: 'DESC'. 192 * @type int $parent Parent ID of comment to retrieve children of. 193 * Default empty. 194 * @type array $parent__in Array of parent IDs of comments to retrieve children for. 195 * Default empty. 196 * @type array $parent__not_in Array of parent IDs of comments *not* to retrieve 197 * children for. Default empty. 198 * @type array $post_author__in Array of author IDs to retrieve comments for. 199 * Default empty. 200 * @type array $post_author__not_in Array of author IDs *not* to retrieve comments for. 201 * Default empty. 202 * @type int $post_ID Currently unused. 203 * @type int $post_id Limit results to those affiliated with a given post ID. 204 * Default 0. 205 * @type array $post__in Array of post IDs to include affiliated comments for. 206 * Default empty. 207 * @type array $post__not_in Array of post IDs to exclude affiliated comments for. 208 * Default empty. 209 * @type int $post_author Comment author ID to limit results by. Default empty. 210 * @type string $post_status Post status to retrieve affiliated comments for. 211 * Default empty. 212 * @type string $post_type Post type to retrieve affiliated comments for. 213 * Default empty. 214 * @type string $post_name Post name to retrieve affiliated comments for. 215 * Default empty. 216 * @type int $post_parent Post parent ID to retrieve affiliated comments for. 217 * Default empty. 218 * @type string $search Search term(s) to retrieve matching comments for. 219 * Default empty. 220 * @type string $status Comment status to limit results by. Accepts 'hold' 221 * (`comment_status=0`), 'approve' (`comment_status=1`), 222 * 'all', or a custom comment status. Default 'all'. 223 * @type string|array $type Include comments of a given type, or array of types. 224 * Accepts 'comment', 'pings' (includes 'pingback' and 225 * 'trackback'), or anycustom type string. Default empty. 226 * @type array $type__in Include comments from a given array of comment types. 227 * Default empty. 228 * @type array $type__not_in Exclude comments from a given array of comment types. 229 * Default empty. 230 * @type int $user_id Include comments for a specific user ID. Default empty. 231 * @type bool|string $hierarchical Whether to include comment descendants in the results. 232 * 'threaded' returns a tree, with each comment's children 233 * stored in a `children` property on the `WP_Comment` 234 * object. 'flat' returns a flat array of found comments plus 235 * their children. Pass `false` to leave out descendants. 236 * The parameter is ignored (forced to `false`) when 237 * `$fields` is 'ids' or 'counts'. Accepts 'threaded', 238 * 'flat', or false. Default: false. 217 239 * @type bool $update_comment_meta_cache Whether to prime the metadata cache for found comments. 218 240 * Default true.
Note: See TracChangeset
for help on using the changeset viewer.