WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

Last modified 4 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)

Hi,

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 4 years ago.

Download all attachments as: .zip

Change History (12)

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

comment:3 @neoxx5 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).

comment:5 @voyagerfan57615 years ago

  • Cc WordPress@… added

comment:6 @scribu5 years ago

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

comment:7 @neoxx5 years ago

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

comment:8 @scribu5 years ago

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

@neoxx4 years ago

comment:9 @neoxx4 years ago

  • Keywords has-patch added

updated patch for default-list-tables

comment:10 @scribu4 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

comment:11 @scribu4 years ago

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

Note: See TracTickets for help on using tickets.