Skip to content
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

Revisions meta entries created when not needed #32

Open
dan-westall opened this issue Jul 14, 2017 · 1 comment · May be fixed by #55
Open

Revisions meta entries created when not needed #32

dan-westall opened this issue Jul 14, 2017 · 1 comment · May be fixed by #55

Comments

@dan-westall
Copy link

When creating a revision's meta entires, it will create meta values based on whitelist, so even if the copied post didn't have a meta value with that key, the new revision will have a blank key because theres no check to see if that key existed.

@adamsilverstein
Copy link
Owner

Thanks for the issue report @dan-westall I think the reason we store blank values is because the we don't know if the meta is unset or a blank string (see https://codex.wordpress.org/Function_Reference/get_metadata),

in get_post_meta() If the meta value isn't set, an empty string is returned. so when restoring the revision in question if it was a blank meta value we would want it restored that way. We could add a filter here to let you control it maybe?

@aaemnnosttv aaemnnosttv linked a pull request Apr 11, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants