Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#10629 closed enhancement (wontfix)

Also show comment count in wp-admin/users.php

Reported by: novasource Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.8
Component: Users Keywords: user comment count has-patch needs-testing
Focuses: Cc:


WordPress should also show each user's comment count in wp-admin/users.php.

An example use case is a client's blog with almost 200 users, the vast majority of which are old spammer accounts established before I added a Turing test to registration. I have no way to know which ones have no approved comments. If I could know that, I could probably reduce this list to 20 or so users.

WordPress forum posts that reference this need:
http://wordpress.org/support/topic/298920 (this one says the feature was available in 2.5?)

Requesting 2.8.5 because this should be an easy change.

Attachments (4)

template.php (127.7 KB) - added by novasource 6 years ago.
user.php (20.0 KB) - added by novasource 6 years ago.
template.patch (1.2 KB) - added by novasource 6 years ago.
user.patch (791 bytes) - added by novasource 6 years ago.

Download all attachments as: .zip

Change History (16)

6 years ago

6 years ago

#1 @novasource
6 years ago

  • Owner set to novasource
  • Status changed from new to assigned

I attached a beta of the new features. Summary of changes:

  • In template.php:
    • Added comments to users case in switch in get_column_headers.
    • To user_row:
      • Added $numcomments variable.
      • Added case switch to switch ($column_name) for new comments column. Note that this column doesn't use the same CSS classes as posts. I tried taking the same CSS classes and changing posts to categories, but the number was vertically centered.
      • Removed display of 0 from both posts and columns. This drastically helps usability where you have sparse matrixes--which will be the case if a lot of spammers got in--because a blank is a lot easier to spot than 0 against a set of integers that are >0.
  • In user.php:
    • Added get_usernumcomments function. It's basically a copy of get_usernumposts with obvious modifications, including leaving out the get_private_posts_cap_sql at the end of the SQL statement. I inspected the referenced code and didn't think it's relevant to comments, although I admit I am not fully aware enough of the plugin ecosystem to know if I should have a different stance. Note that I assume the @since comment means this function has been present since the indicated version?

I couldn't clearly find if you prefer patch files or full files from external parties, so the full PHP is attached.

#2 @novasource
6 years ago

Other notes:

  • Comments in the header appears to wrap in the middle of the word. Not sure what to do; probably needs CSS changes?
  • Unlike the posts count link, comments count has no links to the comments of that user. I didn't see such a page. It would be a handy additional page.

#3 @dd32
6 years ago

  • Milestone changed from 2.8.5 to 2.9
  • Version changed from 2.8.4 to 2.8

Diff always, Full files are pretty much useless when reviewing changes, Many people will mearly glance at the diff rather than trying it out.

Milestone: All enhancements to current trunk

6 years ago

6 years ago

#4 @novasource
6 years ago

Patch files attached.

#5 @mrmist
6 years ago

  • Keywords has-patch needs-testing added

#6 @novasource
6 years ago

  • Owner novasource deleted

Removing my assignment because I am not familiar with Wordpress's development culture or processes.

#7 @janeforshort
6 years ago

  • Milestone changed from 2.9 to Future Release

Punting as no owner and no community testing in the three months that patch has been up. Thinking might be better as a plugin?

#8 @novasource
6 years ago

  • Cc novasource added

It would be unfortunate if such a simple and useful change had to be farmed out to a plugin.

#9 @nacin
6 years ago

I'd tend to agree that this is plugin material. You can always clean up your patches (looks like they're not generated properly; they could also be combined) and see if it gains traction for 3.0.

#10 @westi
6 years ago

This feels like plugin material.

If the plugin is popular then it is possible that the code will get rolled into the core.

If we are missing hooks / filters which make it difficult to write a plugin to do this then pleas let us know and we will add them.

#11 @hakre
6 years ago

This is related to screen options which aren't properly hook-able (missed that already).

Related: #10696

#12 @nacin
6 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from assigned to closed

Hooks should be there to do this. If not, feel free to re-open.

Note: See TracTickets for help on using tickets.