[wp-trac] [WordPress Trac] #21101: Allow get_comments() to query for explicit value of comment_approved
WordPress Trac
wp-trac at lists.automattic.com
Wed Sep 26 05:20:46 UTC 2012
#21101: Allow get_comments() to query for explicit value of comment_approved
-------------------------+-----------------------
Reporter: nbachiyski | Owner: westi
Type: enhancement | Status: assigned
Priority: normal | Milestone: 3.5
Component: Comments | Version: 3.4
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+-----------------------
Comment (by nacin):
This argument:
> the problem is that $status has special values, like 'hold', which
translates to "comment_approved = '0'"
> and it gets complicated, I wouldn't be able to use 'hold' as the value
of comment_appoved
Would make sense if 'hold' was just a special name used only in
get_comments(). But 'approve' and 'hold' is used throughout the comments
API to be the string equivalents/aliases for 1 and 0. When we get to a
custom comment status API, the names will likely be 'approve' and 'hold',
with a separate "value in the DB" property of 1 and 0.
Hence why I still like [attachment:21101.diff]. It's not much different
than the default order of post_date or something, which is what occurs
when you pass it a value it doesn't understand. When you actually look at
it together, it's pretty clearly not a hack or a dirty API.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21101#comment:12>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list