Booking/Registration form integration with other plugins

Aug 14th, 2013
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //This function passes the custom em_registration_errors filter to the original registration_errors filter which allows plugins like SI Captcha to work with booking forms
  2. function my_em_registration_errors( $errors, $sanitized_user_login, $user_email ){
  3.     if( !is_user_logged_in() ){
  4.         return apply_filters( 'registration_errors', $errors, $sanitized_user_login, $user_email );
  5.     }
  6. }
  8. //This function triggers the register_form action which allows plugins like SI Captcha to ouptut a captcha on the booking form
  9. function my_em_registration_form_compat(){
  10.     //add registration hook if user isn't logged in or no-user mode isn't active
  11.     if(!is_user_logged_in() && !get_option('dbem_bookings_registration_disable')) do_action('register_form');
  12. }
  14. add_filter('em_registration_errors', 'my_em_registration_errors', 10, 3);
  15. add_action('em_booking_form_footer', 'my_em_registration_form_compat', 10000);
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.