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

Can't get this to work #23

Open
bustapaladin opened this issue Jul 23, 2016 · 4 comments
Open

Can't get this to work #23

bustapaladin opened this issue Jul 23, 2016 · 4 comments

Comments

@bustapaladin
Copy link

bustapaladin commented Jul 23, 2016

function add_meta_keys_to_revision( $keys ) {
    array_push( $keys,  'uname', 'suspicion', 'profile_summary' );

    return $keys;
}
add_filter( 'wp_post_revision_meta_keys', 'add_meta_keys_to_revision' );
@adamsilverstein
Copy link
Owner

@bustapaladin That code looks correct, are you sure the meta isn't being revisioned? You can chek what is being stored by using this branch where I show the meta in the revisions UI.

@bustapaladin
Copy link
Author

Yea, have you tried testing your plugin with Pods? https://wordpress.org/plugins/pods/

As far I'm aware it doesn't work with that plugin. I made a custom field using that and added the key name and no history shows up for it if I edit that field in a custom post type.

@patrickcameron
Copy link

I'm running into problems with this plugin and Pods-created fields as well. When I add a meta key to the plugin and then change it's value, a new revision is created. However, the changes to the meta field are not shown in the revision.

Not that I expect you to address every weird issue with all the plugins out there, but thought I'd let you know! Thanks for taking the time to develop this for the community 👍

@adamsilverstein
Copy link
Owner

@patrickcameron sorry for the delay in getting back to you. do you mean the changes aren't showing on the revisions screen? this isn't implemented yet, working on it here though: #20

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

No branches or pull requests

3 participants