Completed
Branch FET-8837-purchasing-agent (3c506c)
by
unknown
832:15 queued 816:38
created
admin_pages/transactions/templates/txn_admin_details_header.template.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,19 +1,19 @@
 block discarded – undo
1 1
 
2
-		<h3 class="txn-navigation-strip"><?php echo $previous_transaction . '&nbsp;'; echo __( 'Transaction # ', 'event_espresso' ) . $txn_nmbr['value']; echo '&nbsp;' . $next_transaction; ?></h3>
3
-		<h2 id="txn-date-h2" class="txn-date-h2"><?php echo $txn_datetime['value'];?></h2>
2
+		<h3 class="txn-navigation-strip"><?php echo $previous_transaction.'&nbsp;'; echo __('Transaction # ', 'event_espresso').$txn_nmbr['value']; echo '&nbsp;'.$next_transaction; ?></h3>
3
+		<h2 id="txn-date-h2" class="txn-date-h2"><?php echo $txn_datetime['value']; ?></h2>
4 4
 
5 5
 		<?php echo $send_payment_reminder_button; ?>
6 6
 		<h2 id="txn-status-h2" class="txn-status-h2">
7
-			<?php echo __( 'Transaction Status: ', 'event_espresso' );?><span id="txn-status" class="<?php echo $txn_status['class'];?>"><?php echo $txn_status['value'];?></span>
7
+			<?php echo __('Transaction Status: ', 'event_espresso'); ?><span id="txn-status" class="<?php echo $txn_status['class']; ?>"><?php echo $txn_status['value']; ?></span>
8 8
 		</h2>
9 9
 
10 10
 	<?php $attributes = $amount_due ? 'class="txn-amount-due-h2"' : 'class="txn-amount-due-h2 hidden"'; ?>
11 11
 		<h2 id="txn-amount-due-h2" <?php echo $attributes; ?>>
12
-			<?php echo __( 'Total Amount Due: ', 'event_espresso' );?><span id="txn-admin-total-amount-due" class="<?php echo $amount_due_class;?>"><?php echo $amount_due;?></span>
12
+			<?php echo __('Total Amount Due: ', 'event_espresso'); ?><span id="txn-admin-total-amount-due" class="<?php echo $amount_due_class; ?>"><?php echo $amount_due; ?></span>
13 13
 		</h2>
14 14
 
15 15
 		<h3 id="txn-selected-method-of-payment-h3" class="txn-selected-method-of-payment-h3">
16
-			<?php echo __( 'Last Method of Payment: ', 'event_espresso' );?><?php echo $method_of_payment_name;?>
16
+			<?php echo __('Last Method of Payment: ', 'event_espresso'); ?><?php echo $method_of_payment_name; ?>
17 17
 		</h3>
18 18
 
19 19
 
Please login to merge, or discard this patch.
admin_pages/payments/help_tabs/payment_methods_overview.help_tab.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -2,40 +2,40 @@
 block discarded – undo
2 2
 <p>
3 3
 <?php _e('This page shows all available payment methods for Event Espresso.', 'event_espresso'); ?>
4 4
 </p>
5
-<p><strong><?php _e('Common Settings', 'event_espresso' )?></strong></p>
5
+<p><strong><?php _e('Common Settings', 'event_espresso')?></strong></p>
6 6
 <ul>
7 7
 	<li>
8
-		<strong><?php _e( 'Name', 'event_espresso' );?></strong><br>
9
-		<?php _e( 'The name of the payment method as customers see it in the registration form, in emails, in receipts, etc.', 'event_espresso' );?>
8
+		<strong><?php _e('Name', 'event_espresso'); ?></strong><br>
9
+		<?php _e('The name of the payment method as customers see it in the registration form, in emails, in receipts, etc.', 'event_espresso'); ?>
10 10
 	</li>
11 11
 	<li>
12
-		<strong><?php _e( 'Description', 'event_espresso' );?></strong><br/>
13
-		<?php _e( 'The description of how to use the payment method as customers will see it. This is mostly only seen during registration.', 'event_espresso' );?>
12
+		<strong><?php _e('Description', 'event_espresso'); ?></strong><br/>
13
+		<?php _e('The description of how to use the payment method as customers will see it. This is mostly only seen during registration.', 'event_espresso'); ?>
14 14
 	</li>
15
-	<li><strong><?php _e( 'Admin-Only Name', 'event_espresso' );?></strong><br/>
16
-		<?php _e( 'The name of the payment method as seen internally by site administrators and staff.', 'event_espresso' );?>
15
+	<li><strong><?php _e('Admin-Only Name', 'event_espresso'); ?></strong><br/>
16
+		<?php _e('The name of the payment method as seen internally by site administrators and staff.', 'event_espresso'); ?>
17 17
 	</li>
18 18
 	<li>
19
-		<strong><?php _e( 'Admin-Only Description', 'event_espresso' );?></strong><br/>
20
-		<?php _e( 'The description of the payment method as seen internally by site administrators and staff.', 'event_espresso' );?>
19
+		<strong><?php _e('Admin-Only Description', 'event_espresso'); ?></strong><br/>
20
+		<?php _e('The description of the payment method as seen internally by site administrators and staff.', 'event_espresso'); ?>
21 21
 	</li>
22 22
 	<li>
23
-		<strong><?php _e( 'Debug (sandbox) Mode', 'event_espresso' );?></strong><br/>
24
-		<?php _e( 'Many payment methods have a debug/sandbox mode where payments are not processed but are only simulated. This is helpful when setup and debugging.', 'event_espresso' );?>
23
+		<strong><?php _e('Debug (sandbox) Mode', 'event_espresso'); ?></strong><br/>
24
+		<?php _e('Many payment methods have a debug/sandbox mode where payments are not processed but are only simulated. This is helpful when setup and debugging.', 'event_espresso'); ?>
25 25
 	</li>
26 26
 	<li>
27
-		<strong><?php _e( 'Open by Default', 'event_espresso' );?></strong><br/>
28
-		<?php _e( 'If checked, this payment method will be selected by default (assuming no other valid payment methods are also marked as open by default.)', 'event_espresso' );?>
27
+		<strong><?php _e('Open by Default', 'event_espresso'); ?></strong><br/>
28
+		<?php _e('If checked, this payment method will be selected by default (assuming no other valid payment methods are also marked as open by default.)', 'event_espresso'); ?>
29 29
 	</li>
30 30
 	<li>
31
-		<strong><?php _e( 'Button URL', 'event_espresso' );?></strong><br/>
32
-		<?php printf( __( 'The URL of the button image for this payment method in the registration process. You may use any uploaded image on your website (click %s next to the field to select). If left blank, the default button image will be used.', 'event_espresso' ), '<img src="' . admin_url('images/media-button-image.gif') . '">' );?>
31
+		<strong><?php _e('Button URL', 'event_espresso'); ?></strong><br/>
32
+		<?php printf(__('The URL of the button image for this payment method in the registration process. You may use any uploaded image on your website (click %s next to the field to select). If left blank, the default button image will be used.', 'event_espresso'), '<img src="'.admin_url('images/media-button-image.gif').'">'); ?>
33 33
 	</li>
34
-	<li><strong><?php _e( 'Usable From', 'event_espresso' );?></strong><br/>
35
-	<?php _e( 'Where this payment method can be used from.', 'event_espresso' );?>
34
+	<li><strong><?php _e('Usable From', 'event_espresso'); ?></strong><br/>
35
+	<?php _e('Where this payment method can be used from.', 'event_espresso'); ?>
36 36
 		<ul>
37
-			<li><?php _e( 'Front-end Registration Page: the payment method will appear as an option during the normal registration process to customers and they can use it to process payments.', 'event_espresso' );?></li>
38
-			<li><?php _e( 'Admin Registration Page: when recording payments made from the transaction admin page, the payment method will appear as an option. Note: currently payments can only be RECORDED from the admin, they cannot be PROCESSED.', 'event_espresso' );?></li>
37
+			<li><?php _e('Front-end Registration Page: the payment method will appear as an option during the normal registration process to customers and they can use it to process payments.', 'event_espresso'); ?></li>
38
+			<li><?php _e('Admin Registration Page: when recording payments made from the transaction admin page, the payment method will appear as an option. Note: currently payments can only be RECORDED from the admin, they cannot be PROCESSED.', 'event_espresso'); ?></li>
39 39
 		</ul>
40 40
 	</li>
41 41
 </ul>
Please login to merge, or discard this patch.
templates/reg_admin_details_main_meta_box_reg_details.template.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -4,33 +4,33 @@  discard block
 block discarded – undo
4 4
 	<?php echo $resend_registration_button; ?>
5 5
 	<br/>
6 6
 
7
-	<h3 class="admin-primary-mbox-h4 hdr-has-icon"><span class="dashicons dashicons-clipboard"></span><?php _e( 'Registration Items', 'event_espresso' );?></h3>
7
+	<h3 class="admin-primary-mbox-h4 hdr-has-icon"><span class="dashicons dashicons-clipboard"></span><?php _e('Registration Items', 'event_espresso'); ?></h3>
8 8
 
9 9
 	<?php echo $line_item_table; ?>
10 10
 
11 11
 	<?php
