Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#14163 closed enhancement (fixed)

Extend comment search to support user_id as argument

Reported by: neoxx Owned by: scribu
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.0
Component: Comments Keywords: gsoc has-patch
Focuses: Cc:

Description (last modified by scribu)


what do you think about the idea of extending _wp_get_comment_list in wp-admin/includes/template.php in a way that we can also query for user-ids?

I know, that the user_id will only be stored for comments of logged-in users, though I would need this search functionality not only, but also for my count-comments plugin. Currently, I implemented a link from users.php to edit-comments.php using
?s=user_display_name which obviously results in missed comments as well as false positives.

Just to give the idea a start, I've attached a patch prototype that extends handling of $_REQUEST['s']. - Or would we prefer a separate argument?

Attachments (1)

14163.diff (814 bytes) - added by neoxx 6 years ago.

Download all attachments as: .zip

Change History (12)

#1 @scribu
6 years ago

  • Description modified (diff)
  • Keywords gsoc added; comments comment user removed
  • Milestone changed from Awaiting Review to Future Release
  • Owner set to scribu
  • Status changed from new to assigned

As part of my GSoC project, I have removed _wp_get_comment_list() in favor of get_comments(), which already has a 'user_id' argument.

#3 @neoxx
6 years ago

That's good to know. - Imho the best way would be to have the 'user_id' query-able by a $_REQUEST variable handed over to users.php (same as edit.php?author=nn for posts).

#5 @voyagerfan5761
6 years ago

  • Cc WordPress@… added

#6 @scribu
6 years ago

  • Milestone changed from Future Release to 3.1
  • Resolution set to fixed
  • Status changed from assigned to closed

#7 @neoxx
6 years ago

nice update :) but how is it now possible to query for the user-id with a $_REQUEST-parameter?

#8 @scribu
6 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Type changed from feature request to enhancement

6 years ago

#9 @neoxx
6 years ago

  • Keywords has-patch added

updated patch for default-list-tables

#10 @scribu
6 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [15887]) Allow filtering comments by user_id via URL. Props neoxx. Fixes #14163

#11 @scribu
6 years ago

(In [15888]) Revert accidental changes to WP_Query made in [15887]. See #14163

Note: See TracTickets for help on using tickets.