I'm not sure if this is intentional, but I recently noticed that our post meta table was full of rows that were tied to post revision IDs. This plugin seems to be the source of that.
When saving a post, often times the save_post action gets called twice. Once with a revision ID, and once with the real post ID. So this plugin ends up updating two sets of post meta values, and the meta tied to the revision IDs are never used for anything as far as I can tell.
I think the save_post_meta function should call wp_is_post_revision on the post ID, and if it is true, return early. This is what is done for autosaves already.
I'm not sure if this is intentional, but I recently noticed that our post meta table was full of rows that were tied to post revision IDs. This plugin seems to be the source of that.
When saving a post, often times the
save_post
action gets called twice. Once with a revision ID, and once with the real post ID. So this plugin ends up updating two sets of post meta values, and the meta tied to the revision IDs are never used for anything as far as I can tell.I think the
save_post_meta
function should callwp_is_post_revision
on the post ID, and if it is true, return early. This is what is done for autosaves already.