[wp-trac] [WordPress Trac] #16431: Adding include to wp_list_comments()
WordPress Trac
noreply at wordpress.org
Fri Aug 16 09:14:12 UTC 2013
#16431: Adding include to wp_list_comments()
-------------------------------+------------------------------
Reporter: danielpataki | Owner:
Type: enhancement | Status: reopened
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version: 2.7
Severity: normal | Resolution:
Keywords: reporter-feedback |
-------------------------------+------------------------------
Changes (by c3mdigital):
* keywords: => reporter-feedback
* status: closed => reopened
* resolution: duplicate =>
Comment:
Replying to [comment:6 danielpataki]:
> Great, thanks for giving this some attention :) Should a new ticket be
opened for the WP_Query parameters, or is it covered somewhere already?
>
> Daniel
Actually that this shouldn't be marked as a duplicate. The filter on
#19581 is not for any query arguments. I was thinking of `get_comments()`
which does allow for query arguments for WP_Comment_Query which are a
little different than WP_Query.
I think in your case a new WP_Comment_Query sorting by meta_data would
work. Pass the ordered results to wp_list_comments.
'''WP_Comment_Query query_vars:'''
{{{
'author_email' => '',
'ID' => '',
'karma' => '',
'number' => '',
'offset' => '',
'orderby' => '',
'order' => 'DESC',
'parent' => '',
'post_ID' => '',
'post_id' => 0,
'post_author' => '',
'post_name' => '',
'post_parent' => '',
'post_status' => '',
'post_type' => '',
'status' => '',
'type' => '',
'user_id' => '',
'search' => '',
'count' => false,
'meta_key' => '',
'meta_value' => '',
'meta_query' => '',
}}}
Do we need additional WP_Comment_Query query_vars?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16431#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list