Completed
Branch old/BUG-7514-7935-7936-price-o... (518ae6)
by
unknown
25:14 queued 22:51
created
form_sections/strategies/layout/EE_Admin_Two_Column_Layout.strategy.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -13,9 +13,9 @@  discard block
 block discarded – undo
13 13
 	 *
14 14
 	 * @return string
15 15
 	 */
16
-	public function layout_form_begin( $additional_args = array() ) {
16
+	public function layout_form_begin($additional_args = array()) {
17 17
 		$this->_form_section->set_html_class('form-table');
18
-		return parent::layout_form_begin( $additional_args );
18
+		return parent::layout_form_begin($additional_args);
19 19
 	}
20 20
 
21 21
 
@@ -25,10 +25,10 @@  discard block
 block discarded – undo
25 25
 	 * @param EE_Form_Section_Proper $form_section
26 26
 	 * @return string
27 27
 	 */
28
-	public function layout_subsection( $form_section ){
29
-		if ( $form_section instanceof EE_Form_Section_Proper ) {
30
-			return EEH_HTML::no_row( $form_section->get_html_and_js(), 2 );
31
-		} else if ( $form_section instanceof EE_Form_Section_HTML ) {
28
+	public function layout_subsection($form_section) {
29
+		if ($form_section instanceof EE_Form_Section_Proper) {
30
+			return EEH_HTML::no_row($form_section->get_html_and_js(), 2);
31
+		} else if ($form_section instanceof EE_Form_Section_HTML) {
32 32
 			return $form_section->get_html_and_js();
33 33
 		}
34 34
 		return '';
@@ -41,36 +41,36 @@  discard block
 block discarded – undo
41 41
 	 * @param EE_Form_Input_Base $input
42 42
 	 * @return string
43 43
 	 */
44
-	public function layout_input( $input ) {
44
+	public function layout_input($input) {
45 45
 
46 46
 		if (
47 47
 			$input->get_display_strategy() instanceof EE_Text_Area_Display_Strategy ||
48 48
 			$input->get_display_strategy() instanceof EE_Text_Input_Display_Strategy ||
49 49
 			$input->get_display_strategy() instanceof EE_Admin_File_Uploader_Display_Strategy
50 50
 		) {
51
-			$input->set_html_class( $input->html_class() . ' large-text' );
51
+			$input->set_html_class($input->html_class().' large-text');
52 52
 		}
53
-		if ( $input instanceof EE_Text_Area_Input ) {
54
-			$input->set_rows( 4 );
55
-			$input->set_cols( 60 );
53
+		if ($input instanceof EE_Text_Area_Input) {
54
+			$input->set_rows(4);
55
+			$input->set_cols(60);
56 56
 		}
57 57
 		// no need to repeat the label for checkboxes, radios, etc
58
-		if ( $input instanceof EE_Form_Input_With_Options_Base ) {
58
+		if ($input instanceof EE_Form_Input_With_Options_Base) {
59 59
 			// so if label is in the input html, let's remove that
60
-			$input_html = str_replace( $input->html_label_text(), '', $input->get_html_for_input() );
60
+			$input_html = str_replace($input->html_label_text(), '', $input->get_html_for_input());
61 61
 		} else {
62 62
 			$input_html = $input->get_html_for_input();
63 63
 		}
64 64
 		// maybe add errors and help text ?
65
-		$input_html .= $input->get_html_for_errors() != '' ? EEH_HTML::nl() . $input->get_html_for_errors() : '';
66
-		$input_html .= $input->get_html_for_help() != '' ? EEH_HTML::nl() . $input->get_html_for_help() : '';
65
+		$input_html .= $input->get_html_for_errors() != '' ? EEH_HTML::nl().$input->get_html_for_errors() : '';
66
+		$input_html .= $input->get_html_for_help() != '' ? EEH_HTML::nl().$input->get_html_for_help() : '';
67 67
 		//overriding parent to add wp admin specific things.
68 68
 		$html = '';
69
-		if ( $input instanceof EE_Hidden_Input ) {
70
-			$html .= EEH_HTML::no_row( $input->get_html_for_input(), 2 );
69
+		if ($input instanceof EE_Hidden_Input) {
70
+			$html .= EEH_HTML::no_row($input->get_html_for_input(), 2);
71 71
 		} else {
72 72
 			$html .= EEH_HTML::tr(
73
-				EEH_HTML::th( $input->get_html_for_label(), '', '',  '', 'scope="row"' ) . EEH_HTML::td( $input_html )
73
+				EEH_HTML::th($input->get_html_for_label(), '', '', '', 'scope="row"').EEH_HTML::td($input_html)
74 74
 			);
75 75
 		}
76 76
 		return $html;
Please login to merge, or discard this patch.
libraries/messages/data_class/EE_Messages_Gateways_incoming_data.class.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('NO direct script access allowed');
5 5
 
6 6
 /**
@@ -41,20 +41,20 @@  discard block
 block discarded – undo
41 41
 	 * incoming data is expected to be a EE_Transaction object and (possibly) EE_Payment object in an array.
42 42
 	 * @param array $data
43 43
 	 */
44
-	public function __construct( $data ) {
44
+	public function __construct($data) {
45 45
 
46 46
 		//test for valid params
47
-		if ( ! ( $data[0] instanceof EE_Transaction ))
48
-			throw new EE_Error( __('Incoming data for the Gateways data handler must have an EE_Transaction object as the value for the first array index.', 'event_espresso') );
47
+		if ( ! ($data[0] instanceof EE_Transaction))
48
+			throw new EE_Error(__('Incoming data for the Gateways data handler must have an EE_Transaction object as the value for the first array index.', 'event_espresso'));
49 49
 
50
-		if ( empty( $data[1] ) || ! $data[1] instanceof  EE_Payment  )
51
-			$pmt_obj = $this->_get_empty_payment_obj( $data[0] );
50
+		if (empty($data[1]) || ! $data[1] instanceof  EE_Payment)
51
+			$pmt_obj = $this->_get_empty_payment_obj($data[0]);
52 52
 
53 53
 		$data = array(
54 54
 			'txn_obj' => $data[0],
55 55
 			'pmt_obj' => isset($pmt_obj) ? $pmt_obj : $data[1],
56 56
 			);
57
-		parent::__construct( $data );
57
+		parent::__construct($data);
58 58
 	}
59 59
 
60 60
 
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
 	 * This sets up an empty EE_Payment object for the purpose of shortcode parsing.  Note that this doesn't actually get saved to the db.
63 63
 	 * @return EE_Payment
64 64
 	 */
65
-	private function _get_empty_payment_obj( EE_Transaction $txn ) {
66
-		$PMT = EE_Payment::new_instance( array(
65
+	private function _get_empty_payment_obj(EE_Transaction $txn) {
66
+		$PMT = EE_Payment::new_instance(array(
67 67
 			'STS_ID' => EEM_Payment::status_id_pending,
68 68
 			'PAY_timestamp' => (int) current_time('timestamp'),
69 69
 			'PMD_ID' => $txn->payment_method_ID(),
@@ -86,9 +86,9 @@  discard block
 block discarded – undo
86 86
 
87 87
 
88 88
 		//other data from the session (if possible)
89
-		$this->user_id = isset( $session_data['user_id'] ) ? $session_data['user_id'] : '';
90
-		$this->ip_address = isset( $session_data['ip_address'] ) ? $session_data['ip_address'] : '';
91
-		$this->user_agent = isset( $session_data['user_agent'] ) ? $session_data['user_agent'] : '';
89
+		$this->user_id = isset($session_data['user_id']) ? $session_data['user_id'] : '';
90
+		$this->ip_address = isset($session_data['ip_address']) ? $session_data['ip_address'] : '';
91
+		$this->user_agent = isset($session_data['user_agent']) ? $session_data['user_agent'] : '';
92 92
 		$this->init_access = $this->last_access = '';
93 93
 
94 94
 		$this->reg_objs = $this->txn->get_many_related('Registration');
Please login to merge, or discard this patch.
Braces   +8 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
4 4
 	exit('NO direct script access allowed');
5
+}
5 6
 
6 7
 /**
7 8
  * Event Espresso
@@ -44,11 +45,13 @@  discard block
 block discarded – undo
44 45
 	public function __construct( $data ) {
45 46
 
46 47
 		//test for valid params
47
-		if ( ! ( $data[0] instanceof EE_Transaction ))
48
-			throw new EE_Error( __('Incoming data for the Gateways data handler must have an EE_Transaction object as the value for the first array index.', 'event_espresso') );
48
+		if ( ! ( $data[0] instanceof EE_Transaction )) {
49
+					throw new EE_Error( __('Incoming data for the Gateways data handler must have an EE_Transaction object as the value for the first array index.', 'event_espresso') );
50
+		}
49 51
 
50
-		if ( empty( $data[1] ) || ! $data[1] instanceof  EE_Payment  )
51
-			$pmt_obj = $this->_get_empty_payment_obj( $data[0] );
52
+		if ( empty( $data[1] ) || ! $data[1] instanceof  EE_Payment  ) {
53
+					$pmt_obj = $this->_get_empty_payment_obj( $data[0] );
54
+		}
52 55
 
53 56
 		$data = array(
54 57
 			'txn_obj' => $data[0],
Please login to merge, or discard this patch.
core/libraries/messages/data_class/EE_Messages_REG_incoming_data.class.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('NO direct script access allowed');
5 5
 
6 6
 /**
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	 *
45 45
 	 * @param EE_Registration $data
46 46
 	 */
47
-	public function __construct( EE_Registration $data ) {
47
+	public function __construct(EE_Registration $data) {
48 48
 
49 49
 		$this->reg_obj = $data;
50 50
 
@@ -69,16 +69,16 @@  discard block
 block discarded – undo
69 69
 
70 70
 		//possible session stuff?
71 71
 		$session = $this->txn->session_data();
72
-		$session_data =  $session instanceof EE_Session ? $session->get_session_data() : array();
72
+		$session_data = $session instanceof EE_Session ? $session->get_session_data() : array();
73 73
 
74 74
 		//other data from the session (if possible)
75
-		$this->user_id = isset( $session_data['user_id'] ) ? $session_data['user_id'] : '';
76
-		$this->ip_address = isset( $session_data['ip_address'] ) ? $session_data['ip_address'] : '';
77
-		$this->user_agent = isset( $session_data['user_agent'] ) ? $session_data['user_agent'] : '';
75
+		$this->user_id = isset($session_data['user_id']) ? $session_data['user_id'] : '';
76
+		$this->ip_address = isset($session_data['ip_address']) ? $session_data['ip_address'] : '';
77
+		$this->user_agent = isset($session_data['user_agent']) ? $session_data['user_agent'] : '';
78 78
 		$this->init_access = $this->last_access = '';
79 79
 
80 80
 		$this->payment = $this->txn->get_first_related('Payment');
81
-		$this->payment = empty( $this->payment ) ? EE_Payment::new_instance( array(
81
+		$this->payment = empty($this->payment) ? EE_Payment::new_instance(array(
82 82
 			'STS_ID' => EEM_Payment::status_id_pending,
83 83
 			'PAY_timestamp' => (int) current_time('timestamp'),
84 84
 			'PMD_ID' => $this->txn->payment_method_ID(),
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 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
Please login to merge, or discard this patch.
core/libraries/messages/data_class/EE_Messages_incoming_data.core.php 2 patches
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('NO direct script access allowed');
5 5
 
6 6
 /**
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 	 * constructor
234 234
 	 * @param mixed $data incoming data object|array.  Suggested that child classes use typehinting for expected data object.  But here parent will be generic because we don't know what's coming in.
235 235
 	 */
236
-	public function __construct( $data ) {
236
+	public function __construct($data) {
237 237
 		$this->_data = $data;
238 238
 		$this->_setup_data();
239 239
 
@@ -268,8 +268,8 @@  discard block
 block discarded – undo
268 268
 		$regchk = array_values($this->reg_objs);
269 269
 		$regchk = array_shift($regchk);
270 270
 		//verify that reg_objs is set
271
-		if ( !is_array( $this->reg_objs) && ! $regchk instanceof EE_Registration )
272
-			throw new EE_Error( __('In order to assemble the data correctly, the "reg_objs" property must be an array of EE_Registration objects', 'event_espresso') );
271
+		if ( ! is_array($this->reg_objs) && ! $regchk instanceof EE_Registration)
272
+			throw new EE_Error(__('In order to assemble the data correctly, the "reg_objs" property must be an array of EE_Registration objects', 'event_espresso'));
273 273
 
274 274
 		//get all attendee and events associated with the registrations in this transaction
275 275
 		$events = $event_setup = $evt_cache = $tickets = $datetimes = $answers = $questions = array();
@@ -277,15 +277,15 @@  discard block
 block discarded – undo
277 277
 		$total_ticket_count = 0;
278 278
 
279 279
 
280
-		if ( !empty( $this->reg_objs ) ) {
280
+		if ( ! empty($this->reg_objs)) {
281 281
 			$event_attendee_count = array();
282
-			foreach ( $this->reg_objs as $reg ) {
282
+			foreach ($this->reg_objs as $reg) {
283 283
 				$evt_id = $reg->event_ID();
284 284
 				$ticket = $reg->get_first_related('Ticket');
285 285
 				$relateddatetime = $ticket->datetimes();
286 286
 				$total_ticket_count++;
287 287
 				$tickets[$ticket->ID()]['ticket'] = $ticket;
288
-				$tickets[$ticket->ID()]['count'] = is_array($tickets[$ticket->ID()]) && isset( $tickets[$ticket->ID()]['count'] ) ? $tickets[$ticket->ID()]['count'] + 1 : 1;
288
+				$tickets[$ticket->ID()]['count'] = is_array($tickets[$ticket->ID()]) && isset($tickets[$ticket->ID()]['count']) ? $tickets[$ticket->ID()]['count'] + 1 : 1;
289 289
 				$tickets[$ticket->ID()]['att_objs'][$reg->attendee_ID()] = $reg->attendee();
290 290
 				$tickets[$ticket->ID()]['dtt_objs'] = $relateddatetime;
291 291
 				$tickets[$ticket->ID()]['reg_objs'][$reg->ID()] = $reg;
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 				$eventsetup[$evt_id]['reg_objs'][$reg->ID()] = $reg;
296 296
 				$eventsetup[$evt_id]['tkt_objs'][$ticket->ID()] = $ticket;
297 297
 				$eventsetup[$evt_id]['att_objs'][$reg->attendee_ID()] = $reg->attendee();
298
-				$event_attendee_count[$evt_id] = isset( $event_attendee_count[$evt_id] ) ? $event_attendee_count[$evt_id] + 1 : 0;
298
+				$event_attendee_count[$evt_id] = isset($event_attendee_count[$evt_id]) ? $event_attendee_count[$evt_id] + 1 : 0;
299 299
 				$attendees[$reg->attendee_ID()]['line_ref'][] = $evt_id;
300 300
 				$attendees[$reg->attendee_ID()]['att_obj'] = $reg->attendee();
301 301
 				$attendees[$reg->attendee_ID()]['reg_objs'][$reg->ID()] = $reg;
@@ -312,19 +312,19 @@  discard block
 block discarded – undo
312 312
 
313 313
 				//set up answer objects
314 314
 				$rel_ans = $reg->get_many_related('Answer');
315
-				foreach ( $rel_ans as $ansid => $answer ) {
316
-					if ( !isset( $questions[$ansid] ) ) {
315
+				foreach ($rel_ans as $ansid => $answer) {
316
+					if ( ! isset($questions[$ansid])) {
317 317
 						$questions[$ansid] = $answer->get_first_related('Question');
318 318
 					}
319 319
 					$answers[$ansid] = $answer;
320 320
 					$registrations[$reg->ID()]['ans_objs'][$ansid] = $answer;
321 321
 				}
322 322
 
323
-				foreach ( $relateddatetime as $dtt_id => $datetime ) {
323
+				foreach ($relateddatetime as $dtt_id => $datetime) {
324 324
 					$eventsetup[$evt_id]['dtt_objs'][$dtt_id] = $datetime;
325 325
 					$registrations[$reg->ID()]['dtt_objs'][$dtt_id] = $datetime;
326 326
 
327
-					if ( isset( $datetimes[$dtt_id] ) )
327
+					if (isset($datetimes[$dtt_id]))
328 328
 						continue; //already have this info in the datetimes array.
329 329
 
330 330
 					$datetimes[$dtt_id]['tkt_objs'][] = $ticket;
@@ -337,9 +337,9 @@  discard block
 block discarded – undo
337 337
 			//let's loop through the unique event=>reg items and setup data on them
338 338
 
339 339
 
340
-			if ( !empty( $eventsetup) ) {
341
-				foreach ( $eventsetup as $eid => $items ) {
342
-					$ticket_line_items_for_event = EEM_Line_Item::instance()->get_all(array(array('Ticket.Datetime.EVT_ID'=>$evt_id,'TXN_ID'=>$this->txn->ID()), 'default_where_conditions' => 'none'));
340
+			if ( ! empty($eventsetup)) {
341
+				foreach ($eventsetup as $eid => $items) {
342
+					$ticket_line_items_for_event = EEM_Line_Item::instance()->get_all(array(array('Ticket.Datetime.EVT_ID'=>$evt_id, 'TXN_ID'=>$this->txn->ID()), 'default_where_conditions' => 'none'));
343 343
 					$events[$eid] = array(
344 344
 						'ID' => $eid,
345 345
 						'event' => $evtcache[$eid],
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
 
355 355
 					//make sure the tickets have the line items setup for them.
356 356
 					$line_items = array();
357
-					foreach ( $ticket_line_items_for_event as $line_id => $line_item ) {
357
+					foreach ($ticket_line_items_for_event as $line_id => $line_item) {
358 358
 						$tickets[$line_item->ticket()->ID()]['line_item'] = $line_item;
359 359
 						$tickets[$line_item->ticket()->ID()]['sub_line_items'] = $line_item->children();
360 360
 						$line_items[$line_item->ID()]['children'] = $line_item->children();
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
 		$this->total_ticket_count = $total_ticket_count;
379 379
 		$this->registrations = $registrations;
380 380
 
381
-		$this->tax_line_items =  $this->txn->tax_items();
381
+		$this->tax_line_items = $this->txn->tax_items();
382 382
 		$this->additional_line_items = $this->txn->non_ticket_line_items();
383 383
 		$this->payments = $this->txn->payments();
384 384
 
@@ -388,10 +388,10 @@  discard block
 block discarded – undo
388 388
 		//let's get just the primary_attendee_data!  First we get the primary registration object.
389 389
 		$primary_reg = $this->txn->primary_registration(TRUE);
390 390
 		// verify
391
-		if( $primary_reg instanceof EE_Registration ) {
391
+		if ($primary_reg instanceof EE_Registration) {
392 392
 
393 393
 			// get attendee object
394
-			if( $primary_reg->attendee() instanceof EE_Attendee ) {
394
+			if ($primary_reg->attendee() instanceof EE_Attendee) {
395 395
 
396 396
 				//now we can setup the primary_attendee_data array
397 397
 				$this->primary_attendee_data = array(
@@ -403,11 +403,11 @@  discard block
 block discarded – undo
403 403
 				);
404 404
 
405 405
 			} else {
406
-				EE_Error::add_error( __('Incoming data does not have a valid Attendee object for the primary registrant.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
406
+				EE_Error::add_error(__('Incoming data does not have a valid Attendee object for the primary registrant.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
407 407
 			}
408 408
 
409 409
 		} else {
410
-			EE_Error::add_error( __('Incoming data does not have a valid Registration object for the primary registrant.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
410
+			EE_Error::add_error(__('Incoming data does not have a valid Registration object for the primary registrant.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
411 411
 		}
412 412
 	}
413 413
 
Please login to merge, or discard this patch.
Braces   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
4 4
 	exit('NO direct script access allowed');
5
+}
5 6
 
6 7
 /**
7 8
  * Event Espresso
@@ -268,8 +269,9 @@  discard block
 block discarded – undo
268 269
 		$regchk = array_values($this->reg_objs);
269 270
 		$regchk = array_shift($regchk);
270 271
 		//verify that reg_objs is set
271
-		if ( !is_array( $this->reg_objs) && ! $regchk instanceof EE_Registration )
272
-			throw new EE_Error( __('In order to assemble the data correctly, the "reg_objs" property must be an array of EE_Registration objects', 'event_espresso') );
272
+		if ( !is_array( $this->reg_objs) && ! $regchk instanceof EE_Registration ) {
273
+					throw new EE_Error( __('In order to assemble the data correctly, the "reg_objs" property must be an array of EE_Registration objects', 'event_espresso') );
274
+		}
273 275
 
274 276
 		//get all attendee and events associated with the registrations in this transaction
275 277
 		$events = $event_setup = $evt_cache = $tickets = $datetimes = $answers = $questions = array();
@@ -324,8 +326,10 @@  discard block
 block discarded – undo
324 326
 					$eventsetup[$evt_id]['dtt_objs'][$dtt_id] = $datetime;
325 327
 					$registrations[$reg->ID()]['dtt_objs'][$dtt_id] = $datetime;
326 328
 
327
-					if ( isset( $datetimes[$dtt_id] ) )
328
-						continue; //already have this info in the datetimes array.
329
+					if ( isset( $datetimes[$dtt_id] ) ) {
330
+											continue;
331
+					}
332
+					//already have this info in the datetimes array.
329 333
 
330 334
 					$datetimes[$dtt_id]['tkt_objs'][] = $ticket;
331 335
 					$datetimes[$dtt_id]['datetime'] = $datetime;
Please login to merge, or discard this patch.
default/email_declined_registration_event_list_attendee.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
 <p class="callout">
2
-	<strong><?php _e( 'Event Name:', 'event_espresso' ); ?></strong> <a href="[EVENT_URL]">[EVENT]</a>
2
+	<strong><?php _e('Event Name:', 'event_espresso'); ?></strong> <a href="[EVENT_URL]">[EVENT]</a>
3 3
 </p>
4 4
\ No newline at end of file
Please login to merge, or discard this patch.
core/libraries/shortcodes/EE_Recipient_Details_Shortcodes.lib.php 2 patches
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('NO direct script access allowed');
5 5
 
6 6
 /**
@@ -48,29 +48,29 @@  discard block
 block discarded – undo
48 48
 			'[RECIPIENT_ADDRESS2]' => __('Whatever was in the address 2 field for the recipient of the message.', 'event_espresso'),
49 49
 			'[RECIPIENT_CITY]' => __('The city for the recipient of the message.', 'event_espresso'),
50 50
 			'[RECIPIENT_ZIP_PC]' => __('The ZIP (or Postal) Code for the recipient of the message.', 'event_espresso'),
51
-			'[RECIPIENT_ADDRESS_STATE]' => __('The state/province for the recipient of the message.', 'event_espresso' ),
51
+			'[RECIPIENT_ADDRESS_STATE]' => __('The state/province for the recipient of the message.', 'event_espresso'),
52 52
 			'[RECIPIENT_COUNTRY]' => __('The country for the recipient of the message.', 'event_espresso'),
53
-			'[RECIPIENT_ANSWER_*]' => __('This is a special dynamic shortcode.  After the "*", add the exact text of an existing question, and if there is an answer for that question for this recipient, then it will be output in place of this shortcode.', 'event_espresso' )
53
+			'[RECIPIENT_ANSWER_*]' => __('This is a special dynamic shortcode.  After the "*", add the exact text of an existing question, and if there is an answer for that question for this recipient, then it will be output in place of this shortcode.', 'event_espresso')
54 54
 			);
55 55
 	}
56 56
 
57 57
 
58 58
 
59
-	protected function _parser( $shortcode ) {
59
+	protected function _parser($shortcode) {
60 60
 
61 61
 		//make sure we end up with a copy of the EE_Messages_Addressee object
62 62
 		$this->_recipient = $this->_data instanceof EE_Messages_Addressee ? $this->_data : NULL;
63
-		$this->_recipient = ! $this->_recipient instanceof EE_Messages_Addressee && is_array($this->_data) && isset( $this->_data['data'] ) && $this->_data['data'] instanceof EE_Messages_Addressee ? $this->_data['data'] : $this->_recipient;
64
-		$this->_recipient = ! $this->_recipient instanceof EE_Messages_Addressee && !empty( $this->_extra_data['data'] ) && $this->_extra_data['data'] instanceof EE_Messages_Addressee ? $this->_extra_data['data'] : $this->_recipient;
63
+		$this->_recipient = ! $this->_recipient instanceof EE_Messages_Addressee && is_array($this->_data) && isset($this->_data['data']) && $this->_data['data'] instanceof EE_Messages_Addressee ? $this->_data['data'] : $this->_recipient;
64
+		$this->_recipient = ! $this->_recipient instanceof EE_Messages_Addressee && ! empty($this->_extra_data['data']) && $this->_extra_data['data'] instanceof EE_Messages_Addressee ? $this->_extra_data['data'] : $this->_recipient;
65 65
 
66
-		if ( ! $this->_recipient instanceof EE_Messages_Addressee )
66
+		if ( ! $this->_recipient instanceof EE_Messages_Addressee)
67 67
 			return '';
68 68
 
69 69
 		$attendee = $this->_recipient->att_obj;
70
-		if ( ! $attendee instanceof EE_Attendee )
70
+		if ( ! $attendee instanceof EE_Attendee)
71 71
 			return '';
72 72
 
73
-		switch ( $shortcode ) {
73
+		switch ($shortcode) {
74 74
 			case '[RECIPIENT_FNAME]' :
75 75
 				return $attendee->fname();
76 76
 				break;
@@ -84,13 +84,13 @@  discard block
 block discarded – undo
84 84
 				break;
85 85
 
86 86
 			case '[RECIPIENT_REGISTRATION_CODE]' :
87
-				if ( ! $this->_recipient->reg_obj instanceof EE_Registration )
87
+				if ( ! $this->_recipient->reg_obj instanceof EE_Registration)
88 88
 					return '';
89 89
 				return $this->_recipient->reg_obj->reg_code();
90 90
 				break;
91 91
 
92 92
 			case '[RECIPIENT_EDIT_REGISTRATION_LINK]' :
93
-				if ( ! $this->_recipient->reg_obj instanceof EE_Registration )
93
+				if ( ! $this->_recipient->reg_obj instanceof EE_Registration)
94 94
 					return '';
95 95
 				return $this->_recipient->reg_obj->edit_attendee_information_url();
96 96
 				break;
@@ -126,19 +126,19 @@  discard block
 block discarded – undo
126 126
 				break;
127 127
 		}
128 128
 
129
-		if ( strpos( $shortcode, '[RECIPIENT_ANSWER_*' ) !== false ) {
130
-			$shortcode = str_replace( '[RECIPIENT_ANSWER_*', '', $shortcode );
131
-			$shortcode = trim( str_replace( ']', '', $shortcode ) );
129
+		if (strpos($shortcode, '[RECIPIENT_ANSWER_*') !== false) {
130
+			$shortcode = str_replace('[RECIPIENT_ANSWER_*', '', $shortcode);
131
+			$shortcode = trim(str_replace(']', '', $shortcode));
132 132
 
133 133
 
134 134
 			//now let's figure out what question has this text
135
-			if ( empty( $this->_recipient->questions ) || ! $this->_recipient->reg_obj instanceof EE_Registration ) {
135
+			if (empty($this->_recipient->questions) || ! $this->_recipient->reg_obj instanceof EE_Registration) {
136 136
 				return '';
137 137
 			}
138 138
 
139
-			foreach ( $this->_recipient->questions as $ansid => $question ) {
140
-				if ( $question->get('QST_display_text') == $shortcode && isset( $this->_recipient->registrations[$this->_recipient->reg_obj->ID()]['ans_objs'][$ansid] ) ) {
141
-					return $this->_recipient->registrations[$this->_recipient->reg_obj->ID()]['ans_objs'][$ansid]->get_pretty( 'ANS_value', 'no_wpautop' );
139
+			foreach ($this->_recipient->questions as $ansid => $question) {
140
+				if ($question->get('QST_display_text') == $shortcode && isset($this->_recipient->registrations[$this->_recipient->reg_obj->ID()]['ans_objs'][$ansid])) {
141
+					return $this->_recipient->registrations[$this->_recipient->reg_obj->ID()]['ans_objs'][$ansid]->get_pretty('ANS_value', 'no_wpautop');
142 142
 				}
143 143
 			}
144 144
 		}
Please login to merge, or discard this patch.
Braces   +14 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
4 4
 	exit('NO direct script access allowed');
5
+}
5 6
 
6 7
 /**
7 8
  * Event Espresso
@@ -63,12 +64,14 @@  discard block
 block discarded – undo
63 64
 		$this->_recipient = ! $this->_recipient instanceof EE_Messages_Addressee && is_array($this->_data) && isset( $this->_data['data'] ) && $this->_data['data'] instanceof EE_Messages_Addressee ? $this->_data['data'] : $this->_recipient;
64 65
 		$this->_recipient = ! $this->_recipient instanceof EE_Messages_Addressee && !empty( $this->_extra_data['data'] ) && $this->_extra_data['data'] instanceof EE_Messages_Addressee ? $this->_extra_data['data'] : $this->_recipient;
65 66
 
66
-		if ( ! $this->_recipient instanceof EE_Messages_Addressee )
67
-			return '';
67
+		if ( ! $this->_recipient instanceof EE_Messages_Addressee ) {
68
+					return '';
69
+		}
68 70
 
69 71
 		$attendee = $this->_recipient->att_obj;
70
-		if ( ! $attendee instanceof EE_Attendee )
71
-			return '';
72
+		if ( ! $attendee instanceof EE_Attendee ) {
73
+					return '';
74
+		}
72 75
 
73 76
 		switch ( $shortcode ) {
74 77
 			case '[RECIPIENT_FNAME]' :
@@ -84,14 +87,16 @@  discard block
 block discarded – undo
84 87
 				break;
85 88
 
86 89
 			case '[RECIPIENT_REGISTRATION_CODE]' :
87
-				if ( ! $this->_recipient->reg_obj instanceof EE_Registration )
88
-					return '';
90
+				if ( ! $this->_recipient->reg_obj instanceof EE_Registration ) {
91
+									return '';
92
+				}
89 93
 				return $this->_recipient->reg_obj->reg_code();
90 94
 				break;
91 95
 
92 96
 			case '[RECIPIENT_EDIT_REGISTRATION_LINK]' :
93
-				if ( ! $this->_recipient->reg_obj instanceof EE_Registration )
94
-					return '';
97
+				if ( ! $this->_recipient->reg_obj instanceof EE_Registration ) {
98
+									return '';
99
+				}
95 100
 				return $this->_recipient->reg_obj->edit_attendee_information_url();
96 101
 				break;
97 102
 
Please login to merge, or discard this patch.
core/libraries/shortcodes/EE_Recipient_List_Shortcodes.lib.php 2 patches
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -43,8 +43,8 @@  discard block
 block discarded – undo
43 43
 
44 44
 
45 45
 
46
-	protected function _parser( $shortcode ) {
47
-		switch ( $shortcode ) {
46
+	protected function _parser($shortcode) {
47
+		switch ($shortcode) {
48 48
 			case '[RECIPIENT_TICKET_LIST]' :
49 49
 				return $this->_get_recipient_ticket_list();
50 50
 				break;
@@ -64,58 +64,58 @@  discard block
 block discarded – undo
64 64
 	 * @param  boolean $primary whether we're getting the primary registrant ticket_list.
65 65
 	 * @return string
66 66
 	 */
67
-	private function _get_recipient_ticket_list( $primary = FALSE ) {
67
+	private function _get_recipient_ticket_list($primary = FALSE) {
68 68
 		$this->_validate_list_requirements();
69 69
 		$this->_set_shortcode_helper();
70 70
 
71
-		if ( $this->_data['data'] instanceof EE_Messages_Addressee )
72
-			return $this->_get_recipient_ticket_list_parsed( $this->_data['data'], $primary );
71
+		if ($this->_data['data'] instanceof EE_Messages_Addressee)
72
+			return $this->_get_recipient_ticket_list_parsed($this->_data['data'], $primary);
73 73
 
74
-		else if ( $this->_extra_data['data'] instanceof EE_Messages_Addressee )
75
-			return $this->_get_recipient_ticket_list_parsed( $this->_extra_data['data'], $primary );
74
+		else if ($this->_extra_data['data'] instanceof EE_Messages_Addressee)
75
+			return $this->_get_recipient_ticket_list_parsed($this->_extra_data['data'], $primary);
76 76
 
77 77
 		else
78 78
 			return '';
79 79
 	}
80 80
 
81 81
 
82
-	private function _get_recipient_ticket_list_parsed( EE_Messages_Addressee $data, $primary = FALSE ) {
82
+	private function _get_recipient_ticket_list_parsed(EE_Messages_Addressee $data, $primary = FALSE) {
83 83
 		$registration = $primary ? $data->primary_reg_obj : $data->reg_obj;
84
-			if ( ! $registration instanceof EE_Registration ) return '';
84
+			if ( ! $registration instanceof EE_Registration) return '';
85 85
 		//setup valid shortcodes depending on what the status of the $this->_data property is
86
-		if ( $this->_data['data'] instanceof EE_Messages_Addressee ) {
87
-			$valid_shortcodes = array('ticket', 'event_list', 'attendee_list','datetime_list', 'registration_details', 'attendee');
86
+		if ($this->_data['data'] instanceof EE_Messages_Addressee) {
87
+			$valid_shortcodes = array('ticket', 'event_list', 'attendee_list', 'datetime_list', 'registration_details', 'attendee');
88 88
 			$template = $this->_data['template'];
89 89
 			$tkts = array($data->registrations[$registration->ID()]['tkt_obj']);
90 90
 			$data = $this->_data;
91
-		} elseif ( $this->_data['data'] instanceof EE_Event ) {
91
+		} elseif ($this->_data['data'] instanceof EE_Event) {
92 92
 			$valid_shortcodes = array('ticket', 'attendee_list', 'datetime_list', 'attendee');
93
-			$template = is_array($this->_data['template'] ) && isset($this->_data['template']['ticket_list']) ? $this->_data['template']['ticket_list'] : $this->_extra_data['template']['ticket_list'];
93
+			$template = is_array($this->_data['template']) && isset($this->_data['template']['ticket_list']) ? $this->_data['template']['ticket_list'] : $this->_extra_data['template']['ticket_list'];
94 94
 			//let's remove any existing [EVENT_LIST] shortcode from the ticket list template so that we don't get recursion.
95 95
 			$template = str_replace('[EVENT_LIST]', '', $template);
96 96
 			//data will be tickets for this event for this recipient.
97
-			$tkts = $this->_get_tickets_from_event( $this->_data['data'], $registration );
97
+			$tkts = $this->_get_tickets_from_event($this->_data['data'], $registration);
98 98
 			$data = $this->_extra_data;
99 99
 		} else {
100 100
 			return '';
101 101
 		}
102 102
 
103 103
 		$tkt_parsed = '';
104
-		foreach ( $tkts as $ticket ) {
105
-			$tkt_parsed .= $this->_shortcode_helper->parse_ticket_list_template( $template, $ticket, $valid_shortcodes, $this->_extra_data );
104
+		foreach ($tkts as $ticket) {
105
+			$tkt_parsed .= $this->_shortcode_helper->parse_ticket_list_template($template, $ticket, $valid_shortcodes, $this->_extra_data);
106 106
 		}
107 107
 		return $tkt_parsed;
108 108
 	}
109 109
 
110 110
 
111
-	private function _get_tickets_from_event( EE_Event $event, $reg = NULL ) {
111
+	private function _get_tickets_from_event(EE_Event $event, $reg = NULL) {
112 112
 		$evt_tkts = isset($this->_extra_data['data']->events) ? $this->_extra_data['data']->events[$event->ID()]['tkt_objs'] : array();
113 113
 
114
-		if ( $reg instanceof EE_Registration && $this->_extra_data['data'] instanceof EE_Messages_Addressee ) {
114
+		if ($reg instanceof EE_Registration && $this->_extra_data['data'] instanceof EE_Messages_Addressee) {
115 115
 			$adj_tkts = array();
116 116
 			//return only tickets for the given attendee
117
-			foreach ( $evt_tkts as $tkt ) {
118
-				if ( isset( $this->_extra_data['data']->registrations[$reg->ID()]['tkt_obj'] ) && $this->_extra_data['data']->registrations[$reg->ID()]['tkt_obj']->ID() == $tkt->ID() )
117
+			foreach ($evt_tkts as $tkt) {
118
+				if (isset($this->_extra_data['data']->registrations[$reg->ID()]['tkt_obj']) && $this->_extra_data['data']->registrations[$reg->ID()]['tkt_obj']->ID() == $tkt->ID())
119 119
 					$adj_tkts[] = $tkt;
120 120
 			}
121 121
 			$evt_tkts = $adj_tkts;
@@ -132,58 +132,58 @@  discard block
 block discarded – undo
132 132
 	 * @param  boolean $primary whether we're getting the primary registrant ticket_list.
133 133
 	 * @return string
134 134
 	 */
135
-	private function _get_recipient_datetime_list( $primary = FALSE ) {
135
+	private function _get_recipient_datetime_list($primary = FALSE) {
136 136
 		$this->_validate_list_requirements();
137 137
 		$this->_set_shortcode_helper();
138 138
 
139
-		if ( $this->_data['data'] instanceof EE_Messages_Addressee )
140
-			return $this->_get_recipient_datetime_list_parsed( $this->_data['data'], $primary );
139
+		if ($this->_data['data'] instanceof EE_Messages_Addressee)
140
+			return $this->_get_recipient_datetime_list_parsed($this->_data['data'], $primary);
141 141
 
142
-		else if ( $this->_extra_data['data'] instanceof EE_Messages_Addressee )
143
-			return $this->_get_recipient_datetime_list_parsed( $this->_extra_data['data'], $primary );
142
+		else if ($this->_extra_data['data'] instanceof EE_Messages_Addressee)
143
+			return $this->_get_recipient_datetime_list_parsed($this->_extra_data['data'], $primary);
144 144
 
145 145
 		else
146 146
 			return '';
147 147
 
148
-		return $this->_get_recipient_datetime_list_parsed( $this->_data['data'], $primary);
148
+		return $this->_get_recipient_datetime_list_parsed($this->_data['data'], $primary);
149 149
 	}
150 150
 
151 151
 
152
-	private function _get_recipient_datetime_list_parsed( EE_Messages_Addressee $data, $primary = FALSE ) {
152
+	private function _get_recipient_datetime_list_parsed(EE_Messages_Addressee $data, $primary = FALSE) {
153 153
 		$registration = $primary ? $data->primary_reg_obj : $data->reg_obj;
154
-		if ( ! $registration instanceof EE_Registration ) return '';
154
+		if ( ! $registration instanceof EE_Registration) return '';
155 155
 		//setup valid shortcodes depending on what the status of the $this->_data property is
156
-		if ( $this->_data['data'] instanceof EE_Messages_Addressee ) {
156
+		if ($this->_data['data'] instanceof EE_Messages_Addressee) {
157 157
 			$valid_shortcodes = array('datetime', 'attendee');
158 158
 			$template = $this->_data['template'];
159 159
 			$dtts = $data->registrations[$registration->ID()]['dtt_objs'];
160 160
 			$data = $this->_data;
161
-		} elseif ( $this->_data['data'] instanceof EE_Event ) {
161
+		} elseif ($this->_data['data'] instanceof EE_Event) {
162 162
 			$valid_shortcodes = array('datetime', 'attendee');
163
-			$template = is_array($this->_data['template'] ) && isset($this->_data['template']['datetime_list']) ? $this->_data['template']['datetime_list'] : $this->_extra_data['template']['datetime_list'];
164
-			$dtts = $this->_get_datetimes_from_event( $this->_data['data'], $registration );
163
+			$template = is_array($this->_data['template']) && isset($this->_data['template']['datetime_list']) ? $this->_data['template']['datetime_list'] : $this->_extra_data['template']['datetime_list'];
164
+			$dtts = $this->_get_datetimes_from_event($this->_data['data'], $registration);
165 165
 			$data = $this->_extra_data;
166 166
 		} else {
167 167
 			return '';
168 168
 		}
169 169
 
170 170
 		$dtt_parsed = '';
171
-		foreach ( $dtts as $datetime ) {
172
-			$dtt_parsed .= $this->_shortcode_helper->parse_datetime_list_template( $template, $datetime, $valid_shortcodes, $this->_extra_data );
171
+		foreach ($dtts as $datetime) {
172
+			$dtt_parsed .= $this->_shortcode_helper->parse_datetime_list_template($template, $datetime, $valid_shortcodes, $this->_extra_data);
173 173
 		}
174 174
 		return $dtt_parsed;
175 175
 	}
176 176
 
177 177
 
178 178
 
179
-	private function _get_datetimes_from_event( EE_Event $event, $reg = NULL ) {
179
+	private function _get_datetimes_from_event(EE_Event $event, $reg = NULL) {
180 180
 		$evt_dtts = isset($this->_extra_data['data']->events) ? $this->_extra_data['data']->events[$event->ID()]['dtt_objs'] : array();
181 181
 
182
-		if ( $reg instanceof EE_Registration && $this->_extra_data['data'] instanceof EE_Messages_Addressee ) {
182
+		if ($reg instanceof EE_Registration && $this->_extra_data['data'] instanceof EE_Messages_Addressee) {
183 183
 			$adj_dtts = array();
184 184
 			//return only dtts for the given attendee
185
-			foreach ( $evt_dtts as $dtt ) {
186
-				if ( isset( $this->_extra_data['data']->registrations[$reg->ID()]['dtt_objs'][$dtt->ID()] ) )
185
+			foreach ($evt_dtts as $dtt) {
186
+				if (isset($this->_extra_data['data']->registrations[$reg->ID()]['dtt_objs'][$dtt->ID()]))
187 187
 					$adj_dtts[] = $dtt;
188 188
 			}
189 189
 			$evt_dtts = $adj_dtts;
Please login to merge, or discard this patch.
Braces   +26 added lines, -22 removed lines patch added patch discarded remove patch
@@ -69,20 +69,21 @@  discard block
 block discarded – undo
69 69
 		$this->_validate_list_requirements();
70 70
 		$this->_set_shortcode_helper();
71 71
 
72
-		if ( $this->_data['data'] instanceof EE_Messages_Addressee )
73
-			return $this->_get_recipient_ticket_list_parsed( $this->_data['data'], $primary );
74
-
75
-		else if ( $this->_extra_data['data'] instanceof EE_Messages_Addressee )
76
-			return $this->_get_recipient_ticket_list_parsed( $this->_extra_data['data'], $primary );
77
-
78
-		else
79
-			return '';
72
+		if ( $this->_data['data'] instanceof EE_Messages_Addressee ) {
73
+					return $this->_get_recipient_ticket_list_parsed( $this->_data['data'], $primary );
74
+		} else if ( $this->_extra_data['data'] instanceof EE_Messages_Addressee ) {
75
+					return $this->_get_recipient_ticket_list_parsed( $this->_extra_data['data'], $primary );
76
+		} else {
77
+					return '';
78
+		}
80 79
 	}
81 80
 
82 81
 
83 82
 	private function _get_recipient_ticket_list_parsed( EE_Messages_Addressee $data, $primary = FALSE ) {
84 83
 		$registration = $primary ? $data->primary_reg_obj : $data->reg_obj;
85
-			if ( ! $registration instanceof EE_Registration ) return '';
84
+			if ( ! $registration instanceof EE_Registration ) {
85
+				return '';
86
+			}
86 87
 		//setup valid shortcodes depending on what the status of the $this->_data property is
87 88
 		if ( $this->_data['data'] instanceof EE_Messages_Addressee ) {
88 89
 			$valid_shortcodes = array('ticket', 'event_list', 'attendee_list','datetime_list', 'registration_details', 'attendee');
@@ -116,8 +117,9 @@  discard block
 block discarded – undo
116 117
 			$adj_tkts = array();
117 118
 			//return only tickets for the given attendee
118 119
 			foreach ( $evt_tkts as $tkt ) {
119
-				if ( isset( $this->_extra_data['data']->registrations[$reg->ID()]['tkt_obj'] ) && $this->_extra_data['data']->registrations[$reg->ID()]['tkt_obj']->ID() == $tkt->ID() )
120
-					$adj_tkts[] = $tkt;
120
+				if ( isset( $this->_extra_data['data']->registrations[$reg->ID()]['tkt_obj'] ) && $this->_extra_data['data']->registrations[$reg->ID()]['tkt_obj']->ID() == $tkt->ID() ) {
121
+									$adj_tkts[] = $tkt;
122
+				}
121 123
 			}
122 124
 			$evt_tkts = $adj_tkts;
123 125
 		}
@@ -137,14 +139,13 @@  discard block
 block discarded – undo
137 139
 		$this->_validate_list_requirements();
138 140
 		$this->_set_shortcode_helper();
139 141
 
140
-		if ( $this->_data['data'] instanceof EE_Messages_Addressee )
141
-			return $this->_get_recipient_datetime_list_parsed( $this->_data['data'], $primary );
142
-
143
-		else if ( $this->_extra_data['data'] instanceof EE_Messages_Addressee )
144
-			return $this->_get_recipient_datetime_list_parsed( $this->_extra_data['data'], $primary );
145
-
146
-		else
147
-			return '';
142
+		if ( $this->_data['data'] instanceof EE_Messages_Addressee ) {
143
+					return $this->_get_recipient_datetime_list_parsed( $this->_data['data'], $primary );
144
+		} else if ( $this->_extra_data['data'] instanceof EE_Messages_Addressee ) {
145
+					return $this->_get_recipient_datetime_list_parsed( $this->_extra_data['data'], $primary );
146
+		} else {
147
+					return '';
148
+		}
148 149
 
149 150
 		return $this->_get_recipient_datetime_list_parsed( $this->_data['data'], $primary);
150 151
 	}
@@ -152,7 +153,9 @@  discard block
 block discarded – undo
152 153
 
153 154
 	private function _get_recipient_datetime_list_parsed( EE_Messages_Addressee $data, $primary = FALSE ) {
154 155
 		$registration = $primary ? $data->primary_reg_obj : $data->reg_obj;
155
-		if ( ! $registration instanceof EE_Registration ) return '';
156
+		if ( ! $registration instanceof EE_Registration ) {
157
+			return '';
158
+		}
156 159
 		//setup valid shortcodes depending on what the status of the $this->_data property is
157 160
 		if ( $this->_data['data'] instanceof EE_Messages_Addressee ) {
158 161
 			$valid_shortcodes = array('datetime', 'attendee');
@@ -184,8 +187,9 @@  discard block
 block discarded – undo
184 187
 			$adj_dtts = array();
185 188
 			//return only dtts for the given attendee
186 189
 			foreach ( $evt_dtts as $dtt ) {
187
-				if ( isset( $this->_extra_data['data']->registrations[$reg->ID()]['dtt_objs'][$dtt->ID()] ) )
188
-					$adj_dtts[] = $dtt;
190
+				if ( isset( $this->_extra_data['data']->registrations[$reg->ID()]['dtt_objs'][$dtt->ID()] ) ) {
191
+									$adj_dtts[] = $dtt;
192
+				}
189 193
 			}
190 194
 			$evt_dtts = $adj_dtts;
191 195
 		}
Please login to merge, or discard this patch.
templates/payment_options/events_requiring_pre_approval.template.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 
2
-	<h4 class="orange-text"><?php _e('Important Notice:', 'event_espresso');?></h4>
2
+	<h4 class="orange-text"><?php _e('Important Notice:', 'event_espresso'); ?></h4>
3 3
 	<p id="events-requiring-pre-approval-pg" class="small-text drk-grey-text">
4 4
 		<?php echo $events_requiring_pre_approval_msg; ?>
5 5
 	</p>
6
-	<h6><?php _e('Events Requiring Pre-Approval:', 'event_espresso');?></h6>
6
+	<h6><?php _e('Events Requiring Pre-Approval:', 'event_espresso'); ?></h6>
7 7
 	<ul id="spco-pre-approval-events-ul"><?php echo $events_requiring_pre_approval; ?></ul>
8 8
 
9
-	<?php echo $default_hidden_inputs;  ?>
10
-	<?php echo $extra_hidden_inputs;  ?>
9
+	<?php echo $default_hidden_inputs; ?>
10
+	<?php echo $extra_hidden_inputs; ?>
11 11
 
12 12
 	<!--	<input id="reg-page-selected-method-of-payment" type="hidden" value="payments_closed" name="selected_method_of_payment">-->
13 13
 <!--	<input type="hidden" id="reg-page-no-payment-required-payment_options" name="_reg-page-no-payment-required" value="1" />-->
Please login to merge, or discard this patch.
templates/payment_options/no_payment_required.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
-if( is_array( $registrations_for_free_events ) && ! empty( $registrations_for_free_events ) ) {
2
+if (is_array($registrations_for_free_events) && ! empty($registrations_for_free_events)) {
3 3
 	echo apply_filters(
4 4
 		'FHEE__registration_page_payment_options__no_payment_required_hdr',
5 5
 		sprintf(
6
-			__( '%1$sNo Payment Required%2$s', 'event_espresso' ),
6
+			__('%1$sNo Payment Required%2$s', 'event_espresso'),
7 7
 			'<h6>',
8 8
 			'</h6>'
9 9
 		)
10 10
 	);
11
-	foreach ( $registrations_for_free_events as $registration_for_free_event ) {
12
-		if ( $registration_for_free_event instanceof EE_Registration && $registration_for_free_event->ticket()->is_free() ) {
13
-			if ( $registration_for_free_event->event() instanceof EE_Event ) {
11
+	foreach ($registrations_for_free_events as $registration_for_free_event) {
12
+		if ($registration_for_free_event instanceof EE_Registration && $registration_for_free_event->ticket()->is_free()) {
13
+			if ($registration_for_free_event->event() instanceof EE_Event) {
14 14
 				?>
15 15
 				<p>
16 16
 					<?php echo apply_filters(
17 17
 						'FHEE__registration_page_payment_options__no_payment_required_pg',
18 18
 						sprintf(
19
-							__( '%1$s is a free event, so no billing will occur.', 'event_espresso' ),
19
+							__('%1$s is a free event, so no billing will occur.', 'event_espresso'),
20 20
 							$registration_for_free_event->event()->name()
21 21
 						)
22 22
 					); ?>
Please login to merge, or discard this patch.