Sorting custom column human_time_diff()
-
Hi, I’m trying to sort a custom column on the plugins.php page. Using the
manage_plugins_custom_column
action and themanage_{$this->screen->id}_sortable_columns
filter. Getting thelast_updated
date from theplugins_api()
After parsing the date with:
human_time_diff( strtotime( $plugin_api->last_updated ) ) . ' ago';
It’s loading fine and I get a “sortable” column. Except it’s not sorting. The content is changed to days, weeks, etc by the functions. Not sure what I need to do to make this sortable as it does not change any of the sorting. I tested it in another column and it worked great by sorting things alphabetically. I also notice that it sorts dates fine… I’d love for this to show the format I am setting by using
human_time_diff()
but also be able to sort it.Thanks for any thoughts you may have on this!
- The topic ‘Sorting custom column human_time_diff()’ is closed to new replies.