Access $EM_Event::output in function
-
Hi there,
I want to include a Ninja Form on every event detail page by simply inserting the form’s short code in the event description. On submission, the form should contain the event name and date. Therefor I created a function like this:
function collect_event_name_and_date( $field_id, $data ) { global $post; $EM_Event = em_get_event($post->ID, 'post_id'); $event_name_and_date = $EM_Event->output('#_EVENTNAME') . " / " . $EM_Event->output('#_EVENTDATES'); . . .This will work fine so far.
But now I need to insert content from another plugin via short code right before the form’s short code. This will break my function, as obviously now the
$postdoesn’t reference to the event anymore but to the inserted plugin’s content. I hope I could explain this quite understandable. 😳So, is there a way to geht the event’s name and date into my function?
Thanks in advance for any help!
The topic ‘Access $EM_Event::output in function’ is closed to new replies.