WebDevStudios / WDS-Multisite-Aggregate

Creates a blog where all the most recent posts on a WordPress network may be found. Based on WordPress MU Sitewide Tags Pages plugin by Donncha O Caoimh.
30 stars 11 forks source link

Duplicate meta fields synced #11

Open ghost opened 7 years ago

ghost commented 7 years ago

In certain situations syncing posts seems to create duplicate meta fields with same values.

I'll have to do more testing with this but this could be fixes by switching add_post_meta() call to update_post_meta() in save_meta_fields().

Update call will create meta field if it's missing so change will be backwards compatible. More info: https://codex.wordpress.org/Function_Reference/update_post_meta

tw2113 commented 7 years ago

Possible that the duplicates already exist in the source site/table, for what it's worth.