bobbingwide / oik-clone

Clone content between sites
https://www.oik-plugins.com/oik-plugins/oik-clone-clone-your-wordpress-content/
GNU General Public License v2.0
5 stars 0 forks source link

Need method to detect if meta data should be cloned or not? #3

Closed bobbingwide closed 8 years ago

bobbingwide commented 9 years ago

When the fields defined for a post type differ between sites then it's possible to clone content values which are not defined therefore could contain invalid data.

oik-clone provides a filter function to determine which meta data should be cloned. can this be used by oik-fields to check the definitions? see oik_clone_filter_all_post_meta()

problem 1 - invalid field values used

_documentation_home node ref field not defined on target site so no ability to detect and correct the value that's been cloned. this can lead to blank documentation.

problem 2 - data overwrite

fields which contain counters that are updated individually should not be overwritten on updates.

bobbingwide commented 8 years ago

Proposed solution

The function referred to in see oik_clone_filter_all_post_meta() did not actually implement a filter function. The logic will be changed to invoke the filter oik_clone_filter_all_post_meta. This will be invoked multiple times.