/** * Changes the event id of the link for duplication so that it duplicates the original event instead of a translation. * Translation plugins should hook into em_event_duplicate, checking to make sure it is the original translation and then duplicating the translations of the original event. * @param string $url * @param EM_Event $EM_Event * @return string */ public static function event_duplicate_url($url, $EM_Event) { if (!EM_ML::is_original($EM_Event)) { $EM_Event = EM_ML::get_original($EM_Event); $url = add_query_arg(array('action' => 'event_duplicate', 'event_id' => $EM_Event->event_id, '_wpnonce' => wp_create_nonce('event_duplicate_' . $EM_Event->event_id))); //this gets escaped later } return $url; }