Boone Gorges
e1b44f5203
Introduce hierarchical query support to WP_Comment_Query.
...
Comments can be threaded. Now your query can be threaded too! Bonus: it's
not totally insane.
* The new `$hierarchical` parameter for `WP_Comment_Query` accepts three values:
* `false` - Default value, and equivalent to current behavior. No descendants are fetched for matched comments.
* `'flat'` - `WP_Comment_Query` will fetch the descendant tree for each comment matched by the query paramaters, and append them to the flat array of comments returned. Use this when you have a separate routine for constructing the tree - for example, when passing a list of comments to a `Walker` object.
* `'threaded'` - `WP_Comment_Query` will fetch the descendant tree for each comment, and return it in a tree structure located in the `children` property of the `WP_Comment` objects.
* `WP_Comment` now has a few utility methods for fetching the descendant tree (`get_children()`), fetching a single direct descendant comment (`get_child()`), and adding anothing `WP_Comment` object as a direct descendant (`add_child()`). Note that `add_child()` only modifies the comment object - it does not touch the database.
Props boonebgorges, wonderboymusic.
See #8071 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34546 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-25 15:12:09 +00:00
..
2015-09-18 08:42:24 +00:00
2015-09-14 17:09:58 +00:00
2015-07-23 10:02:54 +00:00
2015-06-28 00:16:17 +00:00
2015-04-11 18:16:24 +00:00
2015-09-20 03:16:23 +00:00
2015-09-20 03:51:55 +00:00
2015-06-28 15:26:41 +00:00
2015-09-20 08:48:28 +00:00
2015-09-24 19:52:06 +00:00
2015-09-20 03:51:55 +00:00
2015-06-28 15:26:41 +00:00
2015-05-25 13:05:21 +00:00
2015-06-22 20:54:31 +00:00
2015-09-08 22:16:57 +00:00
2015-09-16 10:02:20 +00:00
2015-09-24 14:03:05 +00:00
2015-09-22 13:45:48 +00:00
2015-09-22 13:45:48 +00:00
2015-09-22 14:20:49 +00:00
2015-09-22 14:22:48 +00:00
2015-09-22 14:19:13 +00:00
2015-09-20 03:51:55 +00:00
2015-09-24 18:51:13 +00:00
2015-06-28 15:26:41 +00:00
2015-09-16 12:45:51 +00:00
2015-09-24 22:02:16 +00:00
2015-06-28 15:26:41 +00:00
2015-07-09 07:55:44 +00:00
2015-09-16 12:45:51 +00:00
2015-09-20 03:51:55 +00:00
2015-07-08 17:15:02 +00:00
2015-09-20 03:51:55 +00:00
2015-09-22 14:02:32 +00:00
2015-09-22 14:00:54 +00:00
2015-09-22 13:42:15 +00:00
2015-09-22 13:57:23 +00:00
2015-09-22 15:08:10 +00:00
2015-07-08 20:02:44 +00:00
2015-09-25 15:12:09 +00:00
2015-09-25 15:12:09 +00:00
2015-08-25 20:27:56 +00:00
2015-09-19 06:39:09 +00:00
2015-09-24 09:15:15 +00:00
2015-09-13 06:15:42 +00:00
2015-09-09 04:38:31 +00:00
2015-09-05 19:52:17 +00:00
2015-08-03 20:56:56 +00:00
2015-09-16 11:58:41 +00:00
2015-08-25 20:27:56 +00:00
2015-05-24 05:39:47 +00:00
2015-09-03 03:18:20 +00:00
2015-09-08 22:16:57 +00:00
2015-09-03 03:27:04 +00:00
2015-09-15 16:15:39 +00:00
2015-09-03 03:29:39 +00:00
2015-09-16 12:45:51 +00:00
2015-07-02 21:04:57 +00:00
2015-09-20 03:51:55 +00:00
2015-08-25 20:27:56 +00:00
2015-09-22 13:25:37 +00:00
2015-09-13 23:39:20 +00:00
2015-09-22 13:09:17 +00:00
2015-09-24 14:03:05 +00:00
2015-09-22 13:45:48 +00:00
2015-09-22 13:45:48 +00:00
2015-09-22 13:15:45 +00:00
2015-09-16 13:28:41 +00:00
2015-09-25 04:25:20 +00:00
2015-09-24 00:48:23 +00:00
2015-09-14 15:32:46 +00:00
2015-09-22 13:47:09 +00:00
2015-09-22 12:27:33 +00:00
2015-09-17 04:46:00 +00:00
2015-09-24 14:19:03 +00:00
2015-08-25 20:27:56 +00:00
2015-05-29 21:36:38 +00:00
2015-07-13 21:02:06 +00:00
2015-09-25 14:42:48 +00:00
2015-09-24 21:59:39 +00:00
2015-09-22 13:43:55 +00:00
2015-05-31 03:17:50 +00:00
2015-09-11 11:34:52 +00:00
2015-08-29 01:46:53 +00:00
2015-08-25 21:20:02 +00:00
2015-09-25 03:58:59 +00:00
2015-09-22 13:35:41 +00:00
2015-09-09 04:25:24 +00:00
2015-06-16 20:00:15 +00:00
2015-07-15 19:57:47 +00:00
2015-07-15 19:57:47 +00:00
2015-05-09 06:38:38 +00:00
2015-09-16 11:01:50 +00:00
2015-09-22 04:30:11 +00:00
2015-09-24 19:33:07 +00:00
2015-06-12 16:53:17 +00:00
2015-06-12 16:53:17 +00:00
2015-09-24 03:33:21 +00:00
2015-09-22 03:13:13 +00:00
2015-09-03 03:46:27 +00:00
2015-08-25 21:45:42 +00:00
2015-09-24 05:50:49 +00:00
2015-09-25 02:37:29 +00:00
2015-09-23 21:56:32 +00:00
2015-09-24 13:25:55 +00:00
2015-09-11 18:29:26 +00:00
2015-09-24 03:21:11 +00:00
2015-09-22 13:26:47 +00:00
2015-09-22 13:29:02 +00:00
2015-05-26 21:50:13 +00:00
2015-05-26 21:50:13 +00:00
2015-09-16 22:18:33 +00:00
2015-08-20 22:35:30 +00:00
2015-06-16 20:00:15 +00:00
2015-09-23 14:23:13 +00:00
2015-09-13 23:39:20 +00:00
2015-09-13 23:39:20 +00:00
2015-09-24 17:58:20 +00:00
2015-08-25 20:27:56 +00:00
2015-09-11 15:09:13 +00:00
2015-09-20 03:51:55 +00:00
2015-09-20 03:51:55 +00:00
2015-09-18 14:52:37 +00:00
2015-08-25 20:27:56 +00:00
2015-09-24 19:38:11 +00:00
2015-09-22 20:26:17 +00:00
2015-09-24 04:37:48 +00:00
2015-09-22 13:12:55 +00:00
2015-09-24 16:17:23 +00:00
2015-08-25 20:27:56 +00:00
2015-09-04 01:51:08 +00:00
2015-09-24 14:03:05 +00:00
2015-08-26 04:41:29 +00:00
2015-08-25 20:27:56 +00:00
2015-09-24 01:06:17 +00:00
2015-09-14 22:35:22 +00:00
2015-09-25 13:46:36 +00:00
2015-09-22 13:22:38 +00:00
2015-06-18 19:00:09 +00:00
2015-07-14 22:26:32 +00:00
2015-09-10 23:49:14 +00:00
2015-05-28 15:28:10 +00:00
2015-09-22 20:26:17 +00:00
2015-09-22 13:02:25 +00:00
2015-09-05 22:33:01 +00:00
2015-09-25 03:58:59 +00:00
2015-09-24 00:29:54 +00:00
2015-09-03 03:13:20 +00:00
2015-09-25 03:58:59 +00:00
2015-09-20 03:51:55 +00:00