Skip to content

Instantly share code, notes, and snippets.

@glueckpress
Last active December 14, 2015 21:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glueckpress/5014377 to your computer and use it in GitHub Desktop.
Save glueckpress/5014377 to your computer and use it in GitHub Desktop.
[WordPress] Make media library entries sortable by author column.
<?php
/**
* Make media author column sortable.
*/
add_filter( 'manage_upload_sortable_columns', 'gp130222_upload_sortable_columns' );
function gp130222_upload_sortable_columns( $columns ) {
array_push( $columns, $columns['author'] );
return $columns;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment