eventsmanager

custom snippet: em_event_validate

Mar 29th, 2025
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. <?php
  2.  
  3. function em_validate( $result, $EM_Object ){
  4. if ( isset($_REQUEST['data_privacy_consent'] ) || isset($_REQUEST['name="data_comms_consent"'] ) ){
  5. $result = true;
  6. } else {
  7. $EM_Object->errors = array();
  8. $EM_Object->add_error( get_option('dbem_data_privacy_consent_cpt_error') . '**' );
  9. $result = false;
  10. }
  11. return $result;
  12. }
  13. add_action('em_event_validate', 'em_validate', 100, 2);
Advertisement
Add Comment
Please, Sign In to add comment