-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Kultuer ticket requests #21
base: master
Are you sure you want to change the base?
Conversation
Still needs padding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great changes! I really like the looks of the request dialog for the user.
Some minor nitpicking going on in the review otherwise :)
'user_id'=>$current_user->ID); | ||
$answer_request_action = admin_url('options.php?' . http_build_query($response_parameters)); | ||
|
||
$to = '[email protected]'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
das sollte vermutlich in die config ausgelagert werden
$current_user = wp_get_current_user(); | ||
$event = get_post($_REQUEST['event']); | ||
$num_tickets_total = get_field( "num_tickets", $_REQUEST['event'] ); | ||
$num_tickets_assigned = get_field( "num_tickets_assigned", $_REQUEST['event']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
coding style ;)
|
||
function kultuer_send_ticket_response_mail($_to, $subject, $message) { | ||
$to = '[email protected]'; // TODO: remove | ||
$headers = 'From: [email protected]' . "\r\n" . // TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hier auch wp-config.php
'X-Mailer: PHP/' . phpversion(); | ||
//echo $message; | ||
mail($to, '=?utf-8?B?'.base64_encode($subject).'?=', $message, $headers); | ||
$success_message = 'Die%20Ticketanfrage%20wurde%20erfolgreich%20versendet.%20Wir%20werden%20Sie%20per%20E-Mail%20an%20' . $current_user->user_email . '%20benachrichtigen.'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
das hier lieber mit urlencode lösen :)
<label class="sr-only" for="numberOfTickets">Anzahl der Tickets</label> | ||
<div class="input-group"> | ||
<input type="number" value="2" class="form-control" name="number_of_tickets" id="numberOfTickets" placeholder="Anzahl"> | ||
<span class="input-group-addon">Karten anfragen</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
coole idee! ich würd das "anfragen" nach "Karten" aber rausnehmen, sonst wirkt es wie ein button
No description provided.