Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#23666 closed enhancement (wontfix)

Add sortable by Author to Posts

Reported by: ounziw's profile ounziw Owned by:
Milestone: Priority: normal
Severity: minor Version: 3.5.1
Component: Administration Keywords:
Focuses: Cc:

Description

Posts page of dmin area ( wp-admin/edit.php ) is not sortable by Authors.

By typing the urls shown below works.
wp-admin/edit.php?orderby=author&order=asc
wp-admin/edit.php?orderby=author&order=desc

I propose to modify WP_Posts_List_Table::get_sortable_columns (WP_Posts_List_Table is located in wp-admin/includes/class-wp-posts-lista-belt.php), as shown below.

	function get_sortable_columns() {
		return array(
			'title'    => 'title',
			'parent'   => 'parent',
			'author'   => 'author',  // I added here.
			'comments' => 'comment_count',
			'date'     => array( 'date', true )
		);
	}

This modification adds the link to "Author" on the posts list table, which makes easier to sort posts by Author.

Change History (3)

#1 follow-up: @kawauso
12 years ago

That results in sorting by author ID rather than display name though, which is probably not what the user would expect.

#2 in reply to: ↑ 1 @SergeyBiryukov
12 years ago

  • Component changed from General to Administration
  • Keywords close added

Replying to kawauso:

That results in sorting by author ID rather than display name though, which is probably not what the user would expect.

Correct, see #17141.

Author column sorting was intentionally removed in [21743].

#3 @helen
12 years ago

  • Keywords close removed
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.