eventsmanager

Event Bookings Approval Link

Oct 10th, 2018
181
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. * this snippet will create new bookings placeholder to redirect admin to bookings management page
  3. */
  4. function my_em_booking_approval_link_placeholders($replace, $EM_Booking, $result){
  5. if ( $result == '#_BOOKINGAPPROVALINK' ) {
  6. $replace = get_option("siteurl")."/wp-admin/edit.php?post_type=event&page=events-manager-bookings&event_id=".$EM_Booking->get_event()->event_id;
  7. }
  8. return $replace;
  9. }
  10. add_filter('em_booking_output_placeholder','my_em_booking_approval_link_placeholders',1,3);
RAW Paste Data