Skip to content
This repository has been archived by the owner on Nov 6, 2019. It is now read-only.

Use proper strings #178

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions addons/require-login.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ public function ticket_form_message() {
// Inform a user registering multiple attendees that other attendees will enter their own info
if ( isset( $_REQUEST['tix_action'], $_REQUEST['tix_tickets_selected'] ) ) {
if ( 'attendee_info' == $_REQUEST['tix_action'] && $this->registering_multiple_attendees( $_REQUEST['tix_tickets_selected'] ) ) {
$notice = __( '<p>Please enter your own information for the first ticket, and then enter the names and e-mail addresses of other attendees in the subsequent ticket fields.</p>', 'camptix' );
$notice = __( '<p>Please enter your own information for the first ticket, and then enter the names and email addresses of other attendees in the subsequent ticket fields.</p>', 'camptix' );

if ( $this->tickets_have_questions( $_REQUEST['tix_tickets_selected'] ) ) {
$notice .= __( '<p>The other attendees will receive an e-mail asking them to confirm their registration and enter their additional information.</p>', 'camptix' );
$notice .= __( '<p>The other attendees will receive an email asking them to confirm their registration and enter their additional information.</p>', 'camptix' );
}

$camptix->notice( $notice );
Expand Down Expand Up @@ -369,22 +369,22 @@ public function register_custom_email_templates( $templates ) {
}

/**
* Set the default custom e-mail template content.
* Set the default custom email template content.
*
* @param array $options
*
* @return array
*/
public function custom_email_template_default_values( $options ) {
$options['email_template_multiple_purchase_receipt_unconfirmed_attendees'] = __( "Hi there!\n\nYou have purchased the following tickets:\n\n[receipt]\n\nYou can view and edit your order at any time before the event, by visiting the following link:\n\n[ticket_url]\n\nThe other attendees that you purchased tickets for will need to confirm their registration by visiting a link that was sent to them by e-mail.\n\nLet us know if you have any questions!", 'camptix' );
$options['email_template_multiple_purchase_receipt_unconfirmed_attendees'] = __( "Hi there!\n\nYou have purchased the following tickets:\n\n[receipt]\n\nYou can view and edit your order at any time before the event, by visiting the following link:\n\n[ticket_url]\n\nThe other attendees that you purchased tickets for will need to confirm their registration by visiting a link that was sent to them by email.\n\nLet us know if you have any questions!", 'camptix' );
$options['email_template_multiple_purchase_unconfirmed_attendee'] = __( "Hi there!\n\nA ticket to [event_name] has been purchased for you by [buyer_full_name].\n\nPlease visit the following page and fill in your information to complete your registration:\n\n[ticket_url]\n\nLet us know if you have any questions!", 'camptix' );
$options['email_template_multiple_purchase_unknown_attendee'] = __( "Hi there!\n\nThis e-mail is for the unknown attendee that you purchased a ticket for. When you decide who will be using the ticket, please forward the link below to them so that they can complete their registration.\n\n[ticket_url]\n\nLet us know if you have any questions!", 'camptix' );
$options['email_template_multiple_purchase_unknown_attendee'] = __( "Hi there!\n\nThis email is for the unknown attendee that you purchased a ticket for. When you decide who will be using the ticket, please forward the link below to them so that they can complete their registration.\n\n[ticket_url]\n\nLet us know if you have any questions!", 'camptix' );

return $options;
}

/**
* Send custom e-mail templates to the purchaser and to unconfirmed attendees.
* Send custom email templates to the purchaser and to unconfirmed attendees.
*
* @param string $template
* @param WP_Post $attendee
Expand Down Expand Up @@ -413,9 +413,9 @@ public function use_custom_email_templates( $template, $attendee ) {
}

/**
* Redirect e-mails intended for unknown attendees to the ticket buyer instead.
* Redirect emails intended for unknown attendees to the ticket buyer instead.
*
* We don't know the attendee's real e-mail address, so we ask the buyer to forward the
* We don't know the attendee's real email address, so we ask the buyer to forward the
* email to them once they decide who will be using the ticket.
*
* @param string $attendee_email
Expand Down
6 changes: 3 additions & 3 deletions addons/shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -467,11 +467,11 @@ function shortcode_private_template_redirect() {
}

if ( empty( $email ) ) {
return $camptix->error( __( 'Please enter the e-mail address that was used to register for your ticket.', 'camptix' ) );
return $camptix->error( __( 'Please enter the email address that was used to register for your ticket.', 'camptix' ) );
}

if ( ! is_email( $email ) )
return $camptix->error( __( 'The e-mail address you have entered does not seem to be valid.', 'camptix' ) );
return $camptix->error( __( 'The email address you have entered does not seem to be valid.', 'camptix' ) );

$attendees = get_posts( array(
'posts_per_page' => 50, // sane enough?
Expand Down Expand Up @@ -633,7 +633,7 @@ function shortcode_private_login_form( $atts, $content ) {
<th class="tix-left" colspan="2"><?php _e( 'Have a ticket? Sign in', 'camptix' ); ?></th>
</tr>
<tr>
<td class="tix-left"><?php _e( 'E-mail', 'camptix' ); ?></td>
<td class="tix-left"><?php _e( 'Email', 'camptix' ); ?></td>
<td class="tix-right"><input name="tix_email" value="<?php echo esc_attr( $email ); ?>" type="text" /></td>
</tr>
</table>
Expand Down
Loading