johnbillion / extended-cpts

A library which provides extended functionality to WordPress custom post types and taxonomies.
GNU General Public License v2.0
979 stars 96 forks source link

Support date_format within admin_filters #51

Closed lipemat closed 7 years ago

lipemat commented 8 years ago

Super basic implementation of supporting date_format within admin filters. Used when you have a timestamp stored as your meta value and you want a date displayed in the dropdown.

ajuliano commented 7 years ago

I also want this feature, is there a way to get it to work?

lipemat commented 7 years ago

You may use the forked version which includes this functionality https://github.com/lipemat/extended-cpts

ajuliano commented 7 years ago

Alright. I tested the solution, but if I have multiple posts (cpt's) in a given month the dropdown will show multiple entries for one month if I use the date format M Y for example. Do you have a solution for that?

Thanks!

johnbillion commented 7 years ago

I've been thinking about this and due to @ajuliano's comment I'm going to close this as wontfix. I think a better approach would be to use a callback function for the options argument of the filter, and return an array your properly formatted list of options there.

Thanks anyway!