bu-ist / bu-versions

Make and save edits to published posts/pages in WordPress without immediately replacing the public content.
https://developer.bu.edu/bu-versions/
19 stars 5 forks source link

Default Metadata Handling #2

Open lucasstark opened 12 years ago

lucasstark commented 12 years ago

Just curious why the meta data is not always copied, but rather would require a person to "register" what fields they want copied?

I'd like to propose we copy all meta data, except edit_lock and edit_last when publishing, and provide a filter to Exclude meta data key / values rather than the other way around. It seems the more typical use case would be for someone to always the meta data copied, and in the rare instances when they do not, they could then use the filter to exclude certain keys.

gcorne commented 11 years ago

The main reason that I chose to not copy all of the meta data is that copying the meta data doesn't mean that the meta boxes used to manage the meta data will be registered. Having thought more about the implementation, I think it may make sense to copy the "public" meta_keys automatically and to support the "Custom Fields" meta box.