Completed
Branch FET-8476-powered-by-event-espr... (c8a924)
by
unknown
177:34 queued 161:38
created
modules/gateways/Invoice/lib/templates/receipt_body.template.php 1 patch
Spacing   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -36,53 +36,53 @@  discard block
 block discarded – undo
36 36
 						<h2 id="invoice-hdr"><?php _e('Order Confirmation', 'event_espresso')?></h2>
37 37
 						<h3 id="invoice-date"><?php _e('Date:', 'event_espresso')?> <span class="plain-text">[registration_date]</span></h3>
38 38
 						<h3 id="invoice-txn-id"><?php _e('Transaction ID:', 'event_espresso')?> <span class="plain-text">[transaction_id]</span></h3>
39
-						<h3 id="invoice-txn-status"><?php _e('Status:', 'event_espresso')?> <span class="<?php echo $transaction->status_ID()?> plain-text"><?php echo $transaction->pretty_status();?></span></h3>
39
+						<h3 id="invoice-txn-status"><?php _e('Status:', 'event_espresso')?> <span class="<?php echo $transaction->status_ID()?> plain-text"><?php echo $transaction->pretty_status(); ?></span></h3>
40 40
 					</div>
41 41
 				</td>
42 42
 			</tr>
43 43
 		</table>
44 44
 		<div class="events">
