Make WordPress Core

Opened 13 years ago

Closed 11 years ago

Last modified 11 years ago

#16882 closed enhancement (duplicate)

Add support for fetching comments posted since a specific date

Reported by: koke's profile koke Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Comments Keywords: has-patch mobile
Focuses: Cc:

Description

Adding a "since" option to wp.getComments and get_comments() could help reducing bandwidth used by mobile apps.

Probably useful for themes/plugins too

Attachments (1)

patch-core-get_comments_since.diff (1.8 KB) - added by koke 13 years ago.

Download all attachments as: .zip

Change History (9)

#1 @koke
13 years ago

Added patch for it. Please code review, not sure if some kind of date validation needs to be added, or $wpdb->prepare() handles that already.

#2 @koke
13 years ago

  • Cc jbernal@… added

#3 @koke
13 years ago

  • Keywords mobile added

#4 @c3mdigital
11 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

Just like WP_Query requires a clauses or posts_where filter to get posts in a date range, comments would require a comments_clauses['where'] filter.

See Codex for posts_clauses: http://codex.wordpress.org/Plugin_API/Filter_Reference/posts_clauses

#5 @markoheijnen
11 years ago

I'm not sure why it's closed. A filter can be used but option would be nice to have.

#6 @markoheijnen
11 years ago

  • Resolution wontfix deleted
  • Status changed from closed to reopened

#7 @nacin
11 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from reopened to closed

I think this is handled by WP_Date_Query. #18694

#8 @markoheijnen
11 years ago

Is it? I don't think that will mean you can use it through XML-RPC but I can look at that.

Note: See TracTickets for help on using tickets.