Hi Pioneer Web Design,
Thanks for your help. I ended up finding the problem, and a solution.
I dumped the array from above and it was in the correct order. The problem was this chunk of code from some example I found online for extending wp_list_table, seems like everyone is using it.
function usort_reorder($a,$b) {
$orderby = (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'order';
$order = (!empty($_REQUEST['order'])) ? $_REQUEST['order'] : 'asc';
$result = strcmp($a[$orderby], $b[$orderby]);
return ($order==='asc') ? $result : -$result;
}
usort($data, 'usort_reorder');
}
The above is need and works as it it suppose to if the user wants to manually sort the columns, but not by default. So I simply wrapped an if statement around it:
if (isset($_REQUEST['orderby'])) {
function usort_reorder($a,$b) {
$orderby = (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'order';
$order = (!empty($_REQUEST['order'])) ? $_REQUEST['order'] : 'asc';
$result = strcmp($a[$orderby], $b[$orderby]);
return ($order==='asc') ? $result : -$result;
}
usort($data, 'usort_reorder');
}
And this solved the problem. Thanks for your help! I really appreciate it.
Thanks,
Scott