[wp-trac] [WordPress Trac] #29885: Add author__not_in for comment queries
WordPress Trac
noreply at wordpress.org
Wed Oct 8 14:40:16 UTC 2014
#29885: Add author__not_in for comment queries
-----------------------------+---------------------------
Reporter: chriscct7 | Owner: boonebgorges
Type: feature request | Status: accepted
Priority: normal | Milestone: 4.1
Component: Query | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
-----------------------------+---------------------------
Comment (by chriscct7):
Hi Boone,
I by not any means intended to suggest to discard the existing patch. I'm
actually a really big fan of what it does. I just wanted to point out that
while its really useful it wasn't the intended goal of the ticket, and
suggested we instead append to it so we get both the intended
functionality of the ticket and the functionality in the patch. I don't
really care as to how its implemented, but somehow, we need to add the
ability to be able to get all comments that aren't written by a specific
author or array of authors.
While the goal is to parallel WP_Query, it should be noted that the author
parameters always correspond to the author of the given data, in the
normal case a post. On one hand while I get how `author__not_in` referring
to the comment author, might be confusing, at the end of the day the
author parameters always point to the data, not what its displayed on. Its
the way that most developers will end up expecting comment querying to
work, and actually the whole reason I opened this ticket, was because I
mistakenly assumed `author__not_in` already was an existing parameter for
comment queries and had pushed code assuming it was. While my mistake
alone shouldn't be contrived to be a barometer of sorts for the developer
community at whole by a long shot, I think its safe to assume when someone
sees the author parameter in WP_Query and interprets it to be the author
of the post, they'll see the same parameter for comment querying as the
author of the comment. It could also be implemented as proposed above
using a `comment_author__not_in` name.
What is your thoughts?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29885#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list