Normalize whitespace in `WP_Comment_Query` documentation.

git-svn-id: https://develop.svn.wordpress.org/trunk@34548 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Boone Gorges 2015-09-25 15:24:15 +00:00
parent 3b9cb92c44
commit 92da083c00
1 changed files with 92 additions and 70 deletions

View File

@ -149,71 +149,93 @@ class WP_Comment_Query {
* @type array $author__not_in Array of author IDs to exclude comments for. Default empty. * @type array $author__not_in Array of author IDs to exclude comments for. Default empty.
* @type array $comment__in Array of comment IDs to include. Default empty. * @type array $comment__in Array of comment IDs to include. Default empty.
* @type array $comment__not_in Array of comment IDs to exclude. Default empty. * @type array $comment__not_in Array of comment IDs to exclude. Default empty.
* @type bool $count Whether to return a comment count (true) or array of comment * @type bool $count Whether to return a comment count (true) or array of
* objects (false). Default false. * comment objects (false). Default false.
* @type array $date_query Date query clauses to limit comments by. See WP_Date_Query. * @type array $date_query Date query clauses to limit comments by. See WP_Date_Query.
* Default null. * Default null.
* @type string $fields Comment fields to return. Accepts 'ids' for comment IDs only or * @type string $fields Comment fields to return. Accepts 'ids' for comment IDs
* empty for all fields. Default empty. * only or empty for all fields. Default empty.
* @type int $ID Currently unused. * @type int $ID Currently unused.
* @type array $include_unapproved Array of IDs or email addresses of users whose unapproved comments * @type array $include_unapproved Array of IDs or email addresses of users whose unapproved
* will be returned by the query regardless of `$status`. Default empty. * comments will be returned by the query regardless of
* @type int $karma Karma score to retrieve matching comments for. Default empty. * `$status`. Default empty.
* @type string $meta_key Include comments with a matching comment meta key. Default empty. * @type int $karma Karma score to retrieve matching comments for.
* @type string $meta_value Include comments with a matching comment meta value. Requires * Default empty.
* `$meta_key` to be set. Default empty. * @type string $meta_key Include comments with a matching comment meta key.
* Default empty.
* @type string $meta_value Include comments with a matching comment meta value.
* Requires `$meta_key` to be set. Default empty.
* @type array $meta_query Meta query clauses to limit retrieved comments by. * @type array $meta_query Meta query clauses to limit retrieved comments by.
* See WP_Meta_Query. Default empty. * See WP_Meta_Query. Default empty.
* @type int $number Maximum number of comments to retrieve. Default null (no limit). * @type int $number Maximum number of comments to retrieve.
* @type int $offset Number of comments to offset the query. Used to build LIMIT clause. * Default null (no limit).
* Default 0. * @type int $offset Number of comments to offset the query. Used to build
* LIMIT clause. Default 0.
* @type bool $no_found_rows Whether to disable the `SQL_CALC_FOUND_ROWS` query. * @type bool $no_found_rows Whether to disable the `SQL_CALC_FOUND_ROWS` query.
* Default: true. * Default: true.
* @type string|array $orderby Comment status or array of statuses. To use 'meta_value' or * @type string|array $orderby Comment status or array of statuses. To use 'meta_value'
* 'meta_value_num', `$meta_key` must also be defined. To sort by * or 'meta_value_num', `$meta_key` must also be defined.
* a specific `$meta_query` clause, use that clause's array key. * To sort by a specific `$meta_query` clause, use that
* Accepts 'comment_agent', 'comment_approved', 'comment_author', * clause's array key. Accepts 'comment_agent',
* 'comment_approved', 'comment_author',
* 'comment_author_email', 'comment_author_IP', * 'comment_author_email', 'comment_author_IP',
* 'comment_author_url', 'comment_content', 'comment_date', * 'comment_author_url', 'comment_content', 'comment_date',
* 'comment_date_gmt', 'comment_ID', 'comment_karma', * 'comment_date_gmt', 'comment_ID', 'comment_karma',
* 'comment_parent', 'comment_post_ID', 'comment_type', 'user_id', * 'comment_parent', 'comment_post_ID', 'comment_type',
* 'comment__in', 'meta_value', 'meta_value_num', the value of $meta_key, and the * 'user_id', 'comment__in', 'meta_value', 'meta_value_num',
* array keys of `$meta_query`. Also accepts false, an empty array, * the value of $meta_key, and the array keys of
* or 'none' to disable `ORDER BY` clause. * `$meta_query`. Also accepts false, an empty array, or
* 'none' to disable `ORDER BY` clause.
* Default: 'comment_date_gmt'. * Default: 'comment_date_gmt'.
* @type string $order How to order retrieved comments. Accepts 'ASC', 'DESC'. * @type string $order How to order retrieved comments. Accepts 'ASC', 'DESC'.
* Default: 'DESC'. * Default: 'DESC'.
* @type int $parent Parent ID of comment to retrieve children of. Default empty. * @type int $parent Parent ID of comment to retrieve children of.
* @type array $parent__in Array of parent IDs of comments to retrieve children for. Default empty. * Default empty.
* @type array $parent__not_in Array of parent IDs of comments *not* to retrieve children for. Default empty. * @type array $parent__in Array of parent IDs of comments to retrieve children for.
* @type array $post_author__in Array of author IDs to retrieve comments for. Default empty. * Default empty.
* @type array $post_author__not_in Array of author IDs *not* to retrieve comments for. Default empty. * @type array $parent__not_in Array of parent IDs of comments *not* to retrieve
* children for. Default empty.
* @type array $post_author__in Array of author IDs to retrieve comments for.
* Default empty.
* @type array $post_author__not_in Array of author IDs *not* to retrieve comments for.
* Default empty.
* @type int $post_ID Currently unused. * @type int $post_ID Currently unused.
* @type int $post_id Limit results to those affiliated with a given post ID. Default 0. * @type int $post_id Limit results to those affiliated with a given post ID.
* @type array $post__in Array of post IDs to include affiliated comments for. Default empty. * Default 0.
* @type array $post__not_in Array of post IDs to exclude affiliated comments for. Default empty. * @type array $post__in Array of post IDs to include affiliated comments for.
* Default empty.
* @type array $post__not_in Array of post IDs to exclude affiliated comments for.
* Default empty.
* @type int $post_author Comment author ID to limit results by. Default empty. * @type int $post_author Comment author ID to limit results by. Default empty.
* @type string $post_status Post status to retrieve affiliated comments for. Default empty. * @type string $post_status Post status to retrieve affiliated comments for.
* @type string $post_type Post type to retrieve affiliated comments for. Default empty. * Default empty.
* @type string $post_name Post name to retrieve affiliated comments for. Default empty. * @type string $post_type Post type to retrieve affiliated comments for.
* @type int $post_parent Post parent ID to retrieve affiliated comments for. Default empty. * Default empty.
* @type string $search Search term(s) to retrieve matching comments for. Default empty. * @type string $post_name Post name to retrieve affiliated comments for.
* Default empty.
* @type int $post_parent Post parent ID to retrieve affiliated comments for.
* Default empty.
* @type string $search Search term(s) to retrieve matching comments for.
* Default empty.
* @type string $status Comment status to limit results by. Accepts 'hold' * @type string $status Comment status to limit results by. Accepts 'hold'
* (`comment_status=0`), 'approve' (`comment_status=1`), 'all', or a * (`comment_status=0`), 'approve' (`comment_status=1`),
* custom comment status. Default 'all'. * 'all', or a custom comment status. Default 'all'.
* @type string|array $type Include comments of a given type, or array of types. Accepts * @type string|array $type Include comments of a given type, or array of types.
* 'comment', 'pings' (includes 'pingback' and 'trackback'), or any * Accepts 'comment', 'pings' (includes 'pingback' and
* custom type string. Default empty. * 'trackback'), or anycustom type string. Default empty.
* @type array $type__in Include comments from a given array of comment types. Default empty. * @type array $type__in Include comments from a given array of comment types.
* @type array $type__not_in Exclude comments from a given array of comment types. Default empty. * Default empty.
* @type array $type__not_in Exclude comments from a given array of comment types.
* Default empty.
* @type int $user_id Include comments for a specific user ID. Default empty. * @type int $user_id Include comments for a specific user ID. Default empty.
* @type bool|string $hierarchical Whether to include comment descendants in the results. * @type bool|string $hierarchical Whether to include comment descendants in the results.
* 'threaded' returns a tree, with each comment's children stored * 'threaded' returns a tree, with each comment's children
* in a `children` property on the `WP_Comment` object. 'flat' * stored in a `children` property on the `WP_Comment`
* returns a flat array of found comments plus their children. * object. 'flat' returns a flat array of found comments plus
* Pass `false` to leave out descendants. The parameter is ignored * their children. Pass `false` to leave out descendants.
* (forced to `false`) when `$fields` is 'ids' or 'counts'. * The parameter is ignored (forced to `false`) when
* Accepts 'threaded', 'flat', or false. Default: false. * `$fields` is 'ids' or 'counts'. Accepts 'threaded',
* 'flat', or false. Default: false.
* @type bool $update_comment_meta_cache Whether to prime the metadata cache for found comments. * @type bool $update_comment_meta_cache Whether to prime the metadata cache for found comments.
* Default true. * Default true.
* } * }