Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Usage:
- {is_zoom_meeting}
- <strong>Click <a href="#_EVENTLOCATION{join_url}"> <i>HERE</i></a> to start Zoom Meeting</strong> <br>
- {/is_zoom_meeting}
- Location types:
- location
- zoom_room
- zoom_meeting
- zoom_webinar
- */
- add_action('em_event_output_condition', 'my_em_custom_conditional_event_location', 1, 4);
- function my_em_custom_conditional_event_location($replacement, $condition, $match, $EM_Event){
- if( is_object($EM_Event) && preg_match('/^is_zoom_meeting$/',$condition, $matches) ){
- if ( $EM_Event->event_location_type == "zoom_meeting" ){
- $replacement = preg_replace("/\{\/?$condition\}/", '', $match);
- }else{
- $replacement = '';
- }
- }
- return $replacement;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement