Open krilor opened 7 years ago
Hi @krilor Thanks for the PR and apologies for the delay in responding. I agree it would be great to store single values as single values so they are queryable. While a whitelist would work, is there any way we can automate this/eg determine single vs array or multiple programmatically? Also, can we add some unit tests to verify this behavior.
@krilor I tried testing for this by adding the test key as a single via the filter -
one of the existing unit tests failed: https://travis-ci.org/adamsilverstein/wp-post-meta-revisions/jobs/311869964
Can you take a look?
Thanks for replying. I agree that it maybe would be best to programmatically determine single vs array. I'll have a look at that, and at unit tests. I'll see what I can do over the weekend.
Great, thanks! Finally getting back to work on this plugin after a long break. See this related PR - https://github.com/adamsilverstein/wp-post-meta-revisions/pull/27
@krilor - I resolved some merge conflicts, still needs tests.
Hey Adam
Love the plugin! It does exactly what I want it to do :)
But I plan on doing meta queries on the revisions. To be able to do that, I need the keys to be stored as single values (and not serialized arrays) the the db table.
I've taken a stab at forcing certain keys to be single. It's basically an array and a filter just like the list of keys to store revisions for.
Use:
Single meta keys has to be a subset of meta keys.
Should be backwards compatible.