-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds array of meta keys that should be handled as single/not serialized. #34
base: main
Are you sure you want to change the base?
Conversation
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. |
…-setup Fix/travis setup
…p-coding-standards Fix/cleanup coding standards
@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 - #27 |
…wp-post-meta-revisions into support-single-meta-keys # Conflicts: # wp-post-meta-revisions.php
@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.