My Question: Is there some simple function i can use to duplicate a post with a php code, so for example every time someone enters a specific page it will duplicate a given post?
More details: I have a site with front-end posting / editing options. now i want to approve post edits before there are published.
One way to do that is to set the post status to draft when ever it is edited - but then until i approve it it is not shown on the site.
Another way is to display the pervious revision of the post until i approve the edit - but that's very complicated and will make me update my site code every now and then because there is this stupid issue with revisions not saving custom fields...
So i thought when ever a user edit a post it will create a duplicate post (before the new edit is saved) and then display that one on the site until i approve the new edit (then it will delete this duplicated post) - that will be very easy to do if ill found a way to duplicate a post with php :)