TypeRocket / core

TypeRocket core source files where all the magic lives.
https://typerocket.com
36 stars 21 forks source link

Sortable columns not working + fix #9

Closed synio-wesley closed 7 years ago

synio-wesley commented 7 years ago

Hi,

Using TypeRocket right now for a project because I kind of like both WordPress and Laravel.

Came across an issue regarding custom sorting of columns in admin.

In core/src/Register/Registry.php line 306 it says: add_filter( "manage_edit-{$pt}_sortable_columns", function() use ($new_column) { This should be: add_filter( "manage_edit-{$pt}_sortable_columns", function($columns) use ($new_column) {

Otherwise only one the last of the new defined sortable columns will be sortable.

Kind regards Wesley / Synio

kevindees commented 7 years ago

Hey Wesley,

Thanks for spotting this issue and creating the fix. I have created the patch for this bug. you can run composer update to get the changes.

https://github.com/TypeRocket/core/releases/tag/v3.0.40

Thanks, Kevin