45
-		<?php foreach($events_for_txn as $event_id => $event){
46
-			?><h3 class="section-title event-name"><img class="icon" src="<?php echo EE_IMAGES_URL.'calendar_year-24x24.png';?>"><?php _e("Event Name:","event_espresso")?> <span class="plain-text"><?php echo $event->name();?></span> <span class="small-text link">[ <a href='<?php echo $event->get_permalink()?>'><?php _e('view', 'event_espresso'); ?></a> ]</span></h3>
47
-			<?php if (strlen($event->description()>1)){?><p class="event-description"><?php $event->description()?></p><?php }?>
45
+		<?php foreach ($events_for_txn as $event_id => $event) {
46
+			?><h3 class="section-title event-name"><img class="icon" src="<?php echo EE_IMAGES_URL.'calendar_year-24x24.png'; ?>"><?php _e("Event Name:", "event_espresso")?> <span class="plain-text"><?php echo $event->name(); ?></span> <span class="small-text link">[ <a href='<?php echo $event->get_permalink()?>'><?php _e('view', 'event_espresso'); ?></a> ]</span></h3>
47
+			<?php if (strlen($event->description() > 1)) {?><p class="event-description"><?php $event->description()?></p><?php }?>
48 48
 			<ul class="tickets-per-event">
49
-			<?php foreach($ticket_line_items_per_event[$event_id] as $line_item_id => $line_item){
49
+			<?php foreach ($ticket_line_items_per_event[$event_id] as $line_item_id => $line_item) {
50 50
 				$ticket = $line_item->ticket();
51
-				$taxable_html = $ticket->taxable() ? '*': '';
51
+				$taxable_html = $ticket->taxable() ? '*' : '';
52 52
 				$subitems = $line_item->children();
53
-				$ticket_uses = $ticket->get_pretty('TKT_uses',  __("any", "event_espresso"));
53
+				$ticket_uses = $ticket->get_pretty('TKT_uses', __("any", "event_espresso"));
54 54
 			?>
55 55
 				<li class="event-ticket">
56 56
 					<div class="ticket-details">
57 57
 						<table class="invoice-amount">
58 58
 							<thead>
59 59
 								<tr class="header_row">
60
-									<th class="name-column"><?php _e("Ticket", "event_espresso");?></th>
61
-									<th colspan="2" class="desc-column"><?php _e("Description", "event_espresso");?></th>
62
-									<th class="number-column item_c"><?php _e("Quantity", "event_espresso");?></th>
63
-									<th class="number-column item_c"><?php _e("Price", "event_espresso");?></th>
64
-									<th class="number-column item_r"><?php _e("Total", "event_espresso");?></th>
60
+									<th class="name-column"><?php _e("Ticket", "event_espresso"); ?></th>
61
+									<th colspan="2" class="desc-column"><?php _e("Description", "event_espresso"); ?></th>
62
+									<th class="number-column item_c"><?php _e("Quantity", "event_espresso"); ?></th>
63
+									<th class="number-column item_c"><?php _e("Price", "event_espresso"); ?></th>
64
+									<th class="number-column item_r"><?php _e("Total", "event_espresso"); ?></th>
65 65
 								</tr>
66 66
 							</thead>
67 67
 							<tbody>
68
-								<?php if( count($subitems) < 2){?>
68
+								<?php if (count($subitems) < 2) {?>
69 69
 								<tr class="item">
70 70
 									<td><?php echo $line_item->name().$taxable_html?></td>
71
-									<td colspan="2"><?php echo $line_item->desc();?><p class="ticket-note"><?php echo sprintf(__('This ticket can be used once at %s of the dates/times below.', 'event_espresso'), $ticket_uses); ?></p></td>
71
+									<td colspan="2"><?php echo $line_item->desc(); ?><p class="ticket-note"><?php echo sprintf(__('This ticket can be used once at %s of the dates/times below.', 'event_espresso'), $ticket_uses); ?></p></td>
72 72
 									<td class="item_c"><?php echo $line_item->quantity()?></td>
73 73
 									<td class="item_c"><?php echo $line_item->unit_price_no_code()?></td>
74 74
 									<td class="item_r"><?php echo $line_item->total_no_code()?></td>
75 75
 								</tr>
76
-								<?php }else{?>
76
+								<?php } else {?>
77 77
 									<tr class="item">
78 78
 										<td class="aln-left"><?php echo $line_item->name().$taxable_html?></td>
79
-										<td colspan="2"><?php echo $line_item->desc();?><p class="ticket-note"><?php echo sprintf(__('This ticket can be used once at %s of the dates/times below.', 'event_espresso'), $ticket_uses); ?></p></td>
79
+										<td colspan="2"><?php echo $line_item->desc(); ?><p class="ticket-note"><?php echo sprintf(__('This ticket can be used once at %s of the dates/times below.', 'event_espresso'), $ticket_uses); ?></p></td>
80 80
 										<td class="item_c"><?php echo $line_item->quantity()?></td>
81 81
 										<td class="item_c"><?php echo $line_item->unit_price_no_code()?></td>
82 82
 										<td class="item_r"><?php echo $line_item->total_no_code()?></td>
83 83
 									</tr>
84
-									<?php foreach($subitems as $sub_line_item){
85
-										$is_percent = $sub_line_item->is_percent();?>
84
+									<?php foreach ($subitems as $sub_line_item) {
85
+										$is_percent = $sub_line_item->is_percent(); ?>
86 86
 										<tr class="subitem-row">
87 87
 											<td class="subitem"><?php echo $sub_line_item->name()?></td>
88 88
 											<td colspan="2"><?php echo $sub_line_item->desc()?></td>
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 									<?php } ?>
94 94
 									<tr class="total_tr odd">
95 95
 										<td colspan="4"></td>
96
-										<td class="total" nowrap="nowrap"><?php _e("Ticket Total:", "event_espresso");?></td>
96
+										<td class="total" nowrap="nowrap"><?php _e("Ticket Total:", "event_espresso"); ?></td>
97 97
 										<td class="item_r"><?php echo $line_item->total_no_code()?></td>
98 98
 									</tr>
99 99
 								<?php }?>
@@ -104,22 +104,22 @@  discard block
 block discarded – undo
104 104
 					<div class="reg-details-for-ticket">
105 105
 						<div class="ticket-time-and-place-details">
106 106
 							<div class="ticket-time-details">
107
-								<h4 class="sub-section-title no-bottom-margin"><img class="icon" src="<?php echo EE_IMAGES_URL.'clock-16x16.png';?>"><?php echo _n("Date/Time:","Dates/Times:",count($ticket->datetimes()), "event_espresso");?></h4>
107
+								<h4 class="sub-section-title no-bottom-margin"><img class="icon" src="<?php echo EE_IMAGES_URL.'clock-16x16.png'; ?>"><?php echo _n("Date/Time:", "Dates/Times:", count($ticket->datetimes()), "event_espresso"); ?></h4>
108 108
 								<ul class="event-dates">
109
-									<?php foreach($ticket->datetimes_ordered() as $datetime){
109
+									<?php foreach ($ticket->datetimes_ordered() as $datetime) {
110 110
 										/* @var $datetime EE_Datetime */ ?>
111 111
 									<li><?php
112
-										echo $datetime->name() ? '<b>'.$datetime->name().' </b>' : '' ;
113
-										echo sprintf(__("%s - %s (%s)", "event_espresso"),$datetime->start_date_and_time(),$datetime->end_date_and_time(),$datetime->get_timezone());
112
+										echo $datetime->name() ? '<b>'.$datetime->name().' </b>' : '';
113
+										echo sprintf(__("%s - %s (%s)", "event_espresso"), $datetime->start_date_and_time(), $datetime->end_date_and_time(), $datetime->get_timezone());
114 114
 										echo $datetime->description() ? '<p class="ticket-note">'.$datetime->description().'</p>' : '' ?></li>
115 115
 									<?php }?>
116 116
 								</ul>
117 117
 							</div>
118
-							<?php if ($event->venues()){?>
118
+							<?php if ($event->venues()) {?>
119 119
 							<div class="ticket-place-details">
120
-								<h4 class="sub-section-title no-bottom-margin"><img class="icon" src="<?php echo EE_IMAGES_URL.'location-pin-16x16.png';?>"><?php echo _n("Venue:","Venues:",count($event->venues()), "event_espresso");?></h4>
120
+								<h4 class="sub-section-title no-bottom-margin"><img class="icon" src="<?php echo EE_IMAGES_URL.'location-pin-16x16.png'; ?>"><?php echo _n("Venue:", "Venues:", count($event->venues()), "event_espresso"); ?></h4>
121 121
 								<ul class="event-venues">
122
-									<?php foreach($event->venues() as $venue){?>
122
+									<?php foreach ($event->venues() as $venue) {?>
123 123
 									<li><?php echo $venue->name()?> <span class="small-text">[ <a href='<?php echo $venue->get_permalink()?>'><?php _e('view', 'event_espresso'); ?></a> ]</span></li>
124 124
 									<?php } ?>
125 125
 								</ul>
@@ -127,34 +127,34 @@  discard block
 block discarded – undo
127 127
 							<?php }?>
128 128
 						</div>
129 129
 						<div class="ticket-registrations-area">
130
-							<h4 class="sub-section-title"><img class="icon" src="<?php echo EE_IMAGES_URL.'users-16x16.png';?>"><?php echo __("Registration Details", "event_espresso");?> <span class="small-text link">[ <a class="print_button noPrint" href="<?php echo $edit_reg_info_url; ?>"><?php _e('edit', 'event_espresso'); ?></a> ]</span></h4>
130
+							<h4 class="sub-section-title"><img class="icon" src="<?php echo EE_IMAGES_URL.'users-16x16.png'; ?>"><?php echo __("Registration Details", "event_espresso"); ?> <span class="small-text link">[ <a class="print_button noPrint" href="<?php echo $edit_reg_info_url; ?>"><?php _e('edit', 'event_espresso'); ?></a> ]</span></h4>
131 131
 							<ul class="ticket-registrations-list">
132
-								<?php foreach($registrations_per_line_item[$line_item_id] as $registration){
132
+								<?php foreach ($registrations_per_line_item[$line_item_id] as $registration) {
133 133
 									/* @var $registration EE_Registration */
134 134
 									$attendee = $registration->attendee();
135
-									$answers = $registration->answers(array('order_by'=>array('Question.Question_Group_Question.QGQ_order'=>'ASC')));?>
135
+									$answers = $registration->answers(array('order_by'=>array('Question.Question_Group_Question.QGQ_order'=>'ASC'))); ?>
136 136
 								<li class="ticket-registration">
137 137
 									<table class="registration-details">
138 138
 										<tr class="odd">
139
-											<th><?php echo 	_e("Registration Code:", "event_espresso");?></th>
140
-											<td><?php echo $registration->reg_code();?> - <span class="<?php echo $registration->status_ID()?>"><?php echo $registration->pretty_status()?></span></td>
139
+											<th><?php echo 	_e("Registration Code:", "event_espresso"); ?></th>
140
+											<td><?php echo $registration->reg_code(); ?> - <span class="<?php echo $registration->status_ID()?>"><?php echo $registration->pretty_status()?></span></td>
141 141
 										</tr>
142 142
 										<?php
143
-										foreach($event->question_groups() as $question_group){
144
-											?><tr><th><?php $question_group->e('QSG_name');?></th><td></td></tr><?php
143
+										foreach ($event->question_groups() as $question_group) {
144
+											?><tr><th><?php $question_group->e('QSG_name'); ?></th><td></td></tr><?php
145 145
 											$has_personal_info = false;
146
-											foreach($question_group->questions() as $question){
147
-												if( in_array($question->system_ID(),$questions_to_skip)){
146
+											foreach ($question_group->questions() as $question) {
147
+												if (in_array($question->system_ID(), $questions_to_skip)) {
148 148
 													$has_personal_info = true;
149 149
 													continue;
150 150
 												}
151 151
 												?><tr>
152 152
 														<th><?php echo $question->display_text()?></th>
153
-														<td><?php echo $registration->answer_value_to_question($question);?></td>
153
+														<td><?php echo $registration->answer_value_to_question($question); ?></td>
154 154
 												</tr><?php
155 155
 											}
156
-											if($has_personal_info){
157
-												?><tr><th><?php	_e('Attendee', 'event_espresso');?></th><td><?php echo sprintf(__('%s (%s)', "event_espresso"),$attendee->full_name(),$attendee->email())?></td></tr><?php
156
+											if ($has_personal_info) {
157
+												?><tr><th><?php	_e('Attendee', 'event_espresso'); ?></th><td><?php echo sprintf(__('%s (%s)', "event_espresso"), $attendee->full_name(), $attendee->email())?></td></tr><?php
158 158
 											}
159 159
 										}
160 160
 										?>
@@ -171,21 +171,21 @@  discard block
 block discarded – undo
171 171
 		<?php }?>
172 172
 		</div>
173 173
 		<div class="taxes">
174
-			<?php if ($tax_total_line_item && $tax_total_line_item->children()){?>
175
-				<h3 class="section-title"><?php _e("Taxes",'event_espresso')?></h3>
174
+			<?php if ($tax_total_line_item && $tax_total_line_item->children()) {?>
175
+				<h3 class="section-title"><?php _e("Taxes", 'event_espresso')?></h3>
176 176
 				<table class="invoice-amount">
177 177
 
178 178
 					<thead>
179 179
 						<tr class="header_row">
180
-							<th class="left ticket_th"><?php _e("Tax Name", "event_espresso");?></th>
181
-							<th class="left"><?php _e('Description', 'event_espresso');?></th>
180
+							<th class="left ticket_th"><?php _e("Tax Name", "event_espresso"); ?></th>
181
+							<th class="left"><?php _e('Description', 'event_espresso'); ?></th>
182 182
 							<th class="event_th item_c"><?php _e('Rate', 'event_espresso'); ?></th>
183 183
 							<th class="subtotal_th"><?php _e('Tax Amount', 'event_espresso'); ?></th>
184 184
 						</tr>
185 185
 					</thead>
186 186
 					<tbody>
187 187
 						<?php
188
-						foreach($tax_total_line_item->children() as $child_tax){?>
188
+						foreach ($tax_total_line_item->children() as $child_tax) {?>
189 189
 						<tr>
190 190
 							<td><?php echo $child_tax->name()?></td>
191 191
 							<td><?php echo $child_tax->desc()?></td>
@@ -195,26 +195,26 @@  discard block
 block discarded – undo
195 195
 						<?php } ?>
196 196
 						<tr class="total_tr odd">
197 197
 							<td class="total_tr" colspan="2"></td>
198
-							<td class="total"><?php	_e("Tax Total:", "event_espresso");?></td>
198
+							<td class="total"><?php	_e("Tax Total:", "event_espresso"); ?></td>
199 199
 							<td class="item_r"><?php echo $tax_total_line_item->total_no_code()?></td>
200 200
 						</tr>
201 201
 					</tbody>
202 202
 
203 203
 				</table>
204 204
 			<?php }?>
205
-			<p><?php _e("* taxable items", "event_espresso");?></p>
205
+			<p><?php _e("* taxable items", "event_espresso"); ?></p>
206 206
 		</div>
207 207
 		<div class="grand-total-dv">
208
-		<h2 class="grand-total"><?php printf(__("Grand Total: %s", "event_espresso"),EEH_Template::format_currency($total_cost));?></h2>
208
+		<h2 class="grand-total"><?php printf(__("Grand Total: %s", "event_espresso"), EEH_Template::format_currency($total_cost)); ?></h2>
209 209
 		</div>
210 210
 		<div class="payment-dv">
211
-			<h3 class="section-title"><?php _e("Payments",'event_espresso')?></h3>
211
+			<h3 class="section-title"><?php _e("Payments", 'event_espresso')?></h3>
212 212
 			<p>[instructions]</p>
213 213
 			<table class="invoice-amount">
214 214
 				<thead>
215 215
 					<tr class="header_row">
216 216
 						<th><span class=""><?php _e('Payment Method', 'event_espresso'); ?></span></th>
217
-						<th class='left datetime_th'><?php _e("Date",'event_espresso')?></th>
217
+						<th class='left datetime_th'><?php _e("Date", 'event_espresso')?></th>
218 218
 						<th><span class=""><?php _e('Transaction Id / Cheque #', 'event_espresso'); ?></span></th>
219 219
 						<th><span class=""><?php _e('P.O. / S.O.#', 'event_espresso'); ?></span></th>
220 220
 						<th><span class=""><?php _e('Status', 'event_espresso'); ?></span></th>
@@ -224,11 +224,11 @@  discard block
 block discarded – undo
224 224
 				<tbody>
225 225
 					<?php
226 226
 					$c = false;
227
-					if(!empty($payments)){
227
+					if ( ! empty($payments)) {
228 228
 
229
-						foreach($payments as $payment){
229
+						foreach ($payments as $payment) {
230 230
 							/* @var $payment EE_Payment */?>
231
-						<tr class='item <?php echo (($c = !$c) ? ' odd' : '')?>'>
231
+						<tr class='item <?php echo (($c = ! $c) ? ' odd' : '')?>'>
232 232
 							<td><?php $payment->e('PAY_gateway')?></td>
233 233
 							<td><?php echo $payment->timestamp()?></td>
234 234
 							<td><?php $payment->e('PAY_txn_id_chq_nmbr')?></td>
@@ -237,17 +237,17 @@  discard block
 block discarded – undo
237 237
 							<td class='item_r'><?php echo $payment->amount_no_code()?></td>
238 238
 						</tr>
239 239
 						<?php }
240
-					}else{?>
240
+					} else {?>
241 241
 						<tr class='item'>
242
-							<td class='aln-cntr' colspan="6"><?php _e("No approved payments have been received.",'event_espresso')?> </td>
242
+							<td class='aln-cntr' colspan="6"><?php _e("No approved payments have been received.", 'event_espresso')?> </td>
243 243
 						</tr>
244 244
 					<?php }
245
-					?><tr class="item" ><td class='aln-cntr' colspan="6"><?php if($amount_owed){?><a class="noPrint" href='<?php echo $retry_payment_url?>'><?php _e("Please make a payment.", "event_espresso");}?></a></td></tr>
245
+					?><tr class="item" ><td class='aln-cntr' colspan="6"><?php if ($amount_owed) {?><a class="noPrint" href='<?php echo $retry_payment_url?>'><?php _e("Please make a payment.", "event_espresso"); }?></a></td></tr>
246 246
 				</tbody>
247 247
 				<tfoot>
248 248
 					<tr class='total_tr'><td colspan="4">&nbsp;</td>
249
-						<td class="item_r"><?php _e('Total Paid','event_espresso')?></td>
250
-						<td class="item_r"><?php echo EEH_Template::format_currency($amount_pd,false,false)?> </td>
249
+						<td class="item_r"><?php _e('Total Paid', 'event_espresso')?></td>
250
+						<td class="item_r"><?php echo EEH_Template::format_currency($amount_pd, false, false)?> </td>
251 251
 					</tr>
252 252
 					<?php //echo $discount; ?>
253 253
 					<tr class="total_tr odd">
@@ -259,20 +259,20 @@  discard block
 block discarded – undo
259 259
 			</table>
260 260
 		</div>
261 261
 		<div class="additional-info-dv">
262
-			<h3 class="section-title"><?php _e("Additional Information:", "event_espresso");?></h3>
262
+			<h3 class="section-title"><?php _e("Additional Information:", "event_espresso"); ?></h3>
263 263
 			<div class="additional-info">
264
-				<?php if($venues_for_events){?>
265
-				<h2><?php echo _n("Venue Details:", "Venues Details:", "event_espresso",count($venues_for_events));?></h2>
264
+				<?php if ($venues_for_events) {?>
265
+				<h2><?php echo _n("Venue Details:", "Venues Details:", "event_espresso", count($venues_for_events)); ?></h2>
266 266
 				<table class="venue-list">
267
-					<?php foreach($venues_for_events as $venue){?>
267
+					<?php foreach ($venues_for_events as $venue) {?>
268 268
 						<tr class="venue-details">
269 269
 							<td class="venue-details-part venue-address-dv">
270 270
 								<h3><a href='<?php echo $venue->get_permalink()?>'><?php
271 271
 									echo $venue->name()
272 272
 								?></a></h3>
273 273
 								<p><?php echo $venue->description()?></p>
274
-								<?php echo  EEH_Address::format($venue);?></td>
275
-							<?php if($venue->enable_for_gmap()){?>
274
+								<?php echo  EEH_Address::format($venue); ?></td>
275
+							<?php if ($venue->enable_for_gmap()) {?>
276 276
 								<td class="venue-details-part venue-image-dv"><?php echo EEH_Venue_View::espresso_google_static_map($venue)?></td>
277 277
 							<?php } ?>
278 278
 						</tr>
Please login to merge, or discard this patch.
core/libraries/messages/messenger/EE_Html_messenger.class.php 1 patch
Spacing   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
3
-	exit( 'NO direct script access allowed' );
2
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
3
+	exit('NO direct script access allowed');
4 4
 }
5 5
 
6 6
 
@@ -43,16 +43,16 @@  discard block
 block discarded – undo
43 43
 	public function __construct() {
44 44
 		//set properties
45 45
 		$this->name = 'html';
46
-		$this->description = __( 'This messenger outputs a message to a browser for display.', 'event_espresso' );
46
+		$this->description = __('This messenger outputs a message to a browser for display.', 'event_espresso');
47 47
 		$this->label = array(
48
-			'singular' => __( 'html', 'event_espresso' ),
49
-			'plural'   => __( 'html', 'event_espresso' ),
48
+			'singular' => __('html', 'event_espresso'),
49
+			'plural'   => __('html', 'event_espresso'),
50 50
 		);
51 51
 		$this->activate_on_install = true;
52 52
 		// add the "powered by EE" credit link to the HTML receipt and invoice
53 53
 		add_filter(
54 54
 			'FHEE__EE_Html_messenger___send_message__main_body',
55
-			array( $this, 'add_powered_by_credit_link_to_receipt_and_invoice' ),
55
+			array($this, 'add_powered_by_credit_link_to_receipt_and_invoice'),
56 56
 			10,
57 57
 			3
58 58
 		);
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	 * @see abstract declaration in EE_messenger for details.
92 92
 	 */
93 93
 	protected function _set_admin_pages() {
94
-		$this->admin_registered_pages = array( 'events_edit' => true );
94
+		$this->admin_registered_pages = array('events_edit' => true);
95 95
 	}
96 96
 
97 97
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	protected function _set_validator_config() {
112 112
 		$this->_validator_config = array(
113 113
 			'subject'                       => array(
114
-				'shortcodes' => array( 'organization', 'primary_registration_details', 'email', 'transaction' ),
114
+				'shortcodes' => array('organization', 'primary_registration_details', 'email', 'transaction'),
115 115
 			),
116 116
 			'content'                       => array(
117 117
 				'shortcodes' => array(
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 					'primary_registration_list',
138 138
 					'event_author',
139 139
 				),
140
-				'required'   => array( '[EVENT_LIST]' ),
140
+				'required'   => array('[EVENT_LIST]'),
141 141
 			),
142 142
 			'ticket_list'                   => array(
143 143
 				'shortcodes' => array(
@@ -148,39 +148,39 @@  discard block
 block discarded – undo
148 148
 					'line_item_list',
149 149
 					'venue',
150 150
 				),
151
-				'required'   => array( '[TICKET_LIST]' ),
151
+				'required'   => array('[TICKET_LIST]'),
152 152
 			),
153 153
 			'ticket_line_item_no_pms'       => array(
154
-				'shortcodes' => array( 'line_item', 'ticket' ),
155
-				'required'   => array( '[TICKET_LINE_ITEM_LIST]' ),
154
+				'shortcodes' => array('line_item', 'ticket'),
155
+				'required'   => array('[TICKET_LINE_ITEM_LIST]'),
156 156
 			),
157 157
 			'ticket_line_item_pms'          => array(
158
-				'shortcodes' => array( 'line_item', 'ticket', 'line_item_list' ),
159
-				'required'   => array( '[TICKET_LINE_ITEM_LIST]' ),
158
+				'shortcodes' => array('line_item', 'ticket', 'line_item_list'),
159
+				'required'   => array('[TICKET_LINE_ITEM_LIST]'),
160 160
 			),
161 161
 			'price_modifier_line_item_list' => array(
162
-				'shortcodes' => array( 'line_item' ),
163
-				'required'   => array( '[PRICE_MODIFIER_LINE_ITEM_LIST]' ),
162
+				'shortcodes' => array('line_item'),
163
+				'required'   => array('[PRICE_MODIFIER_LINE_ITEM_LIST]'),
164 164
 			),
165 165
 			'datetime_list'                 => array(
166
-				'shortcodes' => array( 'datetime' ),
167
-				'required'   => array( '[DATETIME_LIST]' ),
166
+				'shortcodes' => array('datetime'),
167
+				'required'   => array('[DATETIME_LIST]'),
168 168
 			),
169 169
 			'attendee_list'                 => array(
170
-				'shortcodes' => array( 'attendee' ),
171
-				'required'   => array( '[ATTENDEE_LIST]' ),
170
+				'shortcodes' => array('attendee'),
171
+				'required'   => array('[ATTENDEE_LIST]'),
172 172
 			),
173 173
 			'tax_line_item_list'            => array(
174
-				'shortcodes' => array( 'line_item' ),
175
-				'required'   => array( '[TAX_LINE_ITEM_LIST]' ),
174
+				'shortcodes' => array('line_item'),
175
+				'required'   => array('[TAX_LINE_ITEM_LIST]'),
176 176
 			),
177 177
 			'additional_line_item_list'     => array(
178
-				'shortcodes' => array( 'line_item' ),
179
-				'required'   => array( '[ADDITIONAL_LINE_ITEM_LIST]' ),
178
+				'shortcodes' => array('line_item'),
179
+				'required'   => array('[ADDITIONAL_LINE_ITEM_LIST]'),
180 180
 			),
181 181
 			'payment_list'                  => array(
182
-				'shortcodes' => array( 'payment' ),
183
-				'required'   => array( '[PAYMENT_LIST_*]' ),
182
+				'shortcodes' => array('payment'),
183
+				'required'   => array('[PAYMENT_LIST_*]'),
184 184
 			),
185 185
 		);
186 186
 	}
@@ -196,9 +196,9 @@  discard block
 block discarded – undo
196 196
 	 * @param string $sending_messenger_name the name of the sending messenger so we only set the hooks needed.
197 197
 	 * @return void
198 198
 	 */
199
-	public function do_secondary_messenger_hooks( $sending_messenger_name ) {
200
-		if ( $sending_messenger_name = 'pdf' ) {
201
-			add_filter( 'EE_messenger__get_variation__variation', array( $this, 'add_html_css' ), 10, 8 );
199
+	public function do_secondary_messenger_hooks($sending_messenger_name) {
200
+		if ($sending_messenger_name = 'pdf') {
201
+			add_filter('EE_messenger__get_variation__variation', array($this, 'add_html_css'), 10, 8);
202 202
 		}
203 203
 	}
204 204
 
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 	 */
248 248
 	public function enqueue_scripts_styles() {
249 249
 		parent::enqueue_scripts_styles();
250
-		do_action( 'AHEE__EE_Html_messenger__enqueue_scripts_styles' );
250
+		do_action('AHEE__EE_Html_messenger__enqueue_scripts_styles');
251 251
 	}
252 252
 
253 253
 
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 		$this->_template_fields = array(
276 276
 			'subject' => array(
277 277
 				'input'      => 'text',
278
-				'label'      => __( 'Page Title', 'event_espresso' ),
278
+				'label'      => __('Page Title', 'event_espresso'),
279 279
 				'type'       => 'string',
280 280
 				'required'   => true,
281 281
 				'validation' => true,
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 				'content' => array(
289 289
 					'main'                          => array(
290 290
 						'input'      => 'wp_editor',
291
-						'label'      => __( 'Main Content', 'event_espresso' ),
291
+						'label'      => __('Main Content', 'event_espresso'),
292 292
 						'type'       => 'string',
293 293
 						'required'   => true,
294 294
 						'validation' => true,
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
 						'validation'          => true,
304 304
 						'format'              => '%s',
305 305
 						'rows'                => '15',
306
-						'shortcodes_required' => array( '[EVENT_LIST]' ),
306
+						'shortcodes_required' => array('[EVENT_LIST]'),
307 307
 					),
308 308
 					'ticket_list'                   => array(
309 309
 						'input'               => 'textarea',
@@ -314,11 +314,11 @@  discard block
 block discarded – undo
314 314
 						'format'              => '%s',
315 315
 						'css_class'           => 'large-text',
316 316
 						'rows'                => '10',
317
-						'shortcodes_required' => array( '[TICKET_LIST]' ),
317
+						'shortcodes_required' => array('[TICKET_LIST]'),
318 318
 					),
319 319
 					'ticket_line_item_no_pms'       => array(
320 320
 						'input'               => 'textarea',
321
-						'label'               => '[TICKET_LINE_ITEM_LIST] <br>' . __(
321
+						'label'               => '[TICKET_LINE_ITEM_LIST] <br>'.__(
322 322
 								'Ticket Line Item List with no Price Modifiers',
323 323
 								'event_espresso'
324 324
 							),
@@ -328,11 +328,11 @@  discard block
 block discarded – undo
328 328
 						'format'              => '%s',
329 329
 						'css_class'           => 'large-text',
330 330
 						'rows'                => '5',
331
-						'shortcodes_required' => array( '[TICKET_LINE_ITEM_LIST]' ),
331
+						'shortcodes_required' => array('[TICKET_LINE_ITEM_LIST]'),
332 332
 					),
333 333
 					'ticket_line_item_pms'          => array(
334 334
 						'input'               => 'textarea',
335
-						'label'               => '[TICKET_LINE_ITEM_LIST] <br>' . __(
335
+						'label'               => '[TICKET_LINE_ITEM_LIST] <br>'.__(
336 336
 								'Ticket Line Item List with Price Modifiers',
337 337
 								'event_espresso'
338 338
 							),
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
 						'format'              => '%s',
343 343
 						'css_class'           => 'large-text',
344 344
 						'rows'                => '5',
345
-						'shortcodes_required' => array( '[TICKET_LINE_ITEM_LIST]' ),
345
+						'shortcodes_required' => array('[TICKET_LINE_ITEM_LIST]'),
346 346
 					),
347 347
 					'price_modifier_line_item_list' => array(
348 348
 						'input'               => 'textarea',
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
 						'format'              => '%s',
354 354
 						'css_class'           => 'large-text',
355 355
 						'rows'                => '5',
356
-						'shortcodes_required' => array( '[PRICE_MODIFIER_LINE_ITEM_LIST]' ),
356
+						'shortcodes_required' => array('[PRICE_MODIFIER_LINE_ITEM_LIST]'),
357 357
 					),
358 358
 					'datetime_list'                 => array(
359 359
 						'input'               => 'textarea',
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
 						'format'              => '%s',
365 365
 						'css_class'           => 'large-text',
366 366
 						'rows'                => '5',
367
-						'shortcodes_required' => array( '[DATETIME_LIST]' ),
367
+						'shortcodes_required' => array('[DATETIME_LIST]'),
368 368
 					),
369 369
 					'attendee_list'                 => array(
370 370
 						'input'               => 'textarea',
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
 						'format'              => '%s',
376 376
 						'css_class'           => 'large-text',
377 377
 						'rows'                => '5',
378
-						'shortcodes_required' => array( '[ATTENDEE_LIST]' ),
378
+						'shortcodes_required' => array('[ATTENDEE_LIST]'),
379 379
 					),
380 380
 					'tax_line_item_list'            => array(
381 381
 						'input'               => 'textarea',
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
 						'format'              => '%s',
387 387
 						'css_class'           => 'large-text',
388 388
 						'rows'                => '5',
389
-						'shortcodes_required' => array( '[TAX_LINE_ITEM_LIST]' ),
389
+						'shortcodes_required' => array('[TAX_LINE_ITEM_LIST]'),
390 390
 					),
391 391
 					'additional_line_item_list'     => array(
392 392
 						'input'               => 'textarea',
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
 						'format'              => '%s',
398 398
 						'css_class'           => 'large-text',
399 399
 						'rows'                => '5',
400
-						'shortcodes_required' => array( '[ADDITIONAL_LINE_ITEM_LIST]' ),
400
+						'shortcodes_required' => array('[ADDITIONAL_LINE_ITEM_LIST]'),
401 401
 					),
402 402
 					'payment_list'                  => array(
403 403
 						'input'               => 'textarea',
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
 						'format'              => '%s',
409 409
 						'css_class'           => 'large-text',
410 410
 						'rows'                => '5',
411
-						'shortcodes_required' => array( '[PAYMENT_LIST_*]' ),
411
+						'shortcodes_required' => array('[PAYMENT_LIST_*]'),
412 412
 					),
413 413
 				),
414 414
 			),
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
 	 * @since 4.5.0
423 423
 	 */
424 424
 	protected function _set_default_message_types() {
425
-		$this->_default_message_types = array( 'receipt', 'invoice' );
425
+		$this->_default_message_types = array('receipt', 'invoice');
426 426
 	}
427 427
 
428 428
 
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
 	 * @since 4.5.0
433 433
 	 */
434 434
 	protected function _set_valid_message_types() {
435
-		$this->_valid_message_types = array( 'receipt', 'invoice' );
435
+		$this->_valid_message_types = array('receipt', 'invoice');
436 436
 	}
437 437
 
438 438
 
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
 	 */
446 446
 	protected function _send_message() {
447 447
 		$this->_template_args = array(
448
-			'page_title' => html_entity_decode( stripslashes( $this->_subject ), ENT_QUOTES, "UTF-8" ),
448
+			'page_title' => html_entity_decode(stripslashes($this->_subject), ENT_QUOTES, "UTF-8"),
449 449
 			'base_css'   => $this->get_variation(
450 450
 				$this->_tmp_pack,
451 451
 				$this->_incoming_message_type->name,
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
 			),
484 484
 		);
485 485
 		$this->_deregister_wp_hooks();
486
-		add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts_styles' ) );
486
+		add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts_styles'));
487 487
 		echo $this->_get_main_template();
488 488
 		exit();
489 489
 	}
@@ -499,16 +499,16 @@  discard block
 block discarded – undo
499 499
 	 * @return void
500 500
 	 */
501 501
 	protected function _deregister_wp_hooks() {
502
-		remove_all_actions( 'wp_head' );
503
-		remove_all_actions( 'wp_footer' );
504
-		remove_all_actions( 'wp_print_footer_scripts' );
505
-		remove_all_actions( 'wp_enqueue_scripts' );
502
+		remove_all_actions('wp_head');
503
+		remove_all_actions('wp_footer');
504
+		remove_all_actions('wp_print_footer_scripts');
505
+		remove_all_actions('wp_enqueue_scripts');
506 506
 		global $wp_scripts, $wp_styles;
507 507
 		$wp_scripts = $wp_styles = array();
508 508
 		//just add back in wp_enqueue_scripts and wp_print_footer_scripts cause that's all we want to load.
509
-		add_action( 'wp_footer', 'wp_print_footer_scripts' );
510
-		add_action( 'wp_print_footer_scripts', '_wp_footer_scripts' );
511
-		add_action( 'wp_head', 'wp_enqueue_scripts' );
509
+		add_action('wp_footer', 'wp_print_footer_scripts');
510
+		add_action('wp_print_footer_scripts', '_wp_footer_scripts');
511
+		add_action('wp_head', 'wp_enqueue_scripts');
512 512
 	}
513 513
 
514 514
 
@@ -519,11 +519,11 @@  discard block
 block discarded – undo
519 519
 	 * @since  4.5.0
520 520
 	 * @return string
521 521
 	 */
522
-	protected function _get_main_template( $preview = false ) {
523
-		$wrapper_template = $this->_tmp_pack->get_wrapper( $this->name, 'main' );
522
+	protected function _get_main_template($preview = false) {
523
+		$wrapper_template = $this->_tmp_pack->get_wrapper($this->name, 'main');
524 524
 		//include message type as a template arg
525 525
 		$this->_template_args['message_type'] = $this->_incoming_message_type;
526
-		return EEH_Template::display_template( $wrapper_template, $this->_template_args, true );
526
+		return EEH_Template::display_template($wrapper_template, $this->_template_args, true);
527 527
 	}
528 528
 
529 529
 
@@ -553,10 +553,10 @@  discard block
 block discarded – undo
553 553
 		EE_message_type $incoming_message_type
554 554
 	) {
555 555
 		if (
556
-			apply_filters( 'FHEE_EE_Html_messenger__add_powered_by_credit_link_to_receipt_and_invoice', true )
557
-			&& ( $incoming_message_type->name === 'invoice' || $incoming_message_type->name === 'receipt' )
556
+			apply_filters('FHEE_EE_Html_messenger__add_powered_by_credit_link_to_receipt_and_invoice', true)
557
+			&& ($incoming_message_type->name === 'invoice' || $incoming_message_type->name === 'receipt')
558 558
 		) {
559
-			$content .= \EEH_Template::powered_by_event_espresso( 'aln-cntr' ) . EEH_HTML::div( EEH_HTML::p('&nbsp;') );
559
+			$content .= \EEH_Template::powered_by_event_espresso('aln-cntr').EEH_HTML::div(EEH_HTML::p('&nbsp;'));
560 560
 		}
561 561
 		return $content;
562 562
 	}
Please login to merge, or discard this patch.
core/libraries/messages/defaults/default/html_receipt_content.template.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -23,15 +23,15 @@  discard block
 block discarded – undo
23 23
 			</td>
24 24
 			<td>
25 25
 				<div id="invoice-info">
26
-					<h2 id="invoice-hdr"><?php _e( 'Order Confirmation', 'event_espresso' ) ?></h2>
26
+					<h2 id="invoice-hdr"><?php _e('Order Confirmation', 'event_espresso') ?></h2>
27 27
 
28
-					<h3 id="invoice-date"><?php _e( 'Date:', 'event_espresso' ) ?>
28
+					<h3 id="invoice-date"><?php _e('Date:', 'event_espresso') ?>
29 29
 						<span class="plain-text">[PRIMARY_REGISTRANT_REGISTRATION_DATE]</span></h3>
30 30
 
31
-					<h3 id="invoice-txn-id"><?php _e( 'Transaction ID:', 'event_espresso' ) ?>
31
+					<h3 id="invoice-txn-id"><?php _e('Transaction ID:', 'event_espresso') ?>
32 32
 						<span class="plain-text">[TXN_ID]</span></h3>
33 33
 
34
-					<h3 id="invoice-txn-status"><?php _e( 'Status:', 'event_espresso' ) ?>
34
+					<h3 id="invoice-txn-status"><?php _e('Status:', 'event_espresso') ?>
35 35
 						<span class="[TXN_STATUS_ID] plain-text">[TXN_STATUS]</span></h3>
36 36
 				</div>
37 37
 			</td>
@@ -41,15 +41,15 @@  discard block
 block discarded – undo
41 41
 		[EVENT_LIST]
42 42
 	</div>
43 43
 	<div class="taxes">
44
-		<h3 class="section-title"><?php _e( "Additional Charges/Discounts", 'event_espresso' ) ?></h3>
44
+		<h3 class="section-title"><?php _e("Additional Charges/Discounts", 'event_espresso') ?></h3>
45 45
 		<table class="invoice-amount">
46 46
 			<thead>
47 47
 				<tr class="header_row">
48
-					<th class="left ticket_th"><?php _e( "Name", "event_espresso" ); ?></th>
49
-					<th class="left"><?php _e( 'Description', 'event_espresso' ); ?></th>
50
-					<th class="event_th item_c"><?php _e( 'Quantity', 'event_espresso' ); ?></th>
51
-					<th class="event_th item_c"><?php _e( 'Unit Price', 'event_espresso' ); ?></th>
52
-					<th class="subtotal_th"><?php _e( 'Total', 'event_espresso' ); ?></th>
48
+					<th class="left ticket_th"><?php _e("Name", "event_espresso"); ?></th>
49
+					<th class="left"><?php _e('Description', 'event_espresso'); ?></th>
50
+					<th class="event_th item_c"><?php _e('Quantity', 'event_espresso'); ?></th>
51
+					<th class="event_th item_c"><?php _e('Unit Price', 'event_espresso'); ?></th>
52
+					<th class="subtotal_th"><?php _e('Total', 'event_espresso'); ?></th>
53 53
 				</tr>
54 54
 			</thead>
55 55
 			<tbody>
@@ -60,15 +60,15 @@  discard block
 block discarded – undo
60 60
 		</table>
61 61
 	</div>
62 62
 	<div class="taxes">
63
-		<h3 class="section-title"><?php _e( "Taxes", 'event_espresso' ) ?></h3>
64
-		<p><?php printf( __( '%s*%s Taxable items. The total amount collected for taxes is reflected in the total(s) below.', 'event_espresso' ), '<strong>', '</strong>' ); ?></p>
63
+		<h3 class="section-title"><?php _e("Taxes", 'event_espresso') ?></h3>
64
+		<p><?php printf(__('%s*%s Taxable items. The total amount collected for taxes is reflected in the total(s) below.', 'event_espresso'), '<strong>', '</strong>'); ?></p>
65 65
 		<table class="invoice-amount">
66 66
 			<thead>
67 67
 				<tr class="header_row">
68
-					<th class="left ticket_th"><?php _e( "Tax Name", "event_espresso" ); ?></th>
69
-					<th class="left"><?php _e( 'Description', 'event_espresso' ); ?></th>
70
-					<th class="event_th item_c"><?php _e( 'Rate', 'event_espresso' ); ?></th>
71
-					<th class="subtotal_th"><?php _e( 'Tax Amount', 'event_espresso' ); ?></th>
68
+					<th class="left ticket_th"><?php _e("Tax Name", "event_espresso"); ?></th>
69
+					<th class="left"><?php _e('Description', 'event_espresso'); ?></th>
70
+					<th class="event_th item_c"><?php _e('Rate', 'event_espresso'); ?></th>
71
+					<th class="subtotal_th"><?php _e('Tax Amount', 'event_espresso'); ?></th>
72 72
 				</tr>
73 73
 			</thead>
74 74
 			<tbody>
@@ -79,19 +79,19 @@  discard block
 block discarded – undo
79 79
 		</table>
80 80
 	</div>
81 81
 	<div class="grand-total-dv">
82
-		<h2 class="grand-total"><?php printf( __( "Grand Total: %s", "event_espresso" ), '[TOTAL_COST]' ); ?></h2>
82
+		<h2 class="grand-total"><?php printf(__("Grand Total: %s", "event_espresso"), '[TOTAL_COST]'); ?></h2>
83 83
 	</div>
84 84
 	<div class="payment-dv">
85
-		<h3 class="section-title"><?php _e( "Payments", 'event_espresso' ) ?></h3>
85
+		<h3 class="section-title"><?php _e("Payments", 'event_espresso') ?></h3>
86 86
 		<table class="invoice-amount">
87 87
 			<thead>
88 88
 				<tr class="header_row">
89
-					<th><span class=""><?php _e( 'Payment Method', 'event_espresso' ); ?></span></th>
90
-					<th class='left datetime_th'><?php _e( "Date", 'event_espresso' ) ?></th>
91
-					<th><span class=""><?php _e( 'Transaction Id / Cheque #', 'event_espresso' ); ?></span></th>
92
-					<th><span class=""><?php _e( 'P.O. / S.O.#', 'event_espresso' ); ?></span></th>
93
-					<th><span class=""><?php _e( 'Status', 'event_espresso' ); ?></span></th>
94
-					<th><?php _e( 'Amount', 'event_espresso' ); ?></th>
89
+					<th><span class=""><?php _e('Payment Method', 'event_espresso'); ?></span></th>
90
+					<th class='left datetime_th'><?php _e("Date", 'event_espresso') ?></th>
91
+					<th><span class=""><?php _e('Transaction Id / Cheque #', 'event_espresso'); ?></span></th>
92
+					<th><span class=""><?php _e('P.O. / S.O.#', 'event_espresso'); ?></span></th>
93
+					<th><span class=""><?php _e('Status', 'event_espresso'); ?></span></th>
94
+					<th><?php _e('Amount', 'event_espresso'); ?></th>
95 95
 				</tr>
96 96
 			</thead>
97 97
 			<tbody>
@@ -105,21 +105,21 @@  discard block
 block discarded – undo
105 105
 			<tfoot>
106 106
 				<tr class='total_tr'>
107 107
 					<td colspan="4">&nbsp;</td>
108
-					<td class="item_r"><?php _e( 'Total Paid', 'event_espresso' ) ?></td>
108
+					<td class="item_r"><?php _e('Total Paid', 'event_espresso') ?></td>
109 109
 					<td class="item_r">[TOTAL_AMOUNT_PAID]</td>
110 110
 				</tr>
111 111
 				<tr class="total_tr odd">
112 112
 					<td colspan="4">&nbsp;</td>
113
-					<td class="total" id="total_currency"><?php _e( 'Amount Owed:', 'event_espresso' ); ?></td>
113
+					<td class="total" id="total_currency"><?php _e('Amount Owed:', 'event_espresso'); ?></td>
114 114
 					<td class="total">[TOTAL_OWING]</td>
115 115
 				</tr>
116 116
 			</tfoot>
117 117
 		</table>
118 118
 	</div>
119 119
 	<div class="additional-info-dv">
120
-		<h3 class="section-title"><?php _e( "Additional Information:", "event_espresso" ); ?></h3>
120
+		<h3 class="section-title"><?php _e("Additional Information:", "event_espresso"); ?></h3>
121 121
 		<div class="additional-info">
122
-			<h2><?php _e( "Venue Details:", "event_espresso" ); ?></h2>
122
+			<h2><?php _e("Venue Details:", "event_espresso"); ?></h2>
123 123
 			<table class="venue-list">
124 124
 				<tr class="venue-details">
125 125
 					<td class="venue-details-part venue-address-dv">
Please login to merge, or discard this patch.
caffeinated/brewing_regular.php 1 patch
Spacing   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1
-<?php if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
2
-	exit( 'No direct script access allowed' );
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3 3
 }
4 4
 /**
5 5
  * the purpose of this file is to simply contain any action/filter hook callbacks etc for specific aspects of EE
@@ -7,10 +7,10 @@  discard block
 block discarded – undo
7 7
  * define and use the hook in a specific caffeinated/whatever class or file.
8 8
  */
9 9
 // defined some new constants related to caffeinated folder
10
-define( 'EE_CAF_URL', EE_PLUGIN_DIR_URL . 'caffeinated/' );
11
-define( 'EE_CAF_CORE', EE_CAFF_PATH . 'core' . DS );
12
-define( 'EE_CAF_LIBRARIES', EE_CAF_CORE . 'libraries' . DS );
13
-define( 'EE_CAF_PAYMENT_METHODS', EE_CAFF_PATH . 'payment_methods' . DS );
10
+define('EE_CAF_URL', EE_PLUGIN_DIR_URL.'caffeinated/');
11
+define('EE_CAF_CORE', EE_CAFF_PATH.'core'.DS);
12
+define('EE_CAF_LIBRARIES', EE_CAF_CORE.'libraries'.DS);
13
+define('EE_CAF_PAYMENT_METHODS', EE_CAFF_PATH.'payment_methods'.DS);
14 14
 
15 15
 
16 16
 
@@ -27,29 +27,29 @@  discard block
 block discarded – undo
27 27
 	 * EE_Brewing_Regular constructor.
28 28
 	 */
29 29
 	public function __construct() {
30
-		if ( defined( 'EE_CAFF_PATH' ) ) {
30
+		if (defined('EE_CAFF_PATH')) {
31 31
 			// activation
32
-			add_action( 'AHEE__EEH_Activation__initialize_db_content', array( $this, 'initialize_caf_db_content' ) );
32
+			add_action('AHEE__EEH_Activation__initialize_db_content', array($this, 'initialize_caf_db_content'));
33 33
 			// load caff init
34
-			add_action( 'AHEE__EE_System__set_hooks_for_core', array( $this, 'caffeinated_init' ) );
34
+			add_action('AHEE__EE_System__set_hooks_for_core', array($this, 'caffeinated_init'));
35 35
 			// remove the "powered by" credit link from receipts and invoices
36
-			add_filter( 'FHEE_EE_Html_messenger__add_powered_by_credit_link_to_receipt_and_invoice', '__return_false' );
36
+			add_filter('FHEE_EE_Html_messenger__add_powered_by_credit_link_to_receipt_and_invoice', '__return_false');
37 37
 			// add caffeinated modules
38 38
 			add_filter(
39 39
 				'FHEE__EE_Config__register_modules__modules_to_register',
40
-				array( $this, 'caffeinated_modules_to_register' )
40
+				array($this, 'caffeinated_modules_to_register')
41 41
 			);
42 42
 			// load caff scripts
43
-			add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_caffeinated_scripts' ), 10 );
44
-			add_filter( 'FHEE__EE_Registry__load_helper__helper_paths', array( $this, 'caf_helper_paths' ), 10 );
43
+			add_action('wp_enqueue_scripts', array($this, 'enqueue_caffeinated_scripts'), 10);
44
+			add_filter('FHEE__EE_Registry__load_helper__helper_paths', array($this, 'caf_helper_paths'), 10);
45 45
 			add_filter(
46 46
 				'FHEE__EE_Payment_Method_Manager__register_payment_methods__payment_methods_to_register',
47
-				array( $this, 'caf_payment_methods' )
47
+				array($this, 'caf_payment_methods')
48 48
 			);
49 49
 			// caffeinated constructed
50
-			do_action( 'AHEE__EE_Brewing_Regular__construct__complete' );
50
+			do_action('AHEE__EE_Brewing_Regular__construct__complete');
51 51
 			//seeing how this is caf, which isn't put on WordPress.org, we can have affiliate links without a disclaimer
52
-			add_filter( 'FHEE__ee_show_affiliate_links', '__return_false' );
52
+			add_filter('FHEE__ee_show_affiliate_links', '__return_false');
53 53
 		}
54 54
 	}
55 55
 
@@ -61,8 +61,8 @@  discard block
 block discarded – undo
61 61
 	 * @param array $paths original helper paths array
62 62
 	 * @return array             new array of paths
63 63
 	 */
64
-	public function caf_helper_paths( $paths ) {
65
-		$paths[] = EE_CAF_CORE . 'helpers' . DS;
64
+	public function caf_helper_paths($paths) {
65
+		$paths[] = EE_CAF_CORE.'helpers'.DS;
66 66
 		return $paths;
67 67
 	}
68 68
 
@@ -82,17 +82,17 @@  discard block
 block discarded – undo
82 82
 	function initialize_caf_db_content() {
83 83
 		global $wpdb;
84 84
 		//use same method of getting creator id as the version introducing the change
85
-		$default_creator_id = apply_filters( 'FHEE__EE_DMS_Core_4_5_0__get_default_creator_id', get_current_user_id() );
86
-		$price_type_table = $wpdb->prefix . "esp_price_type";
87
-		$price_table = $wpdb->prefix . "esp_price";
88
-		if ( EEH_Activation::table_exists( $price_type_table ) ) {
89
-			$SQL = 'SELECT COUNT(PRT_ID) FROM ' . $price_type_table . ' WHERE PBT_ID=4';//include trashed price types
90
-			$tax_price_type_count = $wpdb->get_var( $SQL );
91
-			if ( $tax_price_type_count <= 1 ) {
85
+		$default_creator_id = apply_filters('FHEE__EE_DMS_Core_4_5_0__get_default_creator_id', get_current_user_id());
86
+		$price_type_table = $wpdb->prefix."esp_price_type";
87
+		$price_table = $wpdb->prefix."esp_price";
88
+		if (EEH_Activation::table_exists($price_type_table)) {
89
+			$SQL = 'SELECT COUNT(PRT_ID) FROM '.$price_type_table.' WHERE PBT_ID=4'; //include trashed price types
90
+			$tax_price_type_count = $wpdb->get_var($SQL);
91
+			if ($tax_price_type_count <= 1) {
92 92
 				$wpdb->insert(
93 93
 					$price_type_table,
94 94
 					array(
95
-						'PRT_name'       => __( "Regional Tax", "event_espresso" ),
95
+						'PRT_name'       => __("Regional Tax", "event_espresso"),
96 96
 						'PBT_ID'         => 4,
97 97
 						'PRT_is_percent' => true,
98 98
 						'PRT_order'      => 60,
@@ -100,11 +100,11 @@  discard block
 block discarded – undo
100 100
 						'PRT_wp_user'    => $default_creator_id,
101 101
 					),
102 102
 					array(
103
-						'%s',//PRT_name
104
-						'%d',//PBT_id
105
-						'%d',//PRT_is_percent
106
-						'%d',//PRT_order
107
-						'%d',//PRT_deleted
103
+						'%s', //PRT_name
104
+						'%d', //PBT_id
105
+						'%d', //PRT_is_percent
106
+						'%d', //PRT_order
107
+						'%d', //PRT_deleted
108 108
 						'%d', //PRT_wp_user
109 109
 					)
110 110
 				);
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 				$result = $wpdb->insert(
113 113
 					$price_type_table,
114 114
 					array(
115
-						'PRT_name'       => __( "Federal Tax", "event_espresso" ),
115
+						'PRT_name'       => __("Federal Tax", "event_espresso"),
116 116
 						'PBT_ID'         => 4,
117 117
 						'PRT_is_percent' => true,
118 118
 						'PRT_order'      => 70,
@@ -120,21 +120,21 @@  discard block
 block discarded – undo
120 120
 						'PRT_wp_user'    => $default_creator_id,
121 121
 					),
122 122
 					array(
123
-						'%s',//PRT_name
124
-						'%d',//PBT_id
125
-						'%d',//PRT_is_percent
126
-						'%d',//PRT_order
127
-						'%d',//PRT_deleted
123
+						'%s', //PRT_name
124
+						'%d', //PBT_id
125
+						'%d', //PRT_is_percent
126
+						'%d', //PRT_order
127
+						'%d', //PRT_deleted
128 128
 						'%d' //PRT_wp_user
129 129
 					)
130 130
 				);
131
-				if ( $result ) {
131
+				if ($result) {
132 132
 					$wpdb->insert(
133 133
 						$price_table,
134 134
 						array(
135 135
 							'PRT_ID'         => $wpdb->insert_id,
136 136
 							'PRC_amount'     => 15.00,
137
-							'PRC_name'       => __( "Sales Tax", "event_espresso" ),
137
+							'PRC_name'       => __("Sales Tax", "event_espresso"),
138 138
 							'PRC_desc'       => '',
139 139
 							'PRC_is_default' => true,
140 140
 							'PRC_overrides'  => null,
@@ -144,15 +144,15 @@  discard block
 block discarded – undo
144 144
 							'PRC_wp_user'    => $default_creator_id,
145 145
 						),
146 146
 						array(
147
-							'%d',//PRT_id
148
-							'%f',//PRC_amount
149
-							'%s',//PRC_name
150
-							'%s',//PRC_desc
151
-							'%d',//PRC_is_default
152
-							'%d',//PRC_overrides
153
-							'%d',//PRC_deleted
154
-							'%d',//PRC_order
155
-							'%d',//PRC_parent
147
+							'%d', //PRT_id
148
+							'%f', //PRC_amount
149
+							'%s', //PRC_name
150
+							'%s', //PRC_desc
151
+							'%d', //PRC_is_default
152
+							'%d', //PRC_overrides
153
+							'%d', //PRC_deleted
154
+							'%d', //PRC_order
155
+							'%d', //PRC_parent
156 156
 							'%d' //PRC_wp_user
157 157
 						)
158 158
 					);
@@ -170,11 +170,11 @@  discard block
 block discarded – undo
170 170
 	 * @param array $modules_to_register
171 171
 	 * @return array
172 172
 	 */
173
-	public function caffeinated_modules_to_register( $modules_to_register = array() ) {
174
-		if ( is_readable( EE_CAFF_PATH . 'modules' ) ) {
175
-			$caffeinated_modules_to_register = glob( EE_CAFF_PATH . 'modules' . DS . '*', GLOB_ONLYDIR );
176
-			if ( is_array( $caffeinated_modules_to_register ) && ! empty( $caffeinated_modules_to_register ) ) {
177
-				$modules_to_register = array_merge( $modules_to_register, $caffeinated_modules_to_register );
173
+	public function caffeinated_modules_to_register($modules_to_register = array()) {
174
+		if (is_readable(EE_CAFF_PATH.'modules')) {
175
+			$caffeinated_modules_to_register = glob(EE_CAFF_PATH.'modules'.DS.'*', GLOB_ONLYDIR);
176
+			if (is_array($caffeinated_modules_to_register) && ! empty($caffeinated_modules_to_register)) {
177
+				$modules_to_register = array_merge($modules_to_register, $caffeinated_modules_to_register);
178 178
 			}
179 179
 		}
180 180
 		return $modules_to_register;
@@ -184,12 +184,12 @@  discard block
 block discarded – undo
184 184
 
185 185
 	public function caffeinated_init() {
186 186
 		// EE_Register_CPTs hooks
187
-		add_filter( 'FHEE__EE_Register_CPTs__get_taxonomies__taxonomies', array( $this, 'filter_taxonomies' ), 10 );
188
-		add_filter( 'FHEE__EE_Register_CPTs__get_CPTs__cpts', array( $this, 'filter_cpts' ), 10 );
189
-		add_filter( 'FHEE__EE_Admin__get_extra_nav_menu_pages_items', array( $this, 'nav_metabox_items' ), 10 );
190
-		EE_Registry::instance()->load_file( EE_CAFF_PATH, 'EE_Caf_Messages', 'class', array(), false );
187
+		add_filter('FHEE__EE_Register_CPTs__get_taxonomies__taxonomies', array($this, 'filter_taxonomies'), 10);
188
+		add_filter('FHEE__EE_Register_CPTs__get_CPTs__cpts', array($this, 'filter_cpts'), 10);
189
+		add_filter('FHEE__EE_Admin__get_extra_nav_menu_pages_items', array($this, 'nav_metabox_items'), 10);
190
+		EE_Registry::instance()->load_file(EE_CAFF_PATH, 'EE_Caf_Messages', 'class', array(), false);
191 191
 		// caffeinated_init__complete hook
192
-		do_action( 'AHEE__EE_Brewing_Regular__caffeinated_init__complete' );
192
+		do_action('AHEE__EE_Brewing_Regular__caffeinated_init__complete');
193 193
 	}
194 194
 
195 195
 
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 	 * @param array $taxonomy_array
207 207
 	 * @return array
208 208
 	 */
209
-	public function filter_taxonomies( array $taxonomy_array ) {
209
+	public function filter_taxonomies(array $taxonomy_array) {
210 210
 		$taxonomy_array['espresso_venue_categories']['args']['show_in_nav_menus'] = true;
211 211
 		return $taxonomy_array;
212 212
 	}
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 	 * @param array $cpt_array
218 218
 	 * @return mixed
219 219
 	 */
220
-	public function filter_cpts( array $cpt_array ) {
220
+	public function filter_cpts(array $cpt_array) {
221 221
 		$cpt_array['espresso_venues']['args']['show_in_nav_menus'] = true;
222 222
 		return $cpt_array;
223 223
 	}
@@ -228,11 +228,11 @@  discard block
 block discarded – undo
228 228
 	 * @param array $menuitems
229 229
 	 * @return array
230 230
 	 */
231
-	public function nav_metabox_items( array $menuitems ) {
231
+	public function nav_metabox_items(array $menuitems) {
232 232
 		$menuitems[] = array(
233
-			'title'       => __( 'Venue List', 'event_espresso' ),
234
-			'url'         => get_post_type_archive_link( 'espresso_venues' ),
235
-			'description' => __( 'Archive page for all venues.', 'event_espresso' ),
233
+			'title'       => __('Venue List', 'event_espresso'),
234
+			'url'         => get_post_type_archive_link('espresso_venues'),
235
+			'description' => __('Archive page for all venues.', 'event_espresso'),
236 236
 		);
237 237
 		return $menuitems;
238 238
 	}
@@ -245,9 +245,9 @@  discard block
 block discarded – undo
245 245
 	 * @param array $payment_method_paths
246 246
 	 * @return array values are folder paths to payment method folders
247 247
 	 */
248
-	public function caf_payment_methods( $payment_method_paths ) {
249
-		$caf_payment_methods_paths = glob( EE_CAF_PAYMENT_METHODS . '*', GLOB_ONLYDIR );
250
-		$payment_method_paths = array_merge( $payment_method_paths, $caf_payment_methods_paths );
248
+	public function caf_payment_methods($payment_method_paths) {
249
+		$caf_payment_methods_paths = glob(EE_CAF_PAYMENT_METHODS.'*', GLOB_ONLYDIR);
250
+		$payment_method_paths = array_merge($payment_method_paths, $caf_payment_methods_paths);
251 251
 		return $payment_method_paths;
252 252
 	}
253 253
 }
Please login to merge, or discard this patch.