Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- This snippet will make featured image required when submitting new events.
- */
- function em_validate($result,$EM_Event){
- global $EM_Notices;
- $image = $EM_Event->get_image_url();
- if ( empty($image) && !is_admin()){
- $EM_Event->add_error('image is required.');
- }
- }
- add_filter('em_event_validate_meta','em_validate',10,2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement