WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 7 months ago

Last modified 7 months ago

#16882 closed enhancement (duplicate)

Add support for fetching comments posted since a specific date

Reported by: 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 3 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 koke3 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.

comment:2 koke3 years ago

  • Cc jbernal@… added

comment:3 koke3 years ago

  • Keywords mobile added

comment:4 c3mdigital8 months 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

comment:5 markoheijnen8 months ago

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

comment:6 markoheijnen8 months ago

  • Resolution wontfix deleted
  • Status changed from closed to reopened

comment:7 nacin7 months 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

comment:8 markoheijnen7 months 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.