Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // condtional placeholder if bookings are enabled and bookings start date is not yet
- function my_em_regstart_bookings($replacement, $condition, $match, $EM_Event) {
- if( is_object($EM_Event) && preg_match('/^awaiting_regstart$/',$condition, $matches) ) {
- if ( $this->event_rsvp && $this->ticket_start > current_time('timestamp') ) {
- $replacement = '';
- } else {
- $replacement = preg_replace("/\{\/?$condition\}/", '', $match);
- }
- }
- return $replacement;
- }
- add_action('em_event_output_condition', 'my_em_regstart_bookings', 1, 4);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement