Category validation

Feb 12th, 2014
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*make categories required for event submission*/
  2. function my_em_validate($result,$EM_Event){
  3. if( empty($EM_Event->get_categories()->categories) ){
  4. $EM_Event->add_error( __("category is required.", "dbem") );
  5. return false;
  6. }
  7. return $result;
  8. }
  9. add_filter('em_event_validate_meta','my_em_validate',10,2);
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add to your ad blocker whitelist or disable your adblocking software.