[wp-trac] [WordPress Trac] #23666: Add sortable by Author to Posts

WordPress Trac noreply at wordpress.org
Sat Mar 2 09:38:35 UTC 2013


#23666: Add sortable by Author to Posts
-----------------------------+-------------------------
 Reporter:  ounziw           |       Type:  enhancement
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  General
  Version:  3.5.1            |   Severity:  minor
 Keywords:                   |
-----------------------------+-------------------------
 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.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23666>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list