Completed
Branch FET-9783-command-bus (ec950d)
by
unknown
1399:29 queued 1385:17
created
registration_form/templates/question_groups_main_meta_box.template.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
                     <?php
122 122
 					$question_order = 0;
123 123
 					$question_group_questions = $question_group->questions();
124
-                    foreach( $all_questions as $question_ID => $question ){
124
+					foreach( $all_questions as $question_ID => $question ){
125 125
 						if ( $question instanceof EE_Question ) {
126 126
 							/*@var $question EE_Question*/
127 127
 							$checked = isset( $question_group_questions[ $question_ID ] ) ? ' checked="checked"' : '';
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@  discard block
 block discarded – undo
9 9
 assert($question_group);
10 10
 assert($question_group instanceof EE_Question_Group);
11 11
 /* @var EE_Question[] $all_questions */
12
-assert(isset($all_questions) && (empty($all_questions) || is_array($all_questions)));//list of unused questions
13
-foreach($all_questions as $unused_question){
12
+assert(isset($all_questions) && (empty($all_questions) || is_array($all_questions))); //list of unused questions
13
+foreach ($all_questions as $unused_question) {
14 14
 	assert($unused_question);
15 15
 	assert($unused_question instanceof EE_Question);
16 16
 }
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
 
20 20
 $QSG_system = $question_group->system_group();
21 21
 
22
-$disabled = ! empty( $QSG_system ) ? ' disabled="disabled"' : '';
23
-$id =  ! empty( $QST_system ) ? '_disabled' : '';
22
+$disabled = ! empty($QSG_system) ? ' disabled="disabled"' : '';
23
+$id = ! empty($QST_system) ? '_disabled' : '';
24 24
 ?>
25 25
 
26 26
 <div id="group-details" class="edit-group padding">
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 			<tr>
31 31
 				<th>
32 32
 					<label for="QSG_name">
33
-						<?php _e('Group Name','event_espresso');?> <?php echo EEH_Template::get_help_tab_link('group_name_info');?>
33
+						<?php _e('Group Name', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('group_name_info'); ?>
34 34
 					</label>
35 35
 				</th>
36 36
 				<td>
@@ -42,14 +42,14 @@  discard block
 block discarded – undo
42 42
 			<tr>
43 43
 				<th>
44 44
 					<label for="QSG_identifier">
45
-						<?php _e('Group Identifier','event_espresso');?> <?php echo EEH_Template::get_help_tab_link('group_identifier_info');?>
45
+						<?php _e('Group Identifier', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('group_identifier_info'); ?>
46 46
 					</label>
47 47
 				</th>
48 48
 				<td>
49 49
 					<input id="QSG_identifier" name="QSG_identifier<?php echo $id; ?>" value="<?php echo $question_group->identifier()?>" type="text" class="regular-text"<?php echo $disabled; ?>>
50
-					<?php if ( ! empty( $QSG_system )) { ?>
50
+					<?php if ( ! empty($QSG_system)) { ?>
51 51
 					<p><span class="description" style="color:#D54E21;">
52
-							<?php _e('System question group! This field cannot be changed.','event_espresso')?>
52
+							<?php _e('System question group! This field cannot be changed.', 'event_espresso')?>
53 53
 					</span><br/></p>
54 54
 					<?php } ?>
55 55
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 			<tr>
59 59
 				<th>
60 60
 					<label for="QSG_desc">
61
-						<?php _e('Description','event_espresso');?> <?php echo EEH_Template::get_help_tab_link('group_description_info');?>
61
+						<?php _e('Description', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('group_description_info'); ?>
62 62
 					</label>
63 63
 				</th>
64 64
 				<td>
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 			<tr>
70 70
 				<th>
71 71
 					<label for="QSG_order">
72
-						<?php _e('Question Group Order','event_espresso');?> <?php echo EEH_Template::get_help_tab_link('group_order_info');?>
72
+						<?php _e('Question Group Order', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('group_order_info'); ?>
73 73
 					</label>
74 74
 				</th>
75 75
 				<td>
@@ -80,13 +80,13 @@  discard block
 block discarded – undo
80 80
 			<tr>
81 81
 				<th>
82 82
 					<label>
83
-						<?php _e('Show Name','event_espresso');?> <?php echo EEH_Template::get_help_tab_link('show_group_name_info');?>
83
+						<?php _e('Show Name', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('show_group_name_info'); ?>
84 84
 					</label>
85 85
 				</th>
86 86
 				<td>
87 87
 					<label for="QSG_show_group_name">
88
-                        <?php echo EEH_Form_Fields::select_input( 'QSG_show_group_name', $values, $question_group->show_group_name() ); ?>
89
-						<p class="description"><?php _e('Show Group Name on Registration Page?','event_espresso');?></p>
88
+                        <?php echo EEH_Form_Fields::select_input('QSG_show_group_name', $values, $question_group->show_group_name()); ?>
89
+						<p class="description"><?php _e('Show Group Name on Registration Page?', 'event_espresso'); ?></p>
90 90
 					</label>
91 91
 				</td>
92 92
 			</tr>
@@ -94,13 +94,13 @@  discard block
 block discarded – undo
94 94
 			<tr>
95 95
 				<th>
96 96
 					<label>
97
-						<?php _e(' Show Description','event_espresso');?> <?php echo EEH_Template::get_help_tab_link('show_group_description_info');?>
97
+						<?php _e(' Show Description', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('show_group_description_info'); ?>
98 98
 					</label>
99 99
 				</th>
100 100
 				<td>
101 101
                     <label for="QSG_show_group_order">
102
-                        <?php echo EEH_Form_Fields::select_input( 'QSG_show_group_desc', $values, $question_group->show_group_desc() ); ?>
103
-                        <p class="description"><?php _e(' Show Group Description on Registration Page?','event_espresso');?></p>
102
+                        <?php echo EEH_Form_Fields::select_input('QSG_show_group_desc', $values, $question_group->show_group_desc()); ?>
103
+                        <p class="description"><?php _e(' Show Group Description on Registration Page?', 'event_espresso'); ?></p>
104 104
 					</label>
105 105
                     <input type="hidden" name="QSG_system" value="<?php echo $question_group->system_group(); ?>">
106 106
                 </td>
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
 </div>
112 112
 
113 113
 <div id="group-questions" class="edit-group padding question-group-questions-container postbox">
114
-    <div class="handlediv" title="<?php esc_attr_e( 'Click to toggle', 'event_espresso' ); ?>"><br></div>
115
-    <h2 class="handle"><?php _e('Questions','event_espresso');?></h2>
114
+    <div class="handlediv" title="<?php esc_attr_e('Click to toggle', 'event_espresso'); ?>"><br></div>
115
+    <h2 class="handle"><?php _e('Questions', 'event_espresso'); ?></h2>
116 116
 	<div class="form-table question-group-questions inside">
117 117
         <div class="padding">
118 118
             <p><span class="description"><?php _e('Select which questions should be shown in this group by checking or unchecking boxes. You can drag and drop questions to reorder them. Your changes will be updated when you save.', 'event_espresso'); ?></span></p>
@@ -121,26 +121,26 @@  discard block
 block discarded – undo
121 121
                     <?php
122 122
 					$question_order = 0;
123 123
 					$question_group_questions = $question_group->questions();
124
-                    foreach( $all_questions as $question_ID => $question ){
125
-						if ( $question instanceof EE_Question ) {
124
+                    foreach ($all_questions as $question_ID => $question) {
125
+						if ($question instanceof EE_Question) {
126 126
 							/*@var $question EE_Question*/
127
-							$checked = isset( $question_group_questions[ $question_ID ] ) ? ' checked="checked"' : '';
127
+							$checked = isset($question_group_questions[$question_ID]) ? ' checked="checked"' : '';
128 128
 							// disable questions from the personal information question group
129 129
 							// is it required in the current question group? if so don't allow admins to remove it
130
-							$disabled = in_array( $question->system_ID(), EEM_Question::instance()->required_system_questions_in_system_question_group( $QSG_system ) ) ? 'disabled="disabled"' : '';
130
+							$disabled = in_array($question->system_ID(), EEM_Question::instance()->required_system_questions_in_system_question_group($QSG_system)) ? 'disabled="disabled"' : '';
131 131
 							//limit where system questions can appear
132 132
 							if (
133 133
 								$question->system_ID() &&
134
-								! in_array( $question->system_ID(), EEM_Question::instance()->allowed_system_questions_in_system_question_group( $QSG_system ) )
134
+								! in_array($question->system_ID(), EEM_Question::instance()->allowed_system_questions_in_system_question_group($QSG_system))
135 135
 							) {
136 136
 								continue; //skip over system question not assigned to this group except for the address system group cause we want the address questions to display even if they aren't selected (but still not show the personal system questions).  The third condition checks if we're displaying a non system question group and the question is a system question, then we skip because for non-system question groups we only want to show non-system questions.
137 137
 							}
138 138
 						?>
139 139
                     <li class="ee-question-sortable">
140 140
                         <label for="question-<?php echo $question_ID?>">
141
-                            <input type="checkbox" name="questions[<?php echo $question_ID;?>]" id="question-<?php echo $question_ID; ?>" value="<?php echo $question_ID;?>"<?php echo $disabled; ?><?php echo $checked; ?>/>
141
+                            <input type="checkbox" name="questions[<?php echo $question_ID; ?>]" id="question-<?php echo $question_ID; ?>" value="<?php echo $question_ID; ?>"<?php echo $disabled; ?><?php echo $checked; ?>/>
142 142
                             <span class="question-text">
143
-								<?php echo trim( $question->display_text() ) . ( 95 <= strlen( trim( $question->display_text() ) ) ? "&hellip;" : '' ); ?>
143
+								<?php echo trim($question->display_text()).(95 <= strlen(trim($question->display_text())) ? "&hellip;" : ''); ?>
144 144
 							</span>
145 145
                             <input class="question-group-QGQ_order" type="hidden" name="question_orders[<?php echo $question_ID; ?>]" value="<?php echo $question_order; ?>">
146 146
                         </label>
Please login to merge, or discard this patch.
extend/registration_form/templates/questions_in_group_meta_box.template.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@
 block discarded – undo
1 1
 <?php
2 2
 //required variables for template:
3 3
 assert($question_group instanceof EE_Question_Group);
4
-assert(isset($all_questions) && (empty($all_questions) || is_array($all_questions)));//list of unused questions
5
-foreach($all_questions as $question_option){
4
+assert(isset($all_questions) && (empty($all_questions) || is_array($all_questions))); //list of unused questions
5
+foreach ($all_questions as $question_option) {
6 6
 	assert($question_option);
7 7
 	assert($question_option instanceof EE_Question);
8 8
 }
9 9
 ?>
10
-<h4><?php _e('Check off all questions that you wish to appear in this group.','event_espresso');?></h4>
10
+<h4><?php _e('Check off all questions that you wish to appear in this group.', 'event_espresso'); ?></h4>
11 11
 <ul>
12 12
 	<?php 
13
-	foreach( $all_questions as $question_ID=>$question ){
13
+	foreach ($all_questions as $question_ID=>$question) {
14 14
 		/*@var $question EE_Question*/
15
-		$checked = array_key_exists( $question_ID, $question_group->questions() ) ? ' checked="checked"' : '';
15
+		$checked = array_key_exists($question_ID, $question_group->questions()) ? ' checked="checked"' : '';
16 16
 	?>
17 17
 	<li>
18 18
 		<label for="question-<?php echo $question_ID?>">
19
-			<input type="checkbox" name="questions[<?php echo $question_ID;?>]" id="question-<?php echo $question_ID;?>" value="<?php echo $question_ID;?>"<?php echo $checked;?>/>
19
+			<input type="checkbox" name="questions[<?php echo $question_ID; ?>]" id="question-<?php echo $question_ID; ?>" value="<?php echo $question_ID; ?>"<?php echo $checked; ?>/>
20 20
 			<?php echo $question->display_text()?>				
21 21
 		</label>
22 22
 	</li>
Please login to merge, or discard this patch.
admin/extend/registration_form/templates/reg_form_settings.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,3 +1,3 @@
 block discarded – undo
1 1
 <div class="padding">
2
-		<?php do_action( 'AHEE__Extend_Registration_Form_Admin_Page___reg_form_settings_template' ); ?>
2
+		<?php do_action('AHEE__Extend_Registration_Form_Admin_Page___reg_form_settings_template'); ?>
3 3
 </div>
Please login to merge, or discard this patch.
admin/extend/registrations/EE_Registration_CheckIn_List_Table.class.php 2 patches
Braces   +9 added lines, -5 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
  *
@@ -123,8 +125,9 @@  discard block
 block discarded – undo
123 125
 		}
124 126
 
125 127
 		//if no reg id then get out cause need a reg id
126
-		if ( empty( $REG_ID ) || empty( $DTT_ID ) )
127
-			throw new EE_Error(__('This route cannot be viewed unless registration and datetime IDs are included in the request (via REG_ID and DTT_ID parameters)', 'event_espresso') );
128
+		if ( empty( $REG_ID ) || empty( $DTT_ID ) ) {
129
+					throw new EE_Error(__('This route cannot be viewed unless registration and datetime IDs are included in the request (via REG_ID and DTT_ID parameters)', 'event_espresso') );
130
+		}
128 131
 
129 132
 		//set orderby
130 133
 		$orderby = 'CHK_timestamp'; //note that with this table we're only providing the option to orderby the timestamp value.
@@ -147,8 +150,9 @@  discard block
 block discarded – undo
147 150
 		$query_params = array( $_where, 'order_by' => array( $orderby => $order ), 'limit' => $limit );
148 151
 
149 152
 		//if no per_page value then we just want to return a count of all Check-ins
150
-		if ( $count )
151
-			return EEM_Checkin::instance()->count( array( $_where ) );
153
+		if ( $count ) {
154
+					return EEM_Checkin::instance()->count( array( $_where ) );
155
+		}
152 156
 
153 157
 		return $count ? EEM_Checkin::instance()->count( array( $_where ) ) : EEM_Checkin::instance()->get_all($query_params);
154 158
 	}
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
 
30 30
 
31
-	public function __construct( $admin_page ) {
31
+	public function __construct($admin_page) {
32 32
 		parent::__construct($admin_page);
33 33
 	}
34 34
 
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
 
37 37
 
38 38
 	protected function _setup_data() {
39
-		$this->_data = $this->_get_checkins( $this->_per_page );
40
-		$this->_all_data_count = $this->_get_checkins(  $this->_per_page, TRUE );
39
+		$this->_data = $this->_get_checkins($this->_per_page);
40
+		$this->_all_data_count = $this->_get_checkins($this->_per_page, TRUE);
41 41
 	}
42 42
 
43 43
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 			);
59 59
 
60 60
 		$this->_sortable_columns = array(
61
-			'CHK_timestamp' => array( 'CHK_timestamp' => TRUE )
61
+			'CHK_timestamp' => array('CHK_timestamp' => TRUE)
62 62
 			);
63 63
 
64 64
 		$this->_primary_column = 'CHK_in';
@@ -82,25 +82,25 @@  discard block
 block discarded – undo
82 82
 	}
83 83
 
84 84
 
85
-	function column_cb($item ) {
86
-		return sprintf( '<input type="checkbox" name="checkbox[%1$s]" />', $item->ID() );
85
+	function column_cb($item) {
86
+		return sprintf('<input type="checkbox" name="checkbox[%1$s]" />', $item->ID());
87 87
 	}
88 88
 
89 89
 
90
-	function column_CHK_in( EE_Checkin $item ) {
90
+	function column_CHK_in(EE_Checkin $item) {
91 91
 		$checkinstatus = $item->get('CHK_in');
92 92
 		$checkinstatus = $checkinstatus ? EE_Registration::checkin_status_in : EE_Registration::checkin_status_out;
93
-		return '<span class="checkin-icons checkedin-status-' . $checkinstatus . '"></span><span class="show-on-mobile-view-only">' . $item->get_datetime('CHK_timestamp') . '</span>';
93
+		return '<span class="checkin-icons checkedin-status-'.$checkinstatus.'"></span><span class="show-on-mobile-view-only">'.$item->get_datetime('CHK_timestamp').'</span>';
94 94
 	}
95 95
 
96 96
 
97 97
 
98
-	function column_CHK_timestamp( EE_Checkin $item ) {
98
+	function column_CHK_timestamp(EE_Checkin $item) {
99 99
 		$actions = array();
100
-		$delete_url = EE_Admin_Page::add_query_args_and_nonce( array('action' => 'delete_checkin_row', 'DTT_ID' => $this->_req_data['DTT_ID'], '_REGID' => $this->_req_data['_REGID'], 'CHK_ID' => $item->ID() ) );
101
-		$actions['delete_checkin'] = EE_Registry::instance()->CAP->current_user_can( 'ee_delete_checkins', 'espresso_registrations_delete_checkin_row' ) ? '<a href="' . $delete_url . '" title="' . esc_attr__('Click here to delete this check-in record', 'event_espresso') . '">' . __('Delete', 'event_espresso') . '</a>' : '';
100
+		$delete_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'delete_checkin_row', 'DTT_ID' => $this->_req_data['DTT_ID'], '_REGID' => $this->_req_data['_REGID'], 'CHK_ID' => $item->ID()));
101
+		$actions['delete_checkin'] = EE_Registry::instance()->CAP->current_user_can('ee_delete_checkins', 'espresso_registrations_delete_checkin_row') ? '<a href="'.$delete_url.'" title="'.esc_attr__('Click here to delete this check-in record', 'event_espresso').'">'.__('Delete', 'event_espresso').'</a>' : '';
102 102
 
103
-		return sprintf( '%1$s %2$s', $item->get_datetime('CHK_timestamp'), $this->row_actions($actions) );
103
+		return sprintf('%1$s %2$s', $item->get_datetime('CHK_timestamp'), $this->row_actions($actions));
104 104
 	}
105 105
 
106 106
 
@@ -115,30 +115,30 @@  discard block
 block discarded – undo
115 115
 	 * @param bool    $count        Whether to return a count or not
116 116
 	 * @return EE_Checkin[]|int
117 117
 	 */
118
-	protected function _get_checkins( $per_page = 10, $count = FALSE ) {
119
-		$REG_ID = isset( $this->_req_data['_REGID'] ) ? $this->_req_data['_REGID'] : FALSE;
120
-		$DTT_ID = isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : FALSE;
118
+	protected function _get_checkins($per_page = 10, $count = FALSE) {
119
+		$REG_ID = isset($this->_req_data['_REGID']) ? $this->_req_data['_REGID'] : FALSE;
120
+		$DTT_ID = isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : FALSE;
121 121
 
122 122
 		//if user does not have the capability for the checkins for this registration then get out!
123
-		if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_read_checkin', 'espresso_registrations_registration_checkins', $REG_ID ) ) {
123
+		if ( ! EE_Registry::instance()->CAP->current_user_can('ee_read_checkin', 'espresso_registrations_registration_checkins', $REG_ID)) {
124 124
 			return $count ? 0 : array();
125 125
 		}
126 126
 
127 127
 		//if no reg id then get out cause need a reg id
128
-		if ( empty( $REG_ID ) || empty( $DTT_ID ) )
129
-			throw new EE_Error(__('This route cannot be viewed unless registration and datetime IDs are included in the request (via REG_ID and DTT_ID parameters)', 'event_espresso') );
128
+		if (empty($REG_ID) || empty($DTT_ID))
129
+			throw new EE_Error(__('This route cannot be viewed unless registration and datetime IDs are included in the request (via REG_ID and DTT_ID parameters)', 'event_espresso'));
130 130
 
131 131
 		//set orderby
132 132
 		$orderby = 'CHK_timestamp'; //note that with this table we're only providing the option to orderby the timestamp value.
133 133
 
134
-		$order = !empty( $this->_req_data['order'] ) ? $this->_req_data['order'] : 'ASC';
134
+		$order = ! empty($this->_req_data['order']) ? $this->_req_data['order'] : 'ASC';
135 135
 
136
-		$current_page = isset( $this->_req_data['paged'] ) && !empty( $this->_req_data['paged'] ) ? $this->_req_data['paged'] : 1;
137
-		$per_page = isset( $this->_req_data['perpage'] ) && !empty( $this->_req_data['perpage'] ) ? $this->_req_data['perpage'] : $per_page;
136
+		$current_page = isset($this->_req_data['paged']) && ! empty($this->_req_data['paged']) ? $this->_req_data['paged'] : 1;
137
+		$per_page = isset($this->_req_data['perpage']) && ! empty($this->_req_data['perpage']) ? $this->_req_data['perpage'] : $per_page;
138 138
 		$limit = NULL;
139
-		if ( !$count ) {
140
-			$offset = ($current_page-1)*$per_page;
141
-			$limit = array( $offset, $per_page );
139
+		if ( ! $count) {
140
+			$offset = ($current_page - 1) * $per_page;
141
+			$limit = array($offset, $per_page);
142 142
 		}
143 143
 
144 144
 		$_where = array(
@@ -146,13 +146,13 @@  discard block
 block discarded – undo
146 146
 			'DTT_ID' => $DTT_ID
147 147
 			);
148 148
 
149
-		$query_params = array( $_where, 'order_by' => array( $orderby => $order ), 'limit' => $limit );
149
+		$query_params = array($_where, 'order_by' => array($orderby => $order), 'limit' => $limit);
150 150
 
151 151
 		//if no per_page value then we just want to return a count of all Check-ins
152
-		if ( $count )
153
-			return EEM_Checkin::instance()->count( array( $_where ) );
152
+		if ($count)
153
+			return EEM_Checkin::instance()->count(array($_where));
154 154
 
155
-		return $count ? EEM_Checkin::instance()->count( array( $_where ) ) : EEM_Checkin::instance()->get_all($query_params);
155
+		return $count ? EEM_Checkin::instance()->count(array($_where)) : EEM_Checkin::instance()->get_all($query_params);
156 156
 	}
157 157
 
158 158
 } //end class EE_Registration_CheckIn_List_Table
Please login to merge, or discard this patch.
admin/extend/registrations/Extend_EE_Registrations_List_Table.class.php 3 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -31,20 +31,20 @@  discard block
 block discarded – undo
31 31
 	/**
32 32
 	 * 		REG_date
33 33
 	*/
34
-	function column_REG_date(EE_Registration $item){
34
+	function column_REG_date(EE_Registration $item) {
35 35
 
36 36
 		//Build row actions
37 37
 		$actions = array();
38 38
 
39 39
 		//Build row actions
40
-		$check_in_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'event_registrations', 'event_id'=>$item->event_ID() ), REG_ADMIN_URL );
41
-		$actions['check_in'] = EE_Registry::instance()->CAP->current_user_can( 'ee_read_checkin', 'espresso_registrations_registration_checkins', $item->ID() ) ? '
42
-			<a href="'.$check_in_url.'" title="' . esc_attr__( 'The Check-In List allows you to easily toggle check-in status for this event', 'event_espresso' ) . '">' . __( 'View Check-ins', 'event_espresso' ) . '</a>' : __( 'View Check-ins', 'event_espresso' );
40
+		$check_in_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'event_registrations', 'event_id'=>$item->event_ID()), REG_ADMIN_URL);
41
+		$actions['check_in'] = EE_Registry::instance()->CAP->current_user_can('ee_read_checkin', 'espresso_registrations_registration_checkins', $item->ID()) ? '
42
+			<a href="'.$check_in_url.'" title="'.esc_attr__('The Check-In List allows you to easily toggle check-in status for this event', 'event_espresso').'">'.__('View Check-ins', 'event_espresso').'</a>' : __('View Check-ins', 'event_espresso');
43 43
 
44
-		$view_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_transaction', 'TXN_ID'=>$item->transaction()->ID() ), TXN_ADMIN_URL );
45
-		$REG_date = EE_Regisry::instance()->CAP->current_user_can( 'ee_read_transaction', 'espresso_transactions_view_transaction' ) ?  '<a href="'.$view_lnk_url.'" title="' . esc_attr__( 'View Transaction Details', 'event_espresso' ) . '">' . $item->get_i18n_datetime( 'REG_date' ) . '</a>' : $item->get_i18n_datetime( 'REG_date' );
44
+		$view_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_transaction', 'TXN_ID'=>$item->transaction()->ID()), TXN_ADMIN_URL);
45
+		$REG_date = EE_Regisry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction') ? '<a href="'.$view_lnk_url.'" title="'.esc_attr__('View Transaction Details', 'event_espresso').'">'.$item->get_i18n_datetime('REG_date').'</a>' : $item->get_i18n_datetime('REG_date');
46 46
 
47
-		return sprintf('%1$s %2$s', $REG_date, $this->row_actions($actions) );
47
+		return sprintf('%1$s %2$s', $REG_date, $this->row_actions($actions));
48 48
 
49 49
 	}
50 50
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	/**
55 55
 	 * 		column_default
56 56
 	*/
57
-   	function column_DTT_EVT_start(EE_Registration $item){
57
+   	function column_DTT_EVT_start(EE_Registration $item) {
58 58
 		$datetime_strings = array();
59 59
 		$remove_defaults = array('default_where_conditions' => 'none');
60 60
 		$ticket = $item->ticket();
@@ -63,12 +63,12 @@  discard block
 block discarded – undo
63 63
 			'action'=>'event_registrations',
64 64
 			'event_id'=>$item->event_ID()
65 65
 			);
66
-		foreach($datetimes as $datetime){
66
+		foreach ($datetimes as $datetime) {
67 67
 			$query_args['DTT_ID'] = $datetime->ID();
68
-			$checkin_url = EE_Admin_Page::add_query_args_and_nonce( $query_args, REG_ADMIN_URL );
69
-			$datetime_strings[] = EE_Registry::instance()->CAP->current_user_can( 'ee_read_checkin', 'espresso_registrations_registration_checkins', $item->ID() ) ? '<a href="' . $checkin_url . '" title="' . esc_attr__( 'View Checkins for this Event', 'event_espresso' ) . '">' . $datetime->get_i18n_datetime( 'DTT_EVT_start' ) . '</a>' : $datetime->get_i18n_datetime( 'DTT_EVT_start' );
68
+			$checkin_url = EE_Admin_Page::add_query_args_and_nonce($query_args, REG_ADMIN_URL);
69
+			$datetime_strings[] = EE_Registry::instance()->CAP->current_user_can('ee_read_checkin', 'espresso_registrations_registration_checkins', $item->ID()) ? '<a href="'.$checkin_url.'" title="'.esc_attr__('View Checkins for this Event', 'event_espresso').'">'.$datetime->get_i18n_datetime('DTT_EVT_start').'</a>' : $datetime->get_i18n_datetime('DTT_EVT_start');
70 70
 		}
71
-		return implode("<br />",$datetime_strings);
71
+		return implode("<br />", $datetime_strings);
72 72
     }
73 73
 
74 74
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 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
  *
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
 	/**
32 32
 	 * 		REG_date
33
-	*/
33
+	 */
34 34
 	function column_REG_date(EE_Registration $item){
35 35
 
36 36
 		//Build row actions
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
 	/**
55 55
 	 * 		column_default
56
-	*/
56
+	 */
57 57
    	function column_DTT_EVT_start(EE_Registration $item){
58 58
 		$datetime_strings = array();
59 59
 		$remove_defaults = array('default_where_conditions' => 'none');
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 			$datetime_strings[] = EE_Registry::instance()->CAP->current_user_can( 'ee_read_checkin', 'espresso_registrations_registration_checkins', $item->ID() ) ? '<a href="' . $checkin_url . '" title="' . esc_attr__( 'View Checkins for this Event', 'event_espresso' ) . '">' . $datetime->get_i18n_datetime( 'DTT_EVT_start' ) . '</a>' : $datetime->get_i18n_datetime( 'DTT_EVT_start' );
70 70
 		}
71 71
 		return implode("<br />",$datetime_strings);
72
-    }
72
+	}
73 73
 
74 74
 
75 75
 
Please login to merge, or discard this patch.
admin/extend/registrations/Extend_Registrations_Admin_Page.core.php 4 patches
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
@@ -679,8 +680,9 @@  discard block
 block discarded – undo
679 680
 			EE_Error::add_error(__('Missing some required data to toggle the Check-in', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__  );
680 681
 		}
681 682
 
682
-		if ( defined('DOING_AJAX' ) )
683
-			return $new_status;
683
+		if ( defined('DOING_AJAX' ) ) {
684
+					return $new_status;
685
+		}
684 686
 
685 687
 		$this->_redirect_after_action( FALSE,'', '', $query_args, TRUE );
686 688
 
@@ -918,7 +920,7 @@  discard block
 block discarded – undo
918 920
 		$query_params['force_join'] = array('Attendee');//force join to attendee model so that it gets cached, because we're going to need the attendee for each registration
919 921
 		if($count){
920 922
 			$registrations = EEM_Registration::instance()->count(array($query_params[0]));
921
-		}else{
923
+		} else{
922 924
 			$registrations = EEM_Registration::instance()->get_all($query_params);
923 925
 
924 926
 
Please login to merge, or discard this patch.
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -631,8 +631,6 @@
 block discarded – undo
631 631
 	/**
632 632
 	 * 		handles toggleing the checkin status for the registration,
633 633
 	*		@access protected
634
-	*		@param boolean 	$check_in
635
-	*		@return void
636 634
 	*/
637 635
 	protected function _toggle_checkin_status() {
638 636
 		//first let's get the query args out of the way for the redirect
Please login to merge, or discard this patch.
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -453,9 +453,9 @@  discard block
 block discarded – undo
453 453
 
454 454
 	/**
455 455
 	 * 		generates Business Reports regarding Registrations
456
-	*		@access protected
457
-	*		@return void
458
-	*/
456
+	 *		@access protected
457
+	 *		@return void
458
+	 */
459 459
 	protected function _registration_reports() {
460 460
 		$template_path = EE_ADMIN_TEMPLATE . 'admin_reports.template.php';
461 461
 		$this->_template_args['admin_page_content'] = EEH_Template::display_template( $template_path, $this->_reports_template_data, true );
@@ -630,10 +630,10 @@  discard block
 block discarded – undo
630 630
 
631 631
 	/**
632 632
 	 * 		handles toggleing the checkin status for the registration,
633
-	*		@access protected
634
-	*		@param boolean 	$check_in
635
-	*		@return void
636
-	*/
633
+	 *		@access protected
634
+	 *		@param boolean 	$check_in
635
+	 *		@return void
636
+	 */
637 637
 	protected function _toggle_checkin_status() {
638 638
 		//first let's get the query args out of the way for the redirect
639 639
 		$query_args = array(
@@ -754,9 +754,9 @@  discard block
 block discarded – undo
754 754
 
755 755
 	/**
756 756
 	 * 		generates HTML for the Event Registrations List Table
757
-	*		@access protected
758
-	*		@return void
759
-	*/
757
+	 *		@access protected
758
+	 *		@return void
759
+	 */
760 760
 	protected function _event_registrations_list_table() {
761 761
 		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
762 762
 		$this->_admin_page_title .= isset( $this->_req_data['event_id'] ) ? $this->get_action_link_or_button('new_registration', 'add-registrant', array('event_id' => $this->_req_data['event_id']), 'add-new-h2') : '';
@@ -786,11 +786,11 @@  discard block
 block discarded – undo
786 786
 				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_approved,
787 787
 				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_approved, FALSE, 'sentence' )
788 788
 				),
789
-            'cancelled_status' => array(
789
+			'cancelled_status' => array(
790 790
 				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_cancelled,
791 791
 				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_cancelled, FALSE, 'sentence' )
792 792
 				),
793
-            'declined_status' => array(
793
+			'declined_status' => array(
794 794
 				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_declined,
795 795
 				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_declined, FALSE, 'sentence' )
796 796
 				),
@@ -818,9 +818,9 @@  discard block
 block discarded – undo
818 818
 	/**
819 819
 	 * 		get_attendees
820 820
 	 * 		@param bool $count whether to return count or data.
821
-	*		@access public
822
-	*		@return array
823
-	*/
821
+	 *		@access public
822
+	 *		@return array
823
+	 */
824 824
 	public function get_event_attendees( $per_page = 10, $count = FALSE, $trash = FALSE, $orderby = '' ) {
825 825
 
826 826
 		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
Please login to merge, or discard this patch.
Spacing   +234 added lines, -234 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -37,20 +37,20 @@  discard block
 block discarded – undo
37 37
 	protected $_reports_template_data = array();
38 38
 
39 39
 
40
-	public function __construct( $routing = TRUE ) {
41
-		parent::__construct( $routing );
42
-		define( 'REG_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'registrations/templates/');
43
-		define( 'REG_CAF_ASSETS', EE_CORE_CAF_ADMIN_EXTEND . 'registrations/assets/');
44
-		define( 'REG_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'registrations/assets/');
40
+	public function __construct($routing = TRUE) {
41
+		parent::__construct($routing);
42
+		define('REG_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND.'registrations/templates/');
43
+		define('REG_CAF_ASSETS', EE_CORE_CAF_ADMIN_EXTEND.'registrations/assets/');
44
+		define('REG_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL.'registrations/assets/');
45 45
 	}
46 46
 
47 47
 
48 48
 	protected function _extend_page_config() {
49
-		$this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'registrations';
49
+		$this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND.'registrations';
50 50
 
51
-		$reg_id = ! empty( $this->_req_data['_REG_ID'] ) && ! is_array( $this->_req_data['_REG_ID'] ) ? $this->_req_data['_REG_ID'] : 0;
52
-		$att_id = ! empty( $this->_req_data[ 'ATT_ID' ] ) ? ! is_array( $this->_req_data['ATT_ID'] ) : 0;
53
-		$att_id = ! empty( $this->_req_data['post'] ) && ! is_array( $this->_req_data['post'] ) ? $this->_req_data['post'] : $att_id;
51
+		$reg_id = ! empty($this->_req_data['_REG_ID']) && ! is_array($this->_req_data['_REG_ID']) ? $this->_req_data['_REG_ID'] : 0;
52
+		$att_id = ! empty($this->_req_data['ATT_ID']) ? ! is_array($this->_req_data['ATT_ID']) : 0;
53
+		$att_id = ! empty($this->_req_data['post']) && ! is_array($this->_req_data['post']) ? $this->_req_data['post'] : $att_id;
54 54
 
55 55
 		$new_page_routes = array(
56 56
 			'reports' => array(
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 				)
90 90
 			);
91 91
 
92
-		$this->_page_routes = array_merge( $this->_page_routes, $new_page_routes );
92
+		$this->_page_routes = array_merge($this->_page_routes, $new_page_routes);
93 93
 
94 94
 		$new_page_config = array(
95 95
 			'reports' => array(
@@ -134,8 +134,8 @@  discard block
 block discarded – undo
134 134
 						'filename' => 'registrations_event_checkin_other'
135 135
 					)
136 136
 				),
137
-				'help_tour' => array( 'Event_Checkin_Help_Tour' ),
138
-				'qtips' => array('Registration_List_Table_Tips' ),
137
+				'help_tour' => array('Event_Checkin_Help_Tour'),
138
+				'qtips' => array('Registration_List_Table_Tips'),
139 139
 				'list_table' => 'EE_Event_Registrations_List_Table',
140 140
 				'metaboxes' => array(),
141 141
 				'require_nonce' => FALSE
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 				),
154 154
 			);
155 155
 
156
-		$this->_page_config = array_merge( $this->_page_config, $new_page_config );
156
+		$this->_page_config = array_merge($this->_page_config, $new_page_config);
157 157
 		$this->_page_config['contact_list']['list_table'] = 'Extend_EE_Attendee_Contact_List_Table';
158 158
 		$this->_page_config['default']['list_table'] = 'Extend_EE_Registrations_List_Table';
159 159
 	}
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 
163 163
 	protected function _ajax_hooks() {
164 164
 		parent::_ajax_hooks();
165
-		add_action( 'wp_ajax_get_newsletter_form_content', array( $this, 'get_newsletter_form_content' ) );
165
+		add_action('wp_ajax_get_newsletter_form_content', array($this, 'get_newsletter_form_content'));
166 166
 	}
167 167
 
168 168
 
@@ -171,20 +171,20 @@  discard block
 block discarded – undo
171 171
 		parent::load_scripts_styles();
172 172
 
173 173
 		//if newsletter message type is active then let's add filter and load js for it.
174
-		if ( EEH_MSG_Template::is_mt_active('newsletter') ) {
174
+		if (EEH_MSG_Template::is_mt_active('newsletter')) {
175 175
 			//enqueue newsletter js
176
-			wp_enqueue_script( 'ee-newsletter-trigger', REG_CAF_ASSETS_URL . 'ee-newsletter-trigger.js', array( 'ee-dialog' ), EVENT_ESPRESSO_VERSION, TRUE );
177
-			wp_enqueue_style( 'ee-newsletter-trigger-css', REG_CAF_ASSETS_URL . 'ee-newsletter-trigger.css', array(), EVENT_ESPRESSO_VERSION );
176
+			wp_enqueue_script('ee-newsletter-trigger', REG_CAF_ASSETS_URL.'ee-newsletter-trigger.js', array('ee-dialog'), EVENT_ESPRESSO_VERSION, TRUE);
177
+			wp_enqueue_style('ee-newsletter-trigger-css', REG_CAF_ASSETS_URL.'ee-newsletter-trigger.css', array(), EVENT_ESPRESSO_VERSION);
178 178
 			//hook in buttons for newsletter message type trigger.
179
-			add_action('AHEE__EE_Admin_List_Table__extra_tablenav__after_bottom_buttons', array( $this, 'add_newsletter_action_buttons'), 10 );
179
+			add_action('AHEE__EE_Admin_List_Table__extra_tablenav__after_bottom_buttons', array($this, 'add_newsletter_action_buttons'), 10);
180 180
 		}
181 181
 	}
182 182
 
183 183
 
184 184
 
185 185
 	public function load_scripts_styles_reports() {
186
-		wp_register_script( 'ee-reg-reports-js', REG_CAF_ASSETS_URL . 'ee-registration-admin-reports.js', array( 'google-charts' ), EVENT_ESPRESSO_VERSION, true );
187
-		wp_enqueue_script( 'ee-reg-reports-js' );
186
+		wp_register_script('ee-reg-reports-js', REG_CAF_ASSETS_URL.'ee-registration-admin-reports.js', array('google-charts'), EVENT_ESPRESSO_VERSION, true);
187
+		wp_enqueue_script('ee-reg-reports-js');
188 188
 		$this->_registration_reports_js_setup();
189 189
 	}
190 190
 
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 				'slug' => 'all',
217 217
 				'label' => __('All', 'event_espresso'),
218 218
 				'count' => 0,
219
-				'bulk_action' => !isset( $this->_req_data['event_id'] ) ? array() : array(
219
+				'bulk_action' => ! isset($this->_req_data['event_id']) ? array() : array(
220 220
 					'toggle_checkin_status' => __('Toggle Check-In', 'event_espresso'),
221 221
 					//'trash_registrations' => __('Trash Registrations', 'event_espresso')
222 222
 					)
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 				'slug' => 'all',
235 235
 				'label' => __('All', 'event_espresso'),
236 236
 				'count' => 0,
237
-				'bulk_action' => array( 'delete_checkin_rows' => __('Delete Check-In Rows', 'event_espresso') )
237
+				'bulk_action' => array('delete_checkin_rows' => __('Delete Check-In Rows', 'event_espresso'))
238 238
 				),
239 239
 			);
240 240
 	}
@@ -250,20 +250,20 @@  discard block
 block discarded – undo
250 250
 	 */
251 251
 	public function get_newsletter_form_content() {
252 252
 		//do a nonce check cause we're not coming in from an normal route here.
253
-		$nonce = isset( $this->_req_data['get_newsletter_form_content_nonce'] ) ? sanitize_text_field( $this->_req_data['get_newsletter_form_content_nonce'] ) : '';
253
+		$nonce = isset($this->_req_data['get_newsletter_form_content_nonce']) ? sanitize_text_field($this->_req_data['get_newsletter_form_content_nonce']) : '';
254 254
 		$nonce_ref = 'get_newsletter_form_content_nonce';
255 255
 
256
-		$this->_verify_nonce( $nonce, $nonce_ref );
256
+		$this->_verify_nonce($nonce, $nonce_ref);
257 257
 		//let's get the mtp for the incoming MTP_ ID
258
-		if ( !isset( $this->_req_data['GRP_ID'] ) ) {
259
-			EE_Error::add_error( __('There must be something broken with the js or html structure because the required data for getting a message template group is not present (need an GRP_ID).', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
258
+		if ( ! isset($this->_req_data['GRP_ID'])) {
259
+			EE_Error::add_error(__('There must be something broken with the js or html structure because the required data for getting a message template group is not present (need an GRP_ID).', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
260 260
 			$this->_template_args['success'] = FALSE;
261 261
 			$this->_template_args['error'] = TRUE;
262 262
 			$this->_return_json();
263 263
 		}
264
-		$MTPG = EEM_Message_Template_Group::instance()->get_one_by_ID( $this->_req_data['GRP_ID'] );
265
-		if ( ! $MTPG instanceof EE_Message_Template_Group ) {
266
-			EE_Error::add_error( sprintf( __('The GRP_ID given (%d) does not appear to have a corresponding row in the database.', 'event_espresso'), $this->_req_data['GRP_ID'] ), __FILE__, __FUNCTION__, __LINE__  );
264
+		$MTPG = EEM_Message_Template_Group::instance()->get_one_by_ID($this->_req_data['GRP_ID']);
265
+		if ( ! $MTPG instanceof EE_Message_Template_Group) {
266
+			EE_Error::add_error(sprintf(__('The GRP_ID given (%d) does not appear to have a corresponding row in the database.', 'event_espresso'), $this->_req_data['GRP_ID']), __FILE__, __FUNCTION__, __LINE__);
267 267
 			$this->_template_args['success'] = FALSE;
268 268
 			$this->_template_args['error'] = TRUE;
269 269
 			$this->_return_json();
@@ -272,11 +272,11 @@  discard block
 block discarded – undo
272 272
 		$MTPs = $MTPG->context_templates();
273 273
 		$MTPs = $MTPs['attendee'];
274 274
 		$template_fields = array();
275
-		foreach ( $MTPs as $MTP ) {
275
+		foreach ($MTPs as $MTP) {
276 276
 			$field = $MTP->get('MTP_template_field');
277
-			if ( $field == 'content'  ) {
277
+			if ($field == 'content') {
278 278
 				$content = $MTP->get('MTP_content');
279
-				if ( !empty( $content['newsletter_content'] ) ) {
279
+				if ( ! empty($content['newsletter_content'])) {
280 280
 					$template_fields['newsletter_content'] = $content['newsletter_content'];
281 281
 					}
282 282
 				continue;
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 		$this->_template_args['data'] = array(
290 290
 			'batch_message_from' => isset($template_fields['from']) ? $template_fields['from'] : '',
291 291
 			'batch_message_subject' => isset($template_fields['subject']) ? $template_fields['subject'] : '',
292
-			'batch_message_content' => isset( $template_fields['newsletter_content'] ) ? $template_fields['newsletter_content'] : ''
292
+			'batch_message_content' => isset($template_fields['newsletter_content']) ? $template_fields['newsletter_content'] : ''
293 293
 			);
294 294
 		$this->_return_json();
295 295
 	}
@@ -305,8 +305,8 @@  discard block
 block discarded – undo
305 305
 	 * @param EE_Admin_List_Table $list_table
306 306
 	 * @return string html string for extra buttons
307 307
 	 */
308
-	public function add_newsletter_action_buttons( EE_Admin_List_Table $list_table ) {
309
-		if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_send_message', 'espresso_registrations_newsletter_selected_send' ) ) {
308
+	public function add_newsletter_action_buttons(EE_Admin_List_Table $list_table) {
309
+		if ( ! EE_Registry::instance()->CAP->current_user_can('ee_send_message', 'espresso_registrations_newsletter_selected_send')) {
310 310
 			return '';
311 311
 		}
312 312
 
@@ -315,13 +315,13 @@  discard block
 block discarded – undo
315 315
 			'event_registrations',
316 316
 			'default'
317 317
 			);
318
-		if ( $this->_current_page == 'espresso_registrations' && in_array( $this->_req_action, $routes_to_add_to )  ) {
319
-			if ( ( $this->_req_action == 'event_registrations' && empty( $this->_req_data['event_id'] ) ) || ( isset( $this->_req_data['status'] ) && $this->_req_data['status'] == 'trash' ) ) {
318
+		if ($this->_current_page == 'espresso_registrations' && in_array($this->_req_action, $routes_to_add_to)) {
319
+			if (($this->_req_action == 'event_registrations' && empty($this->_req_data['event_id'])) || (isset($this->_req_data['status']) && $this->_req_data['status'] == 'trash')) {
320 320
 				echo '';
321 321
 			} else {
322
-				$button_text = sprintf( __('Send Batch Message (%s selected)', 'event_espresso'), '<span class="send-selected-newsletter-count">0</span>' );
323
-				echo '<button id="selected-batch-send-trigger" class="button secondary-button"><span class="dashicons dashicons-email "></span>' . $button_text . '</button>';
324
-				add_action('admin_footer', array( $this, 'newsletter_send_form_skeleton') );
322
+				$button_text = sprintf(__('Send Batch Message (%s selected)', 'event_espresso'), '<span class="send-selected-newsletter-count">0</span>');
323
+				echo '<button id="selected-batch-send-trigger" class="button secondary-button"><span class="dashicons dashicons-email "></span>'.$button_text.'</button>';
324
+				add_action('admin_footer', array($this, 'newsletter_send_form_skeleton'));
325 325
 			}
326 326
 		}
327 327
 	}
@@ -333,37 +333,37 @@  discard block
 block discarded – undo
333 333
 		$list_table = $this->_list_table_object;
334 334
 		$codes = array();
335 335
 		//need to templates for the newsletter message type for the template selector.
336
-		$values[] = array( 'text' => __('Select Template to Use', 'event_espresso'), 'id' => 0 );
337
-		$mtps = EEM_Message_Template_Group::instance()->get_all( array( array( 'MTP_message_type' => 'newsletter', 'MTP_messenger' => 'email' ) ) );
338
-		foreach ( $mtps as $mtp ) {
336
+		$values[] = array('text' => __('Select Template to Use', 'event_espresso'), 'id' => 0);
337
+		$mtps = EEM_Message_Template_Group::instance()->get_all(array(array('MTP_message_type' => 'newsletter', 'MTP_messenger' => 'email')));
338
+		foreach ($mtps as $mtp) {
339 339
 			$name = $mtp->name();
340 340
 			$values[] = array(
341
-				'text' => empty( $name ) ? __('Global', 'event_espresso') : $name,
341
+				'text' => empty($name) ? __('Global', 'event_espresso') : $name,
342 342
 				'id' => $mtp->ID()
343 343
 				);
344 344
 		}
345 345
 
346 346
 		//need to get a list of shortcodes that are available for the newsletter message type.
347
-		$shortcodes = EEH_MSG_Template::get_shortcodes( 'newsletter', 'email', array(), 'attendee', FALSE );
348
-		foreach ( $shortcodes as $field => $shortcode_array ) {
349
-			$codes[$field] = implode(', ', array_keys($shortcode_array ) );
347
+		$shortcodes = EEH_MSG_Template::get_shortcodes('newsletter', 'email', array(), 'attendee', FALSE);
348
+		foreach ($shortcodes as $field => $shortcode_array) {
349
+			$codes[$field] = implode(', ', array_keys($shortcode_array));
350 350
 		}
351 351
 
352 352
 		$shortcodes = $codes;
353 353
 
354
-		$form_template = REG_CAF_TEMPLATE_PATH . 'newsletter-send-form.template.php';
354
+		$form_template = REG_CAF_TEMPLATE_PATH.'newsletter-send-form.template.php';
355 355
 		$form_template_args = array(
356 356
 			'form_action' => admin_url('admin.php?page=espresso_registrations'),
357 357
 			'form_route' => 'newsletter_selected_send',
358 358
 			'form_nonce_name' => 'newsletter_selected_send_nonce',
359
-			'form_nonce' => wp_create_nonce( 'newsletter_selected_send_nonce' ),
359
+			'form_nonce' => wp_create_nonce('newsletter_selected_send_nonce'),
360 360
 			'redirect_back_to' => $this->_req_action,
361
-			'ajax_nonce' => wp_create_nonce( 'get_newsletter_form_content_nonce'),
362
-			'template_selector' => EEH_Form_Fields::select_input('newsletter_mtp_selected', $values ),
361
+			'ajax_nonce' => wp_create_nonce('get_newsletter_form_content_nonce'),
362
+			'template_selector' => EEH_Form_Fields::select_input('newsletter_mtp_selected', $values),
363 363
 			'shortcodes' => $shortcodes,
364 364
 			'id_type' => $list_table instanceof EE_Attendee_Contact_List_Table ? 'contact' : 'registration'
365 365
 			);
366
-		EEH_Template::display_template( $form_template, $form_template_args );
366
+		EEH_Template::display_template($form_template, $form_template_args);
367 367
 	}
368 368
 
369 369
 
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
 	protected function _newsletter_selected_send() {
379 379
 		$success = TRUE;
380 380
 		//first we need to make sure we have a GRP_ID so we know what template we're sending and updating!
381
-		if ( empty( $this->_req_data['newsletter_mtp_selected'] ) ) {
381
+		if (empty($this->_req_data['newsletter_mtp_selected'])) {
382 382
 			EE_Error::add_error(
383 383
 				__(
384 384
 					'In order to send a message, a Message Template GRP_ID is needed. It was not provided so messages were not sent.',
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
 			$success = FALSE;
390 390
 		}
391 391
 
392
-		if ( $success ) {
392
+		if ($success) {
393 393
 			//update Message template in case there are any changes
394 394
 			$Message_Template_Group = EEM_Message_Template_Group::instance()->get_one_by_ID(
395 395
 				$this->_req_data['newsletter_mtp_selected']
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
 			$Message_Templates = $Message_Template_Group instanceof EE_Message_Template_Group
398 398
 				? $Message_Template_Group->context_templates()
399 399
 				: array();
400
-			if ( empty( $Message_Templates ) ) {
400
+			if (empty($Message_Templates)) {
401 401
 				EE_Error::add_error(
402 402
 					__(
403 403
 						'Unable to retrieve message template fields from the db. Messages not sent.',
@@ -408,25 +408,25 @@  discard block
 block discarded – undo
408 408
 			}
409 409
 
410 410
 			//let's just update the specific fields
411
-			foreach ( $Message_Templates['attendee'] as $Message_Template ) {
412
-				if ( $Message_Template instanceof EE_Message_Template ) {
413
-					$field = $Message_Template->get( 'MTP_template_field' );
414
-					$content = $Message_Template->get( 'MTP_content' );
411
+			foreach ($Message_Templates['attendee'] as $Message_Template) {
412
+				if ($Message_Template instanceof EE_Message_Template) {
413
+					$field = $Message_Template->get('MTP_template_field');
414
+					$content = $Message_Template->get('MTP_content');
415 415
 					$new_content = $content;
416
-					switch ( $field ) {
416
+					switch ($field) {
417 417
 						case 'from' :
418
-							$new_content = ! empty( $this->_req_data['batch_message']['from'] )
418
+							$new_content = ! empty($this->_req_data['batch_message']['from'])
419 419
 								? $this->_req_data['batch_message']['from']
420 420
 								: $content;
421 421
 							break;
422 422
 						case 'subject' :
423
-							$new_content = ! empty( $this->_req_data['batch_message']['subject'] )
423
+							$new_content = ! empty($this->_req_data['batch_message']['subject'])
424 424
 								? $this->_req_data['batch_message']['subject']
425 425
 								: $content;
426 426
 							break;
427 427
 						case 'content' :
428 428
 							$new_content = $content;
429
-							$new_content['newsletter_content'] = ! empty( $this->_req_data['batch_message']['content'] )
429
+							$new_content['newsletter_content'] = ! empty($this->_req_data['batch_message']['content'])
430 430
 								? $this->_req_data['batch_message']['content']
431 431
 								: $content['newsletter_content'];
432 432
 							break;
@@ -434,35 +434,35 @@  discard block
 block discarded – undo
434 434
 							continue;
435 435
 							break;
436 436
 					}
437
-					$Message_Template->set( 'MTP_content', $new_content );
437
+					$Message_Template->set('MTP_content', $new_content);
438 438
 					$Message_Template->save();
439 439
 				}
440 440
 			}
441 441
 
442 442
 			//great fields are updated!  now let's make sure we just have contact objects (EE_Attendee).
443
-			$id_type = ! empty( $this->_req_data['batch_message']['id_type'] )
443
+			$id_type = ! empty($this->_req_data['batch_message']['id_type'])
444 444
 				? $this->_req_data['batch_message']['id_type']
445 445
 				: 'registration';
446 446
 
447 447
 			//id_type will affect how we assemble the ids.
448
-			$ids = ! empty( $this->_req_data['batch_message']['ids'] )
449
-				? json_decode( stripslashes($this->_req_data['batch_message']['ids']) )
448
+			$ids = ! empty($this->_req_data['batch_message']['ids'])
449
+				? json_decode(stripslashes($this->_req_data['batch_message']['ids']))
450 450
 				: array();
451 451
 
452 452
 			$registrations_used_for_contact_data = array();
453 453
 			//using switch because eventually we'll have other contexts that will be used for generating messages.
454
-			switch ( $id_type ) {
454
+			switch ($id_type) {
455 455
 				case 'registration' :
456 456
 					$registrations_used_for_contact_data = EEM_Registration::instance()->get_all(
457 457
 						array(
458 458
 							array(
459
-								'REG_ID' => array( 'IN', $ids )
459
+								'REG_ID' => array('IN', $ids)
460 460
 							)
461 461
 						)
462 462
 					);
463 463
 					break;
464 464
 				case 'contact' :
465
-					$registrations_used_for_contact_data = EEM_Registration::instance()->get_latest_registration_for_each_of_given_contacts( $ids );
465
+					$registrations_used_for_contact_data = EEM_Registration::instance()->get_latest_registration_for_each_of_given_contacts($ids);
466 466
 					break;
467 467
 			}
468 468
 			do_action(
@@ -473,8 +473,8 @@  discard block
 block discarded – undo
473 473
 			//kept for backward compat, internally we no longer use this action.
474 474
 			//@deprecated 4.8.36.rc.002
475 475
 			$contacts = $id_type == 'registration'
476
-				? EEM_Attendee::instance()->get_array_of_contacts_from_reg_ids( $ids )
477
-				: EEM_Attendee::instance()->get_all( array( array( 'ATT_ID' => array('in', $ids ) ) ) );
476
+				? EEM_Attendee::instance()->get_array_of_contacts_from_reg_ids($ids)
477
+				: EEM_Attendee::instance()->get_all(array(array('ATT_ID' => array('in', $ids))));
478 478
 			do_action(
479 479
 				'AHEE__Extend_Registrations_Admin_Page___newsletter_selected_send',
480 480
 				$contacts,
@@ -482,11 +482,11 @@  discard block
 block discarded – undo
482 482
 			);
483 483
 		}
484 484
 		$query_args = array(
485
-			'action' => !empty( $this->_req_data['redirect_back_to'] )
485
+			'action' => ! empty($this->_req_data['redirect_back_to'])
486 486
 				? $this->_req_data['redirect_back_to']
487 487
 				: 'default'
488 488
 			);
489
-		$this->_redirect_after_action( FALSE, '', '', $query_args, TRUE );
489
+		$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
490 490
 	}
491 491
 
492 492
 
@@ -508,8 +508,8 @@  discard block
 block discarded – undo
508 508
 	*		@return void
509 509
 	*/
510 510
 	protected function _registration_reports() {
511
-		$template_path = EE_ADMIN_TEMPLATE . 'admin_reports.template.php';
512
-		$this->_template_args['admin_page_content'] = EEH_Template::display_template( $template_path, $this->_reports_template_data, true );
511
+		$template_path = EE_ADMIN_TEMPLATE.'admin_reports.template.php';
512
+		$this->_template_args['admin_page_content'] = EEH_Template::display_template($template_path, $this->_reports_template_data, true);
513 513
 		// the final template wrapper
514 514
 		$this->display_admin_page_with_no_sidebar();
515 515
 
@@ -522,28 +522,28 @@  discard block
 block discarded – undo
522 522
 	 *
523 523
 	 * @return string
524 524
 	 */
525
-	private function _registrations_per_day_report( $period = '-1 month' ) {
525
+	private function _registrations_per_day_report($period = '-1 month') {
526 526
 		$report_ID = 'reg-admin-registrations-per-day-report-dv';
527 527
 
528
-		$results = EEM_Registration::instance()->get_registrations_per_day_and_per_status_report( $period );
528
+		$results = EEM_Registration::instance()->get_registrations_per_day_and_per_status_report($period);
529 529
 
530 530
 		$results = (array) $results;
531 531
 		$regs = array();
532 532
 		$subtitle = '';
533 533
 
534
-		if( $results ) {
534
+		if ($results) {
535 535
 			$column_titles = array();
536 536
 			$tracker = 0;
537
-			foreach ( $results as $result ) {
537
+			foreach ($results as $result) {
538 538
 				$report_column_values = array();
539
-				foreach( $result as $property_name => $property_value ) {
539
+				foreach ($result as $property_name => $property_value) {
540 540
 					$property_value = $property_name == 'Registration_REG_date' ? $property_value : (int) $property_value;
541 541
 					$report_column_values[] = $property_value;
542
-					if ( $tracker === 0 ) {
543
-						if ( $property_name == 'Registration_REG_date' ) {
544
-							$column_titles[] = __( 'Date (only days with registrations are shown)', 'event_espresso' );
542
+					if ($tracker === 0) {
543
+						if ($property_name == 'Registration_REG_date') {
544
+							$column_titles[] = __('Date (only days with registrations are shown)', 'event_espresso');
545 545
 						} else {
546
-							$column_titles[] = EEH_Template::pretty_status( $property_name, false, 'sentence' );
546
+							$column_titles[] = EEH_Template::pretty_status($property_name, false, 'sentence');
547 547
 						}
548 548
 					}
549 549
 				}
@@ -552,36 +552,36 @@  discard block
 block discarded – undo
552 552
 			}
553 553
 
554 554
 			//make sure the column_titles is pushed to the beginning of the array
555
-			array_unshift( $regs, $column_titles );
555
+			array_unshift($regs, $column_titles);
556 556
 			//setup the date range.
557
-			$DateTimeZone = new DateTimeZone( EEH_DTT_Helper::get_timezone() );
558
-			$beginning_date = new DateTime( "now " . $period, $DateTimeZone );
559
-			$ending_date = new DateTime( "now", $DateTimeZone );
557
+			$DateTimeZone = new DateTimeZone(EEH_DTT_Helper::get_timezone());
558
+			$beginning_date = new DateTime("now ".$period, $DateTimeZone);
559
+			$ending_date = new DateTime("now", $DateTimeZone);
560 560
 			$subtitle = sprintf(
561
-				_x( 'For the period: %1$s to %2$s', 'Used to give date range', 'event_espresso' ),
562
-				$beginning_date->format( 'Y-m-d' ),
563
-				$ending_date->format( 'Y-m-d' )
561
+				_x('For the period: %1$s to %2$s', 'Used to give date range', 'event_espresso'),
562
+				$beginning_date->format('Y-m-d'),
563
+				$ending_date->format('Y-m-d')
564 564
 			);
565 565
 		}
566 566
 
567
-		$report_title = __( 'Total Registrations per Day', 'event_espresso' );
567
+		$report_title = __('Total Registrations per Day', 'event_espresso');
568 568
 
569 569
 		$report_params = array(
570 570
 			'title' 	=> $report_title,
571 571
 			'subtitle' => $subtitle,
572 572
 			'id' 		=> $report_ID,
573 573
 			'regs' 	=> $regs,
574
-			'noResults' => empty( $regs ),
574
+			'noResults' => empty($regs),
575 575
 			'noRegsMsg' => sprintf(
576 576
 				__(
577 577
 					'%sThere are currently no registration records in the last month for this report.%s',
578 578
 					'event_espresso'
579 579
 				),
580
-				'<h2>' . $report_title . '</h2><p>',
580
+				'<h2>'.$report_title.'</h2><p>',
581 581
 				'</p>'
582 582
 			),
583 583
 		);
584
-		wp_localize_script( 'ee-reg-reports-js', 'regPerDay', $report_params );
584
+		wp_localize_script('ee-reg-reports-js', 'regPerDay', $report_params);
585 585
 
586 586
 		return $report_ID;
587 587
 	}
@@ -593,29 +593,29 @@  discard block
 block discarded – undo
593 593
 	 *
594 594
 	 * @return string
595 595
 	 */
596
-	private function _registrations_per_event_report( $period = '-1 month' ) {
596
+	private function _registrations_per_event_report($period = '-1 month') {
597 597
 
598 598
 		$report_ID = 'reg-admin-registrations-per-event-report-dv';
599 599
 
600
-		$results = EEM_Registration::instance()->get_registrations_per_event_and_per_status_report( $period );
600
+		$results = EEM_Registration::instance()->get_registrations_per_event_and_per_status_report($period);
601 601
 
602 602
 		$results = (array) $results;
603 603
 		$regs = array();
604 604
 		$subtitle = '';
605 605
 
606
-		if ( $results ) {
606
+		if ($results) {
607 607
 			$column_titles = array();
608 608
 			$tracker = 0;
609
-			foreach ( $results as $result ) {
609
+			foreach ($results as $result) {
610 610
 				$report_column_values = array();
611
-				foreach( $result as $property_name => $property_value ) {
612
-					$property_value = $property_name == 'Registration_Event' ? wp_trim_words( $property_value, 4, '...' ) : (int) $property_value;
611
+				foreach ($result as $property_name => $property_value) {
612
+					$property_value = $property_name == 'Registration_Event' ? wp_trim_words($property_value, 4, '...') : (int) $property_value;
613 613
 					$report_column_values[] = $property_value;
614
-					if ( $tracker === 0 ) {
615
-						if ( $property_name == 'Registration_Event' ) {
616
-							$column_titles[] = __( 'Event', 'event_espresso' );
614
+					if ($tracker === 0) {
615
+						if ($property_name == 'Registration_Event') {
616
+							$column_titles[] = __('Event', 'event_espresso');
617 617
 						} else {
618
-							$column_titles[] = EEH_Template::pretty_status( $property_name, false, 'sentence' );
618
+							$column_titles[] = EEH_Template::pretty_status($property_name, false, 'sentence');
619 619
 						}
620 620
 					}
621 621
 				}
@@ -624,37 +624,37 @@  discard block
 block discarded – undo
624 624
 			}
625 625
 
626 626
 			//make sure the column_titles is pushed to the beginning of the array
627
-			array_unshift( $regs, $column_titles );
627
+			array_unshift($regs, $column_titles);
628 628
 
629 629
 			//setup the date range.
630
-			$DateTimeZone = new DateTimeZone( EEH_DTT_Helper::get_timezone() );
631
-			$beginning_date = new DateTime( "now " . $period, $DateTimeZone );
632
-			$ending_date = new DateTime( "now", $DateTimeZone );
630
+			$DateTimeZone = new DateTimeZone(EEH_DTT_Helper::get_timezone());
631
+			$beginning_date = new DateTime("now ".$period, $DateTimeZone);
632
+			$ending_date = new DateTime("now", $DateTimeZone);
633 633
 			$subtitle = sprintf(
634
-				_x( 'For the period: %1$s to %2$s', 'Used to give date range', 'event_espresso' ),
635
-				$beginning_date->format( 'Y-m-d' ),
636
-				$ending_date->format( 'Y-m-d' )
634
+				_x('For the period: %1$s to %2$s', 'Used to give date range', 'event_espresso'),
635
+				$beginning_date->format('Y-m-d'),
636
+				$ending_date->format('Y-m-d')
637 637
 			);
638 638
 		}
639 639
 
640
-		$report_title = __( 'Total Registrations per Event', 'event_espresso' );
640
+		$report_title = __('Total Registrations per Event', 'event_espresso');
641 641
 
642 642
 		$report_params = array(
643 643
 			'title' 	=> $report_title,
644 644
 			'subtitle' => $subtitle,
645 645
 			'id' 		=> $report_ID,
646 646
 			'regs' 	=> $regs,
647
-			'noResults' => empty( $regs ),
647
+			'noResults' => empty($regs),
648 648
 			'noRegsMsg' => sprintf(
649 649
 				__(
650 650
 					'%sThere are currently no registration records in the last month for this report.%s',
651 651
 					'event_espresso'
652 652
 				),
653
-				'<h2>' . $report_title . '</h2><p>',
653
+				'<h2>'.$report_title.'</h2><p>',
654 654
 				'</p>'
655 655
 			),
656 656
 		);
657
-		wp_localize_script( 'ee-reg-reports-js', 'regPerEvent', $report_params );
657
+		wp_localize_script('ee-reg-reports-js', 'regPerEvent', $report_params);
658 658
 
659 659
 		return $report_ID;
660 660
 	}
@@ -668,8 +668,8 @@  discard block
 block discarded – undo
668 668
 	 * @return void
669 669
 	 */
670 670
 	protected function _registration_checkin_list_table() {
671
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
672
-		$reg_id = isset( $this->_req_data['_REGID'] ) ? $this->_req_data['_REGID'] : null;
671
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
672
+		$reg_id = isset($this->_req_data['_REGID']) ? $this->_req_data['_REGID'] : null;
673 673
 		$reg = EEM_Registration::instance()->get_one_by_ID($reg_id);
674 674
 		$this->_admin_page_title .= $this->get_action_link_or_button('new_registration', 'add-registrant', array('event_id' => $reg->event_ID()), 'add-new-h2');
675 675
 
@@ -683,15 +683,15 @@  discard block
 block discarded – undo
683 683
 				'desc' => __('This indicates the attendee has been checked out', 'event_espresso')
684 684
 				)
685 685
 			);
686
-		$this->_template_args['after_list_table'] = $this->_display_legend( $legend_items );
686
+		$this->_template_args['after_list_table'] = $this->_display_legend($legend_items);
687 687
 
688 688
 
689
-		$dtt_id = isset(  $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : NULL;
690
-		$go_back_url = !empty( $reg_id )  ? EE_Admin_Page::add_query_args_and_nonce(array('action' => 'event_registrations', 'event_id' => EEM_Registration::instance()->get_one_by_ID($reg_id)->get_first_related('Event')->ID(), 'DTT_ID' => $dtt_id ), $this->_admin_base_url ) : '';
689
+		$dtt_id = isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : NULL;
690
+		$go_back_url = ! empty($reg_id) ? EE_Admin_Page::add_query_args_and_nonce(array('action' => 'event_registrations', 'event_id' => EEM_Registration::instance()->get_one_by_ID($reg_id)->get_first_related('Event')->ID(), 'DTT_ID' => $dtt_id), $this->_admin_base_url) : '';
691 691
 
692
-		$this->_template_args['before_list_table'] = !empty( $reg_id ) && !empty( $dtt_id ) ? '<h2>' . sprintf(__("%s's check in records for %s at the event, %s", 'event_espresso'), '<span id="checkin-attendee-name">' . EEM_Registration::instance()->get_one_by_ID($reg_id)->get_first_related('Attendee')->full_name() . '</span>', '<span id="checkin-dtt"><a href="' . $go_back_url . '">' . EEM_Datetime::instance()->get_one_by_ID($dtt_id)->start_date_and_time() . ' - ' . EEM_Datetime::instance()->get_one_by_ID($dtt_id)->end_date_and_time() . '</a></span>', '<span id="checkin-event-name">' . EEM_Datetime::instance()->get_one_by_ID($dtt_id)->get_first_related('Event')->get('EVT_name') . '</span>' ) . '</h2>' : '';
693
-		$this->_template_args['list_table_hidden_fields'] = !empty( $reg_id ) ? '<input type="hidden" name="_REGID" value="' . $reg_id . '">' : '';
694
-		$this->_template_args['list_table_hidden_fields'] .= !empty( $dtt_id ) ? '<input type="hidden" name="DTT_ID" value="' . $dtt_id . '">' : '';
692
+		$this->_template_args['before_list_table'] = ! empty($reg_id) && ! empty($dtt_id) ? '<h2>'.sprintf(__("%s's check in records for %s at the event, %s", 'event_espresso'), '<span id="checkin-attendee-name">'.EEM_Registration::instance()->get_one_by_ID($reg_id)->get_first_related('Attendee')->full_name().'</span>', '<span id="checkin-dtt"><a href="'.$go_back_url.'">'.EEM_Datetime::instance()->get_one_by_ID($dtt_id)->start_date_and_time().' - '.EEM_Datetime::instance()->get_one_by_ID($dtt_id)->end_date_and_time().'</a></span>', '<span id="checkin-event-name">'.EEM_Datetime::instance()->get_one_by_ID($dtt_id)->get_first_related('Event')->get('EVT_name').'</span>').'</h2>' : '';
693
+		$this->_template_args['list_table_hidden_fields'] = ! empty($reg_id) ? '<input type="hidden" name="_REGID" value="'.$reg_id.'">' : '';
694
+		$this->_template_args['list_table_hidden_fields'] .= ! empty($dtt_id) ? '<input type="hidden" name="DTT_ID" value="'.$dtt_id.'">' : '';
695 695
 
696 696
 		$this->display_admin_list_table_page_with_no_sidebar();
697 697
 	}
@@ -704,24 +704,24 @@  discard block
 block discarded – undo
704 704
 	 */
705 705
 	public function toggle_checkin_status() {
706 706
 		//first make sure we have the necessary data
707
-		if ( !isset( $this->_req_data['_regid'] ) ) {
708
-			EE_Error::add_error( __('There must be something broken with the html structure because the required data for toggling the Check-in status is not being sent via ajax', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
707
+		if ( ! isset($this->_req_data['_regid'])) {
708
+			EE_Error::add_error(__('There must be something broken with the html structure because the required data for toggling the Check-in status is not being sent via ajax', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
709 709
 			$this->_template_args['success'] = FALSE;
710 710
 			$this->_template_args['error'] = TRUE;
711 711
 			$this->_return_json();
712 712
 		};
713 713
 
714 714
 		//do a nonce check cause we're not coming in from an normal route here.
715
-		$nonce = isset( $this->_req_data['checkinnonce'] ) ? sanitize_text_field( $this->_req_data['checkinnonce'] ) : '';
715
+		$nonce = isset($this->_req_data['checkinnonce']) ? sanitize_text_field($this->_req_data['checkinnonce']) : '';
716 716
 		$nonce_ref = 'checkin_nonce';
717 717
 
718
-		$this->_verify_nonce( $nonce, $nonce_ref );
718
+		$this->_verify_nonce($nonce, $nonce_ref);
719 719
 
720 720
 		//beautiful! Made it this far so let's get the status.
721 721
 		$new_status = $this->_toggle_checkin_status();
722 722
 
723 723
 		//setup new class to return via ajax
724
-		$this->_template_args['admin_page_content'] = 'clickable trigger-checkin checkin-icons checkedin-status-' . $new_status;
724
+		$this->_template_args['admin_page_content'] = 'clickable trigger-checkin checkin-icons checkedin-status-'.$new_status;
725 725
 		$this->_template_args['success'] = TRUE;
726 726
 		$this->_return_json();
727 727
 	}
@@ -741,32 +741,32 @@  discard block
 block discarded – undo
741 741
 		//first let's get the query args out of the way for the redirect
742 742
 		$query_args = array(
743 743
 			'action' => 'event_registrations',
744
-			'event_id' => isset( $this->_req_data['event_id'] ) ? $this->_req_data['event_id'] : NULL,
745
-			'DTT_ID' => isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : NULL
744
+			'event_id' => isset($this->_req_data['event_id']) ? $this->_req_data['event_id'] : NULL,
745
+			'DTT_ID' => isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : NULL
746 746
 			);
747 747
 		$new_status = FALSE;
748 748
 
749 749
 		// bulk action check in toggle
750
-		if ( ! empty( $this->_req_data['checkbox'] ) && is_array( $this->_req_data['checkbox'] )) {
750
+		if ( ! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
751 751
 			// cycle thru checkboxes
752
-			while ( list( $REG_ID, $value ) = each($this->_req_data['checkbox'])) {
753
-				$DTT_ID = isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : NULL;
752
+			while (list($REG_ID, $value) = each($this->_req_data['checkbox'])) {
753
+				$DTT_ID = isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : NULL;
754 754
 				$new_status = $this->_toggle_checkin($REG_ID, $DTT_ID);
755 755
 			}
756 756
 
757
-		} elseif ( isset( $this->_req_data['_regid'] ) ) {
757
+		} elseif (isset($this->_req_data['_regid'])) {
758 758
 			//coming from ajax request
759
-			$DTT_ID = isset( $this->_req_data['dttid'] ) ? $this->_req_data['dttid'] : NULL;
759
+			$DTT_ID = isset($this->_req_data['dttid']) ? $this->_req_data['dttid'] : NULL;
760 760
 			$query_args['DTT_ID'] = $DTT_ID;
761 761
 			$new_status = $this->_toggle_checkin($this->_req_data['_regid'], $DTT_ID);
762 762
 		} else {
763
-			EE_Error::add_error(__('Missing some required data to toggle the Check-in', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__  );
763
+			EE_Error::add_error(__('Missing some required data to toggle the Check-in', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
764 764
 		}
765 765
 
766
-		if ( defined('DOING_AJAX' ) )
766
+		if (defined('DOING_AJAX'))
767 767
 			return $new_status;
768 768
 
769
-		$this->_redirect_after_action( FALSE,'', '', $query_args, TRUE );
769
+		$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
770 770
 
771 771
 	}
772 772
 
@@ -782,11 +782,11 @@  discard block
 block discarded – undo
782 782
 	 */
783 783
 	private function _toggle_checkin($REG_ID, $DTT_ID) {
784 784
 		$REG = EEM_Registration::instance()->get_one_by_ID($REG_ID);
785
-		$new_status = $REG->toggle_checkin_status( $DTT_ID );
786
-		if ( $new_status !== FALSE ) {
787
-			EE_Error::add_success($REG->get_checkin_msg($DTT_ID) );
785
+		$new_status = $REG->toggle_checkin_status($DTT_ID);
786
+		if ($new_status !== FALSE) {
787
+			EE_Error::add_success($REG->get_checkin_msg($DTT_ID));
788 788
 		} else {
789
-			EE_Error::add_error($REG->get_checkin_msg($DTT_ID, TRUE), __FILE__, __FUNCTION__, __LINE__ );
789
+			EE_Error::add_error($REG->get_checkin_msg($DTT_ID, TRUE), __FILE__, __FUNCTION__, __LINE__);
790 790
 			$new_status = FALSE;
791 791
 		}
792 792
 		return $new_status;
@@ -802,28 +802,28 @@  discard block
 block discarded – undo
802 802
 	protected function _delete_checkin_rows() {
803 803
 		$query_args = array(
804 804
 			'action' => 'registration_checkins',
805
-			'DTT_ID' => isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : 0,
806
-			'_REGID' => isset( $this->_req_data['_REGID'] ) ? $this->_req_data['_REGID'] : 0
805
+			'DTT_ID' => isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : 0,
806
+			'_REGID' => isset($this->_req_data['_REGID']) ? $this->_req_data['_REGID'] : 0
807 807
 			);
808
-		if ( !empty( $this->_req_data['checkbox'] ) && is_array( $this->_req_data['checkbox'] ) ) {
809
-			while ( list( $CHK_ID, $value ) = each( $this->_req_data['checkbox'] ) ) {
808
+		if ( ! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
809
+			while (list($CHK_ID, $value) = each($this->_req_data['checkbox'])) {
810 810
 				$errors = 0;
811
-				if ( ! EEM_Checkin::instance()->delete_by_ID($CHK_ID ) ) {
811
+				if ( ! EEM_Checkin::instance()->delete_by_ID($CHK_ID)) {
812 812
 					$errors++;
813 813
 				}
814 814
 			}
815 815
 		} else {
816
-			EE_Error::add_error(__('So, something went wrong with the bulk delete because there was no data received for instructions on WHAT to delete!', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
817
-			$this->_redirect_after_action( FALSE, '', '', $query_args, TRUE );
816
+			EE_Error::add_error(__('So, something went wrong with the bulk delete because there was no data received for instructions on WHAT to delete!', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
817
+			$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
818 818
 		}
819 819
 
820
-		if ( $errors > 0 ) {
821
-			EE_Error::add_error( sprintf( __('There were %d records that did not delete successfully', 'event_espresso'), $errors ), __FILE__, __FUNCTION__, __LINE__ );
820
+		if ($errors > 0) {
821
+			EE_Error::add_error(sprintf(__('There were %d records that did not delete successfully', 'event_espresso'), $errors), __FILE__, __FUNCTION__, __LINE__);
822 822
 		} else {
823
-			EE_Error::add_success( __('Records were successfully deleted', 'event_espresso') );
823
+			EE_Error::add_success(__('Records were successfully deleted', 'event_espresso'));
824 824
 		}
825 825
 
826
-		$this->_redirect_after_action( FALSE, '', '', $query_args, TRUE );
826
+		$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
827 827
 	}
828 828
 
829 829
 
@@ -835,20 +835,20 @@  discard block
 block discarded – undo
835 835
 	protected function _delete_checkin_row() {
836 836
 		$query_args = array(
837 837
 			'action' => 'registration_checkins',
838
-			'DTT_ID' => isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : 0,
839
-			'_REGID' => isset( $this->_req_data['_REGID'] ) ? $this->_req_data['_REGID'] : 0
838
+			'DTT_ID' => isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : 0,
839
+			'_REGID' => isset($this->_req_data['_REGID']) ? $this->_req_data['_REGID'] : 0
840 840
 			);
841 841
 
842
-		if ( !empty( $this->_req_data['CHK_ID'] ) ) {
843
-			if ( ! EEM_Checkin::instance()->delete_by_ID($this->_req_data['CHK_ID'] ) ) {
844
-				EE_Error::add_error(__('Something went wrong and this check-in record was not deleted', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
842
+		if ( ! empty($this->_req_data['CHK_ID'])) {
843
+			if ( ! EEM_Checkin::instance()->delete_by_ID($this->_req_data['CHK_ID'])) {
844
+				EE_Error::add_error(__('Something went wrong and this check-in record was not deleted', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
845 845
 			} else {
846
-				EE_Error::add_success( __('Check-In record successfully deleted', 'event_espresso') );
846
+				EE_Error::add_success(__('Check-In record successfully deleted', 'event_espresso'));
847 847
 			}
848 848
 		} else {
849
-			EE_Error::add_error(__('In order to delete a Check-in record, there must be a Check-In ID available. There is not. It is not your fault, there is just a gremlin living in the code', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
849
+			EE_Error::add_error(__('In order to delete a Check-in record, there must be a Check-In ID available. There is not. It is not your fault, there is just a gremlin living in the code', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
850 850
 		}
851
-		$this->_redirect_after_action( FALSE, '', '', $query_args, TRUE );
851
+		$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
852 852
 	}
853 853
 
854 854
 
@@ -861,8 +861,8 @@  discard block
 block discarded – undo
861 861
 	*		@return void
862 862
 	*/
863 863
 	protected function _event_registrations_list_table() {
864
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
865
-		$this->_admin_page_title .= isset( $this->_req_data['event_id'] ) ? $this->get_action_link_or_button('new_registration', 'add-registrant', array('event_id' => $this->_req_data['event_id']), 'add-new-h2') : '';
864
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
865
+		$this->_admin_page_title .= isset($this->_req_data['event_id']) ? $this->get_action_link_or_button('new_registration', 'add-registrant', array('event_id' => $this->_req_data['event_id']), 'add-new-h2') : '';
866 866
 
867 867
 		$legend_items = array(
868 868
 			'star-icon' => array(
@@ -886,31 +886,31 @@  discard block
 block discarded – undo
886 886
 				'desc' => __('View All Check-in Records for this Registrant', 'event_espresso')
887 887
 				),
888 888
 			'approved_status' => array(
889
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_approved,
890
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_approved, FALSE, 'sentence' )
889
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_approved,
890
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_approved, FALSE, 'sentence')
891 891
 				),
892 892
             'cancelled_status' => array(
893
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_cancelled,
894
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_cancelled, FALSE, 'sentence' )
893
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_cancelled,
894
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_cancelled, FALSE, 'sentence')
895 895
 				),
896 896
             'declined_status' => array(
897
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_declined,
898
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_declined, FALSE, 'sentence' )
897
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_declined,
898
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_declined, FALSE, 'sentence')
899 899
 				),
900 900
 			'not_approved' => array(
901
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_not_approved,
902
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_not_approved, FALSE, 'sentence' )
901
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_not_approved,
902
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_not_approved, FALSE, 'sentence')
903 903
 				),
904 904
 			'pending_status' => array(
905
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_pending_payment,
906
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_pending_payment, FALSE, 'sentence' )
905
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_pending_payment,
906
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_pending_payment, FALSE, 'sentence')
907 907
 				)/**/
908 908
 			);
909
-		$this->_template_args['after_list_table'] = $this->_display_legend( $legend_items );
909
+		$this->_template_args['after_list_table'] = $this->_display_legend($legend_items);
910 910
 
911
-		$event_id = isset( $this->_req_data['event_id'] ) ? $this->_req_data['event_id'] : null;
912
-		$this->_template_args['before_list_table'] = !empty( $event_id ) ? '<h2>' . sprintf(__('Viewing Registrations for Event: %s', 'event_espresso'), EEM_Event::instance()->get_one_by_ID($event_id)->get('EVT_name') ) . '</h2>' : '';
913
-		$this->_template_args['list_table_hidden_fields'] = !empty( $event_id ) ? '<input type="hidden" name="event_id" value="' . $event_id . '">' : '';
911
+		$event_id = isset($this->_req_data['event_id']) ? $this->_req_data['event_id'] : null;
912
+		$this->_template_args['before_list_table'] = ! empty($event_id) ? '<h2>'.sprintf(__('Viewing Registrations for Event: %s', 'event_espresso'), EEM_Event::instance()->get_one_by_ID($event_id)->get('EVT_name')).'</h2>' : '';
913
+		$this->_template_args['list_table_hidden_fields'] = ! empty($event_id) ? '<input type="hidden" name="event_id" value="'.$event_id.'">' : '';
914 914
 
915 915
 		$this->display_admin_list_table_page_with_no_sidebar();
916 916
 	}
@@ -924,15 +924,15 @@  discard block
 block discarded – undo
924 924
 	*		@access public
925 925
 	*		@return array
926 926
 	*/
927
-	public function get_event_attendees( $per_page = 10, $count = FALSE, $trash = FALSE, $orderby = '' ) {
927
+	public function get_event_attendees($per_page = 10, $count = FALSE, $trash = FALSE, $orderby = '') {
928 928
 
929
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
930
-		require_once(EE_MODELS . 'EEM_Attendee.model.php');
929
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
930
+		require_once(EE_MODELS.'EEM_Attendee.model.php');
931 931
 		//$ATT_MDL = EEM_Attendee::instance();
932 932
 
933
-		$EVT_ID = isset($this->_req_data['event_id']) ? absint( $this->_req_data['event_id'] ) : FALSE;
934
-		$CAT_ID = isset($this->_req_data['category_id']) ? absint( $this->_req_data['category_id'] ) : FALSE;
935
-		$DTT_ID = isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : NULL;
933
+		$EVT_ID = isset($this->_req_data['event_id']) ? absint($this->_req_data['event_id']) : FALSE;
934
+		$CAT_ID = isset($this->_req_data['category_id']) ? absint($this->_req_data['category_id']) : FALSE;
935
+		$DTT_ID = isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : NULL;
936 936
 
937 937
 		$this->_req_data['orderby'] = ! empty($this->_req_data['orderby']) ? $this->_req_data['orderby'] : $orderby;
938 938
 
@@ -945,94 +945,94 @@  discard block
 block discarded – undo
945 945
 //				$orderby = 'reg.REG_final_price';
946 946
 		}
947 947
 
948
-		$sort = ( isset( $this->_req_data['order'] ) && ! empty( $this->_req_data['order'] )) ? $this->_req_data['order'] : 'ASC';
948
+		$sort = (isset($this->_req_data['order']) && ! empty($this->_req_data['order'])) ? $this->_req_data['order'] : 'ASC';
949 949
 
950
-		$current_page = isset( $this->_req_data['paged'] ) && !empty( $this->_req_data['paged'] ) ? $this->_req_data['paged'] : 1;
951
-		$per_page = isset( $this->_req_data['perpage'] ) && !empty( $this->_req_data['perpage'] ) ? $this->_req_data['perpage'] : $per_page;
950
+		$current_page = isset($this->_req_data['paged']) && ! empty($this->_req_data['paged']) ? $this->_req_data['paged'] : 1;
951
+		$per_page = isset($this->_req_data['perpage']) && ! empty($this->_req_data['perpage']) ? $this->_req_data['perpage'] : $per_page;
952 952
 
953 953
 
954
-		$offset = ($current_page-1)*$per_page;
955
-		$limit = $count ? NULL : array( $offset, $per_page );
956
-		$query_params = array(array('Event.status'=>array('IN',  array_keys(EEM_Event::instance()->get_status_array()))));
957
-		if ($EVT_ID){
958
-			$query_params[0]['EVT_ID']=$EVT_ID;
954
+		$offset = ($current_page - 1) * $per_page;
955
+		$limit = $count ? NULL : array($offset, $per_page);
956
+		$query_params = array(array('Event.status'=>array('IN', array_keys(EEM_Event::instance()->get_status_array()))));
957
+		if ($EVT_ID) {
958
+			$query_params[0]['EVT_ID'] = $EVT_ID;
959 959
 		}
960
-		if($CAT_ID){
960
+		if ($CAT_ID) {
961 961
 			throw new EE_Error("You specified a Category Id for this query. Thats odd because we are now using terms and taxonomies. So did you mean the term taxonomy id o rthe term id?");
962 962
 		}
963 963
 
964 964
 		//if DTT is included we do multiple datetimes.
965
-		if ( $DTT_ID ) {
965
+		if ($DTT_ID) {
966 966
 			$query_params[0]['Ticket.Datetime.DTT_ID'] = $DTT_ID;
967 967
 		}
968 968
 
969 969
 		//make sure we only have default where on the current regs
970 970
 		$query_params['default_where_conditions'] = 'this_model_only';
971 971
 
972
-		$status_ids_array = apply_filters( 'FHEE__Extend_Registrations_Admin_Page__get_event_attendees__status_ids_array', array( EEM_Registration::status_id_pending_payment, EEM_Registration::status_id_approved ) );
972
+		$status_ids_array = apply_filters('FHEE__Extend_Registrations_Admin_Page__get_event_attendees__status_ids_array', array(EEM_Registration::status_id_pending_payment, EEM_Registration::status_id_approved));
973 973
 
974
-		$query_params[0]['STS_ID']= array('IN', $status_ids_array );
974
+		$query_params[0]['STS_ID'] = array('IN', $status_ids_array);
975 975
 
976
-		if($trash){
977
-			$query_params[0]['Attendee.status']=  EEM_CPT_Base::post_status_trashed;
976
+		if ($trash) {
977
+			$query_params[0]['Attendee.status'] = EEM_CPT_Base::post_status_trashed;
978 978
 		}
979 979
 
980
-		if ( isset( $this->_req_data['s'] ) ) {
981
-			$sstr = '%' . $this->_req_data['s'] . '%';
980
+		if (isset($this->_req_data['s'])) {
981
+			$sstr = '%'.$this->_req_data['s'].'%';
982 982
 			$query_params[0]['OR'] = array(
983
-				'Event.EVT_name' => array( 'LIKE', $sstr),
984
-				'Event.EVT_desc' => array( 'LIKE', $sstr ),
985
-				'Event.EVT_short_desc' => array( 'LIKE' , $sstr ),
986
-				'Attendee.ATT_fname' => array( 'LIKE', $sstr ),
987
-				'Attendee.ATT_lname' => array( 'LIKE', $sstr ),
988
-				'Attendee.ATT_short_bio' => array( 'LIKE', $sstr ),
989
-				'Attendee.ATT_email' => array('LIKE', $sstr ),
990
-				'Attendee.ATT_address' => array( 'LIKE', $sstr ),
991
-				'Attendee.ATT_address2' => array( 'LIKE', $sstr ),
992
-				'Attendee.ATT_city' => array( 'LIKE', $sstr ),
993
-				'REG_final_price' => array( 'LIKE', $sstr ),
994
-				'REG_code' => array( 'LIKE', $sstr ),
995
-				'REG_count' => array( 'LIKE' , $sstr ),
996
-				'REG_group_size' => array( 'LIKE' , $sstr ),
997
-				'Ticket.TKT_name' => array( 'LIKE', $sstr ),
998
-				'Ticket.TKT_description' => array( 'LIKE', $sstr )
983
+				'Event.EVT_name' => array('LIKE', $sstr),
984
+				'Event.EVT_desc' => array('LIKE', $sstr),
985
+				'Event.EVT_short_desc' => array('LIKE', $sstr),
986
+				'Attendee.ATT_fname' => array('LIKE', $sstr),
987
+				'Attendee.ATT_lname' => array('LIKE', $sstr),
988
+				'Attendee.ATT_short_bio' => array('LIKE', $sstr),
989
+				'Attendee.ATT_email' => array('LIKE', $sstr),
990
+				'Attendee.ATT_address' => array('LIKE', $sstr),
991
+				'Attendee.ATT_address2' => array('LIKE', $sstr),
992
+				'Attendee.ATT_city' => array('LIKE', $sstr),
993
+				'REG_final_price' => array('LIKE', $sstr),
994
+				'REG_code' => array('LIKE', $sstr),
995
+				'REG_count' => array('LIKE', $sstr),
996
+				'REG_group_size' => array('LIKE', $sstr),
997
+				'Ticket.TKT_name' => array('LIKE', $sstr),
998
+				'Ticket.TKT_description' => array('LIKE', $sstr)
999 999
 				);
1000 1000
 		}
1001 1001
 
1002 1002
 		$query_params['order_by'][$orderby] = $sort;
1003 1003
 		$query_params['limit'] = $limit;
1004
-		$query_params['force_join'] = array('Attendee');//force join to attendee model so that it gets cached, because we're going to need the attendee for each registration
1005
-		if($count){
1006
-			$registrations = EEM_Registration::instance()->count(array($query_params[0], 'default_where_conditions' => 'this_model_only' ));
1007
-		}else{
1004
+		$query_params['force_join'] = array('Attendee'); //force join to attendee model so that it gets cached, because we're going to need the attendee for each registration
1005
+		if ($count) {
1006
+			$registrations = EEM_Registration::instance()->count(array($query_params[0], 'default_where_conditions' => 'this_model_only'));
1007
+		} else {
1008 1008
 			$registrations = EEM_Registration::instance()->get_all($query_params);
1009 1009
 
1010 1010
 
1011 1011
 	//		$registrations = EEM_Registration::instance();
1012 1012
 	//		$all_attendees = EEM_Attendee::instance()->get_event_attendees( $EVT_ID, $CAT_ID, $reg_status, $trash, $orderby, $sort, $limit, $output );
1013
-			if ( isset( $registrations[0] ) && $registrations[0] instanceof EE_Registration ) {
1013
+			if (isset($registrations[0]) && $registrations[0] instanceof EE_Registration) {
1014 1014
 				//EEH_Debug_Tools::printr( $all_attendees[0], '$all_attendees[0]  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
1015 1015
 				// name
1016 1016
 				$first_registration = $registrations[0];
1017 1017
 				$event_obj = $first_registration->event_obj();
1018
-				if($event_obj){
1018
+				if ($event_obj) {
1019 1019
 					$event_name = $first_registration->event_obj()->name();
1020
-					$event_date = 'TODO: we need to get date from earliest price date or should this be the actual event date?';//$first_registration->date_obj()->reg_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 ) : '';
1020
+					$event_date = 'TODO: we need to get date from earliest price date or should this be the actual event date?'; //$first_registration->date_obj()->reg_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 ) : '';
1021 1021
 					// edit event link
1022
-					if ( $event_name != '' ) {
1023
-						$edit_event_url = self::add_query_args_and_nonce( array( 'action'=>'edit_event', 'EVT_ID'=>$EVT_ID ), EVENTS_ADMIN_URL );
1024
-						$edit_event_lnk = '<a href="'.$edit_event_url.'" title="' . esc_attr__( 'Edit ', 'event_espresso' ) . $event_name . '">' . __( 'Edit Event', 'event_espresso' ) . '</a>';
1025
-						$event_name .= ' <span class="admin-page-header-edit-lnk not-bold">' . $edit_event_lnk . '</span>' ;
1022
+					if ($event_name != '') {
1023
+						$edit_event_url = self::add_query_args_and_nonce(array('action'=>'edit_event', 'EVT_ID'=>$EVT_ID), EVENTS_ADMIN_URL);
1024
+						$edit_event_lnk = '<a href="'.$edit_event_url.'" title="'.esc_attr__('Edit ', 'event_espresso').$event_name.'">'.__('Edit Event', 'event_espresso').'</a>';
1025
+						$event_name .= ' <span class="admin-page-header-edit-lnk not-bold">'.$edit_event_lnk.'</span>';
1026 1026
 					}
1027 1027
 
1028
-					$back_2_reg_url = self::add_query_args_and_nonce( array( 'action'=>'default' ), REG_ADMIN_URL );
1029
-					$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>';
1028
+					$back_2_reg_url = self::add_query_args_and_nonce(array('action'=>'default'), REG_ADMIN_URL);
1029
+					$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>';
1030 1030
 
1031 1031
 					$this->_template_args['before_admin_page_content'] = '
1032 1032
 				<div id="admin-page-header">
1033
-					<h1><span class="small-text not-bold">'.__( 'Event: ', 'event_espresso' ).'</span>'. $event_name .'</h1>
1034
-					<h3><span class="small-text not-bold">'.__( 'Date: ', 'event_espresso' ). '</span>'. $event_date .'</h3>
1035
-					<span class="admin-page-header-go-back-lnk not-bold">' . $back_2_reg_lnk . '</span>
1033
+					<h1><span class="small-text not-bold">'.__('Event: ', 'event_espresso').'</span>'.$event_name.'</h1>
1034
+					<h3><span class="small-text not-bold">'.__('Date: ', 'event_espresso').'</span>'.$event_date.'</h3>
1035
+					<span class="admin-page-header-go-back-lnk not-bold">' . $back_2_reg_lnk.'</span>
1036 1036
 				</div>
1037 1037
 				';
1038 1038
 				}
Please login to merge, or discard this patch.
admin/extend/registrations/templates/newsletter-send-form.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
                 <input type="hidden" id="get_newsletter_form_content_nonce" name="get_newsletter_form_content_nonce" value="<?php echo $ajax_nonce; ?>">
33 33
                 <input type="hidden" name="batch_message[id_type]" value="<?php echo $id_type; ?>">
34 34
                 <input id="newsletter-batch-ids" type="hidden" name="batch_message[ids]" value="">
35
-                <h3 class="newsletter-send-form-title"><?php printf( __('Sending batch message to %s people...', 'event_espresso'), '[NUMPEOPLE]' ); ?></h3>
35
+                <h3 class="newsletter-send-form-title"><?php printf(__('Sending batch message to %s people...', 'event_espresso'), '[NUMPEOPLE]'); ?></h3>
36 36
                 <label for="batch-message-template-selector"><?php _e('Select Template:', 'event_espresso'); ?></label>
37 37
                 <?php echo $template_selector; ?>
38 38
                 <div class="batch-message-edit-fields" style="display:none;">
Please login to merge, or discard this patch.
caffeinated/admin/extend/support/Extend_Support_Admin_Page.core.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -29,16 +29,16 @@  discard block
 block discarded – undo
29 29
  */
30 30
 class Extend_Support_Admin_Page extends Support_Admin_Page {
31 31
 
32
-	public function __construct( $routing = TRUE ) {
33
-		parent::__construct( $routing );
34
-		define( 'EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'support/templates/' );
32
+	public function __construct($routing = TRUE) {
33
+		parent::__construct($routing);
34
+		define('EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND.'support/templates/');
35 35
 	}
36 36
 
37 37
 
38 38
 
39 39
 
40 40
 	protected function _extend_page_config() {
41
-		$this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'support';
41
+		$this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND.'support';
42 42
 		//new routes and new configs (or overrides )
43 43
 		$new_page_routes = array(
44 44
 			'faq' => array(
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 				'capability' => 'ee_read_ee'
47 47
 				)
48 48
 			);
49
-		$this->_page_routes = array_merge( $this->_page_routes, $new_page_routes );
49
+		$this->_page_routes = array_merge($this->_page_routes, $new_page_routes);
50 50
 
51 51
 		$new_page_config = array(
52 52
 			'faq' => array(
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 				'require_nonce' => FALSE
58 58
 				)
59 59
 			);
60
-		$this->_page_config = array_merge( $this->_page_config, $new_page_config );
60
+		$this->_page_config = array_merge($this->_page_config, $new_page_config);
61 61
 
62 62
 		$this->_page_config['default']['metaboxes'][] = '_installation_boxes';
63 63
 	}
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
 
67 67
 
68 68
 	protected function _faq() {
69
-		$template_path = EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH . 'support_admin_details_faq.template.php';
70
-		$this->_template_args['admin_page_content'] = EEH_Template::display_template( $template_path, '', TRUE);
69
+		$template_path = EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH.'support_admin_details_faq.template.php';
70
+		$this->_template_args['admin_page_content'] = EEH_Template::display_template($template_path, '', TRUE);
71 71
 		$this->display_admin_page_with_sidebar();
72 72
 
73 73
 	}
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
 
76 76
 
77 77
 	protected function _installation_boxes() {
78
-		$callback_args = array('template_path' => EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH . 'support_admin_details_additional_information.template.php');
79
-		add_meta_box( 'espresso_additional_information_support', __('Additional Information', 'event_espresso'), create_function('$post, $metabox', 'echo EEH_Template::display_template( $metabox["args"]["template_path"], "", TRUE);' ), $this->_current_screen_id, 'normal', 'high', $callback_args);
78
+		$callback_args = array('template_path' => EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH.'support_admin_details_additional_information.template.php');
79
+		add_meta_box('espresso_additional_information_support', __('Additional Information', 'event_espresso'), create_function('$post, $metabox', 'echo EEH_Template::display_template( $metabox["args"]["template_path"], "", TRUE);'), $this->_current_screen_id, 'normal', 'high', $callback_args);
80 80
 	}
81 81
 
82 82
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
admin/extend/support/templates/support_admin_details_faq.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 		</dt>
39 39
 		<dd>
40 40
             <p>
41
-            <?php printf( __('You can add the events or venues page as items to the navigation menu by going to Appearance --> Menus and check the boxes found under the %sEvent Espresso Pages%s section. Then click the Add to Menu button and finally click on the Save Menu button.', 'event_espresso'), '<strong>', '</strong>' ); ?>
41
+            <?php printf(__('You can add the events or venues page as items to the navigation menu by going to Appearance --> Menus and check the boxes found under the %sEvent Espresso Pages%s section. Then click the Add to Menu button and finally click on the Save Menu button.', 'event_espresso'), '<strong>', '</strong>'); ?>
42 42
             <br />
43 43
 			<?php _e('Quick Link:', 'event_espresso'); ?>
44 44
 			<a href="<?php echo site_url('/wp-admin/nav-menus.php'); ?>"><?php _e('Menu Manager', 'event_espresso'); ?></a>
Please login to merge, or discard this patch.