WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#18300 closed enhancement (duplicate)

Allow sorting users by post count

Reported by: sirzooro Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.2.1
Component: Users Keywords:
Focuses: Cc:

Description

I have site where everyone can register and post. I would like to remove all users without posts. User list already displays post count for each user, but it is not possible to sort them by that column, what makes this task more difficult. Please allow sorting users by post count.

Change History (2)

comment:1 scribu3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

comment:2 SergeyBiryukov3 years ago

  • Keywords needs-patch removed

A workaround:

function allow_order_by_post_count($columns) {
	$columns['posts'] = 'post_count';
	return $columns;
}
add_filter('manage_users_sortable_columns', 'allow_order_by_post_count');
Note: See TracTickets for help on using tickets.