eventsmanager

Make Submission Form Event Owner and Email Optional

Nov 21st, 2018
163
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2. * this function will make frontend event submission
  3. */
  4. function custom_event_validate($EM_Event, $validate_post){
  5.  
  6. if( empty($EM_Event->event_owner_name) || empty($EM_Event->event_owner_email) ){
  7. $validate_post = true;
  8. }
  9.  
  10. return $validate_post;
  11. }
  12. add_filter('em_event_validate','custom_event_validate',10,2);
RAW Paste Data