[wp-trac] [WordPress Trac] #12668: Better support for custom comment types
WordPress Trac
noreply at wordpress.org
Wed Oct 15 00:22:50 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:
----------------------------------------+------------------------------
Changes (by boonebgorges):
* keywords: has-patch => has-patch needs-unit-tests
Comment:
This thread is long and the scope of the proposed changes is unclear.
There are pieces of this that I would be happy to help shepherd through
the process - in particular, changes to the `WP_Comment_Query` API that'll
allow for filtering by comment type, and the addition of filters as
necessary to allow plugins to manipulate default comment querying
behavior, eg on the Recent Comments dashboard widget. That said, now that
patches are starting to roll in, it would be nice if they were accompanied
by a succinct statement about what just what it is that we're trying to
accomplish.
> In order to keep track it's gonna be a real hassle if the diff/patch
files get changed. So let's try to keep them as is (although I wouldn't be
apposed to naming the files based off the file names).
+1
> I really want to change the get_approved_comments function, I don't know
how to describe my angst towards it. Firstly, it's not even being used by
anything in core than comments-popup (which brings back memories);
Secondly, I feel that it should be using WP_Comment_Query...I'll create a
totally separate patch.
Yes, this. Adding piecemeal support to `get_approved_comments()` is
unappealing. We'll need unit tests for that function before rewriting its
internals, though. (Also, in `WP_Comment_Query`, be sure to `array_map(
'esc_sql', $this->query_vars['type'] )`.)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/12668#comment:54>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list