[wp-trac] [WordPress Trac] #12668: Better support for custom comment types
WordPress Trac
noreply at wordpress.org
Tue Oct 28 01:06:29 UTC 2014
#12668: Better support for custom comment types
----------------------------------------+------------------------------
Reporter: ptahdunbar | Owner: ptahdunbar
Type: enhancement | Status: reopened
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests | Focuses:
----------------------------------------+------------------------------
Comment (by dancameron):
Firstly thank you [comment:60 boonebgorges] for taking the time yesterday
to focus on this ticket.
What ''we'' concluded was that the latest scope from [comment:55 mordauk]
(although limiting) was far too reaching because it would impose a
regressing for those (hypothetical) comment types that are expected within
the admin edit screen after 4.1. At this point building support to
register comment types (similar to CPTs) is unlikely for an immediate
release and a broader discussion should be had.
That said the pain points [comment:27 mordauk], [comment:26 judgej] and
others brought up should be addressed now.
Here's the scope that I'm working on providing:
* Add support to WP_Comment_Query for retrieving multiple comment types
* Add array support for the `type`
* Add `type__in` and merge with `type`.
* Add support to exclude custom comment_types from
`WP_Comment_Query::query`
* By adding `type__not_in`, `pre_get_comments` should/can be used to
hide comment_types from all comment queries.
* Rewrite the internals for `get_approved_comments` to use
`WP_Comment_Query::query` and allow for query args
* Create new unit tests for comments query pre-patch
* Create new unit tests for any comment query enhancements
At the moment I have all of these items (except a few new tests) complete.
I will wrap everything soon and upload the pre-patch tests separately than
the patch(s).
I do hope the need for this new scope is apparent and the benefits are
clear.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/12668#comment:67>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list