Real time Duplicate title check

You can hook 'save_post' or 'wp_insert_post' (both executed the same in wp_insert_post()) to check for autosaves and notify the author(s) accordingly. The checks that I would do would be to check that the author of the autosave (aka, revision) and the new autosave are not the same, check that the post title is the same and that the content is SIMILAR, to do it right (enterprise strength) you’d need a decent algorithm, probably based on the counts of words or something like that, to do it quick you can just use strpos() and check if one contains the other. If you need example code, provide as many specifics on the implementation (in a comment) as you can and I’ll write it up for you.

Leave a Comment