Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#14163 closed enhancement (fixed)

Extend comment search to support user_id as argument

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

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

Download all attachments as: .zip

Change History (12)

#1 @scribu
16 years ago

  • Description modified (diff)
  • Keywords gsoc added; comments comment user removed
  • Milestone Awaiting Review → Future Release
  • Owner set to scribu
  • Status new → 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
16 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
16 years ago

  • Cc WordPress@… added

#6 @scribu
16 years ago

  • Milestone Future Release → 3.1
  • Resolution → fixed
  • Status assigned → closed

#7 @neoxx
16 years ago

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

#8 @scribu
16 years ago

  • Resolution fixed
  • Status closed → reopened
  • Type feature request → enhancement

#9 @neoxx
16 years ago

  • Keywords has-patch added

updated patch for default-list-tables

#10 @scribu
16 years ago

  • Resolution → fixed
  • Status reopened → closed

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

#11 @scribu
16 years ago

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

Note: See TracTickets for help on using tickets.