12
-	if ( WP_DEBUG ) {
13
-		$delivered_messages = get_option( 'EED_Messages__maybe_registration', array() );
14
-		if ( isset( $delivered_messages[ $REG_ID ] )) {
12
+	if (WP_DEBUG) {
13
+		$delivered_messages = get_option('EED_Messages__maybe_registration', array());
14
+		if (isset($delivered_messages[$REG_ID])) {
15 15
 	?>
16
-	<h4 class="admin-primary-mbox-h4 hdr-has-icon"><span class="dashicons dashicons-email-alt"></span><?php _e( 'Messages Sent to Registrant', 'event_espresso' );?></h4>
16
+	<h4 class="admin-primary-mbox-h4 hdr-has-icon"><span class="dashicons dashicons-email-alt"></span><?php _e('Messages Sent to Registrant', 'event_espresso'); ?></h4>
17 17
 
18 18
 	<div class="admin-primary-mbox-tbl-wrap">
19 19
 		<table class="admin-primary-mbox-tbl">
20 20
 			<thead>
21 21
 				<tr>
22
-					<th class="jst-left"><?php _e( 'Date & Time', 'event_espresso' );?></th>
23
-					<th class="jst-left"><?php _e( 'Message Type', 'event_espresso' );?></th>
24
-					<th class="jst-left"><?php _e( 'REG Status Upon Sending', 'event_espresso' );?></th>
22
+					<th class="jst-left"><?php _e('Date & Time', 'event_espresso'); ?></th>
23
+					<th class="jst-left"><?php _e('Message Type', 'event_espresso'); ?></th>
24
+					<th class="jst-left"><?php _e('REG Status Upon Sending', 'event_espresso'); ?></th>
25 25
 				</tr>
26 26
 			</thead>
27 27
 			<tbody>
28
-				<?php foreach ( $delivered_messages[ $REG_ID ] as $timestamp => $delivered_message ) :
28
+				<?php foreach ($delivered_messages[$REG_ID] as $timestamp => $delivered_message) :
29 29
 					?>
30 30
 					<tr>
31
-						<td class="jst-left"><?php echo gmdate( get_option('date_format') . ' ' . get_option('time_format'), ( $timestamp + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ) );?></td>
32
-						<td class="jst-left"><?php echo isset( $delivered_message['message_type'] ) ? $delivered_message['message_type'] : '';?></td>
33
-						<td class="jst-left"><?php echo isset( $delivered_message['reg_status'] ) ? $delivered_message['reg_status'] : '';?></td>
31
+						<td class="jst-left"><?php echo gmdate(get_option('date_format').' '.get_option('time_format'), ($timestamp + (get_option('gmt_offset') * HOUR_IN_SECONDS))); ?></td>
32
+						<td class="jst-left"><?php echo isset($delivered_message['message_type']) ? $delivered_message['message_type'] : ''; ?></td>
33
+						<td class="jst-left"><?php echo isset($delivered_message['reg_status']) ? $delivered_message['reg_status'] : ''; ?></td>
34 34
 					</tr>
35 35
 				<?php endforeach; // $delivered_messages?>
36 36
 			</tbody>
@@ -42,27 +42,27 @@  discard block
 block discarded – undo
42 42
 	?>
43 43
 
44 44
 	<a id="display-additional-registration-session-info" class="display-the-hidden smaller-text" rel="additional-registration-session-info">
45
-		<span class="dashicons dashicons-plus-alt"></span><?php _e( 'view additional registration session details', 'event_espresso' );?>
45
+		<span class="dashicons dashicons-plus-alt"></span><?php _e('view additional registration session details', 'event_espresso'); ?>
46 46
 	</a>
47 47
 
48 48
 	<div id="additional-registration-session-info-dv" class="hidden">
49 49
 
50 50
 		<a id="hide-additional-registration-session-info" class="hide-the-displayed hidden smaller-text" rel="additional-registration-session-info">
51
-			<span class="dashicons dashicons-dismiss"></span><?php _e( 'hide additional registration session details', 'event_espresso' );?>
51
+			<span class="dashicons dashicons-dismiss"></span><?php _e('hide additional registration session details', 'event_espresso'); ?>
52 52
 		</a>
53 53
 	<br class="clear"/>
54 54
 
55
-		<h3 class="admin-primary-mbox-h4"><?php _e( 'Registration Session Details', 'event_espresso' );?></h3>
55
+		<h3 class="admin-primary-mbox-h4"><?php _e('Registration Session Details', 'event_espresso'); ?></h3>
56 56
 
57 57
 		<table id="admin-primary-mbox-reg-extra-session-info-tbl" class="form-table skinny-rows">
58 58
 			<tbody>
59
-			<?php foreach ( $reg_details as $key => $reg_detail ) : ?>
59
+			<?php foreach ($reg_details as $key => $reg_detail) : ?>
60 60
 				<tr>
61 61
 					<th>
62
-						<label for="<?php echo $key;?>"><?php echo $reg_detail['label'];?></label>
62
+						<label for="<?php echo $key; ?>"><?php echo $reg_detail['label']; ?></label>
63 63
 					</th>
64 64
 					<td>
65
-						<?php echo $reg_detail['value'];?>
65
+						<?php echo $reg_detail['value']; ?>
66 66
 					</td>
67 67
 				</tr>
68 68
 			<?php endforeach; // $reg_details?>
Please login to merge, or discard this patch.
admin_pages/maintenance/templates/ee_data_reset_and_delete.template.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -4,14 +4,14 @@  discard block
 block discarded – undo
4 4
 */
5 5
 ?>
6 6
 <h3>
7
-	<?php _e( 'Reset/Delete Data for Event Espresso', 'event_espresso' );?>
7
+	<?php _e('Reset/Delete Data for Event Espresso', 'event_espresso'); ?>
8 8
 </h3>
9 9
 <br />
10 10
 
11 11
 <!-- reset DB url is here. Just need to make it look pretty and unhide it-->
12 12
 <div class="padding">
13
-	<h4 class="espresso-header"><span class="dashicons dashicons-update ee-icon-size-22"></span><?php _e('Reset Event Espresso Capabilities', 'event_espresso');?></h4>
14
-	<p><?php _e('Use this to reset the capabilities on WP roles to the defaults as defined via EE_Capabilities.  Note this reset does not REMOVE any existing capabilities, it just ensures that all the defaults are ADDED to the roles.', 'event_espresso');?></p>
13
+	<h4 class="espresso-header"><span class="dashicons dashicons-update ee-icon-size-22"></span><?php _e('Reset Event Espresso Capabilities', 'event_espresso'); ?></h4>
14
+	<p><?php _e('Use this to reset the capabilities on WP roles to the defaults as defined via EE_Capabilities.  Note this reset does not REMOVE any existing capabilities, it just ensures that all the defaults are ADDED to the roles.', 'event_espresso'); ?></p>
15 15
 	<div class="float-right"><?php echo $reset_capabilities_button; ?></div>
16 16
 	<div class="clear"></div>
17 17
 </div>
@@ -19,24 +19,24 @@  discard block
 block discarded – undo
19 19
 <br />
20 20
 
21 21
 <div class="padding">
22
-	<h4 class="espresso-header"><span class="dashicons dashicons-update ee-icon-size-22"></span><?php _e('Reset Event Espresso Tables', 'event_espresso');?></h4>
23
-	<p><?php _e('Use this to reset Event Espresso Data and return your site to how it was just after first activating Event Espresso.', 'event_espresso');?></p>
24
-	<div class="float-right"><a class="button button-primary" href="<?php echo $reset_db_url;?>"><?php _e('Reset Event Espresso Tables', 'event_espresso');?></a></div>
22
+	<h4 class="espresso-header"><span class="dashicons dashicons-update ee-icon-size-22"></span><?php _e('Reset Event Espresso Tables', 'event_espresso'); ?></h4>
23
+	<p><?php _e('Use this to reset Event Espresso Data and return your site to how it was just after first activating Event Espresso.', 'event_espresso'); ?></p>
24
+	<div class="float-right"><a class="button button-primary" href="<?php echo $reset_db_url; ?>"><?php _e('Reset Event Espresso Tables', 'event_espresso'); ?></a></div>
25 25
 	<div class="clear"></div>
26 26
 </div>
27 27
 <br />
28 28
 <br />
29 29
 
30 30
 <div class="padding">
31
-	<h4 class="espresso-header"><span class="dashicons dashicons-post-trash ee-icon-size-22"></span><?php _e('Permanently Delete ALL Event Espresso Tables and Data', 'event_espresso');?></h4>
32
-	<p><?php _e('If you know for certain that you will no longer be using Event Espresso and you wish to remove ALL traces of the plugin from your system, then perform the following steps.', 'event_espresso');?></p>
33
-	<p class="important-notice"><?php printf( __('Please note: %sThis is permanent and can NOT be undone.%s', 'event_espresso'), '<strong>', '</strong>' ); ?><br/></p>
31
+	<h4 class="espresso-header"><span class="dashicons dashicons-post-trash ee-icon-size-22"></span><?php _e('Permanently Delete ALL Event Espresso Tables and Data', 'event_espresso'); ?></h4>
32
+	<p><?php _e('If you know for certain that you will no longer be using Event Espresso and you wish to remove ALL traces of the plugin from your system, then perform the following steps.', 'event_espresso'); ?></p>
33
+	<p class="important-notice"><?php printf(__('Please note: %sThis is permanent and can NOT be undone.%s', 'event_espresso'), '<strong>', '</strong>'); ?><br/></p>
34 34
 	<ol>
35
-		<li><?php  printf( __('First, click the button below to permanently delete all Event Espresso tables, records, and options from your WordPress database . If you receive a "500 Internal Server Error" or a blank white screen, it means the server has timed out due to the large number of records being migrated. This is not a cause for concern. Simply %1$srefresh the page%2$s and the migration will continue where it left off.', 'event_espresso'), '<strong>', '</strong>' );?></li>
36
-		<li><?php printf( __('Then, locate Event Espresso on the WordPress Plugins page, and click on %sDelete%s', 'event_espresso'), '<strong>', '</strong>' ); ?></li>
37
-        <li><?php printf( __('Once you are on the Delete Plugin page, click on %sYes, Delete these files and data%s', 'event_espresso'), '<strong>', '</strong>' ); ?></li>
35
+		<li><?php  printf(__('First, click the button below to permanently delete all Event Espresso tables, records, and options from your WordPress database . If you receive a "500 Internal Server Error" or a blank white screen, it means the server has timed out due to the large number of records being migrated. This is not a cause for concern. Simply %1$srefresh the page%2$s and the migration will continue where it left off.', 'event_espresso'), '<strong>', '</strong>'); ?></li>
36
+		<li><?php printf(__('Then, locate Event Espresso on the WordPress Plugins page, and click on %sDelete%s', 'event_espresso'), '<strong>', '</strong>'); ?></li>
37
+        <li><?php printf(__('Once you are on the Delete Plugin page, click on %sYes, Delete these files and data%s', 'event_espresso'), '<strong>', '</strong>'); ?></li>
38 38
 	</ol>
39
-	<div class="float-right"><a href="<?php echo $delete_db_url; ?>" id="delete-all-data-btn" class="button-primary"><?php _e('Permanently Delete All Event Espresso Data', 'event_espresso');?></a></div>
39
+	<div class="float-right"><a href="<?php echo $delete_db_url; ?>" id="delete-all-data-btn" class="button-primary"><?php _e('Permanently Delete All Event Espresso Data', 'event_espresso'); ?></a></div>
40 40
 	<div class="clear"></div>
41 41
 </div>
42 42
 <br/>
Please login to merge, or discard this patch.
Mijireh/help_tabs/payment_methods_overview_mijireh.help_tab.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1
-<p><strong><?php _e( 'Mijireh', 'event_espresso' ); ?></strong></p>
1
+<p><strong><?php _e('Mijireh', 'event_espresso'); ?></strong></p>
2 2
 <p>
3
-	<?php _e( 'Adjust the settings for the Mijireh payment gateway.', 'event_espresso' ); ?>
3
+	<?php _e('Adjust the settings for the Mijireh payment gateway.', 'event_espresso'); ?>
4 4
 </p>
5 5
 <p>
6 6
 	<?php
7 7
 	printf(
8
-		__( 'Mijireh is basically a middle-man between Event Espresso and over 90 payment gateways. Most of the configuration occurs on %1$sMijireh\' website%2$s, where you configure your Mijireh store with the %3$spayment gateway of your choice%4$s.', 'event_espresso' ),
8
+		__('Mijireh is basically a middle-man between Event Espresso and over 90 payment gateways. Most of the configuration occurs on %1$sMijireh\' website%2$s, where you configure your Mijireh store with the %3$spayment gateway of your choice%4$s.', 'event_espresso'),
9 9
 		'<a href="http://www.mijireh.com/" target="_blank">',
10 10
 		'</a>',
11 11
 		'<a href="http://www.mijireh.com/docs/payment-gateways/" target="_blank">',
@@ -14,26 +14,26 @@  discard block
 block discarded – undo
14 14
 	?>
15 15
 </p>
16 16
 <p>
17
-	<?php _e( 'For information on what currencies you can use with Mijireh, please consult the payment gateway Mijireh is setup to use.', 'event_espresso' ) ?>
17
+	<?php _e('For information on what currencies you can use with Mijireh, please consult the payment gateway Mijireh is setup to use.', 'event_espresso') ?>
18 18
 </p>
19 19
 <ul>
20 20
 	<li>
21
-		<strong><?php _e( 'Mijireh Access Key', 'event_espresso' ); ?></strong><br/>
21
+		<strong><?php _e('Mijireh Access Key', 'event_espresso'); ?></strong><br/>
22 22
 		<?php
23 23
 		printf(
24
-			__( 'Enter your Access Key for Mijireh. Your Access Key can be found in your %1$sMijireh account dashboard%2$s.', 'event_espresso' ),
24
+			__('Enter your Access Key for Mijireh. Your Access Key can be found in your %1$sMijireh account dashboard%2$s.', 'event_espresso'),
25 25
 			'<a href="https://secure.mijireh.com/login" target="_blank">',
26 26
 			'</a>'
27 27
 		);
28 28
 		?>
29 29
 	</li>
30 30
 	<li>
31
-		<strong><?php _e( 'Button Image URL', 'event_espresso' ); ?></strong><br/>
32
-		<?php _e( 'Change the image that is used for this payment gateway.', 'event_espresso' ); ?>
31
+		<strong><?php _e('Button Image URL', 'event_espresso'); ?></strong><br/>
32
+		<?php _e('Change the image that is used for this payment gateway.', 'event_espresso'); ?>
33 33
 	</li>
34 34
 </ul>
35
-<p><strong><?php _e( 'Mijireh Checkout Page Design', 'event_espresso' ); ?></strong></p>
35
+<p><strong><?php _e('Mijireh Checkout Page Design', 'event_espresso'); ?></strong></p>
36 36
 <p>
37
-	<?php _e( "As you are probably aware, when users pay with Mijireh Payment Method, they are taken to a secure offsite page, hosted by Mijireh. This page can easily be made to have the look-and-feel of your website through a process called 'slurping', where Mijireh 'slurps' up your website's design and uses it on their checkout page.", 'event_espresso' ); ?>
38
-	<?php printf( __( "In order to do this, we automatically create a new WordPress page which is designed to be slurped by Mijireh. You can customize the page like any other, but the page must contain Mijireh's special '{{mijireh-checkout-form}}' shortcode. Once you have finished designing the page, publish it, and %s then click the special 'slurp now' button%s. Mijireh may take several minutes to slurp the page. Once Mijireh is finished slurping, you can delete the page, or mark it as a draft.", 'event_espresso' ), '<a href="http://ee-screenshots.s3.amazonaws.com/ee4/event-espresso-mijireh-slurp-page-example.jpg" target="_blank">', '</a>' ); ?>
37
+	<?php _e("As you are probably aware, when users pay with Mijireh Payment Method, they are taken to a secure offsite page, hosted by Mijireh. This page can easily be made to have the look-and-feel of your website through a process called 'slurping', where Mijireh 'slurps' up your website's design and uses it on their checkout page.", 'event_espresso'); ?>
38
+	<?php printf(__("In order to do this, we automatically create a new WordPress page which is designed to be slurped by Mijireh. You can customize the page like any other, but the page must contain Mijireh's special '{{mijireh-checkout-form}}' shortcode. Once you have finished designing the page, publish it, and %s then click the special 'slurp now' button%s. Mijireh may take several minutes to slurp the page. Once Mijireh is finished slurping, you can delete the page, or mark it as a draft.", 'event_espresso'), '<a href="http://ee-screenshots.s3.amazonaws.com/ee4/event-espresso-mijireh-slurp-page-example.jpg" target="_blank">', '</a>'); ?>
39 39
 </p>
40 40
\ No newline at end of file
Please login to merge, or discard this patch.
caffeinated/admin/extend/events/help_tabs/import_page.help_tab.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -2,18 +2,18 @@
 block discarded – undo
2 2
 <p>
3 3
 <?php _e('The importer can be used to import event information into Event Espresso using a CSV file.', 'event_espresso'); ?>
4 4
 </p>
5
-<p><strong><?php _e("Importing from other Event Espresso 4 Sites", 'event_espresso');?></strong></p>
5
+<p><strong><?php _e("Importing from other Event Espresso 4 Sites", 'event_espresso'); ?></strong></p>
6 6
 <p>
7 7
 <?php _e('To import Event Espresso data from another Event Espresso 4 install, export a CSV file from the admin Events overview page, or anywhere you can generate a CSV export file from. Then upload that file here (regardless of what type of information was exported).', 'event_espresso'); ?>
8 8
 </p>
9 9
 <p>
10 10
 <?php _e('Note: its possible that data from the other site have the same IDs as data in this site. The importer recognizes that this data is from a different database and inserts new items for each item in the CSV file, regardless of whether its ID matches that of an item in this site\'s database or not. However, the importer also remembers the mapping from the old site\'s database to this site\'s database, and on subsequent CSV importers from that site, the data in this database will be updated instead of re-inserting new items.', 'event_espresso'); ?>
11 11
 </p>
12
-<p><strong><?php _e("Importing from this Site", 'event_espresso');?></strong></p>
13
-<p><?php _e("You may want to export data from this site, modify it (or modify the database), and re-import it. When this is done, the importer recognizes that the data is from this site\'s database and updates the records (instead of inserting new items like it would have, had the CSV data been from a different site).", 'event_espresso');?></p>
12
+<p><strong><?php _e("Importing from this Site", 'event_espresso'); ?></strong></p>
13
+<p><?php _e("You may want to export data from this site, modify it (or modify the database), and re-import it. When this is done, the importer recognizes that the data is from this site\'s database and updates the records (instead of inserting new items like it would have, had the CSV data been from a different site).", 'event_espresso'); ?></p>
14 14
 
15
-	<p><strong><?php _e("Notes about Generating your own CSV Import Files", "event_espresso");?></strong></p>
16
-	<p><?php _e("If you think you could save time entering data into a CSV file, you can use the sample import file below. Note that creating your own CSV file is more complicated than in Event Espresso 3.1 because of the more advanced data structure, and so we recommend creating/editing your events using the normal web-interface.", "event_espresso");?></p>
17
-	<p><?php _e("The export file is just an export of an event, or if you do not have any events in your system, it will only contain column headers. Do not change those column headers. Add as many rows as you like. ", "event_espresso");?></p>
18
-	<p><?php _e("In the ID columns (columns ending in '_ID'), you should enter 'temporary IDs', which are unique numbers/words that identify that item, which can be used later when you want to refer to that item. (For example, if you assign an event's EVT_ID to be a temporary id of 'my-event-1', then use that same phrase 'my-event-1' to refer to that event in the Datetime model's EVT_ID column)", "event_espresso");?></p>
19
-	<p><?php _e("Also note, you do NOT have to enter info in for each model. (You can, for example, only enter in Term_Taxonomies and Term model data)", "event_espresso");?></p>
20 15
\ No newline at end of file
16
+	<p><strong><?php _e("Notes about Generating your own CSV Import Files", "event_espresso"); ?></strong></p>
17
+	<p><?php _e("If you think you could save time entering data into a CSV file, you can use the sample import file below. Note that creating your own CSV file is more complicated than in Event Espresso 3.1 because of the more advanced data structure, and so we recommend creating/editing your events using the normal web-interface.", "event_espresso"); ?></p>
18
+	<p><?php _e("The export file is just an export of an event, or if you do not have any events in your system, it will only contain column headers. Do not change those column headers. Add as many rows as you like. ", "event_espresso"); ?></p>
19
+	<p><?php _e("In the ID columns (columns ending in '_ID'), you should enter 'temporary IDs', which are unique numbers/words that identify that item, which can be used later when you want to refer to that item. (For example, if you assign an event's EVT_ID to be a temporary id of 'my-event-1', then use that same phrase 'my-event-1' to refer to that event in the Datetime model's EVT_ID column)", "event_espresso"); ?></p>
20
+	<p><?php _e("Also note, you do NOT have to enter info in for each model. (You can, for example, only enter in Term_Taxonomies and Term model data)", "event_espresso"); ?></p>
21 21
\ No newline at end of file
Please login to merge, or discard this patch.
modules/batch/EED_Batch.module.php 1 patch
Spacing   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -17,13 +17,13 @@  discard block
 block discarded – undo
17 17
  * @since		 	   4.8.30.rc.007
18 18
  *
19 19
  */
20
-if( !defined( 'EVENT_ESPRESSO_VERSION' ) ) {
21
-	exit( 'No direct script access allowed' );
20
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
21
+	exit('No direct script access allowed');
22 22
 }
23 23
 
24
-define( 'BATCH_URL', plugin_dir_url( __FILE__ ) );
24
+define('BATCH_URL', plugin_dir_url(__FILE__));
25 25
 
26
-class EED_Batch extends EED_Module{
26
+class EED_Batch extends EED_Module {
27 27
 	
28 28
 	/**
29 29
 	 * Possibly value for $_REQUEST[ 'batch' ]. Indicates to run a job that
@@ -70,9 +70,9 @@  discard block
 block discarded – undo
70 70
 	public static function set_hooks() {
71 71
 		//because this is a possibel attack vector, let's have this disabled until 
72 72
 		//we at least have a real use for it on the frontend
73
-		if( apply_filters( 'FHEE__EED_Batch__set_hooks__enable_frontend_batch', false ) ) {
74
-			add_action( 'wp_enqueue_scripts', array( self::instance(), 'enqueue_scripts' ) );
75
-			add_filter( 'template_include', array( self::instance(), 'override_template' ), 99 );
73
+		if (apply_filters('FHEE__EED_Batch__set_hooks__enable_frontend_batch', false)) {
74
+			add_action('wp_enqueue_scripts', array(self::instance(), 'enqueue_scripts'));
75
+			add_filter('template_include', array(self::instance(), 'override_template'), 99);
76 76
 		}
77 77
 	}
78 78
 	
@@ -80,28 +80,28 @@  discard block
 block discarded – undo
80 80
 	 * Initializes some hooks for the admin in order to run batch jobs
81 81
 	 */
82 82
 	public static function set_hooks_admin() {
83
-		add_action( 'admin_menu', array( self::instance(), 'register_admin_pages' ) );
84
-		add_action( 'admin_enqueue_scripts', array( self::instance(), 'enqueue_scripts' ) );
83
+		add_action('admin_menu', array(self::instance(), 'register_admin_pages'));
84
+		add_action('admin_enqueue_scripts', array(self::instance(), 'enqueue_scripts'));
85 85
 		
86 86
 		//ajax
87
-		add_action('wp_ajax_espresso_batch_continue',array(self::instance(),'batch_continue'));
88
-		add_action('wp_ajax_espresso_batch_cleanup',array(self::instance(),'batch_cleanup'));
89
-		add_action('wp_ajax_nopriv_espresso_batch_continue',array(self::instance(),'batch_continue'));
90
-		add_action('wp_ajax_nopriv_espresso_batch_cleanup',array(self::instance(),'batch_cleanup'));
87
+		add_action('wp_ajax_espresso_batch_continue', array(self::instance(), 'batch_continue'));
88
+		add_action('wp_ajax_espresso_batch_cleanup', array(self::instance(), 'batch_cleanup'));
89
+		add_action('wp_ajax_nopriv_espresso_batch_continue', array(self::instance(), 'batch_continue'));
90
+		add_action('wp_ajax_nopriv_espresso_batch_cleanup', array(self::instance(), 'batch_cleanup'));
91 91
 	}
92 92
 	
93 93
 	/**
94 94
 	 * Enqueues batch scripts on the frontend or admin, and creates a job
95 95
 	 */
96 96
 	public function enqueue_scripts() { 
97
-		if( isset( $_REQUEST[ 'espresso_batch' ] ) 
97
+		if (isset($_REQUEST['espresso_batch']) 
98 98
 			|| 
99 99
 			( 
100
-				isset( $_REQUEST[ 'page' ] )
101
-				&& $_REQUEST[ 'page' ] == 'espresso_batch'
100
+				isset($_REQUEST['page'])
101
+				&& $_REQUEST['page'] == 'espresso_batch'
102 102
 			) 
103 103
 		) { 
104
-			switch( $this->batch_request_type() ) {
104
+			switch ($this->batch_request_type()) {
105 105
 				case self::batch_job:
106 106
 					$this->enqueue_scripts_styles_batch_create();
107 107
 					break;
@@ -117,11 +117,11 @@  discard block
 block discarded – undo
117 117
 	 */
118 118
 	public function enqueue_scripts_styles_batch_create() {	
119 119
 		$job_response = $this->_enqueue_batch_job_scripts_and_styles_and_start_job();
120
-		wp_enqueue_script( 'batch_runner_init', BATCH_URL . '/assets/batch_runner_init.js', array( 'batch_runner' ), EVENT_ESPRESSO_VERSION, true );
121
-		wp_localize_script( 'batch_runner_init', 'ee_job_response', $job_response->to_array() );
122
-		wp_localize_script( 'batch_runner_init', 'ee_job_i18n', 
120
+		wp_enqueue_script('batch_runner_init', BATCH_URL.'/assets/batch_runner_init.js', array('batch_runner'), EVENT_ESPRESSO_VERSION, true);
121
+		wp_localize_script('batch_runner_init', 'ee_job_response', $job_response->to_array());
122
+		wp_localize_script('batch_runner_init', 'ee_job_i18n', 
123 123
 			array(
124
-				'return_url' => $_REQUEST['return_url' ],
124
+				'return_url' => $_REQUEST['return_url'],
125 125
 			));
126 126
 	}
127 127
 	
@@ -131,15 +131,15 @@  discard block
 block discarded – undo
131 131
 	public function enqueue_scripts_styles_batch_file_create() {
132 132
 		//creates a job based on the request variable
133 133
 		$job_response = $this->_enqueue_batch_job_scripts_and_styles_and_start_job();
134
-		wp_enqueue_script( 'batch_file_runner_init', BATCH_URL . '/assets/batch_file_runner_init.js', array( 'batch_runner' ), EVENT_ESPRESSO_VERSION, true );
135
-		wp_localize_script( 'batch_file_runner_init', 'ee_job_response', $job_response->to_array() );
136
-		wp_localize_script( 'batch_file_runner_init', 'ee_job_i18n', 
134
+		wp_enqueue_script('batch_file_runner_init', BATCH_URL.'/assets/batch_file_runner_init.js', array('batch_runner'), EVENT_ESPRESSO_VERSION, true);
135
+		wp_localize_script('batch_file_runner_init', 'ee_job_response', $job_response->to_array());
136
+		wp_localize_script('batch_file_runner_init', 'ee_job_i18n', 
137 137
 				array(
138 138
 					'download_and_redirecting' => sprintf( 
139 139
 							__('File Generation complete. Downloading, and %1$sredirecting%2$s...', 'event_espresso'),
140
-							'<a href="' . $_REQUEST['return_url' ] .'">',
140
+							'<a href="'.$_REQUEST['return_url'].'">',
141 141
 							'</a>' ),
142
-					'return_url' => $_REQUEST['return_url' ],
142
+					'return_url' => $_REQUEST['return_url'],
143 143
 				));
144 144
 	}
145 145
 	
@@ -150,18 +150,18 @@  discard block
 block discarded – undo
150 150
 	 * @return \EventEspressoBatchRequest\Helpers\JobStepResponse
151 151
 	 */
152 152
 	protected function _enqueue_batch_job_scripts_and_styles_and_start_job() {
153
-		wp_register_script( 'progress_bar', EE_PLUGIN_DIR_URL . 'core/libraries/batch/Assets/progress_bar.js', array( 'jquery' ) );
154
-		wp_enqueue_style( 'progress_bar', EE_PLUGIN_DIR_URL . 'core/libraries/batch/Assets/progress_bar.css', array(), EVENT_ESPRESSO_VERSION );
155
-		wp_enqueue_script( 'batch_runner', EE_PLUGIN_DIR_URL . 'core/libraries/batch/Assets/batch_runner.js', array( 'progress_bar' ));
153
+		wp_register_script('progress_bar', EE_PLUGIN_DIR_URL.'core/libraries/batch/Assets/progress_bar.js', array('jquery'));
154
+		wp_enqueue_style('progress_bar', EE_PLUGIN_DIR_URL.'core/libraries/batch/Assets/progress_bar.css', array(), EVENT_ESPRESSO_VERSION);
155
+		wp_enqueue_script('batch_runner', EE_PLUGIN_DIR_URL.'core/libraries/batch/Assets/batch_runner.js', array('progress_bar'));
156 156
 		//just copy the bits of EE admin's eei18n that we need in the JS
157
-		wp_localize_script( 'batch_runner', 'eei18n', array( 'ajax_url' => WP_AJAX_URL, 'is_admin' => (bool)is_admin() ) );
158
-		$job_handler_classname = stripslashes( $_GET[ 'job_handler' ] );
157
+		wp_localize_script('batch_runner', 'eei18n', array('ajax_url' => WP_AJAX_URL, 'is_admin' => (bool) is_admin()));
158
+		$job_handler_classname = stripslashes($_GET['job_handler']);
159 159
 		$request_data = array_diff_key( 
160 160
 				$_REQUEST, 
161
-				array_flip( array( 'action',  'page', 'ee', 'batch' ) ) );
161
+				array_flip(array('action', 'page', 'ee', 'batch')) );
162 162
 		$batch_runner = new EventEspressoBatchRequest\BatchRequestProcessor();
163 163
 		//eg 'EventEspressoBatchRequest\JobHandlers\RegistrationsReport'
164
-		$job_response = $batch_runner->create_job( $job_handler_classname, $request_data );
164
+		$job_response = $batch_runner->create_job($job_handler_classname, $request_data);
165 165
 		//remember the response for later. We need it to display the page body
166 166
 		$this->_job_step_response = $job_response;
167 167
 		return $job_response;
@@ -172,9 +172,9 @@  discard block
 block discarded – undo
172 172
 	 * @param string $template
173 173
 	 * @return string
174 174
 	 */
175
-	public function override_template( $template ) {
176
-		if( isset( $_REQUEST[ 'espresso_batch' ] ) && isset( $_REQUEST[ 'batch' ] ) ) {
177
-			return EE_MODULES . 'batch' . DS . 'templates' . DS . 'batch_frontend_wrapper.template.html';
175
+	public function override_template($template) {
176
+		if (isset($_REQUEST['espresso_batch']) && isset($_REQUEST['batch'])) {
177
+			return EE_MODULES.'batch'.DS.'templates'.DS.'batch_frontend_wrapper.template.html';
178 178
 		}
179 179
 		return $template;
180 180
 	}
@@ -185,11 +185,11 @@  discard block
 block discarded – undo
185 185
 	public function register_admin_pages() {
186 186
 		add_submenu_page( 
187 187
 			'', //parent slug. we don't want this to actually appear in the menu
188
-			__( 'Batch Job', 'event_espresso' ), //page title
188
+			__('Batch Job', 'event_espresso'), //page title
189 189
 			'n/a', //menu title
190 190
 			'read', //we want this page to actually be accessible to anyone,  
191 191
 			'espresso_batch', //menu slug
192
-			array( self::instance(), 'show_admin_page' )
192
+			array(self::instance(), 'show_admin_page')
193 193
 		);
194 194
 	}
195 195
 	
@@ -199,8 +199,8 @@  discard block
 block discarded – undo
199 199
 	 */
200 200
 	public function show_admin_page() { 
201 201
 		echo EEH_Template::locate_template( 
202
-			EE_MODULES . 'batch' . DS . 'templates' . DS . 'batch_wrapper.template.html', 
203
-			array( 'batch_request_type' => $this->batch_request_type() )
202
+			EE_MODULES.'batch'.DS.'templates'.DS.'batch_wrapper.template.html', 
203
+			array('batch_request_type' => $this->batch_request_type())
204 204
 		);
205 205
 	}
206 206
 	
@@ -208,10 +208,10 @@  discard block
 block discarded – undo
208 208
 	 * Receives ajax calls for continuing a job
209 209
 	 */
210 210
 	public function batch_continue() {
211
-		$job_id = sanitize_text_field( $_REQUEST[ 'job_id' ] );
211
+		$job_id = sanitize_text_field($_REQUEST['job_id']);
212 212
 		$batch_runner = new EventEspressoBatchRequest\BatchRequestProcessor();
213
-		$response_obj = $batch_runner->continue_job( $job_id);
214
-		$this->_return_json( $response_obj->to_array() );
213
+		$response_obj = $batch_runner->continue_job($job_id);
214
+		$this->_return_json($response_obj->to_array());
215 215
 	}
216 216
 	
217 217
 	/**
@@ -219,10 +219,10 @@  discard block
 block discarded – undo
219 219
 	 * @return type
220 220
 	 */
221 221
 	public function batch_cleanup() {
222
-		$job_id = sanitize_text_field( $_REQUEST[ 'job_id' ] );
222
+		$job_id = sanitize_text_field($_REQUEST['job_id']);
223 223
 		$batch_runner = new EventEspressoBatchRequest\BatchRequestProcessor();
224
-		$response_obj = $batch_runner->cleanup_job( $job_id );
225
-		$this->_return_json( $response_obj->to_array() );
224
+		$response_obj = $batch_runner->cleanup_job($job_id);
225
+		$this->_return_json($response_obj->to_array());
226 226
 	}
227 227
 	
228 228
 	
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 	 *	'isEEajax' => true,//indicates this is a response from EE
239 239
 	 * )
240 240
 	 */
241
-	protected function _return_json( $data ) {
241
+	protected function _return_json($data) {
242 242
 		$json = array(
243 243
 			'notices' => EE_Error::get_notices(),
244 244
 			'data' => $data,
@@ -247,13 +247,13 @@  discard block
 block discarded – undo
247 247
 
248 248
 
249 249
 		// make sure there are no php errors or headers_sent.  Then we can set correct json header.
250
-		if ( NULL === error_get_last() || ! headers_sent() ) {
250
+		if (NULL === error_get_last() || ! headers_sent()) {
251 251
 			header('Content-Type: application/json; charset=UTF-8');
252 252
 		}	
253
-		if( function_exists( 'wp_json_encode' ) ) {
254
-			echo wp_json_encode( $json );
253
+		if (function_exists('wp_json_encode')) {
254
+			echo wp_json_encode($json);
255 255
 		} else {
256
-			echo json_encode( $json );
256
+			echo json_encode($json);
257 257
 		}
258 258
 		exit();
259 259
 	}
@@ -270,16 +270,16 @@  discard block
 block discarded – undo
270 270
 	 * @return string: EED_Batch::batch_job, EED_Batch::batch_file_job, EED_Batch::batch_not_job
271 271
 	 */
272 272
 	public function batch_request_type() {
273
-		if( $this->_batch_request_type === null ) {
274
-			if( isset( $_GET[ 'batch' ] ) ) {
275
-				if( $_GET[ 'batch' ] == self::batch_job ) {
273
+		if ($this->_batch_request_type === null) {
274
+			if (isset($_GET['batch'])) {
275
+				if ($_GET['batch'] == self::batch_job) {
276 276
 					$this->_batch_request_type = self::batch_job;
277
-				} elseif( $_GET[ 'batch' ] == self::batch_file_job ) {
277
+				} elseif ($_GET['batch'] == self::batch_file_job) {
278 278
 					$this->_batch_request_type = self::batch_file_job;
279 279
 				}
280 280
 			}
281 281
 			//if we didn't find that it was a batch request, indicate it wasn't
282
-			if( $this->_batch_request_type === null ) {
282
+			if ($this->_batch_request_type === null) {
283 283
 				$this->_batch_request_type = self::batch_not_job;
284 284
 			}
285 285
 		}
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 	 * Unnecessary
291 291
 	 * @param type $WP
292 292
 	 */
293
-	public function run( $WP ) {
293
+	public function run($WP) {
294 294
 		
295 295
 	}
296 296
 
Please login to merge, or discard this patch.
admin_pages/registrations/Registrations_Admin_Page.core.php 3 patches
Spacing   +545 added lines, -545 removed lines patch added patch discarded remove patch
@@ -56,26 +56,26 @@  discard block
 block discarded – undo
56 56
 	 * @param bool $routing
57 57
 	 * @return Registrations_Admin_Page
58 58
 	 */
59
-	public function __construct( $routing = TRUE ) {
60
-		parent::__construct( $routing );
61
-		add_action( 'wp_loaded', array( $this, 'wp_loaded' ));
59
+	public function __construct($routing = TRUE) {
60
+		parent::__construct($routing);
61
+		add_action('wp_loaded', array($this, 'wp_loaded'));
62 62
 	}
63 63
 
64 64
 
65 65
 
66 66
 	public function wp_loaded() {
67 67
 		// when adding a new registration...
68
-		if ( isset( $this->_req_data[ 'action' ] ) && $this->_req_data[ 'action' ] == 'new_registration' ) {
68
+		if (isset($this->_req_data['action']) && $this->_req_data['action'] == 'new_registration') {
69 69
 			EE_System::do_not_cache();
70 70
 			if (
71
-				! isset( $this->_req_data[ 'processing_registration' ] )
72
-				|| absint( $this->_req_data[ 'processing_registration' ] ) !== 1
71
+				! isset($this->_req_data['processing_registration'])
72
+				|| absint($this->_req_data['processing_registration']) !== 1
73 73
 			) {
74 74
 				// and it's NOT the attendee information reg step
75 75
 				// force cookie expiration by setting time to last week
76
-				setcookie( 'ee_registration_added', 0, time() - WEEK_IN_SECONDS, '/' );
76
+				setcookie('ee_registration_added', 0, time() - WEEK_IN_SECONDS, '/');
77 77
 				// and update the global
78
-				$_COOKIE[ 'ee_registration_added' ] = 0;
78
+				$_COOKIE['ee_registration_added'] = 0;
79 79
 			}
80 80
 		}
81 81
 	}
@@ -109,16 +109,16 @@  discard block
 block discarded – undo
109 109
 				'trash' => 'post.php'
110 110
 			);
111 111
 
112
-		add_action('edit_form_after_title', array($this, 'after_title_form_fields'), 10 );
112
+		add_action('edit_form_after_title', array($this, 'after_title_form_fields'), 10);
113 113
 		//add filters so that the comment urls don't take users to a confusing 404 page
114
-		add_filter('get_comment_link', array( $this, 'clear_comment_link' ), 10, 3 );
114
+		add_filter('get_comment_link', array($this, 'clear_comment_link'), 10, 3);
115 115
 	}
116 116
 
117 117
 
118
-	public function clear_comment_link( $link, $comment, $args ) {
118
+	public function clear_comment_link($link, $comment, $args) {
119 119
 		//gotta make sure this only happens on this route
120
-		$post_type = get_post_type( $comment->comment_post_ID);
121
-		if ( $post_type == 'espresso_attendees' )
120
+		$post_type = get_post_type($comment->comment_post_ID);
121
+		if ($post_type == 'espresso_attendees')
122 122
 			return '#commentsdiv';
123 123
 		return $link;
124 124
 	}
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 
127 127
 	protected function _ajax_hooks() {
128 128
 		//todo: all hooks for registrations ajax goes in here
129
-		add_action( 'wp_ajax_toggle_checkin_status', array( $this, 'toggle_checkin_status' ));
129
+		add_action('wp_ajax_toggle_checkin_status', array($this, 'toggle_checkin_status'));
130 130
 	}
131 131
 
132 132
 
@@ -141,8 +141,8 @@  discard block
 block discarded – undo
141 141
 				'add-attendee' => __('Add Contact', 'event_espresso'),
142 142
 				'edit' => __('Edit Contact', 'event_espresso'),
143 143
 				'report'=>  __("Event Registrations CSV Report", "event_espresso"),
144
-				'report_all' => __( 'All Registrations CSV Report', 'event_espresso' ),
145
-				'contact_list_report' => __( 'Contact List Report', 'event_espresso' ),
144
+				'report_all' => __('All Registrations CSV Report', 'event_espresso'),
145
+				'contact_list_report' => __('Contact List Report', 'event_espresso'),
146 146
 				'contact_list_export'=>  __("Export Data", "event_espresso"),
147 147
 			),
148 148
 			'publishbox' => array(
@@ -170,9 +170,9 @@  discard block
 block discarded – undo
170 170
 
171 171
 		$this->_get_registration_status_array();
172 172
 
173
-		$reg_id = ! empty( $this->_req_data['_REG_ID'] ) && ! is_array( $this->_req_data['_REG_ID'] ) ? $this->_req_data['_REG_ID'] : 0;
174
-		$att_id = ! empty( $this->_req_data[ 'ATT_ID' ] ) && ! is_array( $this->_req_data['ATT_ID'] ) ? $this->_req_data['ATT_ID'] : 0;
175
-		$att_id = ! empty( $this->_req_data['post'] ) && ! is_array( $this->_req_data['post'] ) ? $this->_req_data['post'] : $att_id;
173
+		$reg_id = ! empty($this->_req_data['_REG_ID']) && ! is_array($this->_req_data['_REG_ID']) ? $this->_req_data['_REG_ID'] : 0;
174
+		$att_id = ! empty($this->_req_data['ATT_ID']) && ! is_array($this->_req_data['ATT_ID']) ? $this->_req_data['ATT_ID'] : 0;
175
+		$att_id = ! empty($this->_req_data['post']) && ! is_array($this->_req_data['post']) ? $this->_req_data['post'] : $att_id;
176 176
 
177 177
 		$this->_page_routes = array(
178 178
 
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 
206 206
 				'restore_registrations' => array(
207 207
 					'func' => '_trash_or_restore_registrations',
208
-					'args' => array( 'trash' => FALSE ),
208
+					'args' => array('trash' => FALSE),
209 209
 					'noheader' => TRUE,
210 210
 					'capability' => 'ee_delete_registrations'
211 211
 					),
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
 						'filename' => 'registrations_overview_other'
438 438
 					)
439 439
                 ),
440
-				'help_tour' => array( 'Registration_Overview_Help_Tour' ),
440
+				'help_tour' => array('Registration_Overview_Help_Tour'),
441 441
 				'qtips' => array('Registration_List_Table_Tips'),
442 442
 				'list_table' => 'EE_Registrations_List_Table',
443 443
 				'require_nonce' => FALSE
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
 				'nav' => array(
448 448
 					'label' => __('REG Details', 'event_espresso'),
449 449
 					'order' => 15,
450
-					'url' => isset($this->_req_data['_REG_ID']) ? add_query_arg(array('_REG_ID' => $this->_req_data['_REG_ID'] ), $this->_current_page_view_url )  : $this->_admin_base_url,
450
+					'url' => isset($this->_req_data['_REG_ID']) ? add_query_arg(array('_REG_ID' => $this->_req_data['_REG_ID']), $this->_current_page_view_url) : $this->_admin_base_url,
451 451
 					'persistent' => FALSE
452 452
 				),
453 453
                 'help_tabs' => array(
@@ -468,8 +468,8 @@  discard block
 block discarded – undo
468 468
 						'filename' => 'registrations_details_registrant_details'
469 469
 					)
470 470
 				),
471
-				'help_tour' => array( 'Registration_Details_Help_Tour' ),
472
-				'metaboxes' => array_merge( $this->_default_espresso_metaboxes, array( '_registration_details_metaboxes' ) ),
471
+				'help_tour' => array('Registration_Details_Help_Tour'),
472
+				'metaboxes' => array_merge($this->_default_espresso_metaboxes, array('_registration_details_metaboxes')),
473 473
 				'require_nonce' => FALSE
474 474
 			),
475 475
 
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
 					'order' => 15,
494 494
 					'persistent' => FALSE
495 495
 				),
496
-				'metaboxes' => array_merge( $this->_default_espresso_metaboxes, array('_publish_post_box', 'attendee_editor_metaboxes' ) ),
496
+				'metaboxes' => array_merge($this->_default_espresso_metaboxes, array('_publish_post_box', 'attendee_editor_metaboxes')),
497 497
 				'require_nonce' => FALSE
498 498
 			),
499 499
 
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
 					'label' => __('Edit Contact', 'event_espresso'),
503 503
 					'order' => 15,
504 504
 					'persistent' => FALSE,
505
-					'url' => isset($this->_req_data['ATT_ID']) ? add_query_arg(array('ATT_ID' => $this->_req_data['ATT_ID'] ), $this->_current_page_view_url )  : $this->_admin_base_url
505
+					'url' => isset($this->_req_data['ATT_ID']) ? add_query_arg(array('ATT_ID' => $this->_req_data['ATT_ID']), $this->_current_page_view_url) : $this->_admin_base_url
506 506
 				),
507 507
 				'metaboxes' => array('attendee_editor_metaboxes'),
508 508
 				'require_nonce' => FALSE
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
 						'filename' => 'registrations_contact_list_other'
533 533
 					)
534 534
                 ),
535
-				'help_tour' => array( 'Contact_List_Help_Tour' ),
535
+				'help_tour' => array('Contact_List_Help_Tour'),
536 536
 				'metaboxes' => array(),
537 537
 				'require_nonce' => FALSE
538 538
 			),
@@ -551,7 +551,7 @@  discard block
 block discarded – undo
551 551
 	protected function _add_screen_options() {}
552 552
 	protected function _add_feature_pointers() {}
553 553
 	public function admin_init() {
554
-		EE_Registry::$i18n_js_strings[ 'update_att_qstns' ] = __( 'click "Update Registration Questions" to save your changes', 'event_espresso' );
554
+		EE_Registry::$i18n_js_strings['update_att_qstns'] = __('click "Update Registration Questions" to save your changes', 'event_espresso');
555 555
 	}
556 556
 	public function admin_notices() {}
557 557
 	public function admin_footer_scripts() {}
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
 	*		@return void
570 570
 	*/
571 571
 	private function _get_registration_status_array() {
572
-		self::$_reg_status = EEM_Registration::reg_status_array( array(), TRUE);
572
+		self::$_reg_status = EEM_Registration::reg_status_array(array(), TRUE);
573 573
 	}
574 574
 
575 575
 
@@ -592,11 +592,11 @@  discard block
 block discarded – undo
592 592
 	public function load_scripts_styles() {
593 593
 		//style
594 594
 		//wp_register_style('espresso_attendees', ATT_ASSETS_URL . 'espresso_attendees_admin.css', array(), EVENT_ESPRESSO_VERSION );
595
-		wp_register_style('espresso_reg', REG_ASSETS_URL . 'espresso_registrations_admin.css', array('ee-admin-css'), EVENT_ESPRESSO_VERSION );
595
+		wp_register_style('espresso_reg', REG_ASSETS_URL.'espresso_registrations_admin.css', array('ee-admin-css'), EVENT_ESPRESSO_VERSION);
596 596
 		wp_enqueue_style('espresso_reg');
597 597
 
598 598
 		//script
599
-		wp_register_script('espresso_reg', REG_ASSETS_URL . 'espresso_registrations_admin.js', array('jquery-ui-datepicker', 'jquery-ui-draggable', 'ee_admin_js'), EVENT_ESPRESSO_VERSION, TRUE);
599
+		wp_register_script('espresso_reg', REG_ASSETS_URL.'espresso_registrations_admin.js', array('jquery-ui-datepicker', 'jquery-ui-draggable', 'ee_admin_js'), EVENT_ESPRESSO_VERSION, TRUE);
600 600
 		wp_enqueue_script('espresso_reg');
601 601
 	}
602 602
 
@@ -605,9 +605,9 @@  discard block
 block discarded – undo
605 605
 	public function load_scripts_styles_edit_attendee() {
606 606
 		//stuff to only show up on our attendee edit details page.
607 607
 		$attendee_details_translations = array(
608
-			'att_publish_text' => sprintf( __('Created on: <b>%1$s</b>', 'event_espresso'), $this->_cpt_model_obj->get_datetime('ATT_created') )
608
+			'att_publish_text' => sprintf(__('Created on: <b>%1$s</b>', 'event_espresso'), $this->_cpt_model_obj->get_datetime('ATT_created'))
609 609
 			);
610
-		wp_localize_script( 'espresso_reg', 'ATTENDEE_DETAILS', $attendee_details_translations );
610
+		wp_localize_script('espresso_reg', 'ATTENDEE_DETAILS', $attendee_details_translations);
611 611
 		wp_enqueue_script('jquery-validate');
612 612
 	}
613 613
 
@@ -616,8 +616,8 @@  discard block
 block discarded – undo
616 616
 		//styles
617 617
 		wp_enqueue_style('espresso-ui-theme');
618 618
 		//scripts
619
-		$this->_get_reg_custom_questions_form( $this->_registration->ID() );
620
-		$this->_reg_custom_questions_form->wp_enqueue_scripts( true );
619
+		$this->_get_reg_custom_questions_form($this->_registration->ID());
620
+		$this->_reg_custom_questions_form->wp_enqueue_scripts(true);
621 621
 	}
622 622
 
623 623
 
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
 
628 628
 	public function load_scripts_styles_contact_list() {
629 629
 		wp_deregister_style('espresso_reg');
630
-		wp_register_style('espresso_att', REG_ASSETS_URL . 'espresso_attendees_admin.css', array('ee-admin-css'), EVENT_ESPRESSO_VERSION );
630
+		wp_register_style('espresso_att', REG_ASSETS_URL.'espresso_attendees_admin.css', array('ee-admin-css'), EVENT_ESPRESSO_VERSION);
631 631
 		wp_enqueue_style('espresso_att');
632 632
 	}
633 633
 
@@ -636,9 +636,9 @@  discard block
 block discarded – undo
636 636
 
637 637
 
638 638
 	public function load_scripts_styles_new_registration() {
639
-		wp_register_script( 'ee-spco-for-admin', REG_ASSETS_URL . 'spco_for_admin.js', array('underscore', 'jquery'), EVENT_ESPRESSO_VERSION, TRUE );
639
+		wp_register_script('ee-spco-for-admin', REG_ASSETS_URL.'spco_for_admin.js', array('underscore', 'jquery'), EVENT_ESPRESSO_VERSION, TRUE);
640 640
 		wp_enqueue_script('ee-spco-for-admin');
641
-		add_filter('FHEE__EED_Ticket_Selector__load_tckt_slctr_assets', '__return_true' );
641
+		add_filter('FHEE__EED_Ticket_Selector__load_tckt_slctr_assets', '__return_true');
642 642
 		EE_Form_Section_Proper::wp_enqueue_scripts();
643 643
 		EED_Ticket_Selector::load_tckt_slctr_assets();
644 644
 		EE_Datepicker_Input::enqueue_styles_and_scripts();
@@ -677,23 +677,23 @@  discard block
 block discarded – undo
677 677
 
678 678
 		/** setup reg status bulk actions **/
679 679
 		$def_reg_status_actions['approve_registration'] = __('Approve Registrations', 'event_espresso');
680
-		if ( in_array( $match_array['approve_registration'], $active_mts ) && EE_Registry::instance()->CAP->current_user_can( 'ee_send_message', 'batch_send_messages' ) ) {
680
+		if (in_array($match_array['approve_registration'], $active_mts) && EE_Registry::instance()->CAP->current_user_can('ee_send_message', 'batch_send_messages')) {
681 681
 			$def_reg_status_actions['approve_and_notify_registration'] = __('Approve and Notify Registrations', 'event_espresso');
682 682
 		}
683 683
 		$def_reg_status_actions['decline_registration'] = __('Decline Registrations', 'event_espresso');
684
-		if ( in_array( $match_array['decline_registration'], $active_mts ) && EE_Registry::instance()->CAP->current_user_can( 'ee_send_message', 'batch_send_messages' ) ) {
684
+		if (in_array($match_array['decline_registration'], $active_mts) && EE_Registry::instance()->CAP->current_user_can('ee_send_message', 'batch_send_messages')) {
685 685
 			$def_reg_status_actions['decline_and_notify_registration'] = __('Decline and Notify Registrations', 'event_espresso');
686 686
 		}
687 687
 		$def_reg_status_actions['pending_registration'] = __('Set Registrations to Pending Payment', 'event_espresso');
688
-		if ( in_array( $match_array['pending_registration'], $active_mts ) && EE_Registry::instance()->CAP->current_user_can( 'ee_send_message', 'batch_send_messages' ) ) {
688
+		if (in_array($match_array['pending_registration'], $active_mts) && EE_Registry::instance()->CAP->current_user_can('ee_send_message', 'batch_send_messages')) {
689 689
 			$def_reg_status_actions['pending_and_notify_registration'] = __('Set Registrations to Pending Payment and Notify', 'event_espresso');
690 690
 		}
691 691
 		$def_reg_status_actions['no_approve_registration'] = __('Set Registrations to Not Approved', 'event_espresso');
692
-		if ( in_array( $match_array['no_approve_registration'], $active_mts ) && EE_Registry::instance()->CAP->current_user_can( 'ee_send_message', 'batch_send_messages' ) ) {
692
+		if (in_array($match_array['no_approve_registration'], $active_mts) && EE_Registry::instance()->CAP->current_user_can('ee_send_message', 'batch_send_messages')) {
693 693
 			$def_reg_status_actions['no_approve_and_notify_registration'] = __('Set Registrations to Not Approved and Notify', 'event_espresso');
694 694
 		}
695 695
 		$def_reg_status_actions['cancel_registration'] = __('Cancel Registrations', 'event_espresso');
696
-		if ( in_array( $match_array['cancel_registration'], $active_mts ) && EE_Registry::instance()->CAP->current_user_can( 'ee_send_message', 'batch_send_messages' ) ) {
696
+		if (in_array($match_array['cancel_registration'], $active_mts) && EE_Registry::instance()->CAP->current_user_can('ee_send_message', 'batch_send_messages')) {
697 697
 			$def_reg_status_actions['cancel_and_notify_registration'] = __('Cancel Registrations and Notify', 'event_espresso');
698 698
 		}
699 699
 
@@ -702,29 +702,29 @@  discard block
 block discarded – undo
702 702
 				'slug' => 'all',
703 703
 				'label' => __('View All Registrations', 'event_espresso'),
704 704
 				'count' => 0,
705
-				'bulk_action' => array_merge( $def_reg_status_actions, array(
705
+				'bulk_action' => array_merge($def_reg_status_actions, array(
706 706
 					'trash_registrations' => __('Trash Registrations', 'event_espresso')
707
-					) )
707
+					))
708 708
 				),
709 709
 			'month' => array(
710 710
 				'slug' => 'month',
711 711
 				'label' => __('This Month', 'event_espresso'),
712 712
 				'count' => 0,
713
-				'bulk_action' => array_merge( $def_reg_status_actions, array(
713
+				'bulk_action' => array_merge($def_reg_status_actions, array(
714 714
 					'trash_registrations' => __('Trash Registrations', 'event_espresso')
715 715
 					))
716 716
 				),
717 717
 			'today' => array(
718 718
 				'slug' => 'today',
719
-				'label' => sprintf( __('Today - %s', 'event_espresso'), date('M d, Y', current_time('timestamp' ) ) ),
719
+				'label' => sprintf(__('Today - %s', 'event_espresso'), date('M d, Y', current_time('timestamp'))),
720 720
 				'count' => 0,
721
-				'bulk_action' => array_merge( $def_reg_status_actions,  array(
721
+				'bulk_action' => array_merge($def_reg_status_actions, array(
722 722
 					'trash_registrations' => __('Trash Registrations', 'event_espresso')
723 723
 					))
724 724
 				)
725 725
 			);
726 726
 
727
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_registrations', 'espresso_registrations_delete_registration' ) ) {
727
+		if (EE_Registry::instance()->CAP->current_user_can('ee_delete_registrations', 'espresso_registrations_delete_registration')) {
728 728
 			$this->_views['incomplete'] = array(
729 729
 				'slug' => 'incomplete',
730 730
 				'label' => __('Incomplete', 'event_espresso'),
@@ -760,7 +760,7 @@  discard block
 block discarded – undo
760 760
 				)
761 761
 			);
762 762
 
763
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_contacts', 'espresso_registrations_trash_attendees' ) ) {
763
+		if (EE_Registry::instance()->CAP->current_user_can('ee_delete_contacts', 'espresso_registrations_trash_attendees')) {
764 764
 			$this->_views['trash'] = array(
765 765
 				'slug' => 'trash',
766 766
 				'label' => __('Trash', 'event_espresso'),
@@ -799,42 +799,42 @@  discard block
 block discarded – undo
799 799
 				'desc' => __('View Transaction Invoice', 'event_espresso')
800 800
 				),
801 801
  			);
802
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_send_message', 'espresso_registrations_resend_registration' ) ) {
802
+		if (EE_Registry::instance()->CAP->current_user_can('ee_send_message', 'espresso_registrations_resend_registration')) {
803 803
 			$fc_items['resend_registration'] = array(
804 804
 				'class' => 'dashicons dashicons-email-alt',
805 805
 				'desc' => __('Resend Registration Details', 'event_espresso')
806 806
 				);
807 807
 		} else {
808
-			$fc_items['blank'] = array( 'class' => 'blank', 'desc' => '' );
808
+			$fc_items['blank'] = array('class' => 'blank', 'desc' => '');
809 809
 		}
810 810
 
811 811
 		$sc_items = array(
812 812
 			'approved_status' => array(
813
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_approved,
814
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_approved, FALSE, 'sentence' )
813
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_approved,
814
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_approved, FALSE, 'sentence')
815 815
 				),
816 816
 			'pending_status' => array(
817
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_pending_payment,
818
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_pending_payment, FALSE, 'sentence' )
817
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_pending_payment,
818
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_pending_payment, FALSE, 'sentence')
819 819
 				),
820 820
 			'incomplete_status' => array(
821
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_incomplete,
822
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_incomplete, FALSE, 'sentence' )
821
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_incomplete,
822
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_incomplete, FALSE, 'sentence')
823 823
 			),
824 824
 			'not_approved' => array(
825
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_not_approved,
826
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_not_approved, FALSE, 'sentence' )
825
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_not_approved,
826
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_not_approved, FALSE, 'sentence')
827 827
 				),
828 828
 			'declined_status' => array(
829
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_declined,
830
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_declined, FALSE, 'sentence' )
829
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_declined,
830
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_declined, FALSE, 'sentence')
831 831
 				),
832 832
 			'cancelled_status' => array(
833
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_cancelled,
834
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_cancelled, FALSE, 'sentence' )
833
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_cancelled,
834
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_cancelled, FALSE, 'sentence')
835 835
 				)
836 836
 			);
837
-		return array_merge( $fc_items, $sc_items );
837
+		return array_merge($fc_items, $sc_items);
838 838
 	}
839 839
 
840 840
 
@@ -847,15 +847,15 @@  discard block
 block discarded – undo
847 847
 
848 848
 
849 849
 	protected function _registrations_overview_list_table() {
850
-		$EVT_ID = ( ! empty( $this->_req_data['event_id'] )) ? absint( $this->_req_data['event_id'] ) : FALSE;
851
-		if ( $EVT_ID ) {
852
-			if ( EE_Registry::instance()->CAP->current_user_can( 'ee_edit_registrations', 'espresso_registrations_new_registration', $EVT_ID ) ) {
853
-				$this->_admin_page_title .= $this->get_action_link_or_button( 'new_registration', 'add-registrant', array( 'event_id' => $EVT_ID ), 'add-new-h2' );
850
+		$EVT_ID = ( ! empty($this->_req_data['event_id'])) ? absint($this->_req_data['event_id']) : FALSE;
851
+		if ($EVT_ID) {
852
+			if (EE_Registry::instance()->CAP->current_user_can('ee_edit_registrations', 'espresso_registrations_new_registration', $EVT_ID)) {
853
+				$this->_admin_page_title .= $this->get_action_link_or_button('new_registration', 'add-registrant', array('event_id' => $EVT_ID), 'add-new-h2');
854 854
 			}
855
-			$event = EEM_Event::instance()->get_one_by_ID( $EVT_ID );
856
-			$this->_template_args['admin_page_header'] = $event instanceof EE_Event ? sprintf( __('%s Viewing registrations for the event: %s%s', 'event_espresso'), '<h2>', '<a href="' . EE_Admin_Page::add_query_args_and_nonce( array('action' => 'edit', 'post' => $event->ID() ), EVENTS_ADMIN_URL ) . '">' . $event->get('EVT_name') . '</a>', '</h2>' ) : '';
855
+			$event = EEM_Event::instance()->get_one_by_ID($EVT_ID);
856
+			$this->_template_args['admin_page_header'] = $event instanceof EE_Event ? sprintf(__('%s Viewing registrations for the event: %s%s', 'event_espresso'), '<h2>', '<a href="'.EE_Admin_Page::add_query_args_and_nonce(array('action' => 'edit', 'post' => $event->ID()), EVENTS_ADMIN_URL).'">'.$event->get('EVT_name').'</a>', '</h2>') : '';
857 857
 		}
858
-		$this->_template_args['after_list_table'] = $this->_display_legend( $this->_registration_legend_items() );
858
+		$this->_template_args['after_list_table'] = $this->_display_legend($this->_registration_legend_items());
859 859
 		$this->display_admin_list_table_page_with_no_sidebar();
860 860
 	}
861 861
 
@@ -870,19 +870,19 @@  discard block
 block discarded – undo
870 870
 	 */
871 871
 	private function _set_registration_object() {
872 872
 		//get out if we've already set the object
873
-		if ( is_object( $this->_registration )) {
873
+		if (is_object($this->_registration)) {
874 874
 			return TRUE;
875 875
 		}
876 876
 
877 877
 	    $REG = EEM_Registration::instance();
878 878
 
879
-		$REG_ID = ( ! empty( $this->_req_data['_REG_ID'] )) ? absint( $this->_req_data['_REG_ID'] ) : FALSE;
879
+		$REG_ID = ( ! empty($this->_req_data['_REG_ID'])) ? absint($this->_req_data['_REG_ID']) : FALSE;
880 880
 
881
-		if ( $this->_registration = $REG->get_one_by_ID( $REG_ID ))
881
+		if ($this->_registration = $REG->get_one_by_ID($REG_ID))
882 882
 			return TRUE;
883 883
 		else {
884
-			$error_msg = sprintf( __('An error occurred and the details for Registration ID #%s could not be retrieved.', 'event_espresso'), $REG_ID );
885
-			EE_Error::add_error( $error_msg, __FILE__, __FUNCTION__, __LINE__ );
884
+			$error_msg = sprintf(__('An error occurred and the details for Registration ID #%s could not be retrieved.', 'event_espresso'), $REG_ID);
885
+			EE_Error::add_error($error_msg, __FILE__, __FUNCTION__, __LINE__);
886 886
 			$this->_registration = NULL;
887 887
 			return FALSE;
888 888
 		}
@@ -901,25 +901,25 @@  discard block
 block discarded – undo
901 901
 	 * @internal param bool $all whether to ignore all query params and just return ALL registrations (or count if count is set)
902 902
 	 * @return mixed (int|array)  int = count || array of registration objects
903 903
 	 */
904
-	public function get_registrations( $per_page = 10, $count = FALSE, $this_month = FALSE, $today = FALSE ) {
905
-
906
-		$EVT_ID = ! empty( $this->_req_data['event_id'] ) && $this->_req_data['event_id'] > 0 ? absint( $this->_req_data['event_id'] ) : FALSE;
907
-		$CAT_ID = ! empty( $this->_req_data['EVT_CAT'] ) && (int) $this->_req_data['EVT_CAT'] > 0? absint( $this->_req_data['EVT_CAT'] ) : FALSE;
908
-		$reg_status = ! empty( $this->_req_data['_reg_status'] ) ? sanitize_text_field( $this->_req_data['_reg_status'] ) : FALSE;
909
-		$month_range = ! empty( $this->_req_data['month_range'] ) ? sanitize_text_field( $this->_req_data['month_range'] ) : FALSE;//should be like 2013-april
910
-		$today_a = ! empty( $this->_req_data['status'] ) && $this->_req_data['status'] == 'today' ? TRUE : FALSE;
911
-		$this_month_a = ! empty( $this->_req_data['status'] ) && $this->_req_data['status'] == 'month' ? TRUE  : FALSE;
904
+	public function get_registrations($per_page = 10, $count = FALSE, $this_month = FALSE, $today = FALSE) {
905
+
906
+		$EVT_ID = ! empty($this->_req_data['event_id']) && $this->_req_data['event_id'] > 0 ? absint($this->_req_data['event_id']) : FALSE;
907
+		$CAT_ID = ! empty($this->_req_data['EVT_CAT']) && (int) $this->_req_data['EVT_CAT'] > 0 ? absint($this->_req_data['EVT_CAT']) : FALSE;
908
+		$reg_status = ! empty($this->_req_data['_reg_status']) ? sanitize_text_field($this->_req_data['_reg_status']) : FALSE;
909
+		$month_range = ! empty($this->_req_data['month_range']) ? sanitize_text_field($this->_req_data['month_range']) : FALSE; //should be like 2013-april
910
+		$today_a = ! empty($this->_req_data['status']) && $this->_req_data['status'] == 'today' ? TRUE : FALSE;
911
+		$this_month_a = ! empty($this->_req_data['status']) && $this->_req_data['status'] == 'month' ? TRUE : FALSE;
912 912
 		$start_date = FALSE;
913 913
 		$end_date = FALSE;
914 914
 		$_where = array();
915
-		$trash = ! empty( $this->_req_data['status'] ) && $this->_req_data['status'] == 'trash' ? TRUE : FALSE;
916
-		$incomplete = ! empty( $this->_req_data['status'] ) && $this->_req_data['status'] == 'incomplete' ? TRUE : FALSE;
915
+		$trash = ! empty($this->_req_data['status']) && $this->_req_data['status'] == 'trash' ? TRUE : FALSE;
916
+		$incomplete = ! empty($this->_req_data['status']) && $this->_req_data['status'] == 'incomplete' ? TRUE : FALSE;
917 917
 
918 918
 		//set orderby
919 919
 		$this->_req_data['orderby'] = ! empty($this->_req_data['orderby']) ? $this->_req_data['orderby'] : '';
920 920
 
921 921
 
922
-		switch ( $this->_req_data['orderby'] ) {
922
+		switch ($this->_req_data['orderby']) {
923 923
 			case '_REG_ID':
924 924
 				$orderby = 'REG_ID';
925 925
 				break;
@@ -939,26 +939,26 @@  discard block
 block discarded – undo
939 939
 				$orderby = 'REG_date';
940 940
 		}
941 941
 
942
-		$sort = ( isset( $this->_req_data['order'] ) && ! empty( $this->_req_data['order'] )) ? $this->_req_data['order'] : 'DESC';
943
-		$current_page = isset( $this->_req_data['paged'] ) && !empty( $this->_req_data['paged'] ) ? $this->_req_data['paged'] : 1;
944
-		$per_page = isset( $this->_req_data['perpage'] ) && !empty( $this->_req_data['perpage'] ) ? $this->_req_data['perpage'] : $per_page;
942
+		$sort = (isset($this->_req_data['order']) && ! empty($this->_req_data['order'])) ? $this->_req_data['order'] : 'DESC';
943
+		$current_page = isset($this->_req_data['paged']) && ! empty($this->_req_data['paged']) ? $this->_req_data['paged'] : 1;
944
+		$per_page = isset($this->_req_data['perpage']) && ! empty($this->_req_data['perpage']) ? $this->_req_data['perpage'] : $per_page;
945 945
 
946 946
 
947
-		$offset = ($current_page-1)*$per_page;
948
-		$limit = $count  ? NULL : array( $offset, $per_page );
947
+		$offset = ($current_page - 1) * $per_page;
948
+		$limit = $count ? NULL : array($offset, $per_page);
949 949
 
950
-		if($EVT_ID){
951
-			$_where['EVT_ID']=$EVT_ID;
950
+		if ($EVT_ID) {
951
+			$_where['EVT_ID'] = $EVT_ID;
952 952
 		}
953
-		if($CAT_ID){
953
+		if ($CAT_ID) {
954 954
 			$_where['Event.Term_Taxonomy.term_id'] = $CAT_ID;
955 955
 		}
956
-		if ( $incomplete ) {
956
+		if ($incomplete) {
957 957
 			$_where['STS_ID'] = EEM_Registration::status_id_incomplete;
958 958
 		} else if ( ! $trash) {
959
-			$_where['STS_ID'] = array( '!=', EEM_Registration::status_id_incomplete );
959
+			$_where['STS_ID'] = array('!=', EEM_Registration::status_id_incomplete);
960 960
 		}
961
-		if($reg_status){
961
+		if ($reg_status) {
962 962
 			$_where['STS_ID'] = $reg_status;
963 963
 		}
964 964
 
@@ -970,105 +970,105 @@  discard block
 block discarded – undo
970 970
 		$time_start = ' 00:00:00';
971 971
 		$time_end = ' 23:59:59';
972 972
 
973
-		if($today_a || $today ){
973
+		if ($today_a || $today) {
974 974
 			$curdate = date('Y-m-d', current_time('timestamp'));
975
-			$_where['REG_date']= array('BETWEEN',
975
+			$_where['REG_date'] = array('BETWEEN',
976 976
 				array(
977
-					EEM_Registration::instance()->convert_datetime_for_query( 'REG_date', $curdate . $time_start, 'Y-m-d H:i:s' ),
978
-					EEM_Registration::instance()->convert_datetime_for_query( 'REG_date', $curdate . $time_end, 'Y-m-d H:i:s' ),
977
+					EEM_Registration::instance()->convert_datetime_for_query('REG_date', $curdate.$time_start, 'Y-m-d H:i:s'),
978
+					EEM_Registration::instance()->convert_datetime_for_query('REG_date', $curdate.$time_end, 'Y-m-d H:i:s'),
979 979
 			));
980
-		}elseif($this_month_a || $this_month){
980
+		}elseif ($this_month_a || $this_month) {
981 981
 			$this_month_r = date('m', current_time('timestamp'));
982
-			$days_this_month = date( 't', current_time('timestamp') );
983
-			$_where['REG_date']= array('BETWEEN',
982
+			$days_this_month = date('t', current_time('timestamp'));
983
+			$_where['REG_date'] = array('BETWEEN',
984 984
 				array(
985
-					EEM_Registration::instance()->convert_datetime_for_query( 'REG_date', $this_year_r . '-' . $this_month_r . '-01' . ' ' . $time_start, 'Y-m-d H:i:s' ),
986
-					EEM_Registration::instance()->convert_datetime_for_query( 'REG_date', $this_year_r . '-' . $this_month_r . '-' . $days_this_month . ' ' . $time_end, 'Y-m-d H:i:s' )
985
+					EEM_Registration::instance()->convert_datetime_for_query('REG_date', $this_year_r.'-'.$this_month_r.'-01'.' '.$time_start, 'Y-m-d H:i:s'),
986
+					EEM_Registration::instance()->convert_datetime_for_query('REG_date', $this_year_r.'-'.$this_month_r.'-'.$days_this_month.' '.$time_end, 'Y-m-d H:i:s')
987 987
 			));
988
-		}elseif($month_range){
988
+		}elseif ($month_range) {
989 989
 			$pieces = explode(' ', $this->_req_data['month_range'], 3);
990
-			$month_r = !empty($pieces[0]) ? date('m', strtotime($pieces[0])) : '';
991
-			$year_r = !empty($pieces[1]) ? $pieces[1] : '';
992
-			$days_in_month = date('t', strtotime($year_r .  '-' . $month_r . '-' . '01') );
993
-			$_where['REG_date']= array('BETWEEN',
994
-				array(  EEM_Registration::instance()->convert_datetime_for_query( 'REG_date', $year_r . '-' . $month_r . '-01 00:00:00', 'Y-m-d H:i:s'), EEM_Registration::instance()->convert_datetime_for_query( 'REG_date', $year_r . '-' . $month_r . '-' . $days_in_month .  ' 23:59:59', 'Y-m-d H:i:s' ) ) );
995
-		}elseif($start_date && $end_date){
990
+			$month_r = ! empty($pieces[0]) ? date('m', strtotime($pieces[0])) : '';
991
+			$year_r = ! empty($pieces[1]) ? $pieces[1] : '';
992
+			$days_in_month = date('t', strtotime($year_r.'-'.$month_r.'-'.'01'));
993
+			$_where['REG_date'] = array('BETWEEN',
994
+				array(EEM_Registration::instance()->convert_datetime_for_query('REG_date', $year_r.'-'.$month_r.'-01 00:00:00', 'Y-m-d H:i:s'), EEM_Registration::instance()->convert_datetime_for_query('REG_date', $year_r.'-'.$month_r.'-'.$days_in_month.' 23:59:59', 'Y-m-d H:i:s')));
995
+		}elseif ($start_date && $end_date) {
996 996
 			throw new EE_Error("not yet supported");
997
-		}elseif($start_date){
997
+		}elseif ($start_date) {
998 998
 			throw new EE_Error("not yet supported");
999
-		}elseif($end_date){
999
+		}elseif ($end_date) {
1000 1000
 			throw new EE_Error("not yet supported");
1001 1001
 		}
1002 1002
 
1003
-		if ( ! empty( $this->_req_data['s'] ) ) {
1004
-			$sstr = '%' . $this->_req_data['s'] . '%';
1003
+		if ( ! empty($this->_req_data['s'])) {
1004
+			$sstr = '%'.$this->_req_data['s'].'%';
1005 1005
 			$_where['OR'] = array(
1006
-				'Event.EVT_name' => array( 'LIKE', $sstr),
1007
-				'Event.EVT_desc' => array( 'LIKE', $sstr ),
1008
-				'Event.EVT_short_desc' => array( 'LIKE' , $sstr ),
1009
-				'Attendee.ATT_full_name' => array( 'LIKE', $sstr ),
1010
-				'Attendee.ATT_fname' => array( 'LIKE', $sstr ),
1011
-				'Attendee.ATT_lname' => array( 'LIKE', $sstr ),
1012
-				'Attendee.ATT_short_bio' => array( 'LIKE', $sstr ),
1013
-				'Attendee.ATT_email' => array('LIKE', $sstr ),
1014
-				'Attendee.ATT_address' => array( 'LIKE', $sstr ),
1015
-				'Attendee.ATT_address2' => array( 'LIKE', $sstr ),
1016
-				'Attendee.ATT_city' => array( 'LIKE', $sstr ),
1017
-				'REG_final_price' => array( 'LIKE', $sstr ),
1018
-				'REG_code' => array( 'LIKE', $sstr ),
1019
-				'REG_count' => array( 'LIKE' , $sstr ),
1020
-				'REG_group_size' => array( 'LIKE' , $sstr ),
1021
-				'Ticket.TKT_name' => array( 'LIKE', $sstr ),
1022
-				'Ticket.TKT_description' => array( 'LIKE', $sstr ),
1023
-				'Transaction.Payment.PAY_txn_id_chq_nmbr' => array( 'LIKE', $sstr )
1006
+				'Event.EVT_name' => array('LIKE', $sstr),
1007
+				'Event.EVT_desc' => array('LIKE', $sstr),
1008
+				'Event.EVT_short_desc' => array('LIKE', $sstr),
1009
+				'Attendee.ATT_full_name' => array('LIKE', $sstr),
1010
+				'Attendee.ATT_fname' => array('LIKE', $sstr),
1011
+				'Attendee.ATT_lname' => array('LIKE', $sstr),
1012
+				'Attendee.ATT_short_bio' => array('LIKE', $sstr),
1013
+				'Attendee.ATT_email' => array('LIKE', $sstr),
1014
+				'Attendee.ATT_address' => array('LIKE', $sstr),
1015
+				'Attendee.ATT_address2' => array('LIKE', $sstr),
1016
+				'Attendee.ATT_city' => array('LIKE', $sstr),
1017
+				'REG_final_price' => array('LIKE', $sstr),
1018
+				'REG_code' => array('LIKE', $sstr),
1019
+				'REG_count' => array('LIKE', $sstr),
1020
+				'REG_group_size' => array('LIKE', $sstr),
1021
+				'Ticket.TKT_name' => array('LIKE', $sstr),
1022
+				'Ticket.TKT_description' => array('LIKE', $sstr),
1023
+				'Transaction.Payment.PAY_txn_id_chq_nmbr' => array('LIKE', $sstr)
1024 1024
 				);
1025 1025
 		}
1026 1026
 
1027 1027
 		//capability checks
1028
-		if ( ! EE_Registry::instance()->CAP->current_user_can('ee_read_others_registrations', 'get_registrations' ) ) {
1028
+		if ( ! EE_Registry::instance()->CAP->current_user_can('ee_read_others_registrations', 'get_registrations')) {
1029 1029
 			$_where['AND'] = array(
1030 1030
 				'Event.EVT_wp_user' => get_current_user_id()
1031 1031
 				);
1032 1032
 		}
1033 1033
 
1034 1034
 
1035
-		if( $count ){
1036
-			if ( $trash ) {
1037
-				return EEM_Registration::instance()->count_deleted( array( $_where ));
1038
-			} else if ( $incomplete ) {
1039
-				return EEM_Registration::instance()->count( array( $_where ));
1035
+		if ($count) {
1036
+			if ($trash) {
1037
+				return EEM_Registration::instance()->count_deleted(array($_where));
1038
+			} else if ($incomplete) {
1039
+				return EEM_Registration::instance()->count(array($_where));
1040 1040
 			} else {
1041
-				return EEM_Registration::instance()->count( array( $_where, 'default_where_conditions' => 'this_model_only' ));
1041
+				return EEM_Registration::instance()->count(array($_where, 'default_where_conditions' => 'this_model_only'));
1042 1042
 			}
1043 1043
 		} else {
1044 1044
 			//make sure we remove default where conditions cause all registrations matching query are returned
1045
-			$query_params = array( $_where, 'order_by' => array( $orderby => $sort ), 'default_where_conditions' => 'this_model_only' );
1046
-			if ( $per_page !== -1 ) {
1045
+			$query_params = array($_where, 'order_by' => array($orderby => $sort), 'default_where_conditions' => 'this_model_only');
1046
+			if ($per_page !== -1) {
1047 1047
 				$query_params['limit'] = $limit;
1048 1048
 			}
1049
-			$registrations =  $trash ? EEM_Registration::instance()->get_all_deleted($query_params) : EEM_Registration::instance()->get_all($query_params);
1049
+			$registrations = $trash ? EEM_Registration::instance()->get_all_deleted($query_params) : EEM_Registration::instance()->get_all($query_params);
1050 1050
 
1051 1051
 
1052
-			if ( $EVT_ID && isset( $registrations[0] ) && $registrations[0] instanceof EE_Registration &&  $registrations[0]->event_obj()) {
1052
+			if ($EVT_ID && isset($registrations[0]) && $registrations[0] instanceof EE_Registration && $registrations[0]->event_obj()) {
1053 1053
 				$first_registration = $registrations[0];
1054 1054
 				//EEH_Debug_Tools::printr( $registrations[0], '$registrations  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
1055 1055
 				$event_name = $first_registration->event_obj()->name();
1056
-				$event_date = $first_registration->date_obj()->start_date_and_time('l F j, Y,', 'g:i:s a');// isset( $registrations[0]->DTT_EVT_start ) ? date( 'l F j, Y,    g:i:s a', $registrations[0]->DTT_EVT_start ) : '';
1056
+				$event_date = $first_registration->date_obj()->start_date_and_time('l F j, Y,', 'g:i:s a'); // isset( $registrations[0]->DTT_EVT_start ) ? date( 'l F j, Y,    g:i:s a', $registrations[0]->DTT_EVT_start ) : '';
1057 1057
 				// edit event link
1058
-				if ( $event_name != '' ) {
1059
-					$edit_event_url = self::add_query_args_and_nonce( array( 'action'=>'edit_event', 'EVT_ID'=>$EVT_ID ), EVENTS_ADMIN_URL );
1060
-					$edit_event_lnk = '<a href="'.$edit_event_url.'" title="' . esc_attr__( 'Edit ', 'event_espresso' ) . $event_name . '">' . __( 'Edit Event', 'event_espresso' ) . '</a>';
1061
-					$event_name .= ' <span class="admin-page-header-edit-lnk not-bold">' . $edit_event_lnk . '</span>' ;
1058
+				if ($event_name != '') {
1059
+					$edit_event_url = self::add_query_args_and_nonce(array('action'=>'edit_event', 'EVT_ID'=>$EVT_ID), EVENTS_ADMIN_URL);
1060
+					$edit_event_lnk = '<a href="'.$edit_event_url.'" title="'.esc_attr__('Edit ', 'event_espresso').$event_name.'">'.__('Edit Event', 'event_espresso').'</a>';
1061
+					$event_name .= ' <span class="admin-page-header-edit-lnk not-bold">'.$edit_event_lnk.'</span>';
1062 1062
 				}
1063 1063
 
1064
-				$back_2_reg_url = self::add_query_args_and_nonce( array( 'action'=>'default' ), REG_ADMIN_URL );
1065
-				$back_2_reg_lnk = '<a href="'.$back_2_reg_url.'" title="' . esc_attr__( 'click to return to viewing all registrations ', 'event_espresso' ) . '">&laquo; ' . __( 'Back to All Registrations', 'event_espresso' ) . '</a>';
1064
+				$back_2_reg_url = self::add_query_args_and_nonce(array('action'=>'default'), REG_ADMIN_URL);
1065
+				$back_2_reg_lnk = '<a href="'.$back_2_reg_url.'" title="'.esc_attr__('click to return to viewing all registrations ', 'event_espresso').'">&laquo; '.__('Back to All Registrations', 'event_espresso').'</a>';
1066 1066
 
1067 1067
 				$this->_template_args['before_admin_page_content'] = '
1068 1068
 			<div id="admin-page-header">
1069
-				<h1><span class="small-text not-bold">'.__( 'Event: ', 'event_espresso' ).'</span>'. $event_name .'</h1>
1070
-				<h3><span class="small-text not-bold">'.__( 'Date: ', 'event_espresso' ). '</span>'. $event_date .'</h3>
1071
-				<span class="admin-page-header-go-back-lnk not-bold">' . $back_2_reg_lnk . '</span>
1069
+				<h1><span class="small-text not-bold">'.__('Event: ', 'event_espresso').'</span>'.$event_name.'</h1>
1070
+				<h3><span class="small-text not-bold">'.__('Date: ', 'event_espresso').'</span>'.$event_date.'</h3>
1071
+				<span class="admin-page-header-go-back-lnk not-bold">' . $back_2_reg_lnk.'</span>
1072 1072
 			</div>
1073 1073
 			';
1074 1074
 
@@ -1106,7 +1106,7 @@  discard block
 block discarded – undo
1106 1106
 
1107 1107
 		$this->_set_registration_object();
1108 1108
 
1109
-		if ( is_object( $this->_registration )) {
1109
+		if (is_object($this->_registration)) {
1110 1110
 			$transaction = $this->_registration->transaction() ? $this->_registration->transaction() : EE_Transaction::new_instance();
1111 1111
 			$this->_session = $transaction->session_data();
1112 1112
 
@@ -1114,10 +1114,10 @@  discard block
 block discarded – undo
1114 1114
 
1115 1115
 
1116 1116
 			$this->_template_args['reg_nmbr']['value'] = $this->_registration->ID();
1117
-			$this->_template_args['reg_nmbr']['label'] = __( 'Registration Number', 'event_espresso' );
1117
+			$this->_template_args['reg_nmbr']['label'] = __('Registration Number', 'event_espresso');
1118 1118
 
1119
-			$this->_template_args['reg_datetime']['value'] =  $this->_registration->pretty_date('l F j, Y','g:i:s a') ;
1120
-			$this->_template_args['reg_datetime']['label'] = __( 'Date', 'event_espresso' );
1119
+			$this->_template_args['reg_datetime']['value'] = $this->_registration->pretty_date('l F j, Y', 'g:i:s a');
1120
+			$this->_template_args['reg_datetime']['label'] = __('Date', 'event_espresso');
1121 1121
 
1122 1122
 			$this->_template_args['grand_total'] = $transaction->total();
1123 1123
 
@@ -1125,19 +1125,19 @@  discard block
 block discarded – undo
1125 1125
 			// link back to overview
1126 1126
 			$this->_template_args['reg_overview_url'] = REG_ADMIN_URL;
1127 1127
 			$this->_template_args['registration'] = $this->_registration;
1128
-			$this->_template_args['filtered_registrations_link'] = EE_Admin_Page::add_query_args_and_nonce( array( 'action' => 'default', 'event_id' => $event_id ), REG_ADMIN_URL );
1129
-			$this->_template_args['filtered_transactions_link'] = EE_Admin_Page::add_query_args_and_nonce( array( 'action' => 'default', 'EVT_ID' => $event_id, 'page' => 'espresso_transactions' ), admin_url( 'admin.php' ) );
1130
-			$this->_template_args['event_link'] = EE_Admin_Page::add_query_args_and_nonce( array( 'page' => 'espresso_events', 'action' => 'edit', 'post' => $event_id ), admin_url( 'admin.php' ) );
1128
+			$this->_template_args['filtered_registrations_link'] = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'default', 'event_id' => $event_id), REG_ADMIN_URL);
1129
+			$this->_template_args['filtered_transactions_link'] = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'default', 'EVT_ID' => $event_id, 'page' => 'espresso_transactions'), admin_url('admin.php'));
1130
+			$this->_template_args['event_link'] = EE_Admin_Page::add_query_args_and_nonce(array('page' => 'espresso_events', 'action' => 'edit', 'post' => $event_id), admin_url('admin.php'));
1131 1131
 
1132 1132
 			//next and previous links
1133
-			$next_reg = $this->_registration->next(null, array(), 'REG_ID' );
1134
-			$this->_template_args['next_registration'] = $next_reg ? $this->_next_link( EE_Admin_Page::add_query_args_and_nonce( array( 'action' => 'view_registration', '_REG_ID' => $next_reg['REG_ID'] ), REG_ADMIN_URL ), 'dashicons dashicons-arrow-right ee-icon-size-22' ) : '';
1135
-			$previous_reg = $this->_registration->previous( null, array(), 'REG_ID' );
1136
-			$this->_template_args['previous_registration'] = $previous_reg ? $this->_previous_link( EE_Admin_Page::add_query_args_and_nonce( array( 'action' => 'view_registration', '_REG_ID' => $previous_reg['REG_ID'] ), REG_ADMIN_URL ), 'dashicons dashicons-arrow-left ee-icon-size-22' ) : '';
1133
+			$next_reg = $this->_registration->next(null, array(), 'REG_ID');
1134
+			$this->_template_args['next_registration'] = $next_reg ? $this->_next_link(EE_Admin_Page::add_query_args_and_nonce(array('action' => 'view_registration', '_REG_ID' => $next_reg['REG_ID']), REG_ADMIN_URL), 'dashicons dashicons-arrow-right ee-icon-size-22') : '';
1135
+			$previous_reg = $this->_registration->previous(null, array(), 'REG_ID');
1136
+			$this->_template_args['previous_registration'] = $previous_reg ? $this->_previous_link(EE_Admin_Page::add_query_args_and_nonce(array('action' => 'view_registration', '_REG_ID' => $previous_reg['REG_ID']), REG_ADMIN_URL), 'dashicons dashicons-arrow-left ee-icon-size-22') : '';
1137 1137
 
1138 1138
 			// grab header
1139
-			$template_path = REG_TEMPLATE_PATH . 'reg_admin_details_header.template.php';
1140
-			$this->_template_args['admin_page_header'] = EEH_Template::display_template( $template_path, $this->_template_args, TRUE );
1139
+			$template_path = REG_TEMPLATE_PATH.'reg_admin_details_header.template.php';
1140
+			$this->_template_args['admin_page_header'] = EEH_Template::display_template($template_path, $this->_template_args, TRUE);
1141 1141
 
1142 1142
 		} else {
1143 1143
 
@@ -1156,17 +1156,17 @@  discard block
 block discarded – undo
1156 1156
 
1157 1157
 
1158 1158
 	protected function _registration_details_metaboxes() {
1159
-		do_action( 'AHEE__Registrations_Admin_Page___registration_details_metabox__start', $this );
1159
+		do_action('AHEE__Registrations_Admin_Page___registration_details_metabox__start', $this);
1160 1160
 		$this->_set_registration_object();
1161 1161
 		$attendee = $this->_registration instanceof EE_Registration ? $this->_registration->attendee() : null;
1162
-		add_meta_box( 'edit-reg-status-mbox', __( 'Registration Status', 'event_espresso' ), array( $this, 'set_reg_status_buttons_metabox' ), $this->wp_page_slug, 'normal', 'high' );
1163
-		add_meta_box( 'edit-reg-details-mbox', __( 'Registration Details', 'event_espresso' ), array( $this, '_reg_details_meta_box' ), $this->wp_page_slug, 'normal', 'high' );
1164
-		if ( $attendee instanceof EE_Attendee && EE_Registry::instance()->CAP->current_user_can('ee_edit_registration', 'edit-reg-questions-mbox' ) ) {
1165
-			add_meta_box( 'edit-reg-questions-mbox', __( 'Registration Form Answers', 'event_espresso' ), array( $this, '_reg_questions_meta_box' ), $this->wp_page_slug, 'normal', 'high' );
1162
+		add_meta_box('edit-reg-status-mbox', __('Registration Status', 'event_espresso'), array($this, 'set_reg_status_buttons_metabox'), $this->wp_page_slug, 'normal', 'high');
1163
+		add_meta_box('edit-reg-details-mbox', __('Registration Details', 'event_espresso'), array($this, '_reg_details_meta_box'), $this->wp_page_slug, 'normal', 'high');
1164
+		if ($attendee instanceof EE_Attendee && EE_Registry::instance()->CAP->current_user_can('ee_edit_registration', 'edit-reg-questions-mbox')) {
1165
+			add_meta_box('edit-reg-questions-mbox', __('Registration Form Answers', 'event_espresso'), array($this, '_reg_questions_meta_box'), $this->wp_page_slug, 'normal', 'high');
1166 1166
 		}
1167
-		add_meta_box( 'edit-reg-registrant-mbox', __( 'Contact Details', 'event_espresso' ), array( $this, '_reg_registrant_side_meta_box' ), $this->wp_page_slug, 'side', 'high' );
1168
-		if ( $this->_registration->group_size() > 1 ) {
1169
-			add_meta_box( 'edit-reg-attendees-mbox', __( 'Other Registrations in this Transaction', 'event_espresso' ), array( $this, '_reg_attendees_meta_box' ), $this->wp_page_slug, 'normal', 'high' );
1167
+		add_meta_box('edit-reg-registrant-mbox', __('Contact Details', 'event_espresso'), array($this, '_reg_registrant_side_meta_box'), $this->wp_page_slug, 'side', 'high');
1168
+		if ($this->_registration->group_size() > 1) {
1169
+			add_meta_box('edit-reg-attendees-mbox', __('Other Registrations in this Transaction', 'event_espresso'), array($this, '_reg_attendees_meta_box'), $this->wp_page_slug, 'normal', 'high');
1170 1170
 		}
1171 1171
 	}
1172 1172
 
@@ -1187,23 +1187,23 @@  discard block
 block discarded – undo
1187 1187
 
1188 1188
 		//let's get an array of all possible buttons that we can just reference
1189 1189
 		$status_buttons = $this->_get_reg_status_buttons();
1190
-		$template_args[ 'reg_status_value' ] = $this->_registration->pretty_status();
1191
-		$template_args[ 'reg_status_class' ] = 'status-' . $this->_registration->status_ID();
1190
+		$template_args['reg_status_value'] = $this->_registration->pretty_status();
1191
+		$template_args['reg_status_class'] = 'status-'.$this->_registration->status_ID();
1192 1192
 		$template_args['attendee'] = $this->_registration->attendee();
1193
-		$template = REG_TEMPLATE_PATH . 'reg_status_change_buttons.template.php';
1194
-		if ( $this->_set_registration_object() ) {
1193
+		$template = REG_TEMPLATE_PATH.'reg_status_change_buttons.template.php';
1194
+		if ($this->_set_registration_object()) {
1195 1195
 			$current_status = $this->_registration->status_ID();
1196
-			unset( $status_buttons[$current_status] );
1197
-			if ( $current_status != EEM_Registration::status_id_pending_payment && $is_complete ) {
1198
-				unset( $status_buttons[EEM_Registration::status_id_pending_payment] );
1196
+			unset($status_buttons[$current_status]);
1197
+			if ($current_status != EEM_Registration::status_id_pending_payment && $is_complete) {
1198
+				unset($status_buttons[EEM_Registration::status_id_pending_payment]);
1199 1199
 			}
1200
-			$template_args['status_buttons'] = implode( "\n", $status_buttons );
1200
+			$template_args['status_buttons'] = implode("\n", $status_buttons);
1201 1201
 		}
1202 1202
 		$template_args['form_url'] = REG_ADMIN_URL;
1203 1203
 		$template_args['REG_ID'] = $this->_registration->ID();
1204
-		$template_args['nonce'] = wp_nonce_field( 'change_reg_status_nonce',  'change_reg_status_nonce', FALSE, FALSE );
1204
+		$template_args['nonce'] = wp_nonce_field('change_reg_status_nonce', 'change_reg_status_nonce', FALSE, FALSE);
1205 1205
 
1206
-		EEH_Template::display_template( $template, $template_args );
1206
+		EEH_Template::display_template($template, $template_args);
1207 1207
 
1208 1208
 	}
1209 1209
 
@@ -1217,11 +1217,11 @@  discard block
 block discarded – undo
1217 1217
 	private function _get_reg_status_buttons() {
1218 1218
 
1219 1219
 		$buttons = array(
1220
-			EEM_Registration::status_id_approved => '<input type="submit" name="_reg_status_id" class="button-secondary ee-status-strip reg-status-' . EEM_Registration::status_id_approved . '" value="' . EEH_Template::pretty_status( EEM_Registration::status_id_approved, FALSE, 'sentence' ) . '">',
1221
-			EEM_Registration::status_id_pending_payment => '<input type="submit" name="_reg_status_id" class="button-secondary ee-status-strip reg-status-' . EEM_Registration::status_id_pending_payment . '" value="' . EEH_Template::pretty_status( EEM_Registration::status_id_pending_payment, FALSE, 'sentence' ) . '">',
1222
-			EEM_Registration::status_id_not_approved => '<input type="submit" name="_reg_status_id" class="button-secondary ee-status-strip reg-status-' . EEM_Registration::status_id_not_approved . '" value="' . EEH_Template::pretty_status( EEM_Registration::status_id_not_approved, FALSE, 'sentence' ) . '">',
1223
-			EEM_Registration::status_id_declined => '<input type="submit" name="_reg_status_id" class="button-secondary ee-status-strip reg-status-' . EEM_Registration::status_id_declined . '" value="' . EEH_Template::pretty_status( EEM_Registration::status_id_declined, FALSE, 'sentence' ) . '">',
1224
-			EEM_Registration::status_id_cancelled =>'<input type="submit" name="_reg_status_id" class="button-secondary ee-status-strip reg-status-' . EEM_Registration::status_id_cancelled . '" value="' . EEH_Template::pretty_status( EEM_Registration::status_id_cancelled, FALSE, 'sentence' ) . '">',
1220
+			EEM_Registration::status_id_approved => '<input type="submit" name="_reg_status_id" class="button-secondary ee-status-strip reg-status-'.EEM_Registration::status_id_approved.'" value="'.EEH_Template::pretty_status(EEM_Registration::status_id_approved, FALSE, 'sentence').'">',
1221
+			EEM_Registration::status_id_pending_payment => '<input type="submit" name="_reg_status_id" class="button-secondary ee-status-strip reg-status-'.EEM_Registration::status_id_pending_payment.'" value="'.EEH_Template::pretty_status(EEM_Registration::status_id_pending_payment, FALSE, 'sentence').'">',
1222
+			EEM_Registration::status_id_not_approved => '<input type="submit" name="_reg_status_id" class="button-secondary ee-status-strip reg-status-'.EEM_Registration::status_id_not_approved.'" value="'.EEH_Template::pretty_status(EEM_Registration::status_id_not_approved, FALSE, 'sentence').'">',
1223
+			EEM_Registration::status_id_declined => '<input type="submit" name="_reg_status_id" class="button-secondary ee-status-strip reg-status-'.EEM_Registration::status_id_declined.'" value="'.EEH_Template::pretty_status(EEM_Registration::status_id_declined, FALSE, 'sentence').'">',
1224
+			EEM_Registration::status_id_cancelled =>'<input type="submit" name="_reg_status_id" class="button-secondary ee-status-strip reg-status-'.EEM_Registration::status_id_cancelled.'" value="'.EEH_Template::pretty_status(EEM_Registration::status_id_cancelled, FALSE, 'sentence').'">',
1225 1225
 			);
1226 1226
 		return $buttons;
1227 1227
 	}
@@ -1235,13 +1235,13 @@  discard block
 block discarded – undo
1235 1235
 	 *
1236 1236
 	 * @return array  (array with reg_id(s) updated and whether update was successful.
1237 1237
 	 */
1238
-	protected function _set_registration_status_from_request( $status = false, $notify = false ) {
1239
-		$REG_ID = isset( $this->_req_data['_REG_ID'] ) ? (array) $this->_req_data['_REG_ID'] : array();
1238
+	protected function _set_registration_status_from_request($status = false, $notify = false) {
1239
+		$REG_ID = isset($this->_req_data['_REG_ID']) ? (array) $this->_req_data['_REG_ID'] : array();
1240 1240
 
1241
-		$success = $this->_set_registration_status( $REG_ID, $status );
1241
+		$success = $this->_set_registration_status($REG_ID, $status);
1242 1242
 
1243 1243
 		//notify?
1244
-		if ( $success && $notify && EE_Registry::instance()->CAP->current_user_can( 'ee_send_message', 'espresso_registrations_resend_registration' ) ) {
1244
+		if ($success && $notify && EE_Registry::instance()->CAP->current_user_can('ee_send_message', 'espresso_registrations_resend_registration')) {
1245 1245
 			$this->_process_resend_registration();
1246 1246
 		}
1247 1247
 
@@ -1259,19 +1259,19 @@  discard block
 block discarded – undo
1259 1259
 	 * @param bool $status
1260 1260
 	 * @return array (an array with 'success' key representing whether status change was successful, and 'REG_ID' as the array of updated registrations).
1261 1261
 	 */
1262
-	protected function _set_registration_status( $REG_ID, $status = false ) {
1262
+	protected function _set_registration_status($REG_ID, $status = false) {
1263 1263
 		$success = true;
1264 1264
 		// set default status if none is passed
1265 1265
 		$status = $status ? $status : EEM_Registration::status_id_pending_payment;
1266 1266
 
1267 1267
 		//typecast and sanitize reg_id
1268
-		$reg_ids = array_filter( (array) $REG_ID, 'absint' );
1268
+		$reg_ids = array_filter((array) $REG_ID, 'absint');
1269 1269
 
1270 1270
 		//loop through REG_ID's and change status
1271
-		foreach ( $reg_ids as $r_id ) {
1272
-			$registration = EEM_Registration::instance()->get_one_by_ID( $r_id );
1273
-			if ( $registration instanceof EE_Registration ) {
1274
-				$registration->set_status( $status );
1271
+		foreach ($reg_ids as $r_id) {
1272
+			$registration = EEM_Registration::instance()->get_one_by_ID($r_id);
1273
+			if ($registration instanceof EE_Registration) {
1274
+				$registration->set_status($status);
1275 1275
 				$result = $registration->save();
1276 1276
 
1277 1277
 				//verifying explicit fails because update *may* just return 0 for 0 rows affected
@@ -1283,7 +1283,7 @@  discard block
 block discarded – undo
1283 1283
 		$this->_req_data['_REG_ID'] = $reg_ids;
1284 1284
 
1285 1285
 		//return $success and processed registrations
1286
-		return array( 'REG_ID' => $reg_ids, 'success' => $success );
1286
+		return array('REG_ID' => $reg_ids, 'success' => $success);
1287 1287
 	}
1288 1288
 
1289 1289
 
@@ -1295,37 +1295,37 @@  discard block
 block discarded – undo
1295 1295
 	 * @param   bool    $notify indicates whether the _set_registration_status_from_request does notifications or not.
1296 1296
 	 * @return void
1297 1297
 	 */
1298
-	protected function _reg_status_change_return( $STS_ID, $notify = false ) {
1298
+	protected function _reg_status_change_return($STS_ID, $notify = false) {
1299 1299
 
1300
-		$result = ! empty( $STS_ID ) ? $this->_set_registration_status_from_request( $STS_ID, $notify ) : array( 'success' => false );
1300
+		$result = ! empty($STS_ID) ? $this->_set_registration_status_from_request($STS_ID, $notify) : array('success' => false);
1301 1301
 
1302 1302
 
1303
-		$success = isset( $result['success'] ) && $result['success'];
1303
+		$success = isset($result['success']) && $result['success'];
1304 1304
 
1305 1305
 		//setup success message
1306
-		if ( $success ) {
1307
-			$msg = is_array( $result['REG_ID'] ) && count( $result['REG_ID'] ) > 1  ? sprintf( __('Registration status has been set to %s', 'event_espresso'), EEH_Template::pretty_status($STS_ID, false, 'lower' ) ) :  sprintf( __('Registrations have been set to %s.', 'event_espresso'), EEH_Template::pretty_status($STS_ID, false, 'lower' ) ) ;
1308
-			EE_Error::add_success( $msg );
1306
+		if ($success) {
1307
+			$msg = is_array($result['REG_ID']) && count($result['REG_ID']) > 1 ? sprintf(__('Registration status has been set to %s', 'event_espresso'), EEH_Template::pretty_status($STS_ID, false, 'lower')) : sprintf(__('Registrations have been set to %s.', 'event_espresso'), EEH_Template::pretty_status($STS_ID, false, 'lower'));
1308
+			EE_Error::add_success($msg);
1309 1309
 		} else {
1310
-			EE_Error::add_error( __('Something went wrong, and the status was not changed', 'event_espresso' ), __FILE__, __LINE__, __FUNCTION__ );
1310
+			EE_Error::add_error(__('Something went wrong, and the status was not changed', 'event_espresso'), __FILE__, __LINE__, __FUNCTION__);
1311 1311
 		}
1312 1312
 
1313
-		$route = isset( $this->_req_data['return'] ) && $this->_req_data['return'] == 'view_registration' ? array( 'action' => 'view_registration', '_REG_ID' => $result['REG_ID'][0] ) : array( 'action' => 'default' );
1313
+		$route = isset($this->_req_data['return']) && $this->_req_data['return'] == 'view_registration' ? array('action' => 'view_registration', '_REG_ID' => $result['REG_ID'][0]) : array('action' => 'default');
1314 1314
 		//unset nonces
1315
-		foreach ( $this->_req_data as $ref => $value ) {
1316
-			if ( strpos( $ref, 'nonce' ) !== false ) {
1317
-				unset( $this->_req_data[$ref] );
1315
+		foreach ($this->_req_data as $ref => $value) {
1316
+			if (strpos($ref, 'nonce') !== false) {
1317
+				unset($this->_req_data[$ref]);
1318 1318
 				continue;
1319 1319
 			}
1320 1320
 
1321
-			$value = is_array( $value ) ? array_map( 'urlencode', $value ) : urlencode( $value );
1321
+			$value = is_array($value) ? array_map('urlencode', $value) : urlencode($value);
1322 1322
 			$this->_req_data[$ref] = $value;
1323 1323
 		}
1324 1324
 
1325 1325
 		//merge request vars so that the reloaded list table contains any existing filter query params
1326
-		$route = array_merge( $this->_req_data, $route );
1326
+		$route = array_merge($this->_req_data, $route);
1327 1327
 
1328
-		$this->_redirect_after_action( false, '', '', $route, true );
1328
+		$this->_redirect_after_action(false, '', '', $route, true);
1329 1329
 	}
1330 1330
 
1331 1331
 
@@ -1337,29 +1337,29 @@  discard block
 block discarded – undo
1337 1337
 	protected function _change_reg_status() {
1338 1338
 		$this->_req_data['return'] = 'view_registration';
1339 1339
 		//set notify based on whether the send notifications toggle is set or not
1340
-		$notify = ! empty( $this->_req_data['txn_reg_status_change']['send_notifications'] );
1341
-		$this->_req_data[ '_reg_status_id' ] = isset( $this->_req_data[ '_reg_status_id' ] ) ? $this->_req_data[ '_reg_status_id' ] : '';
1340
+		$notify = ! empty($this->_req_data['txn_reg_status_change']['send_notifications']);
1341
+		$this->_req_data['_reg_status_id'] = isset($this->_req_data['_reg_status_id']) ? $this->_req_data['_reg_status_id'] : '';
1342 1342
 
1343
-		switch ( $this->_req_data['_reg_status_id'] ) {
1344
-			case EEH_Template::pretty_status( EEM_Registration::status_id_approved, false, 'sentence' ) :
1345
-				$this->approve_registration( $notify );
1343
+		switch ($this->_req_data['_reg_status_id']) {
1344
+			case EEH_Template::pretty_status(EEM_Registration::status_id_approved, false, 'sentence') :
1345
+				$this->approve_registration($notify);
1346 1346
 				break;
1347
-			case EEH_Template::pretty_status( EEM_Registration::status_id_pending_payment, false, 'sentence' ) :
1348
-				$this->pending_registration( $notify );
1347
+			case EEH_Template::pretty_status(EEM_Registration::status_id_pending_payment, false, 'sentence') :
1348
+				$this->pending_registration($notify);
1349 1349
 				break;
1350
-			case EEH_Template::pretty_status( EEM_Registration::status_id_not_approved, false, 'sentence' ) :
1351
-				$this->not_approve_registration( $notify );
1350
+			case EEH_Template::pretty_status(EEM_Registration::status_id_not_approved, false, 'sentence') :
1351
+				$this->not_approve_registration($notify);
1352 1352
 				break;
1353
-			case EEH_Template::pretty_status( EEM_Registration::status_id_declined, false, 'sentence' ) :
1354
-				$this->decline_registration( $notify );
1353
+			case EEH_Template::pretty_status(EEM_Registration::status_id_declined, false, 'sentence') :
1354
+				$this->decline_registration($notify);
1355 1355
 				break;
1356
-			case EEH_Template::pretty_status( EEM_Registration::status_id_cancelled, false, 'sentence' ) :
1357
-				$this->cancel_registration( $notify );
1356
+			case EEH_Template::pretty_status(EEM_Registration::status_id_cancelled, false, 'sentence') :
1357
+				$this->cancel_registration($notify);
1358 1358
 				break;
1359 1359
 			default :
1360 1360
 				$result['success'] = false;
1361
-				unset( $this->_req_data['return'] );
1362
-				$this->_reg_status_change_return( '', false );
1361
+				unset($this->_req_data['return']);
1362
+				$this->_reg_status_change_return('', false);
1363 1363
 				break;
1364 1364
 		}
1365 1365
 	}
@@ -1372,8 +1372,8 @@  discard block
 block discarded – undo
1372 1372
 	*		@param bool $notify whether or not to notify the registrant about their approval.
1373 1373
 	*		@return void
1374 1374
 	*/
1375
-	protected function approve_registration( $notify = false ) {
1376
-		$this->_reg_status_change_return( EEM_Registration::status_id_approved, $notify );
1375
+	protected function approve_registration($notify = false) {
1376
+		$this->_reg_status_change_return(EEM_Registration::status_id_approved, $notify);
1377 1377
 	}
1378 1378
 
1379 1379
 
@@ -1385,8 +1385,8 @@  discard block
 block discarded – undo
1385 1385
 	*		@param bool $notify whether or not to notify the registrant about their approval.
1386 1386
 	*		@return void
1387 1387
 	*/
1388
-	protected function decline_registration( $notify = false ) {
1389
-		$this->_reg_status_change_return( EEM_Registration::status_id_declined, $notify );
1388
+	protected function decline_registration($notify = false) {
1389
+		$this->_reg_status_change_return(EEM_Registration::status_id_declined, $notify);
1390 1390
 	}
1391 1391
 
1392 1392
 
@@ -1398,8 +1398,8 @@  discard block
 block discarded – undo
1398 1398
 	*		@param bool $notify whether or not to notify the registrant about their approval.
1399 1399
 	*		@return void
1400 1400
 	*/
1401
-	protected function cancel_registration( $notify = false ) {
1402
-		$this->_reg_status_change_return( EEM_Registration::status_id_cancelled, $notify );
1401
+	protected function cancel_registration($notify = false) {
1402
+		$this->_reg_status_change_return(EEM_Registration::status_id_cancelled, $notify);
1403 1403
 	}
1404 1404
 
1405 1405
 
@@ -1412,8 +1412,8 @@  discard block
 block discarded – undo
1412 1412
 	*		@param bool $notify whether or not to notify the registrant about their approval.
1413 1413
 	*		@return void
1414 1414
 	*/
1415
-	protected function not_approve_registration( $notify = false ) {
1416
-		$this->_reg_status_change_return( EEM_Registration::status_id_not_approved, $notify );
1415
+	protected function not_approve_registration($notify = false) {
1416
+		$this->_reg_status_change_return(EEM_Registration::status_id_not_approved, $notify);
1417 1417
 	}
1418 1418
 
1419 1419
 
@@ -1424,8 +1424,8 @@  discard block
 block discarded – undo
1424 1424
 	*		@param bool $notify whether or not to notify the registrant about their approval.
1425 1425
 	*		@return void
1426 1426
 	*/
1427
-	protected function pending_registration( $notify = false ) {
1428
-		$this->_reg_status_change_return( EEM_Registration::status_id_pending_payment, $notify );
1427
+	protected function pending_registration($notify = false) {
1428
+		$this->_reg_status_change_return(EEM_Registration::status_id_pending_payment, $notify);
1429 1429
 	}
1430 1430
 
1431 1431
 
@@ -1439,75 +1439,75 @@  discard block
 block discarded – undo
1439 1439
 	public function _reg_details_meta_box() {
1440 1440
 		EEH_Autoloader::register_line_item_display_autoloaders();
1441 1441
 		EEH_Autoloader::register_line_item_filter_autoloaders();
1442
-		EE_Registry::instance()->load_Helper( 'Line_Item' );
1442
+		EE_Registry::instance()->load_Helper('Line_Item');
1443 1443
 		$transaction = $this->_registration->transaction() ? $this->_registration->transaction() : EE_Transaction::new_instance();
1444 1444
 		$this->_session = $transaction->session_data();
1445 1445
 
1446 1446
 		$filters = new EE_Line_Item_Filter_Collection();
1447
-		$filters->add( new EE_Single_Registration_Line_Item_Filter( $this->_registration ) );
1448
-		$filters->add( new EE_Non_Zero_Line_Item_Filter() );
1449
-		$line_item_filter_processor = new EE_Line_Item_Filter_Processor( $filters, $transaction->total_line_item() );
1447
+		$filters->add(new EE_Single_Registration_Line_Item_Filter($this->_registration));
1448
+		$filters->add(new EE_Non_Zero_Line_Item_Filter());
1449
+		$line_item_filter_processor = new EE_Line_Item_Filter_Processor($filters, $transaction->total_line_item());
1450 1450
 		$filtered_line_item_tree = $line_item_filter_processor->process();
1451 1451
 
1452 1452
 		$this->_template_args['REG_ID'] = $this->_registration->ID();
1453
-		$line_item_display = new EE_Line_Item_Display( 'reg_admin_table', 'EE_Admin_Table_Registration_Line_Item_Display_Strategy' );
1454
-		$this->_template_args['line_item_table'] = $line_item_display->display_line_item( $filtered_line_item_tree, array( 'EE_Registration' => $this->_registration ) );
1453
+		$line_item_display = new EE_Line_Item_Display('reg_admin_table', 'EE_Admin_Table_Registration_Line_Item_Display_Strategy');
1454
+		$this->_template_args['line_item_table'] = $line_item_display->display_line_item($filtered_line_item_tree, array('EE_Registration' => $this->_registration));
1455 1455
 
1456 1456
 
1457 1457
 		$attendee = $this->_registration->attendee();
1458 1458
 
1459 1459
 
1460
-		$this->_template_args['view_transaction_button'] = EE_Registry::instance()->CAP->current_user_can( 'ee_read_transaction', 'espresso_transactions_view_transaction' ) ?EEH_Template::get_button_or_link( EE_Admin_Page::add_query_args_and_nonce( array('action'=> 'view_transaction', 'TXN_ID' => $transaction->ID() ), TXN_ADMIN_URL ), __(' View Transaction'), 'button secondary-button right', 'dashicons dashicons-cart' ) : '';
1461
-		$this->_template_args['resend_registration_button'] = $attendee instanceof EE_Attendee && EE_Registry::instance()->CAP->current_user_can( 'ee_send_message', 'espresso_registrations_resend_registration' ) ?EEH_Template::get_button_or_link( EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'resend_registration', '_REG_ID'=>$this->_registration->ID(), 'redirect_to' => 'view_registration' ), REG_ADMIN_URL ), __(' Resend Registration'), 'button secondary-button right', 'dashicons dashicons-email-alt' ) : '';
1460
+		$this->_template_args['view_transaction_button'] = EE_Registry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction') ? EEH_Template::get_button_or_link(EE_Admin_Page::add_query_args_and_nonce(array('action'=> 'view_transaction', 'TXN_ID' => $transaction->ID()), TXN_ADMIN_URL), __(' View Transaction'), 'button secondary-button right', 'dashicons dashicons-cart') : '';
1461
+		$this->_template_args['resend_registration_button'] = $attendee instanceof EE_Attendee && EE_Registry::instance()->CAP->current_user_can('ee_send_message', 'espresso_registrations_resend_registration') ? EEH_Template::get_button_or_link(EE_Admin_Page::add_query_args_and_nonce(array('action'=>'resend_registration', '_REG_ID'=>$this->_registration->ID(), 'redirect_to' => 'view_registration'), REG_ADMIN_URL), __(' Resend Registration'), 'button secondary-button right', 'dashicons dashicons-email-alt') : '';
1462 1462
 
1463 1463
 
1464 1464
 		$this->_template_args['currency_sign'] = EE_Registry::instance()->CFG->currency->sign;
1465
-		$payment = $transaction->get_first_related( 'Payment' );
1465
+		$payment = $transaction->get_first_related('Payment');
1466 1466
 		$payment = ! $payment instanceof EE_Payment ? EE_Payment::new_instance() : $payment;
1467
-		$payment_method = $payment->get_first_related( 'Payment_Method' );
1467
+		$payment_method = $payment->get_first_related('Payment_Method');
1468 1468
 		$payment_method = ! $payment_method instanceof EE_Payment_Method ? EE_Payment_Method::new_instance() : $payment_method;
1469
-		$reg_status_class = 'status-' . $this->_registration->status_ID();
1469
+		$reg_status_class = 'status-'.$this->_registration->status_ID();
1470 1470
 		$reg_details = array(
1471 1471
 			'payment_method' => $payment_method->name(),
1472 1472
 			'response_msg' => $payment->gateway_response(),
1473
-			'registration_id' => $this->_registration->get( 'REG_code' ),
1473
+			'registration_id' => $this->_registration->get('REG_code'),
1474 1474
 			'registration_session' => $this->_registration->session_ID(),
1475
-			'ip_address' => isset( $this->_session['ip_address'] ) ? $this->_session['ip_address'] : '',
1476
-			'user_agent' => isset( $this->_session['user_agent'] ) ? $this->_session['user_agent'] : '',
1475
+			'ip_address' => isset($this->_session['ip_address']) ? $this->_session['ip_address'] : '',
1476
+			'user_agent' => isset($this->_session['user_agent']) ? $this->_session['user_agent'] : '',
1477 1477
 			);
1478 1478
 
1479 1479
 
1480
-		if ( isset( $reg_details['registration_id'] )) {
1480
+		if (isset($reg_details['registration_id'])) {
1481 1481
 			$this->_template_args['reg_details']['registration_id']['value'] = $reg_details['registration_id'];
1482
-			$this->_template_args['reg_details']['registration_id']['label'] = __( 'Registration ID', 'event_espresso' );
1482
+			$this->_template_args['reg_details']['registration_id']['label'] = __('Registration ID', 'event_espresso');
1483 1483
 			$this->_template_args['reg_details']['registration_id']['class'] = 'regular-text';
1484 1484
 		}
1485 1485
 
1486
-		if ( isset( $reg_details['payment_method'] ) ) {
1486
+		if (isset($reg_details['payment_method'])) {
1487 1487
 			$this->_template_args['reg_details']['payment_method']['value'] = $reg_details['payment_method'];
1488
-			$this->_template_args['reg_details']['payment_method']['label'] = __( 'Most Recent Payment Method', 'event_espresso' );
1488
+			$this->_template_args['reg_details']['payment_method']['label'] = __('Most Recent Payment Method', 'event_espresso');
1489 1489
 			$this->_template_args['reg_details']['payment_method']['class'] = 'regular-text';
1490 1490
 			$this->_template_args['reg_details']['response_msg']['value'] = $reg_details['response_msg'];
1491
-			$this->_template_args['reg_details']['response_msg']['label'] = __( 'Payment method response', 'event_espresso' );
1491
+			$this->_template_args['reg_details']['response_msg']['label'] = __('Payment method response', 'event_espresso');
1492 1492
 			$this->_template_args['reg_details']['response_msg']['class'] = 'regular-text';
1493 1493
 		}
1494 1494
 
1495 1495
 		$this->_template_args['reg_details']['registration_session']['value'] = $reg_details['registration_session'];
1496
-		$this->_template_args['reg_details']['registration_session']['label'] = __( 'Registration Session', 'event_espresso' );
1496
+		$this->_template_args['reg_details']['registration_session']['label'] = __('Registration Session', 'event_espresso');
1497 1497
 		$this->_template_args['reg_details']['registration_session']['class'] = 'regular-text';
1498 1498
 
1499 1499
 		$this->_template_args['reg_details']['ip_address']['value'] = $reg_details['ip_address'];
1500
-		$this->_template_args['reg_details']['ip_address']['label'] = __( 'Registration placed from IP', 'event_espresso' );
1500
+		$this->_template_args['reg_details']['ip_address']['label'] = __('Registration placed from IP', 'event_espresso');
1501 1501
 		$this->_template_args['reg_details']['ip_address']['class'] = 'regular-text';
1502 1502
 
1503 1503
 		$this->_template_args['reg_details']['user_agent']['value'] = $reg_details['user_agent'];
1504
-		$this->_template_args['reg_details']['user_agent']['label'] = __( 'Registrant User Agent', 'event_espresso' );
1504
+		$this->_template_args['reg_details']['user_agent']['label'] = __('Registrant User Agent', 'event_espresso');
1505 1505
 		$this->_template_args['reg_details']['user_agent']['class'] = 'large-text';
1506 1506
 
1507
-		$this->_template_args['event_link'] = EE_Admin_Page::add_query_args_and_nonce( array( 'action' => 'default', 'event_id' => $this->_registration->event_ID()), REG_ADMIN_URL );
1507
+		$this->_template_args['event_link'] = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'default', 'event_id' => $this->_registration->event_ID()), REG_ADMIN_URL);
1508 1508
 
1509
-		$template_path = REG_TEMPLATE_PATH . 'reg_admin_details_main_meta_box_reg_details.template.php';
1510
-		echo EEH_Template::display_template( $template_path, $this->_template_args, TRUE );
1509
+		$template_path = REG_TEMPLATE_PATH.'reg_admin_details_main_meta_box_reg_details.template.php';
1510
+		echo EEH_Template::display_template($template_path, $this->_template_args, TRUE);
1511 1511
 
1512 1512
 	}
1513 1513
 
@@ -1521,14 +1521,14 @@  discard block
 block discarded – undo
1521 1521
 	*/
1522 1522
 	public function _reg_questions_meta_box() {
1523 1523
 		//allow someone to override this method entirely
1524
-		if( apply_filters( 'FHEE__Registrations_Admin_Page___reg_questions_meta_box__do_default', true, $this, $this->_registration ) ) {
1525
-			$form = $this->_get_reg_custom_questions_form( $this->_registration->ID() );
1526
-			$this->_template_args[ 'att_questions' ] = count( $form->subforms() ) > 0 ? $form->get_html_and_js() : '';
1524
+		if (apply_filters('FHEE__Registrations_Admin_Page___reg_questions_meta_box__do_default', true, $this, $this->_registration)) {
1525
+			$form = $this->_get_reg_custom_questions_form($this->_registration->ID());
1526
+			$this->_template_args['att_questions'] = count($form->subforms()) > 0 ? $form->get_html_and_js() : '';
1527 1527
 			$this->_template_args['reg_questions_form_action'] = 'edit_registration';
1528 1528
 			$this->_template_args['REG_ID'] = $this->_registration->ID();
1529 1529
 
1530
-			$template_path = REG_TEMPLATE_PATH . 'reg_admin_details_main_meta_box_reg_questions.template.php';
1531
-			echo EEH_Template::display_template( $template_path, $this->_template_args, TRUE );
1530
+			$template_path = REG_TEMPLATE_PATH.'reg_admin_details_main_meta_box_reg_questions.template.php';
1531
+			echo EEH_Template::display_template($template_path, $this->_template_args, TRUE);
1532 1532
 		}
1533 1533
 	}
1534 1534
 
@@ -1542,12 +1542,12 @@  discard block
 block discarded – undo
1542 1542
 	 * @param        string $output
1543 1543
 	 * @return        string
1544 1544
 	 */
1545
-	public function form_before_question_group( $output ) {
1545
+	public function form_before_question_group($output) {
1546 1546
 		EE_Error::doing_it_wrong(
1547
-			__CLASS__ . '::' . __FUNCTION__,
1548
-			__( 'This method would have been protected but was used on a filter callback'
1547
+			__CLASS__.'::'.__FUNCTION__,
1548
+			__('This method would have been protected but was used on a filter callback'
1549 1549
 				. 'so needed to be public. Please discontinue usage as it will be removed soon.',
1550
-				'event_espresso' ),
1550
+				'event_espresso'),
1551 1551
 			'4.8.32.rc.000'
1552 1552
 		);
1553 1553
 		return '
@@ -1566,20 +1566,20 @@  discard block
 block discarded – undo
1566 1566
 	 * @param        string $output
1567 1567
 	 * @return        string
1568 1568
 	 */
1569
-	public function form_after_question_group( $output ) {
1569
+	public function form_after_question_group($output) {
1570 1570
 		EE_Error::doing_it_wrong(
1571
-			__CLASS__ . '::' . __FUNCTION__,
1572
-			__( 'This method would have been protected but was used on a filter callback'
1571
+			__CLASS__.'::'.__FUNCTION__,
1572
+			__('This method would have been protected but was used on a filter callback'
1573 1573
 				. 'so needed to be public. Please discontinue usage as it will be removed soon.',
1574
-				'event_espresso' ),
1574
+				'event_espresso'),
1575 1575
 			'4.8.32.rc.000'
1576 1576
 		);
1577 1577
 		return  '
1578 1578
 			<tr class="hide-if-no-js">
1579 1579
 				<th> </th>
1580 1580
 				<td class="reg-admin-edit-attendee-question-td">
1581
-					<a class="reg-admin-edit-attendee-question-lnk" href="#" title="' . esc_attr__( 'click to edit question', 'event_espresso' ) . '">
1582
-						<span class="reg-admin-edit-question-group-spn lt-grey-txt">' . __( 'edit the above question group', 'event_espresso' ) . '</span>
1581
+					<a class="reg-admin-edit-attendee-question-lnk" href="#" title="' . esc_attr__('click to edit question', 'event_espresso').'">
1582
+						<span class="reg-admin-edit-question-group-spn lt-grey-txt">' . __('edit the above question group', 'event_espresso').'</span>
1583 1583
 						<div class="dashicons dashicons-edit"></div>
1584 1584
 					</a>
1585 1585
 				</td>
@@ -1599,18 +1599,18 @@  discard block
 block discarded – undo
1599 1599
 	 * @param        string $label
1600 1600
 	 * @return        string
1601 1601
 	 */
1602
-	public function form_form_field_label_wrap( $label ) {
1602
+	public function form_form_field_label_wrap($label) {
1603 1603
 		EE_Error::doing_it_wrong(
1604
-			__CLASS__ . '::' . __FUNCTION__,
1605
-			__( 'This method would have been protected but was used on a filter callback'
1604
+			__CLASS__.'::'.__FUNCTION__,
1605
+			__('This method would have been protected but was used on a filter callback'
1606 1606
 				. 'so needed to be public. Please discontinue usage as it will be removed soon.',
1607
-				'event_espresso' ),
1607
+				'event_espresso'),
1608 1608
 			'4.8.32.rc.000'
1609 1609
 		);
1610 1610
 		return '
1611 1611
 			<tr>
1612 1612
 				<th>
1613
-					' . $label  . '
1613
+					' . $label.'
1614 1614
 				</th>';
1615 1615
 	}
1616 1616
 
@@ -1624,17 +1624,17 @@  discard block
 block discarded – undo
1624 1624
 	 * @param        string $input
1625 1625
 	 * @return        string
1626 1626
 	 */
1627
-	public function form_form_field_input__wrap( $input ) {
1627
+	public function form_form_field_input__wrap($input) {
1628 1628
 		EE_Error::doing_it_wrong(
1629
-			__CLASS__ . '::' . __FUNCTION__,
1630
-			__( 'This method would have been protected but was used on a filter callback'
1629
+			__CLASS__.'::'.__FUNCTION__,
1630
+			__('This method would have been protected but was used on a filter callback'
1631 1631
 				. 'so needed to be public. Please discontinue usage as it will be removed soon.',
1632
-				'event_espresso' ),
1632
+				'event_espresso'),
1633 1633
 			'4.8.32.rc.000'
1634 1634
 		);
1635 1635
 		return '
1636 1636
 				<td class="reg-admin-attendee-questions-input-td disabled-input">
1637
-					' . $input . '
1637
+					' . $input.'
1638 1638
 				</td>
1639 1639
 			</tr>';
1640 1640
 	}
@@ -1648,14 +1648,14 @@  discard block
 block discarded – undo
1648 1648
 	 * @return void
1649 1649
 	 */
1650 1650
 	protected function _update_attendee_registration_form() {
1651
-		do_action( 'AHEE__Registrations_Admin_Page___update_attendee_registration_form__start', $this );
1652
-		if( $_SERVER['REQUEST_METHOD'] == 'POST'){
1653
-			$REG_ID = isset( $this->_req_data['_REG_ID'] ) ? absint( $this->_req_data['_REG_ID'] ) : FALSE;
1654
-			$success = $this->_save_reg_custom_questions_form( $REG_ID );
1655
-			if( $success ) {
1651
+		do_action('AHEE__Registrations_Admin_Page___update_attendee_registration_form__start', $this);
1652
+		if ($_SERVER['REQUEST_METHOD'] == 'POST') {
1653
+			$REG_ID = isset($this->_req_data['_REG_ID']) ? absint($this->_req_data['_REG_ID']) : FALSE;
1654
+			$success = $this->_save_reg_custom_questions_form($REG_ID);
1655
+			if ($success) {
1656 1656
 				$what = __('Registration Form', 'event_espresso');
1657
-				$route = $REG_ID ? array( 'action' => 'view_registration', '_REG_ID' => $REG_ID ) : array( 'action' => 'default' );
1658
-				$this->_redirect_after_action( $success, $what, __('updated', 'event_espresso'), $route );
1657
+				$route = $REG_ID ? array('action' => 'view_registration', '_REG_ID' => $REG_ID) : array('action' => 'default');
1658
+				$this->_redirect_after_action($success, $what, __('updated', 'event_espresso'), $route);
1659 1659
 			}
1660 1660
 		}
1661 1661
 	}
@@ -1666,11 +1666,11 @@  discard block
 block discarded – undo
1666 1666
 	 * @param int $REG_ID
1667 1667
 	 * @return EE_Registration_Custom_Questions_Form
1668 1668
 	 */
1669
-	protected function _get_reg_custom_questions_form( $REG_ID ) {
1670
-		if( ! $this->_reg_custom_questions_form ) {
1671
-			require_once( REG_ADMIN . 'form_sections' . DS . 'EE_Registration_Custom_Questions_Form.form.php' );
1672
-			$this->_reg_custom_questions_form = new EE_Registration_Custom_Questions_Form( EEM_Registration::instance()->get_one_by_ID( $REG_ID ) );
1673
-			$this->_reg_custom_questions_form->_construct_finalize( null, null );
1669
+	protected function _get_reg_custom_questions_form($REG_ID) {
1670
+		if ( ! $this->_reg_custom_questions_form) {
1671
+			require_once(REG_ADMIN.'form_sections'.DS.'EE_Registration_Custom_Questions_Form.form.php');
1672
+			$this->_reg_custom_questions_form = new EE_Registration_Custom_Questions_Form(EEM_Registration::instance()->get_one_by_ID($REG_ID));
1673
+			$this->_reg_custom_questions_form->_construct_finalize(null, null);
1674 1674
 		}
1675 1675
 		return $this->_reg_custom_questions_form;
1676 1676
 	}
@@ -1683,17 +1683,17 @@  discard block
 block discarded – undo
1683 1683
 	 * @param bool $REG_ID
1684 1684
 	 * @return bool
1685 1685
 	 */
1686
-	private function _save_reg_custom_questions_form( $REG_ID = FALSE ) {
1686
+	private function _save_reg_custom_questions_form($REG_ID = FALSE) {
1687 1687
 
1688 1688
 		if ( ! $REG_ID) {
1689
-			EE_Error::add_error( __('An error occurred. No registration ID was received.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
1689
+			EE_Error::add_error(__('An error occurred. No registration ID was received.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
1690 1690
 		}
1691
-		$form = $this->_get_reg_custom_questions_form( $REG_ID );
1692
-		$form->receive_form_submission( $this->_req_data );
1691
+		$form = $this->_get_reg_custom_questions_form($REG_ID);
1692
+		$form->receive_form_submission($this->_req_data);
1693 1693
 		$success = false;
1694
-		if( $form->is_valid() ) {
1695
-			foreach( $form->subforms() as $question_group_id => $question_group_form ) {
1696
-				foreach( $question_group_form->inputs() as $question_id => $input ) {
1694
+		if ($form->is_valid()) {
1695
+			foreach ($form->subforms() as $question_group_id => $question_group_form) {
1696
+				foreach ($question_group_form->inputs() as $question_id => $input) {
1697 1697
 					$where_conditions = array(
1698 1698
 							'QST_ID' => $question_id,
1699 1699
 							'REG_ID' => $REG_ID
@@ -1701,19 +1701,19 @@  discard block
 block discarded – undo
1701 1701
 					$possibly_new_values = array(
1702 1702
 							'ANS_value' => $input->normalized_value()
1703 1703
 						);
1704
-					$answer = EEM_Answer::instance()->get_one( array( $where_conditions ) );
1705
-					if( $answer instanceof EE_Answer ) {
1706
-						$success = $answer->save( $possibly_new_values );
1704
+					$answer = EEM_Answer::instance()->get_one(array($where_conditions));
1705
+					if ($answer instanceof EE_Answer) {
1706
+						$success = $answer->save($possibly_new_values);
1707 1707
 					} else {
1708 1708
 						//insert it then
1709
-						$cols_n_vals = array_merge( $where_conditions, $possibly_new_values );
1710
-						$answer = EE_Answer::new_instance( $cols_n_vals );
1709
+						$cols_n_vals = array_merge($where_conditions, $possibly_new_values);
1710
+						$answer = EE_Answer::new_instance($cols_n_vals);
1711 1711
 						$success = $answer->save();
1712 1712
 					}
1713 1713
 				}
1714 1714
 			}
1715 1715
 		} else {
1716
-			EE_Error::add_error( $form->get_validation_error_string(), __FILE__, __FUNCTION__, __LINE__ );
1716
+			EE_Error::add_error($form->get_validation_error_string(), __FILE__, __FUNCTION__, __LINE__);
1717 1717
 		}
1718 1718
 		return $success;
1719 1719
 	}
@@ -1731,30 +1731,30 @@  discard block
 block discarded – undo
1731 1731
 		$registrations = $REG->get_all(array(
1732 1732
 			array(
1733 1733
 				'TXN_ID'=>$this->_registration->transaction_ID(),
1734
-				'REG_ID'=>array('!=',$this->_registration->ID())
1734
+				'REG_ID'=>array('!=', $this->_registration->ID())
1735 1735
 			),
1736 1736
 			'force_join'=>array('Attendee')));
1737 1737
 
1738 1738
 		$this->_template_args['attendees'] = array();
1739 1739
 		$this->_template_args['attendee_notice'] = '';
1740 1740
 		EE_Registry::instance()->load_helper('Array');
1741
-		if ( empty( $registrations)  || ( is_array($registrations) &&  ! EEH_Array::get_one_item_from_array($registrations) ) ) {
1742
-			EE_Error::add_error( __('There are no records attached to this registration. Something may have gone wrong with the registration', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
1741
+		if (empty($registrations) || (is_array($registrations) && ! EEH_Array::get_one_item_from_array($registrations))) {
1742
+			EE_Error::add_error(__('There are no records attached to this registration. Something may have gone wrong with the registration', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
1743 1743
 			$this->_template_args['attendee_notice'] = EE_Error::get_notices();
1744 1744
 		} else {
1745 1745
 
1746 1746
 			$att_nmbr = 1;
1747
-			foreach ( $registrations as $registration ) {
1747
+			foreach ($registrations as $registration) {
1748 1748
 				/* @var $registration EE_Registration */
1749 1749
 				$attendee = $registration->attendee() ? $registration->attendee() : EEM_Attendee::instance()->create_default_object();
1750
-				$this->_template_args['attendees'][ $att_nmbr ]['fname'] = $attendee->fname();//( isset( $registration->ATT_fname ) & ! empty( $registration->ATT_fname ) ) ? $registration->ATT_fname : '';
1751
-				$this->_template_args['attendees'][ $att_nmbr ]['lname'] = $attendee->lname();//( isset( $registration->ATT_lname ) & ! empty( $registration->ATT_lname ) ) ? $registration->ATT_lname : '';
1752
-				$this->_template_args['attendees'][ $att_nmbr ]['email'] = $attendee->email();//( isset( $registration->ATT_email ) & ! empty( $registration->ATT_email ) ) ? $registration->ATT_email : '';
1753
-				$this->_template_args['attendees'][ $att_nmbr ]['final_price'] = $registration->final_price();//( isset( $registration->REG_final_price ) & ! empty( $registration->REG_final_price ) ) ? $registration->REG_final_price : '';
1750
+				$this->_template_args['attendees'][$att_nmbr]['fname'] = $attendee->fname(); //( isset( $registration->ATT_fname ) & ! empty( $registration->ATT_fname ) ) ? $registration->ATT_fname : '';
1751
+				$this->_template_args['attendees'][$att_nmbr]['lname'] = $attendee->lname(); //( isset( $registration->ATT_lname ) & ! empty( $registration->ATT_lname ) ) ? $registration->ATT_lname : '';
1752
+				$this->_template_args['attendees'][$att_nmbr]['email'] = $attendee->email(); //( isset( $registration->ATT_email ) & ! empty( $registration->ATT_email ) ) ? $registration->ATT_email : '';
1753
+				$this->_template_args['attendees'][$att_nmbr]['final_price'] = $registration->final_price(); //( isset( $registration->REG_final_price ) & ! empty( $registration->REG_final_price ) ) ? $registration->REG_final_price : '';
1754 1754
 
1755
-				$this->_template_args['attendees'][ $att_nmbr ]['address'] = implode( ', ', $attendee->full_address_as_array() );
1755
+				$this->_template_args['attendees'][$att_nmbr]['address'] = implode(', ', $attendee->full_address_as_array());
1756 1756
 
1757
-				$this->_template_args['attendees'][ $att_nmbr ]['att_link'] = self::add_query_args_and_nonce( array( 'action'=>'edit_attendee', 'post'=>$attendee->ID() ), REG_ADMIN_URL );
1757
+				$this->_template_args['attendees'][$att_nmbr]['att_link'] = self::add_query_args_and_nonce(array('action'=>'edit_attendee', 'post'=>$attendee->ID()), REG_ADMIN_URL);
1758 1758
 
1759 1759
 				$att_nmbr++;
1760 1760
 			}
@@ -1766,8 +1766,8 @@  discard block
 block discarded – undo
1766 1766
 
1767 1767
 	//			$this->_template_args['registration_form_url'] = add_query_arg( array( 'action' => 'edit_registration', 'process' => 'attendees'  ), REG_ADMIN_URL );
1768 1768
 		}
1769
-		$template_path = REG_TEMPLATE_PATH . 'reg_admin_details_main_meta_box_attendees.template.php';
1770
-		echo EEH_Template::display_template( $template_path, $this->_template_args, TRUE );
1769
+		$template_path = REG_TEMPLATE_PATH.'reg_admin_details_main_meta_box_attendees.template.php';
1770
+		echo EEH_Template::display_template($template_path, $this->_template_args, TRUE);
1771 1771
 
1772 1772
 	}
1773 1773
 
@@ -1788,11 +1788,11 @@  discard block
 block discarded – undo
1788 1788
 		$attendee = $att_check instanceof EE_Attendee ? $att_check : EEM_Attendee::instance()->create_default_object();
1789 1789
 
1790 1790
 		//now let's determine if this is not the primary registration.  If it isn't then we set the primary_registration object for reference BUT ONLY if the Attendee object loaded is not the same as the primary registration object (that way we know if we need to show cereate button or not)
1791
-		if ( ! $this->_registration->is_primary_registrant() ) {
1791
+		if ( ! $this->_registration->is_primary_registrant()) {
1792 1792
 			$primary_registration = $this->_registration->get_primary_registration();
1793 1793
 			$primary_attendee = $primary_registration->attendee();
1794 1794
 
1795
-			if ( ! $primary_attendee instanceof EE_Attendee || $attendee->ID() !== $primary_attendee->ID() ) {
1795
+			if ( ! $primary_attendee instanceof EE_Attendee || $attendee->ID() !== $primary_attendee->ID()) {
1796 1796
 				//in here?  This means the displayed registration is not the primary registrant but ALREADY HAS its own custom attendee object so let's not worry about the primary reg.
1797 1797
 				$primary_registration = NULL;
1798 1798
 			}
@@ -1801,28 +1801,28 @@  discard block
 block discarded – undo
1801 1801
 		}
1802 1802
 
1803 1803
 		$this->_template_args['ATT_ID'] = $attendee->ID();
1804
-		$this->_template_args['fname'] = $attendee->fname();//$this->_registration->ATT_fname;
1805
-		$this->_template_args['lname'] = $attendee->lname();//$this->_registration->ATT_lname;
1806
-		$this->_template_args['email'] = $attendee->email();//$this->_registration->ATT_email;
1804
+		$this->_template_args['fname'] = $attendee->fname(); //$this->_registration->ATT_fname;
1805
+		$this->_template_args['lname'] = $attendee->lname(); //$this->_registration->ATT_lname;
1806
+		$this->_template_args['email'] = $attendee->email(); //$this->_registration->ATT_email;
1807 1807
 		$this->_template_args['phone'] = $attendee->phone();
1808 1808
 
1809
-		EE_Registry::instance()->load_helper( 'Formatter' );
1810
-		$this->_template_args[ 'formatted_address' ] = EEH_Address::format( $attendee );
1809
+		EE_Registry::instance()->load_helper('Formatter');
1810
+		$this->_template_args['formatted_address'] = EEH_Address::format($attendee);
1811 1811
 
1812 1812
 
1813 1813
 		//edit link
1814
-		$this->_template_args['att_edit_link'] = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'edit_attendee', 'post'=>$attendee->ID() ), REG_ADMIN_URL );
1815
-		$this->_template_args['att_edit_label'] = __('View/Edit Contact' );
1814
+		$this->_template_args['att_edit_link'] = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'edit_attendee', 'post'=>$attendee->ID()), REG_ADMIN_URL);
1815
+		$this->_template_args['att_edit_label'] = __('View/Edit Contact');
1816 1816
 
1817 1817
 		//create link
1818
-		$this->_template_args['create_link'] = $primary_registration instanceof EE_Registration ? EE_Admin_Page::add_query_args_and_nonce( array( 'action' => 'duplicate_attendee',  '_REG_ID' => $this->_registration->ID() ), REG_ADMIN_URL ): '';
1818
+		$this->_template_args['create_link'] = $primary_registration instanceof EE_Registration ? EE_Admin_Page::add_query_args_and_nonce(array('action' => 'duplicate_attendee', '_REG_ID' => $this->_registration->ID()), REG_ADMIN_URL) : '';
1819 1819
 		$this->_template_args['create_label'] = __('Create Contact', 'event_espresso');
1820 1820
 
1821 1821
 		$this->_template_args['att_check'] = $att_check;
1822 1822
 
1823 1823
 
1824
-		$template_path = REG_TEMPLATE_PATH . 'reg_admin_details_side_meta_box_registrant.template.php';
1825
-		echo EEH_Template::display_template( $template_path, $this->_template_args, TRUE );
1824
+		$template_path = REG_TEMPLATE_PATH.'reg_admin_details_side_meta_box_registrant.template.php';
1825
+		echo EEH_Template::display_template($template_path, $this->_template_args, TRUE);
1826 1826
 	}
1827 1827
 
1828 1828
 
@@ -1835,7 +1835,7 @@  discard block
 block discarded – undo
1835 1835
 	 * @access protected
1836 1836
 	 * @return void
1837 1837
 	 */
1838
-	protected function _trash_or_restore_registrations( $trash = TRUE ) {
1838
+	protected function _trash_or_restore_registrations($trash = TRUE) {
1839 1839
 		$REGM = EEM_Registration::instance();
1840 1840
 
1841 1841
 		$success = 1;
@@ -1845,26 +1845,26 @@  discard block
 block discarded – undo
1845 1845
 		$dtts = array();
1846 1846
 
1847 1847
 		//if empty _REG_ID then get out because there's nothing to do
1848
-		if ( empty( $this->_req_data['_REG_ID'] ) ) {
1848
+		if (empty($this->_req_data['_REG_ID'])) {
1849 1849
 			$msg = $trash ? __('In order to trash registrations you must select which ones you wish to trash by clicking the checkboxes.', 'event_espresso') : __('In order to restore registrations you must select which ones you wish to restore by clicking the checkboxes.', 'event_espresso');
1850
-			EE_Error::add_error( $msg, __FILE__, __LINE__, __FUNCTION__ );
1851
-			$this->_redirect_after_action(FALSE, '', '', array(), TRUE );
1850
+			EE_Error::add_error($msg, __FILE__, __LINE__, __FUNCTION__);
1851
+			$this->_redirect_after_action(FALSE, '', '', array(), TRUE);
1852 1852
 		}
1853 1853
 
1854 1854
 		//Checkboxes
1855
-		if (!empty($this->_req_data['_REG_ID']) && is_array($this->_req_data['_REG_ID'])) {
1855
+		if ( ! empty($this->_req_data['_REG_ID']) && is_array($this->_req_data['_REG_ID'])) {
1856 1856
 			// if array has more than one element than success message should be plural
1857
-			$success = count( $this->_req_data['_REG_ID'] ) > 1 ? 2 : 1;
1857
+			$success = count($this->_req_data['_REG_ID']) > 1 ? 2 : 1;
1858 1858
 			// cycle thru checkboxes
1859
-			while (list( $ind, $REG_ID ) = each($this->_req_data['_REG_ID'])) {
1859
+			while (list($ind, $REG_ID) = each($this->_req_data['_REG_ID'])) {
1860 1860
 
1861 1861
 				$REG = $REGM->get_one_by_ID($REG_ID);
1862 1862
 				$payment_count = $REG->get_first_related('Transaction')->count_related('Payment');
1863
-				if ( $payment_count > 0 ) {
1864
-					$name = $REG->attendee() instanceof EE_Attendee ? $REG->attendee()->full_name() : __( 'Unknown Attendee', 'event_espresso' );
1863
+				if ($payment_count > 0) {
1864
+					$name = $REG->attendee() instanceof EE_Attendee ? $REG->attendee()->full_name() : __('Unknown Attendee', 'event_espresso');
1865 1865
 					$error = 1;
1866 1866
 					$success = 0;
1867
-					EE_Error::add_error( sprintf( __('The registration for %s could not be trashed because it has payments attached to the related transaction.  If you wish to trash this registration you must first delete the payments on the related transaction.', 'event_espresso'), $name ), __FILE__, __FUNCTION__, __LINE__ );
1867
+					EE_Error::add_error(sprintf(__('The registration for %s could not be trashed because it has payments attached to the related transaction.  If you wish to trash this registration you must first delete the payments on the related transaction.', 'event_espresso'), $name), __FILE__, __FUNCTION__, __LINE__);
1868 1868
 					continue; //can't trash this registration because it has payments.
1869 1869
 				}
1870 1870
 				$ticket = $REG->get_first_related('Ticket');
@@ -1873,7 +1873,7 @@  discard block
 block discarded – undo
1873 1873
 				$dtts = array_merge($dtts, $dtt);
1874 1874
 
1875 1875
 				$updated = $trash ? $REG->delete() : $REG->restore();
1876
-				if ( !$updated ) {
1876
+				if ( ! $updated) {
1877 1877
 					$success = 0;
1878 1878
 				} else {
1879 1879
 					$success = 2;
@@ -1888,7 +1888,7 @@  discard block
 block discarded – undo
1888 1888
 			$tickets[$ticket->ID()] = $ticket;
1889 1889
 			$dtts = $ticket->get_many_related('Datetime');
1890 1890
 			$updated = $trash ? $REG->delete() : $REG->restore();
1891
-			if ( ! $updated ) {
1891
+			if ( ! $updated) {
1892 1892
 				$success = 0;
1893 1893
 			}
1894 1894
 
@@ -1898,10 +1898,10 @@  discard block
 block discarded – undo
1898 1898
 		EEM_Ticket::instance()->update_tickets_sold($tickets);
1899 1899
 		EEM_Datetime::instance()->update_sold($dtts);
1900 1900
 
1901
-		$what = $success > 1 ? __( 'Registrations', 'event_espresso' ) : __( 'Registration', 'event_espresso' );
1902
-		$action_desc = $trash ? __( 'moved to the trash', 'event_espresso' ) : __( 'restored', 'event_espresso' );
1901
+		$what = $success > 1 ? __('Registrations', 'event_espresso') : __('Registration', 'event_espresso');
1902
+		$action_desc = $trash ? __('moved to the trash', 'event_espresso') : __('restored', 'event_espresso');
1903 1903
 		$overwrite_msgs = $error ? TRUE : FALSE;
1904
-		$this->_redirect_after_action( $success, $what, $action_desc, array( 'action' => 'default' ), $overwrite_msgs );
1904
+		$this->_redirect_after_action($success, $what, $action_desc, array('action' => 'default'), $overwrite_msgs);
1905 1905
 	}
1906 1906
 
1907 1907
 
@@ -1925,16 +1925,16 @@  discard block
 block discarded – undo
1925 1925
 		$success = 1;
1926 1926
 
1927 1927
 		//Checkboxes
1928
-		if (!empty($this->_req_data['_REG_ID']) && is_array($this->_req_data['_REG_ID'])) {
1928
+		if ( ! empty($this->_req_data['_REG_ID']) && is_array($this->_req_data['_REG_ID'])) {
1929 1929
 			// if array has more than one element than success message should be plural
1930
-			$success = count( $this->_req_data['_REG_ID'] ) > 1 ? 2 : 1;
1930
+			$success = count($this->_req_data['_REG_ID']) > 1 ? 2 : 1;
1931 1931
 			// cycle thru checkboxes
1932
-			while (list( $ind, $REG_ID ) = each($this->_req_data['_REG_ID'])) {
1932
+			while (list($ind, $REG_ID) = each($this->_req_data['_REG_ID'])) {
1933 1933
 				$REG = $REG_MDL->get_one_by_ID($REG_ID);
1934
-				if ( ! $REG instanceof EE_Registration )
1934
+				if ( ! $REG instanceof EE_Registration)
1935 1935
 					continue;
1936 1936
 				$deleted = $this->_delete_registration($REG);
1937
-				if ( !$deleted ) {
1937
+				if ( ! $deleted) {
1938 1938
 					$success = 0;
1939 1939
 				}
1940 1940
 			}
@@ -1944,15 +1944,15 @@  discard block
 block discarded – undo
1944 1944
 			$REG_ID = $this->_req_data['_REG_ID'];
1945 1945
 			$REG = $REG_MDL->get_one_by_ID($REG_ID);
1946 1946
 			$deleted = $this->_delete_registration($REG);
1947
-			if ( ! $deleted ) {
1947
+			if ( ! $deleted) {
1948 1948
 				$success = 0;
1949 1949
 			}
1950 1950
 
1951 1951
 		}
1952 1952
 
1953
-		$what = $success > 1 ? __( 'Registrations', 'event_espresso' ) : __( 'Registration', 'event_espresso' );
1954
-		$action_desc = __( 'permanently deleted.', 'event_espresso' );
1955
-		$this->_redirect_after_action( $success, $what, $action_desc, array( 'action' => 'default' ), TRUE );
1953
+		$what = $success > 1 ? __('Registrations', 'event_espresso') : __('Registration', 'event_espresso');
1954
+		$action_desc = __('permanently deleted.', 'event_espresso');
1955
+		$this->_redirect_after_action($success, $what, $action_desc, array('action' => 'default'), TRUE);
1956 1956
 	}
1957 1957
 
1958 1958
 
@@ -1964,31 +1964,31 @@  discard block
 block discarded – undo
1964 1964
 	 * @param  EE_Registration $REG registration to be deleted permenantly
1965 1965
 	 * @return boolean              true = successful deletion, false = fail.
1966 1966
 	 */
1967
-	protected function _delete_registration( EE_Registration $REG ) {
1967
+	protected function _delete_registration(EE_Registration $REG) {
1968 1968
 		//first we start with the transaction... ultimately, we WILL not delete permanently if there are any related registrations on the transaction that are NOT trashed.
1969 1969
 		$TXN = $REG->get_first_related('Transaction');
1970 1970
 		$REGS = $TXN->get_many_related('Registration');
1971 1971
 
1972 1972
 		$all_trashed = TRUE;
1973
-		foreach ( $REGS as $registration ) {
1974
-			if ( ! $registration->get('REG_deleted') )
1973
+		foreach ($REGS as $registration) {
1974
+			if ( ! $registration->get('REG_deleted'))
1975 1975
 				$all_trashed = FALSE;
1976 1976
 		}
1977 1977
 
1978
-		if ( ! $all_trashed ) {
1979
-			EE_Error::add_error( __('Unable to permanently delete this registration. Before this registration can be permanently deleted, all registrations made in the same transaction must be trashed as well.  These registrations will be permanently deleted in the same action.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
1978
+		if ( ! $all_trashed) {
1979
+			EE_Error::add_error(__('Unable to permanently delete this registration. Before this registration can be permanently deleted, all registrations made in the same transaction must be trashed as well.  These registrations will be permanently deleted in the same action.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
1980 1980
 			return false;
1981 1981
 		}
1982 1982
 
1983 1983
 		//k made it here so that means we can delete all the related transactions and their answers (but let's do them separately from THIS one).
1984
-		foreach ( $REGS as $registration ) {
1984
+		foreach ($REGS as $registration) {
1985 1985
 
1986 1986
 			//delete related answers
1987 1987
 			$registration->delete_related_permanently('Answer');
1988 1988
 
1989 1989
 			//remove relationship to EE_Attendee (but we ALWAYS leave the contact record intact)
1990 1990
 			$attendee = $registration->get_first_related('Attendee');
1991
-			if ( $attendee instanceof EE_Attendee ) {
1991
+			if ($attendee instanceof EE_Attendee) {
1992 1992
 				$registration->_remove_relation_to($attendee, 'Attendee');
1993 1993
 			}
1994 1994
 
@@ -1998,7 +1998,7 @@  discard block
 block discarded – undo
1998 1998
 			//now delete permanently the checkins related to this registration.
1999 1999
 			$registration->delete_related_permanently('Checkin');
2000 2000
 
2001
-			if ( $registration->ID() === $REG->ID() )
2001
+			if ($registration->ID() === $REG->ID())
2002 2002
 				continue; //we don't want to delete permanently the existing registration just yet.
2003 2003
 
2004 2004
 			//remove relation to transaction for these registrations if NOT the existing registrations
@@ -2031,35 +2031,35 @@  discard block
 block discarded – undo
2031 2031
 	 * @return void
2032 2032
 	 */
2033 2033
 	public function new_registration() {
2034
-		if ( ! $this->_set_reg_event() ) {
2035
-			throw new EE_Error(__('Unable to continue with registering because there is no Event ID in the request', 'event_espresso') );
2034
+		if ( ! $this->_set_reg_event()) {
2035
+			throw new EE_Error(__('Unable to continue with registering because there is no Event ID in the request', 'event_espresso'));
2036 2036
 		}
2037
-		EE_Registry::instance()->REQ->set_espresso_page( TRUE );
2037
+		EE_Registry::instance()->REQ->set_espresso_page(TRUE);
2038 2038
 		// gotta start with a clean slate if we're not coming here via ajax
2039 2039
 		if (
2040
-			! defined('DOING_AJAX' )
2041
-			&& ( ! isset( $this->_req_data['processing_registration'] ) || isset( $this->_req_data['step_error'] ) )
2040
+			! defined('DOING_AJAX')
2041
+			&& ( ! isset($this->_req_data['processing_registration']) || isset($this->_req_data['step_error']))
2042 2042
 		) {
2043
-			EE_Registry::instance()->SSN->clear_session( __CLASS__, __FUNCTION__ );
2043
+			EE_Registry::instance()->SSN->clear_session(__CLASS__, __FUNCTION__);
2044 2044
 		}
2045 2045
 
2046
-		$this->_template_args['event_name'] = '' ;
2046
+		$this->_template_args['event_name'] = '';
2047 2047
 		// event name
2048
-		if ( $this->_reg_event ) {
2048
+		if ($this->_reg_event) {
2049 2049
 			$this->_template_args['event_name'] = $this->_reg_event->name();
2050
-			$edit_event_url = self::add_query_args_and_nonce( array( 'action'=>'edit', 'post'=>$this->_reg_event->ID() ), EVENTS_ADMIN_URL );
2051
-			$edit_event_lnk = '<a href="'.$edit_event_url.'" title="' . esc_attr__( 'Edit ', 'event_espresso' ) . $this->_reg_event->name() . '">' . __( 'Edit Event', 'event_espresso' ) . '</a>';
2052
-			$this->_template_args['event_name'] .= ' <span class="admin-page-header-edit-lnk not-bold">' . $edit_event_lnk . '</span>' ;
2050
+			$edit_event_url = self::add_query_args_and_nonce(array('action'=>'edit', 'post'=>$this->_reg_event->ID()), EVENTS_ADMIN_URL);
2051
+			$edit_event_lnk = '<a href="'.$edit_event_url.'" title="'.esc_attr__('Edit ', 'event_espresso').$this->_reg_event->name().'">'.__('Edit Event', 'event_espresso').'</a>';
2052
+			$this->_template_args['event_name'] .= ' <span class="admin-page-header-edit-lnk not-bold">'.$edit_event_lnk.'</span>';
2053 2053
 		}
2054 2054
 
2055 2055
 		$this->_template_args['step_content'] = $this->_get_registration_step_content();
2056 2056
 
2057
-		if ( defined('DOING_AJAX' ) ) {
2057
+		if (defined('DOING_AJAX')) {
2058 2058
 			$this->_return_json();
2059 2059
 		}
2060 2060
 		// grab header
2061
-		$template_path = REG_TEMPLATE_PATH . 'reg_admin_register_new_attendee.template.php';
2062
-		$this->_template_args['admin_page_content'] = EEH_Template::display_template( $template_path, $this->_template_args, TRUE );
2061
+		$template_path = REG_TEMPLATE_PATH.'reg_admin_register_new_attendee.template.php';
2062
+		$this->_template_args['admin_page_content'] = EEH_Template::display_template($template_path, $this->_template_args, TRUE);
2063 2063
 
2064 2064
 		//$this->_set_publish_post_box_vars( NULL, FALSE, FALSE, NULL, FALSE );
2065 2065
 		// the details template wrapper
@@ -2076,7 +2076,7 @@  discard block
 block discarded – undo
2076 2076
 	 * @return string html
2077 2077
 	 */
2078 2078
 	protected function _get_registration_step_content() {
2079
-		if ( isset( $_COOKIE[ 'ee_registration_added' ] ) && $_COOKIE[ 'ee_registration_added' ] ) {
2079
+		if (isset($_COOKIE['ee_registration_added']) && $_COOKIE['ee_registration_added']) {
2080 2080
 			$warning_msg = sprintf(
2081 2081
 				__(
2082 2082
 					'%2$sWARNING!!!%3$s%1$sPlease do not use the back button to return to this page for the purpose of adding another registration.%1$sThis can result in lost and/or corrupted data.%1$sIf you wish to add another registration, then please click the%1$s%7$s"Add Another New Registration to Event"%8$s button%1$son the Transaction details page, after you are redirected.%1$s%1$s%4$s redirecting in %5$s seconds %6$s',
@@ -2092,7 +2092,7 @@  discard block
 block discarded – undo
2092 2092
 				'</b>'
2093 2093
 			);
2094 2094
 			return '
2095
-	<div id="ee-add-reg-back-button-dv"><p>' . $warning_msg . '</p></div>
2095
+	<div id="ee-add-reg-back-button-dv"><p>' . $warning_msg.'</p></div>
2096 2096
 	<script >
2097 2097
 		// WHOAH !!! it appears that someone is using the back button from the Transaction admin page
2098 2098
 		// after just adding a new registration... we gotta try to put a stop to that !!!
@@ -2127,16 +2127,16 @@  discard block
 block discarded – undo
2127 2127
 		$cart = EE_Registry::instance()->SSN->cart();
2128 2128
 		$step = ! $cart instanceof EE_Cart ? 'ticket' : 'questions';
2129 2129
 
2130
-		switch ( $step ) {
2130
+		switch ($step) {
2131 2131
 			case 'ticket' :
2132 2132
 				$hidden_fields['processing_registration']['value'] = 1;
2133 2133
 				$template_args['title'] = __('Step One: Select the Ticket for this registration', 'event_espresso');
2134
-				$template_args['content'] = EED_Ticket_Selector::instance()->display_ticket_selector( $this->_reg_event );
2134
+				$template_args['content'] = EED_Ticket_Selector::instance()->display_ticket_selector($this->_reg_event);
2135 2135
 				$template_args['step_button_text'] = __('Add Tickets and Continue to Registrant Details', 'event_espresso');
2136 2136
 				$template_args['show_notification_toggle'] = FALSE;
2137 2137
 				break;
2138 2138
 			case 'questions' :
2139
-				$hidden_fields[ 'processing_registration' ][ 'value' ] = 2;
2139
+				$hidden_fields['processing_registration']['value'] = 2;
2140 2140
 				$template_args['title'] = __('Step Two: Add Registrant Details for this Registration', 'event_espresso');
2141 2141
 				//in theory we should be able to run EED_SPCO at this point because the cart should have been setup properly by the first process_reg_step run.
2142 2142
 				$template_args['content'] = EED_Single_Page_Checkout::registration_checkout_for_admin();
@@ -2145,10 +2145,10 @@  discard block
 block discarded – undo
2145 2145
 				break;
2146 2146
 		}
2147 2147
 
2148
-		$this->_set_add_edit_form_tags( 'process_reg_step', $hidden_fields ); //we come back to the process_registration_step route.
2148
+		$this->_set_add_edit_form_tags('process_reg_step', $hidden_fields); //we come back to the process_registration_step route.
2149 2149
 
2150 2150
 		return EEH_Template::display_template(
2151
-			REG_TEMPLATE_PATH . 'reg_admin_register_new_attendee_step_content.template.php', $template_args, TRUE
2151
+			REG_TEMPLATE_PATH.'reg_admin_register_new_attendee_step_content.template.php', $template_args, TRUE
2152 2152
 		);
2153 2153
 	}
2154 2154
 
@@ -2163,11 +2163,11 @@  discard block
 block discarded – undo
2163 2163
 	*		@return boolean
2164 2164
 	*/
2165 2165
 	private function _set_reg_event() {
2166
-		if ( is_object( $this->_reg_event )) {
2166
+		if (is_object($this->_reg_event)) {
2167 2167
 			return TRUE;
2168 2168
 		}
2169
-		$EVT_ID = ( ! empty( $this->_req_data['event_id'] )) ? absint( $this->_req_data['event_id'] ) : FALSE;
2170
-		if ( ! $EVT_ID ) {
2169
+		$EVT_ID = ( ! empty($this->_req_data['event_id'])) ? absint($this->_req_data['event_id']) : FALSE;
2170
+		if ( ! $EVT_ID) {
2171 2171
 			return FALSE;
2172 2172
 		}
2173 2173
 
@@ -2188,82 +2188,82 @@  discard block
 block discarded – undo
2188 2188
 	public function process_reg_step() {
2189 2189
 		EE_System::do_not_cache();
2190 2190
 		$this->_set_reg_event();
2191
-		EE_Registry::instance()->REQ->set_espresso_page( TRUE );
2191
+		EE_Registry::instance()->REQ->set_espresso_page(TRUE);
2192 2192
 
2193 2193
 		//what step are we on?
2194 2194
 		$cart = EE_Registry::instance()->SSN->cart();
2195 2195
 		$step = ! $cart instanceof EE_Cart ? 'ticket' : 'questions';
2196 2196
 
2197 2197
 		//if doing ajax then we need to verify the nonce
2198
-		if ( defined( 'DOING_AJAX' ) ) {
2199
-			$nonce = isset( $this->_req_data[$this->_req_nonce] ) ? sanitize_text_field( $this->_req_data[$this->_req_nonce] ) : '';
2200
-			$this->_verify_nonce( $nonce, $this->_req_nonce );
2198
+		if (defined('DOING_AJAX')) {
2199
+			$nonce = isset($this->_req_data[$this->_req_nonce]) ? sanitize_text_field($this->_req_data[$this->_req_nonce]) : '';
2200
+			$this->_verify_nonce($nonce, $this->_req_nonce);
2201 2201
 		}
2202 2202
 
2203
-		switch ( $step ) {
2203
+		switch ($step) {
2204 2204
 
2205 2205
 			case 'ticket' :
2206 2206
 				//process ticket selection
2207 2207
 				$success = EED_Ticket_Selector::instance()->process_ticket_selections();
2208
-				if ( $success ) {
2209
-					EE_Error::add_success( __('Tickets Selected. Now complete the registration.'), 'event_espresso');
2208
+				if ($success) {
2209
+					EE_Error::add_success(__('Tickets Selected. Now complete the registration.'), 'event_espresso');
2210 2210
 				} else {
2211 2211
 					$query_args['step_error'] = $this->_req_data['step_error'] = TRUE;
2212 2212
 				}
2213
-				if ( defined('DOING_AJAX') ) {
2213
+				if (defined('DOING_AJAX')) {
2214 2214
 					$this->new_registration(); //display next step
2215 2215
 				} else {
2216 2216
 					$query_args['action'] = 'new_registration';
2217 2217
 					$query_args['processing_registration'] = 1;
2218 2218
 					$query_args['event_id'] = $this->_reg_event->ID();
2219
-					$this->_redirect_after_action( FALSE, '', '', $query_args, TRUE );
2219
+					$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
2220 2220
 				}
2221 2221
 				break;
2222 2222
 
2223 2223
 			case 'questions' :
2224
-				if( ! isset( $this->_req_data[ 'txn_reg_status_change' ], $this->_req_data[ 'txn_reg_status_change' ][ 'send_notifications' ] ) ) {
2225
-					add_filter( 'FHEE__EED_Messages___maybe_registration__deliver_notifications', '__return_false', 15 );
2224
+				if ( ! isset($this->_req_data['txn_reg_status_change'], $this->_req_data['txn_reg_status_change']['send_notifications'])) {
2225
+					add_filter('FHEE__EED_Messages___maybe_registration__deliver_notifications', '__return_false', 15);
2226 2226
 				}
2227 2227
 				//process registration
2228 2228
 				$transaction = EED_Single_Page_Checkout::instance()->process_registration_from_admin();
2229
-				if ( $cart instanceof EE_Cart ) {
2229
+				if ($cart instanceof EE_Cart) {
2230 2230
 					$grand_total = $cart->get_cart_grand_total();
2231
-					if ( $grand_total instanceof EE_Line_Item ) {
2231
+					if ($grand_total instanceof EE_Line_Item) {
2232 2232
 						$grand_total->save_this_and_descendants_to_txn();
2233 2233
 					}
2234 2234
 				}
2235
-				if ( ! $transaction instanceof EE_Transaction ) {
2235
+				if ( ! $transaction instanceof EE_Transaction) {
2236 2236
 					$query_args = array(
2237 2237
 						'action' => 'new_registration',
2238 2238
 						'processing_registration' => 2,
2239 2239
 						'event_id' => $this->_reg_event->ID()
2240 2240
 					);
2241 2241
 
2242
-					if ( defined('DOING_AJAX' )) {
2242
+					if (defined('DOING_AJAX')) {
2243 2243
 						//display registration form again because there are errors (maybe validation?)
2244 2244
 						$this->new_registration();
2245 2245
 						return;
2246 2246
 					} else {
2247
-						$this->_redirect_after_action( FALSE, '', '', $query_args, TRUE );
2247
+						$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
2248 2248
 						return;
2249 2249
 					}
2250 2250
 				}
2251 2251
 				/** @type EE_Transaction_Payments $transaction_payments */
2252
-				$transaction_payments = EE_Registry::instance()->load_class( 'Transaction_Payments' );
2252
+				$transaction_payments = EE_Registry::instance()->load_class('Transaction_Payments');
2253 2253
 				// maybe update status, and make sure to save transaction if not done already
2254
-				if ( ! $transaction_payments->update_transaction_status_based_on_total_paid( $transaction )) {
2254
+				if ( ! $transaction_payments->update_transaction_status_based_on_total_paid($transaction)) {
2255 2255
 					$transaction->save();
2256 2256
 				}
2257
-				EE_Registry::instance()->SSN->clear_session( __CLASS__, __FUNCTION__ );
2257
+				EE_Registry::instance()->SSN->clear_session(__CLASS__, __FUNCTION__);
2258 2258
 				$this->_req_data = array();
2259 2259
 				$query_args = array(
2260 2260
 					'action'        => 'redirect_to_txn',
2261 2261
 					'TXN_ID'        => $transaction->ID(),
2262 2262
 					'EVT_ID'        => $this->_reg_event->ID(),
2263
-					'event_name'    => urlencode( $this->_reg_event->name() ),
2263
+					'event_name'    => urlencode($this->_reg_event->name()),
2264 2264
 					'redirect_from' => 'new_registration'
2265 2265
 				);
2266
-				$this->_redirect_after_action( false, '', '', $query_args, true );
2266
+				$this->_redirect_after_action(false, '', '', $query_args, true);
2267 2267
 				break;
2268 2268
 		}
2269 2269
 
@@ -2280,21 +2280,21 @@  discard block
 block discarded – undo
2280 2280
 	 */
2281 2281
 	public function redirect_to_txn() {
2282 2282
 		EE_System::do_not_cache();
2283
-		EE_Registry::instance()->SSN->clear_session( __CLASS__, __FUNCTION__ );
2283
+		EE_Registry::instance()->SSN->clear_session(__CLASS__, __FUNCTION__);
2284 2284
 		$query_args = array(
2285 2285
 			'action' => 'view_transaction',
2286
-			'TXN_ID' => isset( $this->_req_data['TXN_ID'] ) ? absint( $this->_req_data[ 'TXN_ID' ] )  : 0,
2286
+			'TXN_ID' => isset($this->_req_data['TXN_ID']) ? absint($this->_req_data['TXN_ID']) : 0,
2287 2287
 			'page'   => 'espresso_transactions'
2288 2288
 		);
2289
-		if ( isset( $this->_req_data[ 'EVT_ID' ], $this->_req_data[ 'redirect_from' ] ) ) {
2290
-			$query_args['EVT_ID'] = $this->_req_data[ 'EVT_ID' ];
2291
-			$query_args['event_name'] = urlencode( $this->_req_data[ 'event_name' ] );
2292
-			$query_args['redirect_from'] = $this->_req_data[ 'redirect_from' ];
2289
+		if (isset($this->_req_data['EVT_ID'], $this->_req_data['redirect_from'])) {
2290
+			$query_args['EVT_ID'] = $this->_req_data['EVT_ID'];
2291
+			$query_args['event_name'] = urlencode($this->_req_data['event_name']);
2292
+			$query_args['redirect_from'] = $this->_req_data['redirect_from'];
2293 2293
 		}
2294 2294
 		EE_Error::add_success(
2295
-			__( 'Registration Created.  Please review the transaction and add any payments as necessary', 'event_espresso' )
2295
+			__('Registration Created.  Please review the transaction and add any payments as necessary', 'event_espresso')
2296 2296
 		);
2297
-		$this->_redirect_after_action( false, '', '', $query_args, true );
2297
+		$this->_redirect_after_action(false, '', '', $query_args, true);
2298 2298
 	}
2299 2299
 
2300 2300
 
@@ -2305,7 +2305,7 @@  discard block
 block discarded – undo
2305 2305
 	*		@return void
2306 2306
 	*/
2307 2307
 	protected function _attendee_contact_list_table() {
2308
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
2308
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
2309 2309
 		$this->_search_btn_label = __('Contacts', 'event_espresso');
2310 2310
 		$this->display_admin_list_table_page_with_no_sidebar();
2311 2311
 	}
@@ -2320,10 +2320,10 @@  discard block
 block discarded – undo
2320 2320
 	*		@access public
2321 2321
 	*		@return array
2322 2322
 	*/
2323
-	public function get_attendees( $per_page, $count = FALSE, $trash = FALSE ) {
2323
+	public function get_attendees($per_page, $count = FALSE, $trash = FALSE) {
2324 2324
 
2325
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
2326
-		require_once( REG_ADMIN . 'EE_Attendee_Contact_List_Table.class.php' );
2325
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
2326
+		require_once(REG_ADMIN.'EE_Attendee_Contact_List_Table.class.php');
2327 2327
 		$ATT_MDL = EEM_Attendee::instance();
2328 2328
 
2329 2329
 		$this->_req_data['orderby'] = ! empty($this->_req_data['orderby']) ? $this->_req_data['orderby'] : '';
@@ -2351,47 +2351,47 @@  discard block
 block discarded – undo
2351 2351
 				$orderby = 'ATT_lname';
2352 2352
 		}
2353 2353
 
2354
-		$sort = ( isset( $this->_req_data['order'] ) && ! empty( $this->_req_data['order'] )) ? $this->_req_data['order'] : 'ASC';
2354
+		$sort = (isset($this->_req_data['order']) && ! empty($this->_req_data['order'])) ? $this->_req_data['order'] : 'ASC';
2355 2355
 
2356
-		$current_page = isset( $this->_req_data['paged'] ) && !empty( $this->_req_data['paged'] ) ? $this->_req_data['paged'] : 1;
2357
-		$per_page = isset( $per_page ) && !empty( $per_page ) ? $per_page : 10;
2358
-		$per_page = isset( $this->_req_data['perpage'] ) && !empty( $this->_req_data['perpage'] ) ? $this->_req_data['perpage'] : $per_page;
2356
+		$current_page = isset($this->_req_data['paged']) && ! empty($this->_req_data['paged']) ? $this->_req_data['paged'] : 1;
2357
+		$per_page = isset($per_page) && ! empty($per_page) ? $per_page : 10;
2358
+		$per_page = isset($this->_req_data['perpage']) && ! empty($this->_req_data['perpage']) ? $this->_req_data['perpage'] : $per_page;
2359 2359
 
2360 2360
 		$_where = array();
2361 2361
 
2362
-		if ( isset( $this->_req_data['s'] ) ) {
2363
-			$sstr = '%' . $this->_req_data['s'] . '%';
2362
+		if (isset($this->_req_data['s'])) {
2363
+			$sstr = '%'.$this->_req_data['s'].'%';
2364 2364
 			$_where['OR'] = array(
2365
-				'Registration.Event.EVT_name' => array( 'LIKE', $sstr),
2366
-				'Registration.Event.EVT_desc' => array( 'LIKE', $sstr ),
2367
-				'Registration.Event.EVT_short_desc' => array( 'LIKE' , $sstr ),
2368
-				'ATT_fname' => array( 'LIKE', $sstr ),
2369
-				'ATT_lname' => array( 'LIKE', $sstr ),
2370
-				'ATT_short_bio' => array( 'LIKE', $sstr ),
2371
-				'ATT_email' => array('LIKE', $sstr ),
2372
-				'ATT_address' => array( 'LIKE', $sstr ),
2373
-				'ATT_address2' => array( 'LIKE', $sstr ),
2374
-				'ATT_city' => array( 'LIKE', $sstr ),
2375
-				'Country.CNT_name' => array( 'LIKE', $sstr ),
2376
-				'State.STA_name' => array('LIKE', $sstr ),
2377
-				'ATT_phone' => array( 'LIKE', $sstr ),
2378
-				'Registration.REG_final_price' => array( 'LIKE', $sstr ),
2379
-				'Registration.REG_code' => array( 'LIKE', $sstr ),
2380
-				'Registration.REG_count' => array( 'LIKE' , $sstr ),
2381
-				'Registration.REG_group_size' => array( 'LIKE' , $sstr )
2365
+				'Registration.Event.EVT_name' => array('LIKE', $sstr),
2366
+				'Registration.Event.EVT_desc' => array('LIKE', $sstr),
2367
+				'Registration.Event.EVT_short_desc' => array('LIKE', $sstr),
2368
+				'ATT_fname' => array('LIKE', $sstr),
2369
+				'ATT_lname' => array('LIKE', $sstr),
2370
+				'ATT_short_bio' => array('LIKE', $sstr),
2371
+				'ATT_email' => array('LIKE', $sstr),
2372
+				'ATT_address' => array('LIKE', $sstr),
2373
+				'ATT_address2' => array('LIKE', $sstr),
2374
+				'ATT_city' => array('LIKE', $sstr),
2375
+				'Country.CNT_name' => array('LIKE', $sstr),
2376
+				'State.STA_name' => array('LIKE', $sstr),
2377
+				'ATT_phone' => array('LIKE', $sstr),
2378
+				'Registration.REG_final_price' => array('LIKE', $sstr),
2379
+				'Registration.REG_code' => array('LIKE', $sstr),
2380
+				'Registration.REG_count' => array('LIKE', $sstr),
2381
+				'Registration.REG_group_size' => array('LIKE', $sstr)
2382 2382
 				);
2383 2383
 		}
2384 2384
 
2385 2385
 
2386
-		$offset = ($current_page-1)*$per_page;
2387
-		$limit = $count ? NULL : array( $offset, $per_page );
2386
+		$offset = ($current_page - 1) * $per_page;
2387
+		$limit = $count ? NULL : array($offset, $per_page);
2388 2388
 
2389
-		if ( $trash ) {
2390
-			$_where['status'] = array( '!=', 'publish' );
2391
-			$all_attendees = $count ? $ATT_MDL->count( array($_where,'order_by'=>array($orderby=>$sort), 'limit'=>$limit)): $ATT_MDL->get_all( array($_where,'order_by'=>array($orderby=>$sort), 'limit'=>$limit));
2389
+		if ($trash) {
2390
+			$_where['status'] = array('!=', 'publish');
2391
+			$all_attendees = $count ? $ATT_MDL->count(array($_where, 'order_by'=>array($orderby=>$sort), 'limit'=>$limit)) : $ATT_MDL->get_all(array($_where, 'order_by'=>array($orderby=>$sort), 'limit'=>$limit));
2392 2392
 		} else {
2393
-			$_where['status'] = array( 'IN', array( 'publish' ) );
2394
-			$all_attendees = $count ? $ATT_MDL->count( array($_where, 'order_by'=>array($orderby=>$sort),'limit'=>$limit)) : $ATT_MDL->get_all( array($_where, 'order_by'=>array($orderby=>$sort), 'limit'=>$limit) );
2393
+			$_where['status'] = array('IN', array('publish'));
2394
+			$all_attendees = $count ? $ATT_MDL->count(array($_where, 'order_by'=>array($orderby=>$sort), 'limit'=>$limit)) : $ATT_MDL->get_all(array($_where, 'order_by'=>array($orderby=>$sort), 'limit'=>$limit));
2395 2395
 		}
2396 2396
 
2397 2397
 		return $all_attendees;
@@ -2408,10 +2408,10 @@  discard block
 block discarded – undo
2408 2408
 	 */
2409 2409
 	protected function _resend_registration() {
2410 2410
 		$this->_process_resend_registration();
2411
-		$query_args = isset($this->_req_data['redirect_to'] ) ? array('action' => $this->_req_data['redirect_to'], '_REG_ID' => $this->_req_data['_REG_ID'] ) : array(
2411
+		$query_args = isset($this->_req_data['redirect_to']) ? array('action' => $this->_req_data['redirect_to'], '_REG_ID' => $this->_req_data['_REG_ID']) : array(
2412 2412
 			'action' => 'default'
2413 2413
 		);
2414
-		$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE );
2414
+		$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
2415 2415
 	}
2416 2416
 
2417 2417
 
@@ -2419,27 +2419,27 @@  discard block
 block discarded – undo
2419 2419
 
2420 2420
 
2421 2421
 
2422
-	public function _registrations_report(){
2423
-		if( ! defined( 'EE_USE_OLD_CSV_REPORT_CLASS' ) ) {
2424
-			wp_redirect( EE_Admin_Page::add_query_args_and_nonce(
2422
+	public function _registrations_report() {
2423
+		if ( ! defined('EE_USE_OLD_CSV_REPORT_CLASS')) {
2424
+			wp_redirect(EE_Admin_Page::add_query_args_and_nonce(
2425 2425
 				array(
2426 2426
 					'page' => 'espresso_batch',
2427 2427
 					'batch' => 'file',
2428
-					'EVT_ID' => isset( $this->_req_data[ 'EVT_ID'] ) ? $this->_req_data[ 'EVT_ID' ] : NULL,
2429
-					'job_handler' => urlencode( 'EventEspressoBatchRequest\JobHandlers\RegistrationsReport' ),
2430
-					'return_url' => urlencode( $this->_req_data[ 'return_url' ] ),
2431
-				)) );
2428
+					'EVT_ID' => isset($this->_req_data['EVT_ID']) ? $this->_req_data['EVT_ID'] : NULL,
2429
+					'job_handler' => urlencode('EventEspressoBatchRequest\JobHandlers\RegistrationsReport'),
2430
+					'return_url' => urlencode($this->_req_data['return_url']),
2431
+				)));
2432 2432
 		} else {
2433
-			EE_Registry::instance()->load_helper( 'File' );
2433
+			EE_Registry::instance()->load_helper('File');
2434 2434
 			$new_request_args = array(
2435 2435
 				'export' => 'report',
2436 2436
 				'action' => 'registrations_report_for_event',
2437
-				'EVT_ID' => isset( $this->_req_data[ 'EVT_ID'] ) ? $this->_req_data[ 'EVT_ID' ] : NULL,
2437
+				'EVT_ID' => isset($this->_req_data['EVT_ID']) ? $this->_req_data['EVT_ID'] : NULL,
2438 2438
 			);
2439 2439
 			$this->_req_data = array_merge($this->_req_data, $new_request_args);
2440 2440
 
2441
-			if ( is_readable(EE_CLASSES . 'EE_Export.class.php')) {
2442
-				require_once(EE_CLASSES . 'EE_Export.class.php');
2441
+			if (is_readable(EE_CLASSES.'EE_Export.class.php')) {
2442
+				require_once(EE_CLASSES.'EE_Export.class.php');
2443 2443
 				$EE_Export = EE_Export::instance($this->_req_data);
2444 2444
 				$EE_Export->export();
2445 2445
 			}
@@ -2448,28 +2448,28 @@  discard block
 block discarded – undo
2448 2448
 
2449 2449
 
2450 2450
 
2451
-	public function _contact_list_export(){
2452
-		EE_Registry::instance()->load_helper( 'File' );
2453
-		if ( is_readable(EE_CLASSES . 'EE_Export.class.php')) {
2454
-			require_once(EE_CLASSES . 'EE_Export.class.php');
2451
+	public function _contact_list_export() {
2452
+		EE_Registry::instance()->load_helper('File');
2453
+		if (is_readable(EE_CLASSES.'EE_Export.class.php')) {
2454
+			require_once(EE_CLASSES.'EE_Export.class.php');
2455 2455
 			$EE_Export = EE_Export::instance($this->_req_data);
2456 2456
 			$EE_Export->export_attendees();
2457 2457
 		}
2458 2458
 	}
2459 2459
 
2460
-	public function _contact_list_report(){
2461
-		if( ! defined( 'EE_USE_OLD_CSV_REPORT_CLASS' ) ) {
2462
-			wp_redirect( EE_Admin_Page::add_query_args_and_nonce(
2460
+	public function _contact_list_report() {
2461
+		if ( ! defined('EE_USE_OLD_CSV_REPORT_CLASS')) {
2462
+			wp_redirect(EE_Admin_Page::add_query_args_and_nonce(
2463 2463
 				array(
2464 2464
 					'page' => 'espresso_batch',
2465 2465
 					'batch' => 'file',
2466
-					'job_handler' => urlencode( 'EventEspressoBatchRequest\JobHandlers\AttendeesReport' ),
2467
-					'return_url' => urlencode( $this->_req_data[ 'return_url' ] ),
2468
-				)) );
2466
+					'job_handler' => urlencode('EventEspressoBatchRequest\JobHandlers\AttendeesReport'),
2467
+					'return_url' => urlencode($this->_req_data['return_url']),
2468
+				)));
2469 2469
 		} else {
2470
-			EE_Registry::instance()->load_helper( 'File' );
2471
-			if ( is_readable(EE_CLASSES . 'EE_Export.class.php')) {
2472
-				require_once(EE_CLASSES . 'EE_Export.class.php');
2470
+			EE_Registry::instance()->load_helper('File');
2471
+			if (is_readable(EE_CLASSES.'EE_Export.class.php')) {
2472
+				require_once(EE_CLASSES.'EE_Export.class.php');
2473 2473
 				$EE_Export = EE_Export::instance($this->_req_data);
2474 2474
 				$EE_Export->report_attendees();
2475 2475
 			}
@@ -2489,73 +2489,73 @@  discard block
 block discarded – undo
2489 2489
 	 * @return void
2490 2490
 	 */
2491 2491
 	protected function _duplicate_attendee() {
2492
-		$action = !empty( $this->_req_data['return'] ) ? $this->_req_data['return'] : 'default';
2492
+		$action = ! empty($this->_req_data['return']) ? $this->_req_data['return'] : 'default';
2493 2493
 		//verify we have necessary info
2494
-		if ( empty($this->_req_data['_REG_ID'] )  ) {
2495
-			EE_Error::add_error( __('Unable to create the contact for the registration because the required paramaters are not present (_REG_ID )', 'event_espresso'),  __FILE__, __LINE__, __FUNCTION__ );
2496
-			$query_args = array( 'action' => $action );
2494
+		if (empty($this->_req_data['_REG_ID'])) {
2495
+			EE_Error::add_error(__('Unable to create the contact for the registration because the required paramaters are not present (_REG_ID )', 'event_espresso'), __FILE__, __LINE__, __FUNCTION__);
2496
+			$query_args = array('action' => $action);
2497 2497
 			$this->_redirect_after_action('', '', '', $query_args, TRUE);
2498 2498
 		}
2499 2499
 
2500 2500
 		//okay necessary deets present... let's dupe the incoming attendee and attach to incoming registration.
2501
-		$registration = EEM_Registration::instance()->get_one_by_ID( $this->_req_data['_REG_ID'] );
2501
+		$registration = EEM_Registration::instance()->get_one_by_ID($this->_req_data['_REG_ID']);
2502 2502
 		$attendee = $registration->attendee();
2503 2503
 
2504 2504
 		//remove relation of existing attendee on registration
2505
-		$registration->_remove_relation_to($attendee, 'Attendee' );
2505
+		$registration->_remove_relation_to($attendee, 'Attendee');
2506 2506
 		//new attendee
2507 2507
 		$new_attendee = clone $attendee;
2508
-		$new_attendee->set( 'ATT_ID', 0 );
2508
+		$new_attendee->set('ATT_ID', 0);
2509 2509
 		$new_attendee->save();
2510 2510
 
2511 2511
 		//add new attendee to reg
2512
-		$registration->_add_relation_to( $new_attendee, 'Attendee');
2512
+		$registration->_add_relation_to($new_attendee, 'Attendee');
2513 2513
 
2514
-		EE_Error::add_success( __('New Contact record created.  Now make any edits you wish to make for this contact.', 'event_espresso') );
2514
+		EE_Error::add_success(__('New Contact record created.  Now make any edits you wish to make for this contact.', 'event_espresso'));
2515 2515
 
2516 2516
 		//redirect to edit page for attendee
2517
-		$query_args = array( 'post' => $new_attendee->ID(), 'action' => 'edit_attendee' );
2517
+		$query_args = array('post' => $new_attendee->ID(), 'action' => 'edit_attendee');
2518 2518
 
2519
-		$this->_redirect_after_action( '', '', '', $query_args, TRUE );
2519
+		$this->_redirect_after_action('', '', '', $query_args, TRUE);
2520 2520
 	}
2521 2521
 
2522 2522
 
2523 2523
 	//related to cpt routes
2524 2524
 	protected function _insert_update_cpt_item($post_id, $post) {
2525 2525
 		$success = true;
2526
-		$attendee = EEM_Attendee::instance()->get_one_by_ID( $post_id );
2526
+		$attendee = EEM_Attendee::instance()->get_one_by_ID($post_id);
2527 2527
 		//for attendee updates
2528
-		if ( $post->post_type = 'espresso_attendees' && !empty( $attendee ) ) {
2528
+		if ($post->post_type = 'espresso_attendees' && ! empty($attendee)) {
2529 2529
 			//note we should only be UPDATING attendees at this point.
2530 2530
 			$updated_fields = array(
2531 2531
 				'ATT_fname' => $this->_req_data['ATT_fname'],
2532 2532
 				'ATT_lname' => $this->_req_data['ATT_lname'],
2533
-				'ATT_full_name'=> $this->_req_data['ATT_fname'] . ' ' . $this->_req_data['ATT_lname'],
2533
+				'ATT_full_name'=> $this->_req_data['ATT_fname'].' '.$this->_req_data['ATT_lname'],
2534 2534
 				'ATT_address' => isset($this->_req_data['ATT_address']) ? $this->_req_data['ATT_address'] : '',
2535 2535
 				'ATT_address2' => isset($this->_req_data['ATT_address2']) ? $this->_req_data['ATT_address2'] : '',
2536
-				'ATT_city' => isset( $this->_req_data['ATT_city'] ) ? $this->_req_data['ATT_city'] : '',
2537
-				'STA_ID' => isset( $this->_req_data['STA_ID'] ) ? $this->_req_data['STA_ID'] : '',
2538
-				'CNT_ISO' => isset( $this->_req_data['CNT_ISO'] ) ? $this->_req_data['CNT_ISO'] : '',
2539
-				'ATT_zip' => isset( $this->_req_data['ATT_zip'] ) ? $this->_req_data['ATT_zip'] : '',
2540
-				'ATT_email' => isset( $this->_req_data['ATT_email'] ) ? $this->_req_data['ATT_email'] : '',
2541
-				'ATT_phone' => isset( $this->_req_data['ATT_phone'] ) ? $this->_req_data['ATT_phone'] : ''
2536
+				'ATT_city' => isset($this->_req_data['ATT_city']) ? $this->_req_data['ATT_city'] : '',
2537
+				'STA_ID' => isset($this->_req_data['STA_ID']) ? $this->_req_data['STA_ID'] : '',
2538
+				'CNT_ISO' => isset($this->_req_data['CNT_ISO']) ? $this->_req_data['CNT_ISO'] : '',
2539
+				'ATT_zip' => isset($this->_req_data['ATT_zip']) ? $this->_req_data['ATT_zip'] : '',
2540
+				'ATT_email' => isset($this->_req_data['ATT_email']) ? $this->_req_data['ATT_email'] : '',
2541
+				'ATT_phone' => isset($this->_req_data['ATT_phone']) ? $this->_req_data['ATT_phone'] : ''
2542 2542
 				);
2543
-			foreach ( $updated_fields as $field => $value ) {
2543
+			foreach ($updated_fields as $field => $value) {
2544 2544
 				$attendee->set($field, $value);
2545 2545
 			}
2546 2546
 
2547 2547
 			$success = $attendee->save();
2548 2548
 
2549
-			$attendee_update_callbacks = apply_filters( 'FHEE__Registrations_Admin_Page__insert_update_cpt_item__attendee_update', array() );
2550
-			foreach ( $attendee_update_callbacks as $a_callback ) {
2551
-				if ( FALSE === call_user_func_array( $a_callback, array($attendee, $this->_req_data ) ) ) {
2552
-					throw new EE_Error( sprintf( __('The %s callback given for the "FHEE__Registrations_Admin_Page__insert_update_cpt_item__attendee_update" filter is not a valid callback.  Please check the spelling.', 'event_espresso'), $a_callback ) );
2549
+			$attendee_update_callbacks = apply_filters('FHEE__Registrations_Admin_Page__insert_update_cpt_item__attendee_update', array());
2550
+			foreach ($attendee_update_callbacks as $a_callback) {
2551
+				if (FALSE === call_user_func_array($a_callback, array($attendee, $this->_req_data))) {
2552
+					throw new EE_Error(sprintf(__('The %s callback given for the "FHEE__Registrations_Admin_Page__insert_update_cpt_item__attendee_update" filter is not a valid callback.  Please check the spelling.', 'event_espresso'), $a_callback));
2553 2553
 				}
2554 2554
 			}
2555 2555
 		}
2556 2556
 
2557
-		if ( $success === FALSE )
2558
-			EE_Error::add_error(__('Something went wrong with updating the meta table data for the registration.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
2557
+		if ($success === FALSE)
2558
+			EE_Error::add_error(__('Something went wrong with updating the meta table data for the registration.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
2559 2559
 
2560 2560
 	}
2561 2561
 
@@ -2575,17 +2575,17 @@  discard block
 block discarded – undo
2575 2575
 		remove_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', $this->_cpt_routes[$this->_req_action], 'normal', 'core');
2576 2576
 		remove_meta_box('commentstatusdiv', $this->_cpt_routes[$this->_req_action], 'normal', 'core');
2577 2577
 
2578
-		if ( post_type_supports( 'espresso_attendees', 'excerpt') ) {
2579
-			add_meta_box('postexcerpt', __('Short Biography', 'event_espresso'), 'post_excerpt_meta_box', $this->_cpt_routes[$this->_req_action], 'normal' );
2578
+		if (post_type_supports('espresso_attendees', 'excerpt')) {
2579
+			add_meta_box('postexcerpt', __('Short Biography', 'event_espresso'), 'post_excerpt_meta_box', $this->_cpt_routes[$this->_req_action], 'normal');
2580 2580
 		}
2581 2581
 
2582
-		if ( post_type_supports( 'espresso_attendees', 'comments') ) {
2582
+		if (post_type_supports('espresso_attendees', 'comments')) {
2583 2583
 			add_meta_box('commentsdiv', __('Notes on the Contact', 'event_espresso'), 'post_comment_meta_box', $this->_cpt_routes[$this->_req_action], 'normal', 'core');
2584 2584
 		}
2585 2585
 
2586
-		add_meta_box('attendee_contact_info', __('Contact Info', 'event_espresso'), array( $this, 'attendee_contact_info'), $this->_cpt_routes[$this->_req_action], 'side', 'core' );
2587
-		add_meta_box('attendee_details_address', __('Address Details', 'event_espresso'), array($this, 'attendee_address_details'), $this->_cpt_routes[$this->_req_action], 'normal', 'core' );
2588
-		add_meta_box('attendee_registrations', __('Registrations for this Contact', 'event_espresso'), array( $this, 'attendee_registrations_meta_box'), $this->_cpt_routes[$this->_req_action], 'normal', 'high');
2586
+		add_meta_box('attendee_contact_info', __('Contact Info', 'event_espresso'), array($this, 'attendee_contact_info'), $this->_cpt_routes[$this->_req_action], 'side', 'core');
2587
+		add_meta_box('attendee_details_address', __('Address Details', 'event_espresso'), array($this, 'attendee_address_details'), $this->_cpt_routes[$this->_req_action], 'normal', 'core');
2588
+		add_meta_box('attendee_registrations', __('Registrations for this Contact', 'event_espresso'), array($this, 'attendee_registrations_meta_box'), $this->_cpt_routes[$this->_req_action], 'normal', 'high');
2589 2589
 	}
2590 2590
 
2591 2591
 
@@ -2594,10 +2594,10 @@  discard block
 block discarded – undo
2594 2594
 	 * @param  WP_Post $post wp post object
2595 2595
 	 * @return string        attendee contact info ( and form )
2596 2596
 	 */
2597
-	public function attendee_contact_info( $post ) {
2597
+	public function attendee_contact_info($post) {
2598 2598
 		//get attendee object ( should already have it )
2599 2599
 		$this->_template_args['attendee'] = $this->_cpt_model_obj;
2600
-		$template = REG_TEMPLATE_PATH . 'attendee_contact_info_metabox_content.template.php';
2600
+		$template = REG_TEMPLATE_PATH.'attendee_contact_info_metabox_content.template.php';
2601 2601
 		EEH_Template::display_template($template, $this->_template_args);
2602 2602
 	}
2603 2603
 
@@ -2613,12 +2613,12 @@  discard block
 block discarded – undo
2613 2613
 		$this->_template_args['attendee'] = $this->_cpt_model_obj;
2614 2614
 		$this->_template_args['state_html'] = EEH_Form_Fields::generate_form_input(
2615 2615
 				new EE_Question_Form_Input(
2616
-				EE_Question::new_instance( array(
2616
+				EE_Question::new_instance(array(
2617 2617
 					'QST_ID' => 0,
2618 2618
 					'QST_display_text' => __('State/Province', 'event_espresso'),
2619 2619
 					'QST_system' => 'admin-state'
2620 2620
 					)),
2621
-				EE_Answer::new_instance( array(
2621
+				EE_Answer::new_instance(array(
2622 2622
 					'ANS_ID' => 0,
2623 2623
 					'ANS_value' => $this->_cpt_model_obj->state_ID()
2624 2624
 					)),
@@ -2631,12 +2631,12 @@  discard block
 block discarded – undo
2631 2631
 			));
2632 2632
 		$this->_template_args['country_html'] = EEH_Form_Fields::generate_form_input(
2633 2633
 				new EE_Question_Form_Input(
2634
-				EE_Question::new_instance( array(
2634
+				EE_Question::new_instance(array(
2635 2635
 					'QST_ID' => 0,
2636 2636
 					'QST_display_text' => __('Country', 'event_espresso'),
2637 2637
 					'QST_system' => 'admin-country'
2638 2638
 					)),
2639
-				EE_Answer::new_instance( array(
2639
+				EE_Answer::new_instance(array(
2640 2640
 					'ANS_ID' => 0,
2641 2641
 					'ANS_value' => $this->_cpt_model_obj->country_ID()
2642 2642
 					)),
@@ -2647,8 +2647,8 @@  discard block
 block discarded – undo
2647 2647
 					'append_qstn_id' => FALSE
2648 2648
 					)
2649 2649
 				));
2650
-		$template = REG_TEMPLATE_PATH . 'attendee_address_details_metabox_content.template.php';
2651
-		EEH_Template::display_template($template, $this->_template_args );
2650
+		$template = REG_TEMPLATE_PATH.'attendee_address_details_metabox_content.template.php';
2651
+		EEH_Template::display_template($template, $this->_template_args);
2652 2652
 
2653 2653
 	}
2654 2654
 
@@ -2658,11 +2658,11 @@  discard block
 block discarded – undo
2658 2658
 	*		@access protected
2659 2659
 	*		@return void
2660 2660
 	*/
2661
-	public function attendee_registrations_meta_box( $post ) {
2661
+	public function attendee_registrations_meta_box($post) {
2662 2662
 
2663 2663
 		$this->_template_args['attendee'] = $this->_cpt_model_obj;
2664 2664
 		$this->_template_args['registrations'] = $this->_cpt_model_obj->get_many_related('Registration');
2665
-		$template = REG_TEMPLATE_PATH . 'attendee_registrations_main_meta_box.template.php';
2665
+		$template = REG_TEMPLATE_PATH.'attendee_registrations_main_meta_box.template.php';
2666 2666
 		EEH_Template::display_template($template, $this->_template_args);
2667 2667
 
2668 2668
 	}
@@ -2676,8 +2676,8 @@  discard block
 block discarded – undo
2676 2676
 	 * @return string        html for new form.
2677 2677
 	 */
2678 2678
 	public function after_title_form_fields($post) {
2679
-		if ( $post->post_type == 'espresso_attendees' ) {
2680
-			$template = REG_TEMPLATE_PATH . 'attendee_details_after_title_form_fields.template.php';
2679
+		if ($post->post_type == 'espresso_attendees') {
2680
+			$template = REG_TEMPLATE_PATH.'attendee_details_after_title_form_fields.template.php';
2681 2681
 			$template_args['attendee'] = $this->_cpt_model_obj;
2682 2682
 			EEH_Template::display_template($template, $template_args);
2683 2683
 		}
@@ -2694,21 +2694,21 @@  discard block
 block discarded – undo
2694 2694
 	*		@access protected
2695 2695
 	*		@return void
2696 2696
 	*/
2697
-	protected function _trash_or_restore_attendees( $trash = TRUE ) {
2697
+	protected function _trash_or_restore_attendees($trash = TRUE) {
2698 2698
 
2699
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
2699
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
2700 2700
 
2701 2701
 		$ATT_MDL = EEM_Attendee::instance();
2702 2702
 
2703 2703
 		$success = 1;
2704 2704
 		//Checkboxes
2705
-		if (!empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
2705
+		if ( ! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
2706 2706
 			// if array has more than one element than success message should be plural
2707
-			$success = count( $this->_req_data['checkbox'] ) > 1 ? 2 : 1;
2707
+			$success = count($this->_req_data['checkbox']) > 1 ? 2 : 1;
2708 2708
 			// cycle thru checkboxes
2709
-			while (list( $ATT_ID, $value ) = each($this->_req_data['checkbox'])) {
2710
-				$updated = $trash ? $ATT_MDL->update_by_ID(array( 'status' => 'trash' ), $ATT_ID) : $ATT_MDL->update_by_ID( array('status' => 'publish' ), $ATT_ID);
2711
-				if ( !$updated ) {
2709
+			while (list($ATT_ID, $value) = each($this->_req_data['checkbox'])) {
2710
+				$updated = $trash ? $ATT_MDL->update_by_ID(array('status' => 'trash'), $ATT_ID) : $ATT_MDL->update_by_ID(array('status' => 'publish'), $ATT_ID);
2711
+				if ( ! $updated) {
2712 2712
 					$success = 0;
2713 2713
 				}
2714 2714
 			}
@@ -2717,18 +2717,18 @@  discard block
 block discarded – undo
2717 2717
 			// grab single id and delete
2718 2718
 			$ATT_ID = absint($this->_req_data['ATT_ID']);
2719 2719
 			//get attendee
2720
-			$att = $ATT_MDL->get_one_by_ID( $ATT_ID );
2720
+			$att = $ATT_MDL->get_one_by_ID($ATT_ID);
2721 2721
 			$updated = $trash ? $att->set_status('trash') : $att->set_status('publish');
2722 2722
 			$updated = $att->save();
2723
-			if ( ! $updated ) {
2723
+			if ( ! $updated) {
2724 2724
 				$success = 0;
2725 2725
 			}
2726 2726
 
2727 2727
 		}
2728 2728
 
2729
-		$what = $success > 1 ? __( 'Contacts', 'event_espresso' ) : __( 'Contact', 'event_espresso' );
2730
-		$action_desc = $trash ? __( 'moved to the trash', 'event_espresso' ) : __( 'restored', 'event_espresso' );
2731
-		$this->_redirect_after_action( $success, $what, $action_desc, array( 'action' => 'contact_list' ) );
2729
+		$what = $success > 1 ? __('Contacts', 'event_espresso') : __('Contact', 'event_espresso');
2730
+		$action_desc = $trash ? __('moved to the trash', 'event_espresso') : __('restored', 'event_espresso');
2731
+		$this->_redirect_after_action($success, $what, $action_desc, array('action' => 'contact_list'));
2732 2732
 
2733 2733
 	}
2734 2734
 
Please login to merge, or discard this patch.
Braces   +27 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
@@ -118,8 +120,9 @@  discard block
 block discarded – undo
118 120
 	public function clear_comment_link( $link, $comment, $args ) {
119 121
 		//gotta make sure this only happens on this route
120 122
 		$post_type = get_post_type( $comment->comment_post_ID);
121
-		if ( $post_type == 'espresso_attendees' )
122
-			return '#commentsdiv';
123
+		if ( $post_type == 'espresso_attendees' ) {
124
+					return '#commentsdiv';
125
+		}
123 126
 		return $link;
124 127
 	}
125 128
 
@@ -878,9 +881,9 @@  discard block
 block discarded – undo
878 881
 
879 882
 		$REG_ID = ( ! empty( $this->_req_data['_REG_ID'] )) ? absint( $this->_req_data['_REG_ID'] ) : FALSE;
880 883
 
881
-		if ( $this->_registration = $REG->get_one_by_ID( $REG_ID ))
882
-			return TRUE;
883
-		else {
884
+		if ( $this->_registration = $REG->get_one_by_ID( $REG_ID )) {
885
+					return TRUE;
886
+		} else {
884 887
 			$error_msg = sprintf( __('An error occurred and the details for Registration ID #%s could not be retrieved.', 'event_espresso'), $REG_ID );
885 888
 			EE_Error::add_error( $error_msg, __FILE__, __FUNCTION__, __LINE__ );
886 889
 			$this->_registration = NULL;
@@ -977,7 +980,7 @@  discard block
 block discarded – undo
977 980
 					EEM_Registration::instance()->convert_datetime_for_query( 'REG_date', $curdate . $time_start, 'Y-m-d H:i:s' ),
978 981
 					EEM_Registration::instance()->convert_datetime_for_query( 'REG_date', $curdate . $time_end, 'Y-m-d H:i:s' ),
979 982
 			));
980
-		}elseif($this_month_a || $this_month){
983
+		} elseif($this_month_a || $this_month){
981 984
 			$this_month_r = date('m', current_time('timestamp'));
982 985
 			$days_this_month = date( 't', current_time('timestamp') );
983 986
 			$_where['REG_date']= array('BETWEEN',
@@ -985,18 +988,18 @@  discard block
 block discarded – undo
985 988
 					EEM_Registration::instance()->convert_datetime_for_query( 'REG_date', $this_year_r . '-' . $this_month_r . '-01' . ' ' . $time_start, 'Y-m-d H:i:s' ),
986 989
 					EEM_Registration::instance()->convert_datetime_for_query( 'REG_date', $this_year_r . '-' . $this_month_r . '-' . $days_this_month . ' ' . $time_end, 'Y-m-d H:i:s' )
987 990
 			));
988
-		}elseif($month_range){
991
+		} elseif($month_range){
989 992
 			$pieces = explode(' ', $this->_req_data['month_range'], 3);
990 993
 			$month_r = !empty($pieces[0]) ? date('m', strtotime($pieces[0])) : '';
991 994
 			$year_r = !empty($pieces[1]) ? $pieces[1] : '';
992 995
 			$days_in_month = date('t', strtotime($year_r .  '-' . $month_r . '-' . '01') );
993 996
 			$_where['REG_date']= array('BETWEEN',
994 997
 				array(  EEM_Registration::instance()->convert_datetime_for_query( 'REG_date', $year_r . '-' . $month_r . '-01 00:00:00', 'Y-m-d H:i:s'), EEM_Registration::instance()->convert_datetime_for_query( 'REG_date', $year_r . '-' . $month_r . '-' . $days_in_month .  ' 23:59:59', 'Y-m-d H:i:s' ) ) );
995
-		}elseif($start_date && $end_date){
998
+		} elseif($start_date && $end_date){
996 999
 			throw new EE_Error("not yet supported");
997
-		}elseif($start_date){
1000
+		} elseif($start_date){
998 1001
 			throw new EE_Error("not yet supported");
999
-		}elseif($end_date){
1002
+		} elseif($end_date){
1000 1003
 			throw new EE_Error("not yet supported");
1001 1004
 		}
1002 1005
 
@@ -1931,8 +1934,9 @@  discard block
 block discarded – undo
1931 1934
 			// cycle thru checkboxes
1932 1935
 			while (list( $ind, $REG_ID ) = each($this->_req_data['_REG_ID'])) {
1933 1936
 				$REG = $REG_MDL->get_one_by_ID($REG_ID);
1934
-				if ( ! $REG instanceof EE_Registration )
1935
-					continue;
1937
+				if ( ! $REG instanceof EE_Registration ) {
1938
+									continue;
1939
+				}
1936 1940
 				$deleted = $this->_delete_registration($REG);
1937 1941
 				if ( !$deleted ) {
1938 1942
 					$success = 0;
@@ -1971,8 +1975,9 @@  discard block
 block discarded – undo
1971 1975
 
1972 1976
 		$all_trashed = TRUE;
1973 1977
 		foreach ( $REGS as $registration ) {
1974
-			if ( ! $registration->get('REG_deleted') )
1975
-				$all_trashed = FALSE;
1978
+			if ( ! $registration->get('REG_deleted') ) {
1979
+							$all_trashed = FALSE;
1980
+			}
1976 1981
 		}
1977 1982
 
1978 1983
 		if ( ! $all_trashed ) {
@@ -1998,8 +2003,10 @@  discard block
 block discarded – undo
1998 2003
 			//now delete permanently the checkins related to this registration.
1999 2004
 			$registration->delete_related_permanently('Checkin');
2000 2005
 
2001
-			if ( $registration->ID() === $REG->ID() )
2002
-				continue; //we don't want to delete permanently the existing registration just yet.
2006
+			if ( $registration->ID() === $REG->ID() ) {
2007
+							continue;
2008
+			}
2009
+			//we don't want to delete permanently the existing registration just yet.
2003 2010
 
2004 2011
 			//remove relation to transaction for these registrations if NOT the existing registrations
2005 2012
 			$registration->_remove_relations('Transaction');
@@ -2554,8 +2561,9 @@  discard block
 block discarded – undo
2554 2561
 			}
2555 2562
 		}
2556 2563
 
2557
-		if ( $success === FALSE )
2558
-			EE_Error::add_error(__('Something went wrong with updating the meta table data for the registration.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
2564
+		if ( $success === FALSE ) {
2565
+					EE_Error::add_error(__('Something went wrong with updating the meta table data for the registration.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
2566
+		}
2559 2567
 
2560 2568
 	}
2561 2569
 
Please login to merge, or discard this patch.
Indentation   +85 added lines, -85 removed lines patch added patch discarded remove patch
@@ -1,26 +1,26 @@  discard block
 block discarded – undo
1 1
 <?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
2 2
 /**
3
- * Event Espresso
4
- *
5
- * Event Registration and Management Plugin for WordPress
6
- *
7
- * @ package			Event Espresso
8
- * @ author				Seth Shoultes
9
- * @ copyright		(c) 2008-2011 Event Espresso  All Rights Reserved.
10
- * @ license			{@link http://eventespresso.com/support/terms-conditions/}   * see Plugin Licensing *
11
- * @ link					{@link http://www.eventespresso.com}
12
- * @ since		 		4.0
13
- *
14
- * ------------------------------------------------------------------------
15
- *
16
- * Registrations_Admin_Page class
17
- *
18
- * @package			Event Espresso
19
- * @subpackage	includes/core/admin/transactions/Registrations_Admin_Page.core.php
20
- * @author				Brent Christensen
21
- *
22
- * ------------------------------------------------------------------------
23
- */
3
+	 * Event Espresso
4
+	 *
5
+	 * Event Registration and Management Plugin for WordPress
6
+	 *
7
+	 * @ package			Event Espresso
8
+	 * @ author				Seth Shoultes
9
+	 * @ copyright		(c) 2008-2011 Event Espresso  All Rights Reserved.
10
+	 * @ license			{@link http://eventespresso.com/support/terms-conditions/}   * see Plugin Licensing *
11
+	 * @ link					{@link http://www.eventespresso.com}
12
+	 * @ since		 		4.0
13
+	 *
14
+	 * ------------------------------------------------------------------------
15
+	 *
16
+	 * Registrations_Admin_Page class
17
+	 *
18
+	 * @package			Event Espresso
19
+	 * @subpackage	includes/core/admin/transactions/Registrations_Admin_Page.core.php
20
+	 * @author				Brent Christensen
21
+	 *
22
+	 * ------------------------------------------------------------------------
23
+	 */
24 24
 class Registrations_Admin_Page extends EE_Admin_Page_CPT {
25 25
 
26 26
 	/**
@@ -163,9 +163,9 @@  discard block
 block discarded – undo
163 163
 
164 164
 	/**
165 165
 	 * 		grab url requests and route them
166
-	*		@access private
167
-	*		@return void
168
-	*/
166
+	 *		@access private
167
+	 *		@return void
168
+	 */
169 169
 	public function _set_page_routes() {
170 170
 
171 171
 		$this->_get_registration_status_array();
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
 						'title' => __('Registrations Other', 'event_espresso'),
437 437
 						'filename' => 'registrations_overview_other'
438 438
 					)
439
-                ),
439
+				),
440 440
 				'help_tour' => array( 'Registration_Overview_Help_Tour' ),
441 441
 				'qtips' => array('Registration_List_Table_Tips'),
442 442
 				'list_table' => 'EE_Registrations_List_Table',
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
 					'url' => isset($this->_req_data['_REG_ID']) ? add_query_arg(array('_REG_ID' => $this->_req_data['_REG_ID'] ), $this->_current_page_view_url )  : $this->_admin_base_url,
451 451
 					'persistent' => FALSE
452 452
 				),
453
-                'help_tabs' => array(
453
+				'help_tabs' => array(
454 454
 					'registrations_details_help_tab' => array(
455 455
 						'title' => __('Registration Details', 'event_espresso'),
456 456
 						'filename' => 'registrations_details'
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
 					'order' => 20
515 515
 				),
516 516
 				'list_table' => 'EE_Attendee_Contact_List_Table',
517
-                'help_tabs' => array(
517
+				'help_tabs' => array(
518 518
 					'registrations_contact_list_help_tab' => array(
519 519
 						'title' => __('Registrations Contact List', 'event_espresso'),
520 520
 						'filename' => 'registrations_contact_list'
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
 						'title' => __('Contact List Other', 'event_espresso'),
532 532
 						'filename' => 'registrations_contact_list_other'
533 533
 					)
534
-                ),
534
+				),
535 535
 				'help_tour' => array( 'Contact_List_Help_Tour' ),
536 536
 				'metaboxes' => array(),
537 537
 				'require_nonce' => FALSE
@@ -565,9 +565,9 @@  discard block
 block discarded – undo
565 565
 
566 566
 	/**
567 567
 	 * 		get list of registration statuses
568
-	*		@access private
569
-	*		@return void
570
-	*/
568
+	 *		@access private
569
+	 *		@return void
570
+	 */
571 571
 	private function _get_registration_status_array() {
572 572
 		self::$_reg_status = EEM_Registration::reg_status_array( array(), TRUE);
573 573
 	}
@@ -874,7 +874,7 @@  discard block
 block discarded – undo
874 874
 			return TRUE;
875 875
 		}
876 876
 
877
-	    $REG = EEM_Registration::instance();
877
+		$REG = EEM_Registration::instance();
878 878
 
879 879
 		$REG_ID = ( ! empty( $this->_req_data['_REG_ID'] )) ? absint( $this->_req_data['_REG_ID'] ) : FALSE;
880 880
 
@@ -1097,9 +1097,9 @@  discard block
 block discarded – undo
1097 1097
 
1098 1098
 	/**
1099 1099
 	 * 		generates HTML for the View Registration Details Admin page
1100
-	*		@access protected
1101
-	*		@return void
1102
-	*/
1100
+	 *		@access protected
1101
+	 *		@return void
1102
+	 */
1103 1103
 	protected function _registration_details() {
1104 1104
 
1105 1105
 		$this->_template_args = array();
@@ -1177,9 +1177,9 @@  discard block
 block discarded – undo
1177 1177
 
1178 1178
 	/**
1179 1179
 	 * 		_set_approve_or_decline_reg_status_buttons
1180
-	*		@access protected
1181
-	*		@return string
1182
-	*/
1180
+	 *		@access protected
1181
+	 *		@return string
1182
+	 */
1183 1183
 	public function set_reg_status_buttons_metabox() {
1184 1184
 
1185 1185
 		//is registration for free event OR for a completed transaction? This will determine whether the set to pending option is shown.
@@ -1368,10 +1368,10 @@  discard block
 block discarded – undo
1368 1368
 
1369 1369
 	/**
1370 1370
 	 * 		approve_registration
1371
-	*		@access protected
1372
-	*		@param bool $notify whether or not to notify the registrant about their approval.
1373
-	*		@return void
1374
-	*/
1371
+	 *		@access protected
1372
+	 *		@param bool $notify whether or not to notify the registrant about their approval.
1373
+	 *		@return void
1374
+	 */
1375 1375
 	protected function approve_registration( $notify = false ) {
1376 1376
 		$this->_reg_status_change_return( EEM_Registration::status_id_approved, $notify );
1377 1377
 	}
@@ -1381,10 +1381,10 @@  discard block
 block discarded – undo
1381 1381
 
1382 1382
 	/**
1383 1383
 	 * 		decline_registration
1384
-	*		@access protected
1385
-	*		@param bool $notify whether or not to notify the registrant about their approval.
1386
-	*		@return void
1387
-	*/
1384
+	 *		@access protected
1385
+	 *		@param bool $notify whether or not to notify the registrant about their approval.
1386
+	 *		@return void
1387
+	 */
1388 1388
 	protected function decline_registration( $notify = false ) {
1389 1389
 		$this->_reg_status_change_return( EEM_Registration::status_id_declined, $notify );
1390 1390
 	}
@@ -1394,10 +1394,10 @@  discard block
 block discarded – undo
1394 1394
 
1395 1395
 	/**
1396 1396
 	 * 		cancel_registration
1397
-	*		@access protected
1398
-	*		@param bool $notify whether or not to notify the registrant about their approval.
1399
-	*		@return void
1400
-	*/
1397
+	 *		@access protected
1398
+	 *		@param bool $notify whether or not to notify the registrant about their approval.
1399
+	 *		@return void
1400
+	 */
1401 1401
 	protected function cancel_registration( $notify = false ) {
1402 1402
 		$this->_reg_status_change_return( EEM_Registration::status_id_cancelled, $notify );
1403 1403
 	}
@@ -1408,10 +1408,10 @@  discard block
 block discarded – undo
1408 1408
 
1409 1409
 	/**
1410 1410
 	 * 		not_approve_registration
1411
-	*		@access protected
1412
-	*		@param bool $notify whether or not to notify the registrant about their approval.
1413
-	*		@return void
1414
-	*/
1411
+	 *		@access protected
1412
+	 *		@param bool $notify whether or not to notify the registrant about their approval.
1413
+	 *		@return void
1414
+	 */
1415 1415
 	protected function not_approve_registration( $notify = false ) {
1416 1416
 		$this->_reg_status_change_return( EEM_Registration::status_id_not_approved, $notify );
1417 1417
 	}
@@ -1420,10 +1420,10 @@  discard block
 block discarded – undo
1420 1420
 
1421 1421
 	/**
1422 1422
 	 * 		decline_registration
1423
-	*		@access protected
1424
-	*		@param bool $notify whether or not to notify the registrant about their approval.
1425
-	*		@return void
1426
-	*/
1423
+	 *		@access protected
1424
+	 *		@param bool $notify whether or not to notify the registrant about their approval.
1425
+	 *		@return void
1426
+	 */
1427 1427
 	protected function pending_registration( $notify = false ) {
1428 1428
 		$this->_reg_status_change_return( EEM_Registration::status_id_pending_payment, $notify );
1429 1429
 	}
@@ -1433,9 +1433,9 @@  discard block
 block discarded – undo
1433 1433
 
1434 1434
 	/**
1435 1435
 	 * 		generates HTML for the Registration main meta box
1436
-	*		@access public
1437
-	*		@return void
1438
-	*/
1436
+	 *		@access public
1437
+	 *		@return void
1438
+	 */
1439 1439
 	public function _reg_details_meta_box() {
1440 1440
 		EEH_Autoloader::register_line_item_display_autoloaders();
1441 1441
 		EEH_Autoloader::register_line_item_filter_autoloaders();
@@ -1518,7 +1518,7 @@  discard block
 block discarded – undo
1518 1518
 	 *
1519 1519
 	 * @access public
1520 1520
 	 * @return void
1521
-	*/
1521
+	 */
1522 1522
 	public function _reg_questions_meta_box() {
1523 1523
 		//allow someone to override this method entirely
1524 1524
 		if( apply_filters( 'FHEE__Registrations_Admin_Page___reg_questions_meta_box__do_default', true, $this, $this->_registration ) ) {
@@ -1720,12 +1720,12 @@  discard block
 block discarded – undo
1720 1720
 
1721 1721
 	/**
1722 1722
 	 * 		generates HTML for the Registration main meta box
1723
-	*		@access public
1724
-	*		@return void
1725
-	*/
1723
+	 *		@access public
1724
+	 *		@return void
1725
+	 */
1726 1726
 	public function _reg_attendees_meta_box() {
1727 1727
 
1728
-	    $REG = EEM_Registration::instance();
1728
+		$REG = EEM_Registration::instance();
1729 1729
 		//get all other registrations on this transaction, and cache
1730 1730
 		//the attendees for them so we don't have to run another query using force_join
1731 1731
 		$registrations = $REG->get_all(array(
@@ -1778,9 +1778,9 @@  discard block
 block discarded – undo
1778 1778
 
1779 1779
 	/**
1780 1780
 	 * 		generates HTML for the Edit Registration side meta box
1781
-	*		@access public
1782
-	*		@return void
1783
-	*/
1781
+	 *		@access public
1782
+	 *		@return void
1783
+	 */
1784 1784
 	public function _reg_registrant_side_meta_box() {
1785 1785
 
1786 1786
 		/*@var $attendee EE_Attendee */
@@ -2159,9 +2159,9 @@  discard block
 block discarded – undo
2159 2159
 
2160 2160
 	/**
2161 2161
 	 * 		set_reg_event
2162
-	*		@access private
2163
-	*		@return boolean
2164
-	*/
2162
+	 *		@access private
2163
+	 *		@return boolean
2164
+	 */
2165 2165
 	private function _set_reg_event() {
2166 2166
 		if ( is_object( $this->_reg_event )) {
2167 2167
 			return TRUE;
@@ -2301,9 +2301,9 @@  discard block
 block discarded – undo
2301 2301
 
2302 2302
 	/**
2303 2303
 	 * 		generates HTML for the Attendee Contact List
2304
-	*		@access protected
2305
-	*		@return void
2306
-	*/
2304
+	 *		@access protected
2305
+	 *		@return void
2306
+	 */
2307 2307
 	protected function _attendee_contact_list_table() {
2308 2308
 		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
2309 2309
 		$this->_search_btn_label = __('Contacts', 'event_espresso');
@@ -2317,9 +2317,9 @@  discard block
 block discarded – undo
2317 2317
 	/**
2318 2318
 	 * 		get_attendees
2319 2319
 	 * 		@param bool $count whether to return count or data.
2320
-	*		@access public
2321
-	*		@return array
2322
-	*/
2320
+	 *		@access public
2321
+	 *		@return array
2322
+	 */
2323 2323
 	public function get_attendees( $per_page, $count = FALSE, $trash = FALSE ) {
2324 2324
 
2325 2325
 		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
@@ -2655,9 +2655,9 @@  discard block
 block discarded – undo
2655 2655
 
2656 2656
 	/**
2657 2657
 	 * 		_attendee_details
2658
-	*		@access protected
2659
-	*		@return void
2660
-	*/
2658
+	 *		@access protected
2659
+	 *		@return void
2660
+	 */
2661 2661
 	public function attendee_registrations_meta_box( $post ) {
2662 2662
 
2663 2663
 		$this->_template_args['attendee'] = $this->_cpt_model_obj;
@@ -2690,10 +2690,10 @@  discard block
 block discarded – undo
2690 2690
 
2691 2691
 	/**
2692 2692
 	 * 		_trash_or_restore_attendee
2693
-	*		@param boolean 		$trash - whether to move item to trash (TRUE) or restore it (FALSE)
2694
-	*		@access protected
2695
-	*		@return void
2696
-	*/
2693
+	 *		@param boolean 		$trash - whether to move item to trash (TRUE) or restore it (FALSE)
2694
+	 *		@access protected
2695
+	 *		@return void
2696
+	 */
2697 2697
 	protected function _trash_or_restore_attendees( $trash = TRUE ) {
2698 2698
 
2699 2699
 		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
Please login to merge, or discard this patch.
support/templates/support_admin_details_contact_support.template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 		<?php _e('As with most open source programs (and closed licensed programs), the possibility exists that you may find the occasional bug or discover that something is not working as expected. Please don\'t panic! We are here to help you.', 'event_espresso'); ?>
10 10
 	</p>
11 11
 	<p>
12
-		<?php printf( __('If your problems are not urgent, please post in our %ssupport forums%s. If you need immediate help, please purchase a support token and you\'ll be able to schedule one-on-one time with a member of our team.', 'event_espresso'), '<a href="https://eventespresso.com/support/forums/" target="_blank">', '</a>' ); ?>
12
+		<?php printf(__('If your problems are not urgent, please post in our %ssupport forums%s. If you need immediate help, please purchase a support token and you\'ll be able to schedule one-on-one time with a member of our team.', 'event_espresso'), '<a href="https://eventespresso.com/support/forums/" target="_blank">', '</a>'); ?>
13 13
 	</p>
14 14
 	<p class="ee-attention">
15 15
 		<strong class="red_text">
@@ -30,6 +30,6 @@  discard block
 block discarded – undo
30 30
 		<?php _e('A support token can be used towards receiving support for a single incident. Support is provided up to 30 minutes via phone call, instant message, or priority email support. Here are examples of how support tokens can be used: how-to questions, best practices questions, technical issues, advising on custom development.', 'event_espresso'); ?>
31 31
 	</p>
32 32
 	<p>
33
-		<?php printf( __('You can learn more about support tokens and purchase one by %sclicking here%s.', 'event_espresso'),'<a href="https://eventespresso.com/product/premium-support-token/?utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=help_support_tab&utm_content=support_token" target="_blank">','</a>'); ?>
33
+		<?php printf(__('You can learn more about support tokens and purchase one by %sclicking here%s.', 'event_espresso'), '<a href="https://eventespresso.com/product/premium-support-token/?utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=help_support_tab&utm_content=support_token" target="_blank">', '</a>'); ?>
34 34
 	</p>
35 35
 </div>
36 36
\ No newline at end of file
Please login to merge, or discard this patch.