WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#25386 closed enhancement (fixed)

Add comment__in and comment__not_in to WP_Comment_Query

Reported by: nofearinc Owned by: boonebgorges
Milestone: 4.1 Priority: normal
Severity: normal Version:
Component: Comments Keywords: has-patch needs-testing
Focuses: Cc:

Description

Suggesting an update to the WP_Comment_Query class for filtering comments by ID, similarly to the WP_Query post__in and post__not_in.

Attachments (2)

25386.patch (1.0 KB) - added by nofearinc 6 years ago.
adding commentin and commentnot_in to WP_Comment_Query
25386-tests.diff (5.6 KB) - added by mordauk 5 years ago.

Download all attachments as: .zip

Change History (12)

@nofearinc
6 years ago

adding commentin and commentnot_in to WP_Comment_Query

#2 @ramiy
5 years ago

I like this too!

@mordauk
5 years ago

#3 @mordauk
5 years ago

  • Keywords needs-testing added

25386-tests.diff has basic tests for commentin and commentnot_in

#5 @boonebgorges
5 years ago

  • Owner set to boonebgorges
  • Status changed from new to reviewing

Hey fellows - Do you guys have strong feelings about parameter names? In 29189.2.patch I use comment_id__in etc while you've gone with comment__in etc. I guess your choice is more consistent with WP_Query params?

#6 @wonderboymusic
5 years ago

comment__in

#7 @mordauk
5 years ago

For consistency, comment__in

#8 @boonebgorges
5 years ago

  • Milestone Awaiting Review deleted
  • Status changed from reviewing to closed

Yeeeeah.

#9 @boonebgorges
5 years ago

  • Resolution set to fixed

In 29808:

WP_Comment_Query: commentin, commentnot_in, postin, postnot_in.

Props nofearinc, mordauk, boonebgorges

Fixes #25386

#10 @SergeyBiryukov
5 years ago

  • Milestone set to 4.1
Note: See TracTickets for help on using tickets.