Hello,
i have the issue, that i need a copy function for previous Events.
I added this manually, not wordpress-like, cause i am not very familiar with it.
But it was pretty easy:
1. I added a GET-Variable to the “ADD”-Link
http://localhost/wp/veranstaltungen/community/add/?duplicateID=144
2. In “tribe-community-events.class.php” at function doEventForm() i added at the beginning:
if (isset($_GET[“duplicateID”]))
$id = $_GET[“duplicateID”];
3. The Edit/Add-Form will be loaded. With the previous Event
4. The form would be submitted to the URL which has been called. I replaced the URL-Parameters (duplicateID) and added the action Tag to the form.
$form_url = $_SERVER[“REQUEST_URI”];
if ($_GET[“duplicateID”]){
$form_url = str_replace(‘?duplicateID=’.$_GET[“duplicateID”],”,$_SERVER[“REQUEST_URI”]);
}
I hope, you can integrate it in a propper way into the Plugin.
Best regards
Andreas