@@ -11,18 +11,18 @@ discard block |
||
11 | 11 | |
12 | 12 | $row = 1; |
13 | 13 | $max = 1; |
14 | -$ticket_count = count( $tickets ); |
|
14 | +$ticket_count = count($tickets); |
|
15 | 15 | $ticket_status_display = ''; |
16 | -if ( ! $ticket_count ) { |
|
16 | +if ( ! $ticket_count) { |
|
17 | 17 | return; |
18 | 18 | } |
19 | 19 | |
20 | 20 | $required_ticket_sold_out = FALSE; |
21 | -$template_settings = isset ( EE_Registry::instance()->CFG->template_settings->EED_Ticket_Selector ) |
|
21 | +$template_settings = isset (EE_Registry::instance()->CFG->template_settings->EED_Ticket_Selector) |
|
22 | 22 | ? EE_Registry::instance()->CFG->template_settings->EED_Ticket_Selector |
23 | 23 | : new EE_Ticket_Selector_Config(); |
24 | 24 | |
25 | -$tax_settings = isset ( EE_Registry::instance()->CFG->tax_settings ) |
|
25 | +$tax_settings = isset (EE_Registry::instance()->CFG->tax_settings) |
|
26 | 26 | ? EE_Registry::instance()->CFG->tax_settings |
27 | 27 | : new EE_Tax_Config(); |
28 | 28 | |
@@ -31,22 +31,22 @@ discard block |
||
31 | 31 | |
32 | 32 | ob_start(); |
33 | 33 | |
34 | -foreach ( $tickets as $TKT_ID => $ticket ) { |
|
35 | - if ( $ticket instanceof EE_Ticket ) { |
|
34 | +foreach ($tickets as $TKT_ID => $ticket) { |
|
35 | + if ($ticket instanceof EE_Ticket) { |
|
36 | 36 | $cols = 2; |
37 | 37 | $max = $ticket->max(); |
38 | 38 | $min = 0; |
39 | 39 | $remaining = $ticket->remaining(); |
40 | - if ( $ticket->is_on_sale() && $ticket->is_remaining() ) { |
|
40 | + if ($ticket->is_on_sale() && $ticket->is_remaining()) { |
|
41 | 41 | // offer the number of $tickets_remaining or $max_atndz, whichever is smaller |
42 | - $max = min( $remaining, $max_atndz ); |
|
42 | + $max = min($remaining, $max_atndz); |
|
43 | 43 | // but... we also want to restrict the number of tickets by the ticket max setting, |
44 | 44 | // however, the max still can't be higher than what was just set above |
45 | - $max = $ticket->max() > 0 ? min( $ticket->max(), $max ) : $max; |
|
45 | + $max = $ticket->max() > 0 ? min($ticket->max(), $max) : $max; |
|
46 | 46 | // and we also want to restrict the minimum number of tickets by the ticket min setting |
47 | 47 | $min = $ticket->min() > 0 ? $ticket->min() : 0; |
48 | 48 | // and if the ticket is required, then make sure that min qty is at least 1 |
49 | - $min = $ticket->required() ? max( $min, 1 ) : $min; |
|
49 | + $min = $ticket->required() ? max($min, 1) : $min; |
|
50 | 50 | } else { |
51 | 51 | // set flag if ticket is required (flag is set to start date so that future tickets are not blocked) |
52 | 52 | $required_ticket_sold_out = $ticket->required() && ! $remaining ? $ticket->start_date() : $required_ticket_sold_out; |
@@ -58,42 +58,42 @@ discard block |
||
58 | 58 | $taxable_tickets = $ticket->taxable() ? true : $taxable_tickets; |
59 | 59 | $ticket_bundle = FALSE; |
60 | 60 | // for ticket bundles, set min and max qty the same |
61 | - if ( $ticket->min() !== 0 && $ticket->min() === $ticket->max() ) { |
|
61 | + if ($ticket->min() !== 0 && $ticket->min() === $ticket->max()) { |
|
62 | 62 | $ticket_price *= $ticket->min(); |
63 | 63 | $ticket_bundle = TRUE; |
64 | 64 | } |
65 | - $ticket_price = apply_filters( 'FHEE__ticket_selector_chart_template__ticket_price', $ticket_price, $ticket ); |
|
65 | + $ticket_price = apply_filters('FHEE__ticket_selector_chart_template__ticket_price', $ticket_price, $ticket); |
|
66 | 66 | $is_remaining = $remaining > 0 ? true : false; |
67 | 67 | // if a previous required ticket with the same sale start date is sold out, then mark this ticket as sold out as well. |
68 | 68 | // tickets that go on sale at a later date than the required ticket will NOT be affected |
69 | - $tkt_status = $required_ticket_sold_out !== FALSE && $required_ticket_sold_out === $ticket->start_date() ? EE_Ticket::sold_out : $ticket->ticket_status( false, $is_remaining ); |
|
69 | + $tkt_status = $required_ticket_sold_out !== FALSE && $required_ticket_sold_out === $ticket->start_date() ? EE_Ticket::sold_out : $ticket->ticket_status(false, $is_remaining); |
|
70 | 70 | $tkt_status = $event_status === EE_Datetime::sold_out ? EE_Ticket::sold_out : $tkt_status; |
71 | 71 | // check ticket status |
72 | - switch ( $tkt_status ) { |
|
72 | + switch ($tkt_status) { |
|
73 | 73 | // sold_out |
74 | 74 | case EE_Ticket::sold_out : |
75 | - $ticket_status = '<span class="ticket-sales-sold-out">' . $ticket->ticket_status( TRUE, $is_remaining ) . '</span>'; |
|
75 | + $ticket_status = '<span class="ticket-sales-sold-out">'.$ticket->ticket_status(TRUE, $is_remaining).'</span>'; |
|
76 | 76 | $status_class = 'ticket-sales-sold-out lt-grey-text'; |
77 | 77 | break; |
78 | 78 | // expired |
79 | 79 | case EE_Ticket::expired : |
80 | - $ticket_status = '<span class="ticket-sales-expired">' . $ticket->ticket_status( true, $is_remaining ) . '</span>'; |
|
80 | + $ticket_status = '<span class="ticket-sales-expired">'.$ticket->ticket_status(true, $is_remaining).'</span>'; |
|
81 | 81 | $status_class = 'ticket-sales-expired lt-grey-text'; |
82 | 82 | break; |
83 | 83 | // archived |
84 | 84 | case EE_Ticket::archived : |
85 | - $ticket_status = '<span class="archived-ticket">' . $ticket->ticket_status( true, $is_remaining ) . '</span>'; |
|
85 | + $ticket_status = '<span class="archived-ticket">'.$ticket->ticket_status(true, $is_remaining).'</span>'; |
|
86 | 86 | $status_class = 'archived-ticket hidden'; |
87 | 87 | break; |
88 | 88 | // pending |
89 | 89 | case EE_Ticket::pending : |
90 | - $ticket_status = '<span class="ticket-pending">' . $ticket->ticket_status( true, $is_remaining ) . '</span>'; |
|
90 | + $ticket_status = '<span class="ticket-pending">'.$ticket->ticket_status(true, $is_remaining).'</span>'; |
|
91 | 91 | $status_class = 'ticket-pending'; |
92 | 92 | break; |
93 | 93 | // onsale |
94 | 94 | case EE_Ticket::onsale : |
95 | 95 | default : |
96 | - $ticket_status = '<span class="ticket-on-sale">' . $ticket->ticket_status( true, $is_remaining ) . '</span>'; |
|
96 | + $ticket_status = '<span class="ticket-on-sale">'.$ticket->ticket_status(true, $is_remaining).'</span>'; |
|
97 | 97 | $status_class = 'ticket-on-sale'; |
98 | 98 | break; |
99 | 99 | } |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | "tckt-slctr-tkt-details-{$EVT_ID}-{$TKT_ID}" |
134 | 134 | ); |
135 | 135 | ?> |
136 | - <tr class="tckt-slctr-tbl-tr <?php echo $status_class . ' ' . espresso_get_object_css_class( $ticket ); ?>"> |
|
136 | + <tr class="tckt-slctr-tbl-tr <?php echo $status_class.' '.espresso_get_object_css_class($ticket); ?>"> |
|
137 | 137 | <?php |
138 | 138 | /** |
139 | 139 | * Allow plugins to hook in and abort the generation and display of the contents of this |
@@ -145,24 +145,24 @@ discard block |
||
145 | 145 | * |
146 | 146 | * @var string|bool |
147 | 147 | */ |
148 | - if ( false !== ( $new_row_cells_content = apply_filters( 'FHEE__ticket_selector_chart_template__do_ticket_inside_row', false, $ticket, $max, $min, $required_ticket_sold_out, $ticket_price, $ticket_bundle, $ticket_status, $status_class ) ) ) { |
|
148 | + if (false !== ($new_row_cells_content = apply_filters('FHEE__ticket_selector_chart_template__do_ticket_inside_row', false, $ticket, $max, $min, $required_ticket_sold_out, $ticket_price, $ticket_bundle, $ticket_status, $status_class))) { |
|
149 | 149 | echo $new_row_cells_content; |
150 | 150 | echo '</tr>'; |
151 | 151 | continue; |
152 | 152 | } |
153 | 153 | ?> |
154 | 154 | <td class="tckt-slctr-tbl-td-name"> |
155 | - <b><?php echo $ticket->get_pretty('TKT_name');?></b> |
|
156 | - <?php if ( $template_settings->show_ticket_details ) : ?> |
|
157 | - <a id="display-<?php echo $ticket_details_css_id; ?>" class="display-tckt-slctr-tkt-details display-the-hidden lt-grey-text smaller-text hide-if-no-js" rel="<?php echo $ticket_details_css_id; ?>" title="<?php echo esc_attr( apply_filters( 'FHEE__ticket_selector_chart_template__show_ticket_details_link_title', __( 'click to show additional ticket details', 'event_espresso' )) ); ?>"> |
|
158 | - <?php echo sprintf( __( 'show%1$sdetails%1$s+', 'event_espresso' ), ' ' ); ?> |
|
155 | + <b><?php echo $ticket->get_pretty('TKT_name'); ?></b> |
|
156 | + <?php if ($template_settings->show_ticket_details) : ?> |
|
157 | + <a id="display-<?php echo $ticket_details_css_id; ?>" class="display-tckt-slctr-tkt-details display-the-hidden lt-grey-text smaller-text hide-if-no-js" rel="<?php echo $ticket_details_css_id; ?>" title="<?php echo esc_attr(apply_filters('FHEE__ticket_selector_chart_template__show_ticket_details_link_title', __('click to show additional ticket details', 'event_espresso'))); ?>"> |
|
158 | + <?php echo sprintf(__('show%1$sdetails%1$s+', 'event_espresso'), ' '); ?> |
|
159 | 159 | </a> |
160 | - <a id="hide-<?php echo $ticket_details_css_id; ?>" class="hide-tckt-slctr-tkt-details hide-the-displayed lt-grey-text smaller-text hide-if-no-js" rel="<?php echo $ticket_details_css_id; ?>" title="<?php echo esc_attr( apply_filters( 'FHEE__ticket_selector_chart_template__hide_ticket_details_link_title', __( 'click to hide additional ticket details', 'event_espresso' )) ); ?>" style="display:none;"> |
|
161 | - <?php echo sprintf( __( 'hide%1$sdetails%1$s-', 'event_espresso' ), ' ' ); ?> |
|
160 | + <a id="hide-<?php echo $ticket_details_css_id; ?>" class="hide-tckt-slctr-tkt-details hide-the-displayed lt-grey-text smaller-text hide-if-no-js" rel="<?php echo $ticket_details_css_id; ?>" title="<?php echo esc_attr(apply_filters('FHEE__ticket_selector_chart_template__hide_ticket_details_link_title', __('click to hide additional ticket details', 'event_espresso'))); ?>" style="display:none;"> |
|
161 | + <?php echo sprintf(__('hide%1$sdetails%1$s-', 'event_espresso'), ' '); ?> |
|
162 | 162 | </a> |
163 | 163 | <?php endif; //end show details check ?> |
164 | - <?php if ( $ticket->required() ) { ?> |
|
165 | - <p class="ticket-required-pg"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_required_message', __( 'This ticket is required and must be purchased.', 'event_espresso' )); ?></p> |
|
164 | + <?php if ($ticket->required()) { ?> |
|
165 | + <p class="ticket-required-pg"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_required_message', __('This ticket is required and must be purchased.', 'event_espresso')); ?></p> |
|
166 | 166 | <?php } ?> |
167 | 167 | <?php |
168 | 168 | // echo '<br/><b>$max_atndz : ' . $max_atndz . '</b>'; |
@@ -178,16 +178,16 @@ discard block |
||
178 | 178 | </td> |
179 | 179 | <?php |
180 | 180 | if ( |
181 | - apply_filters( 'FHEE__ticket_selector_chart_template__display_ticket_price_details', TRUE ) |
|
181 | + apply_filters('FHEE__ticket_selector_chart_template__display_ticket_price_details', TRUE) |
|
182 | 182 | ) { ?> |
183 | 183 | <td class="tckt-slctr-tbl-td-price jst-rght"><?php |
184 | - echo EEH_Template::format_currency( $ticket_price ); |
|
184 | + echo EEH_Template::format_currency($ticket_price); |
|
185 | 185 | echo $ticket->taxable() ? '<span class="taxable-tickets-asterisk grey-text">*</span>' : ''; |
186 | 186 | ?> <span class="smaller-text no-bold"><?php |
187 | - if ( $ticket_bundle ) { |
|
188 | - echo apply_filters( 'FHEE__ticket_selector_chart_template__per_ticket_bundle_text', __( ' / bundle', 'event_espresso' )); |
|
187 | + if ($ticket_bundle) { |
|
188 | + echo apply_filters('FHEE__ticket_selector_chart_template__per_ticket_bundle_text', __(' / bundle', 'event_espresso')); |
|
189 | 189 | } else { |
190 | - echo apply_filters( 'FHEE__ticket_selector_chart_template__per_ticket_text', __( '', 'event_espresso' )); |
|
190 | + echo apply_filters('FHEE__ticket_selector_chart_template__per_ticket_text', __('', 'event_espresso')); |
|
191 | 191 | }?></span> </td> |
192 | 192 | <?php $cols++; ?> |
193 | 193 | <?php } ?> |
@@ -195,28 +195,28 @@ discard block |
||
195 | 195 | <?php |
196 | 196 | $hidden_input_qty = $max_atndz > 1 ? TRUE : FALSE; |
197 | 197 | $ticket_status_display = ''; |
198 | - if ( $max_atndz === 0 ) { |
|
198 | + if ($max_atndz === 0) { |
|
199 | 199 | // registration is CLOSED because admin set max attendees to ZERO |
200 | - $ticket_status_display = '<span class="sold-out">' . apply_filters( |
|
200 | + $ticket_status_display = '<span class="sold-out">'.apply_filters( |
|
201 | 201 | 'FHEE__ticket_selector_chart_template__ticket_closed_msg', |
202 | - __( 'Closed', 'event_espresso' ) |
|
203 | - ) . '</span>'; |
|
204 | - } else if ( $tkt_status === EE_Ticket::sold_out || $remaining === 0 ) { |
|
202 | + __('Closed', 'event_espresso') |
|
203 | + ).'</span>'; |
|
204 | + } else if ($tkt_status === EE_Ticket::sold_out || $remaining === 0) { |
|
205 | 205 | // SOLD OUT - no tickets remaining |
206 | - $ticket_status_display = '<span class="sold-out">' . apply_filters( |
|
206 | + $ticket_status_display = '<span class="sold-out">'.apply_filters( |
|
207 | 207 | 'FHEE__ticket_selector_chart_template__ticket_sold_out_msg', |
208 | - __( 'Sold Out', 'event_espresso' ) |
|
209 | - ) . '</span>'; |
|
210 | - } else if ( $tkt_status === EE_Ticket::expired || $tkt_status === EE_Ticket::archived ) { |
|
208 | + __('Sold Out', 'event_espresso') |
|
209 | + ).'</span>'; |
|
210 | + } else if ($tkt_status === EE_Ticket::expired || $tkt_status === EE_Ticket::archived) { |
|
211 | 211 | // expired or archived ticket |
212 | 212 | $ticket_status_display = $ticket_status; |
213 | - } else if ( $tkt_status === EE_Ticket::pending ) { |
|
213 | + } else if ($tkt_status === EE_Ticket::pending) { |
|
214 | 214 | // ticket not on sale yet |
215 | 215 | $ticket_status_display = '<span class="ticket-pending-pg"> |
216 | 216 | <span class="ticket-pending">' |
217 | 217 | . apply_filters( |
218 | 218 | 'FHEE__ticket_selector_chart_template__ticket_goes_on_sale_msg', |
219 | - __( 'Goes On Sale', 'event_espresso' ) |
|
219 | + __('Goes On Sale', 'event_espresso') |
|
220 | 220 | ) |
221 | 221 | . '</span><br/> |
222 | 222 | <span class="small-text">' |
@@ -229,36 +229,36 @@ discard block |
||
229 | 229 | ) |
230 | 230 | . '</span> |
231 | 231 | </span>'; |
232 | - } else if ( $ticket->min() > $remaining ) { |
|
232 | + } else if ($ticket->min() > $remaining) { |
|
233 | 233 | // min qty purchasable is less than tickets available |
234 | 234 | $ticket_status_display = ' |
235 | 235 | <div class="archived-ticket-pg"> |
236 | 236 | <span class="archived-ticket small-text">' |
237 | - . apply_filters( 'FHEE__ticket_selector_chart_template__ticket_not_available_msg', __( 'Not Available', 'event_espresso' )) |
|
237 | + . apply_filters('FHEE__ticket_selector_chart_template__ticket_not_available_msg', __('Not Available', 'event_espresso')) |
|
238 | 238 | . '</span><br/> |
239 | 239 | </div>'; |
240 | - } else if ( $max_atndz === 1 ) { |
|
240 | + } else if ($max_atndz === 1) { |
|
241 | 241 | // only ONE attendee is allowed to register at a time |
242 | 242 | // display submit button since we have tickets available |
243 | - add_filter( 'FHEE__EE_Ticket_Selector__display_ticket_selector_submit', '__return_true' ); |
|
243 | + add_filter('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', '__return_true'); |
|
244 | 244 | ?> |
245 | - <input type="radio" name="tkt-slctr-qty-<?php echo $EVT_ID; ?>" id="ticket-selector-tbl-qty-slct-<?php echo $EVT_ID . '-' . $row; ?>" class="ticket-selector-tbl-qty-slct" value="<?php echo $row . '-'; ?>1" <?php echo $row === 1 ? ' checked="checked"' : ''; ?> title=""/> |
|
245 | + <input type="radio" name="tkt-slctr-qty-<?php echo $EVT_ID; ?>" id="ticket-selector-tbl-qty-slct-<?php echo $EVT_ID.'-'.$row; ?>" class="ticket-selector-tbl-qty-slct" value="<?php echo $row.'-'; ?>1" <?php echo $row === 1 ? ' checked="checked"' : ''; ?> title=""/> |
|
246 | 246 | <?php |
247 | 247 | $hidden_input_qty = FALSE; |
248 | 248 | |
249 | - } else if ( $max > 0 ) { |
|
249 | + } else if ($max > 0) { |
|
250 | 250 | // display submit button since we have tickets available |
251 | - add_filter( 'FHEE__EE_Ticket_Selector__display_ticket_selector_submit', '__return_true' ); |
|
251 | + add_filter('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', '__return_true'); |
|
252 | 252 | ?> |
253 | - <select name="tkt-slctr-qty-<?php echo $EVT_ID; ?>[]" id="ticket-selector-tbl-qty-slct-<?php echo $EVT_ID . '-' . $row; ?>" class="ticket-selector-tbl-qty-slct" title=""> |
|
253 | + <select name="tkt-slctr-qty-<?php echo $EVT_ID; ?>[]" id="ticket-selector-tbl-qty-slct-<?php echo $EVT_ID.'-'.$row; ?>" class="ticket-selector-tbl-qty-slct" title=""> |
|
254 | 254 | <?php |
255 | 255 | // this ensures that non-required tickets with non-zero MIN QTYs don't HAVE to be purchased |
256 | - if ( ! $ticket->required() && $min !== 0 ) { |
|
256 | + if ( ! $ticket->required() && $min !== 0) { |
|
257 | 257 | ?> |
258 | 258 | <option value="0"> 0 </option> |
259 | 259 | <?php } |
260 | 260 | // offer ticket quantities from the min to the max |
261 | - for ( $i = $min; $i <= $max; $i++) { |
|
261 | + for ($i = $min; $i <= $max; $i++) { |
|
262 | 262 | ?> |
263 | 263 | <option value="<?php echo $i; ?>"> <?php echo $i; ?> </option> |
264 | 264 | <?php } ?> |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | } |
270 | 270 | echo $ticket_status_display; |
271 | 271 | // depending on group reg we need to change the format for qty |
272 | - if ( $hidden_input_qty ) { |
|
272 | + if ($hidden_input_qty) { |
|
273 | 273 | ?> |
274 | 274 | <input type="hidden" name="tkt-slctr-qty-<?php echo $EVT_ID; ?>[]" value="0" /> |
275 | 275 | <?php |
@@ -279,33 +279,33 @@ discard block |
||
279 | 279 | |
280 | 280 | </td> |
281 | 281 | </tr> |
282 | - <?php if ( $template_settings->show_ticket_details ) : ?> |
|
283 | - <tr class="tckt-slctr-tkt-details-tr <?php echo espresso_get_object_css_class( $ticket, '', 'details' );?>"> |
|
282 | + <?php if ($template_settings->show_ticket_details) : ?> |
|
283 | + <tr class="tckt-slctr-tkt-details-tr <?php echo espresso_get_object_css_class($ticket, '', 'details'); ?>"> |
|
284 | 284 | <td class="tckt-slctr-tkt-details-td" colspan="<?php echo $cols; ?>" > |
285 | 285 | <div id="<?php echo $ticket_details_css_id; ?>-dv" class="tckt-slctr-tkt-details-dv" style="display: none;"> |
286 | 286 | |
287 | 287 | <section class="tckt-slctr-tkt-details-sctn"> |
288 | - <h3><?php _e( 'Details', 'event_espresso' ); ?></h3> |
|
288 | + <h3><?php _e('Details', 'event_espresso'); ?></h3> |
|
289 | 289 | <p><?php echo $ticket->description(); ?></p> |
290 | 290 | |
291 | - <?php if ( $ticket_price !== 0 && apply_filters( 'FHEE__ticket_selector_chart_template__display_ticket_price_details', TRUE ) ) { ?> |
|
291 | + <?php if ($ticket_price !== 0 && apply_filters('FHEE__ticket_selector_chart_template__display_ticket_price_details', TRUE)) { ?> |
|
292 | 292 | <section class="tckt-slctr-tkt-price-sctn"> |
293 | - <h5><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_price_breakdown_heading', __( 'Price', 'event_espresso' )); ?></h5> |
|
293 | + <h5><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_price_breakdown_heading', __('Price', 'event_espresso')); ?></h5> |
|
294 | 294 | <div class="tckt-slctr-tkt-details-tbl-wrap-dv"> |
295 | 295 | <table class="tckt-slctr-tkt-details-tbl"> |
296 | 296 | <thead> |
297 | 297 | <tr> |
298 | - <th class="ee-third-width"><span class="small-text"><?php _e( 'Name', 'event_espresso' ); ?></span></th> |
|
299 | - <th class="jst-cntr"><span class="small-text"><?php _e( 'Description', 'event_espresso' ); ?></span></th> |
|
300 | - <th class="ee-fourth-width jst-rght"><span class="small-text"><?php _e( 'Amount', 'event_espresso' ); ?></span></th> |
|
298 | + <th class="ee-third-width"><span class="small-text"><?php _e('Name', 'event_espresso'); ?></span></th> |
|
299 | + <th class="jst-cntr"><span class="small-text"><?php _e('Description', 'event_espresso'); ?></span></th> |
|
300 | + <th class="ee-fourth-width jst-rght"><span class="small-text"><?php _e('Amount', 'event_espresso'); ?></span></th> |
|
301 | 301 | </tr> |
302 | 302 | </thead> |
303 | 303 | <tbody> |
304 | - <?php if ( $ticket->base_price() instanceof EE_Price ) { ?> |
|
304 | + <?php if ($ticket->base_price() instanceof EE_Price) { ?> |
|
305 | 305 | <tr> |
306 | - <td data-th="<?php _e( 'Name', 'event_espresso' ); ?>" class="small-text"><b><?php echo $ticket->base_price()->name(); ?></b></td> |
|
307 | - <td data-th="<?php _e( 'Description', 'event_espresso' ); ?>" class="small-text"><?php echo $ticket->base_price()->desc(); ?></td> |
|
308 | - <td data-th="<?php _e( 'Amount', 'event_espresso' ); ?>" class="jst-rght small-text"><?php echo $ticket->base_price()->pretty_price(); ?></td> |
|
306 | + <td data-th="<?php _e('Name', 'event_espresso'); ?>" class="small-text"><b><?php echo $ticket->base_price()->name(); ?></b></td> |
|
307 | + <td data-th="<?php _e('Description', 'event_espresso'); ?>" class="small-text"><?php echo $ticket->base_price()->desc(); ?></td> |
|
308 | + <td data-th="<?php _e('Amount', 'event_espresso'); ?>" class="jst-rght small-text"><?php echo $ticket->base_price()->pretty_price(); ?></td> |
|
309 | 309 | </tr> |
310 | 310 | <?php |
311 | 311 | $running_total = $ticket->base_price()->amount(); |
@@ -313,44 +313,44 @@ discard block |
||
313 | 313 | $running_total = 0; |
314 | 314 | } |
315 | 315 | // now add price modifiers |
316 | - foreach ( $ticket->price_modifiers() as $price_mod ) { ?> |
|
316 | + foreach ($ticket->price_modifiers() as $price_mod) { ?> |
|
317 | 317 | <tr> |
318 | - <td data-th="<?php _e( 'Name', 'event_espresso' ); ?>" class="jst-rght small-text"><?php echo $price_mod->name(); ?></td> |
|
319 | - <?php if ( $price_mod->is_percent() ) { ?> |
|
320 | - <td data-th="<?php _e( 'Description', 'event_espresso' ); ?>" class="small-text"><?php echo $price_mod->desc(); ?> <?php echo $price_mod->amount(); ?>%</td> |
|
318 | + <td data-th="<?php _e('Name', 'event_espresso'); ?>" class="jst-rght small-text"><?php echo $price_mod->name(); ?></td> |
|
319 | + <?php if ($price_mod->is_percent()) { ?> |
|
320 | + <td data-th="<?php _e('Description', 'event_espresso'); ?>" class="small-text"><?php echo $price_mod->desc(); ?> <?php echo $price_mod->amount(); ?>%</td> |
|
321 | 321 | <?php |
322 | - $new_sub_total = $running_total * ( $price_mod->amount() / 100 ); |
|
322 | + $new_sub_total = $running_total * ($price_mod->amount() / 100); |
|
323 | 323 | $new_sub_total = $price_mod->is_discount() ? $new_sub_total * -1 : $new_sub_total; |
324 | 324 | ?> |
325 | 325 | <?php } else { ?> |
326 | 326 | <?php $new_sub_total = $price_mod->is_discount() ? $price_mod->amount() * -1 : $price_mod->amount(); ?> |
327 | - <td data-th="<?php _e( 'Description', 'event_espresso' ); ?>" class="small-text"><?php echo $price_mod->desc(); ?></td> |
|
327 | + <td data-th="<?php _e('Description', 'event_espresso'); ?>" class="small-text"><?php echo $price_mod->desc(); ?></td> |
|
328 | 328 | <?php $new_sub_total = $price_mod->is_discount() ? $price_mod->amount() * -1 : $price_mod->amount(); ?> |
329 | 329 | <?php } ?> |
330 | - <td data-th="<?php _e( 'Amount', 'event_espresso' ); ?>" class="jst-rght small-text"><?php echo EEH_Template::format_currency( $new_sub_total ); ?></td> |
|
330 | + <td data-th="<?php _e('Amount', 'event_espresso'); ?>" class="jst-rght small-text"><?php echo EEH_Template::format_currency($new_sub_total); ?></td> |
|
331 | 331 | <?php $running_total += $new_sub_total; ?> |
332 | 332 | </tr> |
333 | 333 | <?php } ?> |
334 | - <?php if ( $ticket->taxable() ) { ?> |
|
334 | + <?php if ($ticket->taxable()) { ?> |
|
335 | 335 | <?php //$ticket_subtotal =$ticket->get_ticket_subtotal(); ?> |
336 | 336 | <tr> |
337 | - <td colspan="2" class="jst-rght small-text sbttl"><b><?php _e( 'subtotal', 'event_espresso' ); ?></b></td> |
|
338 | - <td data-th="<?php _e( 'subtotal', 'event_espresso' ); ?>" class="jst-rght small-text"><b><?php echo EEH_Template::format_currency( $running_total ); ?></b></td> |
|
337 | + <td colspan="2" class="jst-rght small-text sbttl"><b><?php _e('subtotal', 'event_espresso'); ?></b></td> |
|
338 | + <td data-th="<?php _e('subtotal', 'event_espresso'); ?>" class="jst-rght small-text"><b><?php echo EEH_Template::format_currency($running_total); ?></b></td> |
|
339 | 339 | </tr> |
340 | 340 | |
341 | - <?php foreach ( $ticket->get_ticket_taxes_for_admin() as $tax ) { ?> |
|
341 | + <?php foreach ($ticket->get_ticket_taxes_for_admin() as $tax) { ?> |
|
342 | 342 | <tr> |
343 | - <td data-th="<?php _e( 'Name', 'event_espresso' ); ?>" class="jst-rght small-text"><?php echo $tax->name(); ?></td> |
|
344 | - <td data-th="<?php _e( 'Description', 'event_espresso' ); ?>" class="jst-rght small-text"><?php echo $tax->amount(); ?>%</td> |
|
345 | - <?php $tax_amount = $running_total * ( $tax->amount() / 100 ); ?> |
|
346 | - <td data-th="<?php _e( 'Amount', 'event_espresso' ); ?>" class="jst-rght small-text"><?php echo EEH_Template::format_currency( $tax_amount ); ?></td> |
|
343 | + <td data-th="<?php _e('Name', 'event_espresso'); ?>" class="jst-rght small-text"><?php echo $tax->name(); ?></td> |
|
344 | + <td data-th="<?php _e('Description', 'event_espresso'); ?>" class="jst-rght small-text"><?php echo $tax->amount(); ?>%</td> |
|
345 | + <?php $tax_amount = $running_total * ($tax->amount() / 100); ?> |
|
346 | + <td data-th="<?php _e('Amount', 'event_espresso'); ?>" class="jst-rght small-text"><?php echo EEH_Template::format_currency($tax_amount); ?></td> |
|
347 | 347 | <?php $running_total += $tax_amount; ?> |
348 | 348 | </tr> |
349 | 349 | <?php } ?> |
350 | 350 | <?php } ?> |
351 | 351 | <tr> |
352 | - <td colspan="2" class="jst-rght small-text ttl-lbl-td"><b><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_total_price', __( 'Total', 'event_espresso' )); ?></b></td> |
|
353 | - <td data-th="<?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_total_price', __( 'Total', 'event_espresso' )); ?>" class="jst-rght small-text"><b><?php echo EEH_Template::format_currency( $running_total ); ?></b></td> |
|
352 | + <td colspan="2" class="jst-rght small-text ttl-lbl-td"><b><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_total_price', __('Total', 'event_espresso')); ?></b></td> |
|
353 | + <td data-th="<?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_total_price', __('Total', 'event_espresso')); ?>" class="jst-rght small-text"><b><?php echo EEH_Template::format_currency($running_total); ?></b></td> |
|
354 | 354 | </tr> |
355 | 355 | </tbody> |
356 | 356 | </table> |
@@ -360,110 +360,110 @@ discard block |
||
360 | 360 | <?php } ?> |
361 | 361 | |
362 | 362 | <section class="tckt-slctr-tkt-sale-dates-sctn"> |
363 | - <h5 class="tckt-slctr-tkt-sale-dates-hdr"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_sales_date_heading', __( 'Sale Dates', 'event_espresso' )); ?></h5> |
|
364 | - <span class="tckt-slctr-tkt-sale-dates-desc drk-grey-text small-text no-bold"> - <?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_dates_available_message', __( 'The dates when this option is available for purchase.', 'event_espresso' )); ?></span> |
|
363 | + <h5 class="tckt-slctr-tkt-sale-dates-hdr"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_sales_date_heading', __('Sale Dates', 'event_espresso')); ?></h5> |
|
364 | + <span class="tckt-slctr-tkt-sale-dates-desc drk-grey-text small-text no-bold"> - <?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_dates_available_message', __('The dates when this option is available for purchase.', 'event_espresso')); ?></span> |
|
365 | 365 | <span class="tckt-slctr-tkt-sale-dates-start"> |
366 | - <span class="ticket-details-label-spn drk-grey-text"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_goes_on_sale', __( 'Goes On Sale:', 'event_espresso' )); ?></span><span class="dashicons dashicons-calendar"></span><span class="ee-date-start"><?php echo $ticket->get_i18n_datetime( 'TKT_start_date', $date_format) . ' '; ?></span><span class="dashicons dashicons-clock"></span><span class="ee-time-start"><?php echo $ticket->get_i18n_datetime( 'TKT_start_date', $time_format ) ; ?></span> |
|
366 | + <span class="ticket-details-label-spn drk-grey-text"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_goes_on_sale', __('Goes On Sale:', 'event_espresso')); ?></span><span class="dashicons dashicons-calendar"></span><span class="ee-date-start"><?php echo $ticket->get_i18n_datetime('TKT_start_date', $date_format).' '; ?></span><span class="dashicons dashicons-clock"></span><span class="ee-time-start"><?php echo $ticket->get_i18n_datetime('TKT_start_date', $time_format); ?></span> |
|
367 | 367 | </span> |
368 | 368 | <span clacc="tckt-slctr-tkt-sale-dates-end"> |
369 | - <span class="ticket-details-label-spn drk-grey-text"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_sales_end', __( 'Sales End:', 'event_espresso' )); ?></span><span class="dashicons dashicons-calendar"></span><span class="ee-date-end"><?php echo $ticket->get_i18n_datetime( 'TKT_end_date', $date_format ) . ' '; ?></span><span class="dashicons dashicons-clock"></span><span class="ee-time-end"><?php echo $ticket->get_i18n_datetime( 'TKT_end_date', $time_format ) ; ?></span> |
|
369 | + <span class="ticket-details-label-spn drk-grey-text"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_sales_end', __('Sales End:', 'event_espresso')); ?></span><span class="dashicons dashicons-calendar"></span><span class="ee-date-end"><?php echo $ticket->get_i18n_datetime('TKT_end_date', $date_format).' '; ?></span><span class="dashicons dashicons-clock"></span><span class="ee-time-end"><?php echo $ticket->get_i18n_datetime('TKT_end_date', $time_format); ?></span> |
|
370 | 370 | </span> |
371 | 371 | </section> |
372 | 372 | <br/> |
373 | 373 | |
374 | - <?php do_action( 'AHEE__ticket_selector_chart_template__after_ticket_date', $ticket ); ?> |
|
374 | + <?php do_action('AHEE__ticket_selector_chart_template__after_ticket_date', $ticket); ?> |
|
375 | 375 | |
376 | - <?php if ( $ticket->min() && $ticket->max() ) { ?> |
|
376 | + <?php if ($ticket->min() && $ticket->max()) { ?> |
|
377 | 377 | <section class="tckt-slctr-tkt-quantities-sctn"> |
378 | - <h5><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_heading', __( 'Purchasable Quantities', 'event_espresso' )); ?></h5> |
|
379 | - <span class="drk-grey-text small-text no-bold"> - <?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_message', __( 'The number of tickets that can be purchased per transaction (if available).', 'event_espresso' )); ?></span><br/> |
|
380 | - <span class="ticket-details-label-spn drk-grey-text"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_min_qty', __( 'Minimum Qty:', 'event_espresso' )); ?></span><?php echo $ticket->min() > 0 ? $ticket->min() : 0; ?> |
|
381 | - <?php if ( $ticket->min() > $remaining ) { ?> <span class="important-notice small-text"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_min_qty_message', __( 'The Minimum Quantity purchasable for this ticket exceeds the number of spaces remaining', 'event_espresso' )); ?></span><?php } ?><br/> |
|
378 | + <h5><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_heading', __('Purchasable Quantities', 'event_espresso')); ?></h5> |
|
379 | + <span class="drk-grey-text small-text no-bold"> - <?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_message', __('The number of tickets that can be purchased per transaction (if available).', 'event_espresso')); ?></span><br/> |
|
380 | + <span class="ticket-details-label-spn drk-grey-text"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_min_qty', __('Minimum Qty:', 'event_espresso')); ?></span><?php echo $ticket->min() > 0 ? $ticket->min() : 0; ?> |
|
381 | + <?php if ($ticket->min() > $remaining) { ?> <span class="important-notice small-text"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_min_qty_message', __('The Minimum Quantity purchasable for this ticket exceeds the number of spaces remaining', 'event_espresso')); ?></span><?php } ?><br/> |
|
382 | 382 | <?php //$max = min( $max, $max_atndz );?> |
383 | - <span class="ticket-details-label-spn drk-grey-text"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_max_qty', __( 'Maximum Qty:', 'event_espresso' )); ?></span><?php echo $ticket->max() === EE_INF ? __( 'no limit', 'event_espresso' ) : max( $ticket->max(), 1 ); ?><br/> |
|
383 | + <span class="ticket-details-label-spn drk-grey-text"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_max_qty', __('Maximum Qty:', 'event_espresso')); ?></span><?php echo $ticket->max() === EE_INF ? __('no limit', 'event_espresso') : max($ticket->max(), 1); ?><br/> |
|
384 | 384 | </section> |
385 | 385 | <br/> |
386 | 386 | <?php } ?> |
387 | 387 | |
388 | - <?php if ( $ticket->uses() !== EE_INF && ( ! defined( 'EE_DECAF' ) || EE_DECAF !== TRUE )) { ?> |
|
388 | + <?php if ($ticket->uses() !== EE_INF && ( ! defined('EE_DECAF') || EE_DECAF !== TRUE)) { ?> |
|
389 | 389 | <section class="tckt-slctr-tkt-uses-sctn"> |
390 | - <h5><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_date_ticket_uses_heading', __( 'Event Date Ticket Uses', 'event_espresso' )); ?></h5> |
|
390 | + <h5><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_date_ticket_uses_heading', __('Event Date Ticket Uses', 'event_espresso')); ?></h5> |
|
391 | 391 | <span class="drk-grey-text small-text no-bold"> - <?php |
392 | 392 | echo apply_filters( |
393 | 393 | 'FHEE__ticket_selector_chart_template__ticket_details_event_date_ticket_uses_message', |
394 | 394 | sprintf( |
395 | - __( 'The number of separate event datetimes (see table below) that this ticket can be used to gain admittance to.%1$s%2$sAdmission is always one person per ticket.%3$s', 'event_espresso' ), |
|
395 | + __('The number of separate event datetimes (see table below) that this ticket can be used to gain admittance to.%1$s%2$sAdmission is always one person per ticket.%3$s', 'event_espresso'), |
|
396 | 396 | '<br/>', |
397 | 397 | '<strong>', |
398 | 398 | '</strong>' |
399 | 399 | ) |
400 | 400 | ); |
401 | 401 | ?></span><br/> |
402 | - <span class="ticket-details-label-spn drk-grey-text"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_date_number_datetimes', __( '# Datetimes:', 'event_espresso' )); ?></span><?php echo $ticket->uses();?><br/> |
|
402 | + <span class="ticket-details-label-spn drk-grey-text"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_date_number_datetimes', __('# Datetimes:', 'event_espresso')); ?></span><?php echo $ticket->uses(); ?><br/> |
|
403 | 403 | </section> |
404 | 404 | <?php } ?> |
405 | 405 | |
406 | 406 | <?php |
407 | - $datetimes = $ticket->datetimes_ordered( $event_is_expired, FALSE ); |
|
407 | + $datetimes = $ticket->datetimes_ordered($event_is_expired, FALSE); |
|
408 | 408 | $chart_column_width = $template_settings->show_ticket_sale_columns ? ' ee-fourth-width' : ' ee-half-width'; |
409 | - if ( ! empty( $datetimes )) { ?> |
|
409 | + if ( ! empty($datetimes)) { ?> |
|
410 | 410 | <section class="tckt-slctr-tkt-datetimes-sctn"> |
411 | - <h5><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_access_heading', __( 'Access', 'event_espresso' )); ?></h5> |
|
412 | - <span class="drk-grey-text small-text no-bold"> - <?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_access_message', __( 'This option allows access to the following dates and times.', 'event_espresso' )); ?></span> |
|
411 | + <h5><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_access_heading', __('Access', 'event_espresso')); ?></h5> |
|
412 | + <span class="drk-grey-text small-text no-bold"> - <?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_access_message', __('This option allows access to the following dates and times.', 'event_espresso')); ?></span> |
|
413 | 413 | <div class="tckt-slctr-tkt-details-tbl-wrap-dv"> |
414 | 414 | <table class="tckt-slctr-tkt-details-tbl"> |
415 | 415 | <thead> |
416 | 416 | <tr> |
417 | 417 | <th class="tckt-slctr-tkt-details-date-th"> |
418 | - <span class="dashicons dashicons-calendar"></span><span class="small-text"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_event_date', __( 'Date ', 'event_espresso' )); ?></span> |
|
418 | + <span class="dashicons dashicons-calendar"></span><span class="small-text"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_access_table_event_date', __('Date ', 'event_espresso')); ?></span> |
|
419 | 419 | </th> |
420 | 420 | <th class="tckt-slctr-tkt-details-time-th <?php echo $chart_column_width; ?>"> |
421 | - <span class="dashicons dashicons-clock"></span><span class="small-text"><?php _e( 'Time ', 'event_espresso' ); ?></span> |
|
421 | + <span class="dashicons dashicons-clock"></span><span class="small-text"><?php _e('Time ', 'event_espresso'); ?></span> |
|
422 | 422 | </th> |
423 | - <?php if ( $template_settings->show_ticket_sale_columns ) : ?> |
|
423 | + <?php if ($template_settings->show_ticket_sale_columns) : ?> |
|
424 | 424 | <th class="tckt-slctr-tkt-details-this-ticket-sold-th ee-fourth-width cntr"> |
425 | - <span class="smaller-text"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_this_ticket_sold', sprintf( __( 'Sold', 'event_espresso' ), '<br/>' )); ?></span> |
|
425 | + <span class="smaller-text"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_access_table_this_ticket_sold', sprintf(__('Sold', 'event_espresso'), '<br/>')); ?></span> |
|
426 | 426 | </th> |
427 | 427 | <th class="tckt-slctr-tkt-details-this-ticket-left-th ee-fourth-width cntr"> |
428 | - <span class="smaller-text"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_this_ticket_left', sprintf( __( 'Remaining', 'event_espresso' ), '<br/>' )); ?></span> |
|
428 | + <span class="smaller-text"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_access_table_this_ticket_left', sprintf(__('Remaining', 'event_espresso'), '<br/>')); ?></span> |
|
429 | 429 | </th> |
430 | 430 | <th class="tckt-slctr-tkt-details-total-tickets-sold-th ee-fourth-width cntr"> |
431 | - <span class="smaller-text"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_total_ticket_sold', sprintf( __( 'Total%sSold', 'event_espresso' ), '<br/>' )); ?></span> |
|
431 | + <span class="smaller-text"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_access_table_total_ticket_sold', sprintf(__('Total%sSold', 'event_espresso'), '<br/>')); ?></span> |
|
432 | 432 | </th> |
433 | 433 | <th class="tckt-slctr-tkt-details-total-tickets-left-th ee-fourth-width cntr"> |
434 | - <span class="smaller-text"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_total_ticket_left', sprintf( __( 'Total Spaces%sLeft', 'event_espresso' ), '<br/>' )); ?></span> |
|
434 | + <span class="smaller-text"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_access_table_total_ticket_left', sprintf(__('Total Spaces%sLeft', 'event_espresso'), '<br/>')); ?></span> |
|
435 | 435 | </th> |
436 | 436 | <?php endif; //end $template_settings->show_ticket_sale_columns conditional ?> |
437 | 437 | </tr> |
438 | 438 | </thead> |
439 | 439 | <tbody> |
440 | 440 | <?php |
441 | - foreach ( $datetimes as $datetime ) { |
|
442 | - if ( $datetime instanceof EE_Datetime ) { |
|
441 | + foreach ($datetimes as $datetime) { |
|
442 | + if ($datetime instanceof EE_Datetime) { |
|
443 | 443 | ?> |
444 | 444 | |
445 | 445 | <tr> |
446 | - <td data-th="<?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_event_date', __( 'Event Date ', 'event_espresso' )); ?>" class="small-text tckt-slctr-tkt-details-date"> |
|
446 | + <td data-th="<?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_access_table_event_date', __('Event Date ', 'event_espresso')); ?>" class="small-text tckt-slctr-tkt-details-date"> |
|
447 | 447 | <?php $datetime_name = $datetime->name(); ?> |
448 | - <?php echo ! empty( $datetime_name ) ? '<b>' . $datetime_name . '</b><br/>' : ''; ?> |
|
449 | - <?php echo $datetime->date_range( $date_format, __( ' to ', 'event_espresso' )); ?> |
|
448 | + <?php echo ! empty($datetime_name) ? '<b>'.$datetime_name.'</b><br/>' : ''; ?> |
|
449 | + <?php echo $datetime->date_range($date_format, __(' to ', 'event_espresso')); ?> |
|
450 | 450 | </td> |
451 | - <td data-th="<?php _e( 'Time ', 'event_espresso' ); ?>" class="cntr small-text tckt-slctr-tkt-details-time"> |
|
452 | - <?php echo $datetime->time_range( $time_format, __( ' to ', 'event_espresso' )); ?> |
|
451 | + <td data-th="<?php _e('Time ', 'event_espresso'); ?>" class="cntr small-text tckt-slctr-tkt-details-time"> |
|
452 | + <?php echo $datetime->time_range($time_format, __(' to ', 'event_espresso')); ?> |
|
453 | 453 | </td> |
454 | - <?php if ( $template_settings->show_ticket_sale_columns ) : ?> |
|
455 | - <td data-th="<?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_this_ticket_sold', __( 'Sold', 'event_espresso' )); ?>" class="cntr small-text tckt-slctr-tkt-details-this-ticket-sold"> |
|
454 | + <?php if ($template_settings->show_ticket_sale_columns) : ?> |
|
455 | + <td data-th="<?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_access_table_this_ticket_sold', __('Sold', 'event_espresso')); ?>" class="cntr small-text tckt-slctr-tkt-details-this-ticket-sold"> |
|
456 | 456 | <?php echo $ticket->sold(); ?> |
457 | 457 | </td> |
458 | - <td data-th="<?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_this_ticket_left', __( 'Remaining', 'event_espresso' )); ?>" class="cntr small-text tckt-slctr-tkt-details-this-ticket-left"> |
|
459 | - <?php echo $remaining === EE_INF ? '<span class="smaller-text">' . __( 'unlimited ', 'event_espresso' ) . '</span>' : $remaining; ?> |
|
458 | + <td data-th="<?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_access_table_this_ticket_left', __('Remaining', 'event_espresso')); ?>" class="cntr small-text tckt-slctr-tkt-details-this-ticket-left"> |
|
459 | + <?php echo $remaining === EE_INF ? '<span class="smaller-text">'.__('unlimited ', 'event_espresso').'</span>' : $remaining; ?> |
|
460 | 460 | </td> |
461 | - <td data-th="<?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_total_ticket_sold', __( 'Total Sold', 'event_espresso' )); ?>" class="cntr small-text tckt-slctr-tkt-details-tickets-sold"> |
|
461 | + <td data-th="<?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_access_table_total_ticket_sold', __('Total Sold', 'event_espresso')); ?>" class="cntr small-text tckt-slctr-tkt-details-tickets-sold"> |
|
462 | 462 | <?php echo $datetime->sold(); ?> |
463 | 463 | </td> |
464 | - <?php $tkts_left = $datetime->sold_out() ? '<span class="sold-out smaller-text">' . __( 'Sold Out', 'event_espresso' ) . '</span>' : $datetime->spaces_remaining(); ?> |
|
465 | - <td data-th="<?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_total_ticket_left', __( 'Total Spaces Left', 'event_espresso' )); ?>" class="cntr small-text tckt-slctr-tkt-details-tickets-left"> |
|
466 | - <?php echo $tkts_left === EE_INF ? '<span class="smaller-text">' . __( 'unlimited ', 'event_espresso' ) . '</span>' : $tkts_left; ?> |
|
464 | + <?php $tkts_left = $datetime->sold_out() ? '<span class="sold-out smaller-text">'.__('Sold Out', 'event_espresso').'</span>' : $datetime->spaces_remaining(); ?> |
|
465 | + <td data-th="<?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_access_table_total_ticket_left', __('Total Spaces Left', 'event_espresso')); ?>" class="cntr small-text tckt-slctr-tkt-details-tickets-left"> |
|
466 | + <?php echo $tkts_left === EE_INF ? '<span class="smaller-text">'.__('unlimited ', 'event_espresso').'</span>' : $tkts_left; ?> |
|
467 | 467 | </td> |
468 | 468 | <?php endif; //end $template_settings->show_ticket_sale_columns conditional ?> |
469 | 469 | </tr> |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | </div> |
482 | 482 | </td> |
483 | 483 | </tr> |
484 | - <?php endif; //end template_settings->show_ticket_details check?> |
|
484 | + <?php endif; //end template_settings->show_ticket_details check?> |
|
485 | 485 | <?php |
486 | 486 | $row++; |
487 | 487 | } |
@@ -490,8 +490,8 @@ discard block |
||
490 | 490 | $ticket_row_html = ob_get_clean(); |
491 | 491 | // if there is only ONE ticket with a max qty of ONE, and it is free... then not much need for the ticket selector |
492 | 492 | $hide_ticket_selector = $ticket_count === 1 && $max_atndz === 1 && $ticket->is_free() ? true : false; |
493 | -$hide_ticket_selector = apply_filters( 'FHEE__ticket_selector_chart_template__hide_ticket_selector', $hide_ticket_selector, $EVT_ID ); |
|
494 | -remove_all_filters( 'FHEE__EE_Ticket_Selector__hide_ticket_selector' ); |
|
493 | +$hide_ticket_selector = apply_filters('FHEE__ticket_selector_chart_template__hide_ticket_selector', $hide_ticket_selector, $EVT_ID); |
|
494 | +remove_all_filters('FHEE__EE_Ticket_Selector__hide_ticket_selector'); |
|
495 | 495 | // EEH_Debug_Tools::printr( apply_filters( 'FHEE__EE_Ticket_Selector__display_ticket_selector_submit', false ), 'display submit', __FILE__, __LINE__ ); |
496 | 496 | // EEH_Debug_Tools::printr( (string) $ticket_count, '$ticket_count', __FILE__, __LINE__ ); |
497 | 497 | // EEH_Debug_Tools::printr( (string) $max, '$max', __FILE__, __LINE__ ); |
@@ -505,20 +505,20 @@ discard block |
||
505 | 505 | * @param string '#tkt-slctr-tbl-' . $EVT_ID The html ID to anchor to |
506 | 506 | * @param int $EVT_ID The Event ID |
507 | 507 | */ |
508 | -$anchor_id = apply_filters( 'FHEE__EE_Ticket_Selector__redirect_anchor_id', '#tkt-slctr-tbl-' . $EVT_ID, $EVT_ID ); |
|
509 | -if ( ! $hide_ticket_selector ) { |
|
508 | +$anchor_id = apply_filters('FHEE__EE_Ticket_Selector__redirect_anchor_id', '#tkt-slctr-tbl-'.$EVT_ID, $EVT_ID); |
|
509 | +if ( ! $hide_ticket_selector) { |
|
510 | 510 | ?> |
511 | 511 | <div id="tkt-slctr-tbl-wrap-dv-<?php echo $EVT_ID; ?>" class="tkt-slctr-tbl-wrap-dv"> |
512 | 512 | |
513 | - <?php do_action( 'AHEE__ticket_selector_chart__template__before_ticket_selector', $event ); ?> |
|
513 | + <?php do_action('AHEE__ticket_selector_chart__template__before_ticket_selector', $event); ?> |
|
514 | 514 | |
515 | 515 | <table id="tkt-slctr-tbl-<?php echo $EVT_ID; ?>" class="tkt-slctr-tbl"> |
516 | 516 | <thead> |
517 | 517 | <tr> |
518 | 518 | <th scope="col" class="ee-ticket-selector-ticket-details-th"> |
519 | - <?php echo esc_html( apply_filters( 'FHEE__ticket_selector_chart_template__table_header_available_tickets', '', $EVT_ID ) ); ?> |
|
519 | + <?php echo esc_html(apply_filters('FHEE__ticket_selector_chart_template__table_header_available_tickets', '', $EVT_ID)); ?> |
|
520 | 520 | </th> |
521 | - <?php if ( apply_filters( 'FHEE__ticket_selector_chart_template__display_ticket_price_details', TRUE ) ) { ?> |
|
521 | + <?php if (apply_filters('FHEE__ticket_selector_chart_template__display_ticket_price_details', TRUE)) { ?> |
|
522 | 522 | <th scope="col" class="ee-ticket-selector-ticket-price-th cntr"> |
523 | 523 | <?php |
524 | 524 | /** |
@@ -529,7 +529,7 @@ discard block |
||
529 | 529 | * @param string 'Price' The translatable text to display in the table header for price |
530 | 530 | * @param int $EVT_ID The Event ID |
531 | 531 | */ |
532 | - echo esc_html( apply_filters( 'FHEE__ticket_selector_chart_template__table_header_price', __( 'Price', 'event_espresso' ), $EVT_ID ) ); |
|
532 | + echo esc_html(apply_filters('FHEE__ticket_selector_chart_template__table_header_price', __('Price', 'event_espresso'), $EVT_ID)); |
|
533 | 533 | ?> |
534 | 534 | </th> |
535 | 535 | <?php } ?> |
@@ -543,77 +543,77 @@ discard block |
||
543 | 543 | * @param string 'Qty' The translatable text to display in the table header for the Quantity of tickets |
544 | 544 | * @param int $EVT_ID The Event ID |
545 | 545 | */ |
546 | - echo esc_html( apply_filters( 'FHEE__ticket_selector_chart_template__table_header_qty', __( 'Qty', 'event_espresso' ), $EVT_ID ) ); |
|
546 | + echo esc_html(apply_filters('FHEE__ticket_selector_chart_template__table_header_qty', __('Qty', 'event_espresso'), $EVT_ID)); |
|
547 | 547 | ?> |
548 | 548 | </th> |
549 | 549 | </tr> |
550 | 550 | </thead> |
551 | 551 | <tbody> |
552 | - <?php echo $ticket_row_html;?> |
|
552 | + <?php echo $ticket_row_html; ?> |
|
553 | 553 | </tbody> |
554 | 554 | </table> |
555 | 555 | <?php |
556 | - if ( $taxable_tickets && apply_filters( 'FHEE__ticket_selector_chart_template__display_ticket_price_details', true ) ) { |
|
557 | - if ( $tax_settings->prices_displayed_including_taxes ) { |
|
558 | - $ticket_price_includes_taxes = __( '* price includes taxes', 'event_espresso' ); |
|
556 | + if ($taxable_tickets && apply_filters('FHEE__ticket_selector_chart_template__display_ticket_price_details', true)) { |
|
557 | + if ($tax_settings->prices_displayed_including_taxes) { |
|
558 | + $ticket_price_includes_taxes = __('* price includes taxes', 'event_espresso'); |
|
559 | 559 | } else { |
560 | - $ticket_price_includes_taxes = __( '* price does not include taxes', 'event_espresso' ); |
|
560 | + $ticket_price_includes_taxes = __('* price does not include taxes', 'event_espresso'); |
|
561 | 561 | } |
562 | - echo '<p class="small-text lt-grey-text" style="text-align:right; margin: -1em 0 1em;">' . $ticket_price_includes_taxes . '</p>'; |
|
562 | + echo '<p class="small-text lt-grey-text" style="text-align:right; margin: -1em 0 1em;">'.$ticket_price_includes_taxes.'</p>'; |
|
563 | 563 | } |
564 | 564 | ?> |
565 | 565 | |
566 | 566 | <input type="hidden" name="noheader" value="true" /> |
567 | - <input type="hidden" name="tkt-slctr-return-url-<?php echo $EVT_ID ?>" value="<?php echo EEH_URL::filter_input_server_url() . $anchor_id; ?>" /> |
|
567 | + <input type="hidden" name="tkt-slctr-return-url-<?php echo $EVT_ID ?>" value="<?php echo EEH_URL::filter_input_server_url().$anchor_id; ?>" /> |
|
568 | 568 | <input type="hidden" name="tkt-slctr-rows-<?php echo $EVT_ID; ?>" value="<?php echo $row - 1; ?>" /> |
569 | 569 | <input type="hidden" name="tkt-slctr-max-atndz-<?php echo $EVT_ID; ?>" value="<?php echo $max_atndz; ?>" /> |
570 | 570 | <input type="hidden" name="tkt-slctr-event-id" value="<?php echo $EVT_ID; ?>" /> |
571 | 571 | |
572 | 572 | <?php |
573 | -if ( $max_atndz > 0 ) { |
|
573 | +if ($max_atndz > 0) { |
|
574 | 574 | echo apply_filters( |
575 | 575 | 'FHEE__ticket_selector_chart_template__maximum_tickets_purchased_footnote', |
576 | 576 | '' |
577 | 577 | ); |
578 | 578 | } |
579 | -if ( ! apply_filters( 'FHEE__EE_Ticket_Selector__display_ticket_selector_submit', false ) ) { |
|
580 | - add_filter( 'FHEE__EE_Ticket_Selector__no_ticket_selector_submit', '__return_true' ); |
|
579 | +if ( ! apply_filters('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', false)) { |
|
580 | + add_filter('FHEE__EE_Ticket_Selector__no_ticket_selector_submit', '__return_true'); |
|
581 | 581 | } |
582 | -do_action( 'AHEE__ticket_selector_chart__template__after_ticket_selector', $EVT_ID, $event ); |
|
582 | +do_action('AHEE__ticket_selector_chart__template__after_ticket_selector', $EVT_ID, $event); |
|
583 | 583 | ?> |
584 | 584 | |
585 | 585 | <?php |
586 | -} else if ( isset( $TKT_ID ) ) { |
|
587 | - add_filter( 'FHEE__EE_Ticket_Selector__hide_ticket_selector', '__return_true' ); |
|
586 | +} else if (isset($TKT_ID)) { |
|
587 | + add_filter('FHEE__EE_Ticket_Selector__hide_ticket_selector', '__return_true'); |
|
588 | 588 | ?> |
589 | 589 | |
590 | 590 | <input type="hidden" name="tkt-slctr-qty-<?php echo $EVT_ID; ?>[]" value="1"/> |
591 | 591 | <input type="hidden" name="tkt-slctr-ticket-id-<?php echo $EVT_ID; ?>[]" value="<?php echo $TKT_ID; ?>"/> |
592 | 592 | <input type="hidden" name="noheader" value="true"/> |
593 | -<input type="hidden" name="tkt-slctr-return-url-<?php echo $EVT_ID ?>" value="<?php echo EEH_URL::filter_input_server_url() . $anchor_id; ?>"/> |
|
593 | +<input type="hidden" name="tkt-slctr-return-url-<?php echo $EVT_ID ?>" value="<?php echo EEH_URL::filter_input_server_url().$anchor_id; ?>"/> |
|
594 | 594 | <input type="hidden" name="tkt-slctr-rows-<?php echo $EVT_ID; ?>" value="<?php echo $row - 1; ?>"/> |
595 | 595 | <input type="hidden" name="tkt-slctr-max-atndz-<?php echo $EVT_ID; ?>" value="<?php echo $max_atndz; ?>"/> |
596 | 596 | <input type="hidden" name="tkt-slctr-event-id" value="<?php echo $EVT_ID; ?>"/> |
597 | 597 | <?php |
598 | - if ( $ticket instanceof EE_Ticket ) { |
|
599 | - do_action( 'AHEE__ticket_selector_chart__template__before_ticket_selector', $event ); |
|
598 | + if ($ticket instanceof EE_Ticket) { |
|
599 | + do_action('AHEE__ticket_selector_chart__template__before_ticket_selector', $event); |
|
600 | 600 | $ticket_description = $ticket->description(); |
601 | - $ticket_description .= ! empty( $ticket_description ) |
|
602 | - ? '<br />' . $ticket_status_display |
|
601 | + $ticket_description .= ! empty($ticket_description) |
|
602 | + ? '<br />'.$ticket_status_display |
|
603 | 603 | : $ticket_status_display; |
604 | - if ( ! strpos( $ticket_description, '<div' ) ) { |
|
604 | + if ( ! strpos($ticket_description, '<div')) { |
|
605 | 605 | $ticket_description = "<p>{$ticket_description}</p>"; |
606 | 606 | } |
607 | 607 | ?> |
608 | 608 | <div id="no-tkt-slctr-ticket-dv-<?php echo $EVT_ID; ?>" class="no-tkt-slctr-ticket-dv"> |
609 | 609 | <div class="no-tkt-slctr-ticket-content-dv"> |
610 | 610 | <h5><?php echo $ticket->name(); ?></h5> |
611 | - <?php if ( ! empty( $ticket_description ) ) { ?> |
|
611 | + <?php if ( ! empty($ticket_description)) { ?> |
|
612 | 612 | <?php echo $ticket_description; ?> |
613 | 613 | <?php } ?> |
614 | 614 | </div> |
615 | 615 | <?php |
616 | - do_action( 'AHEE__ticket_selector_chart__template__after_ticket_selector', $EVT_ID, $event ); |
|
616 | + do_action('AHEE__ticket_selector_chart__template__after_ticket_selector', $EVT_ID, $event); |
|
617 | 617 | } |
618 | 618 | } |
619 | 619 | ?> |
@@ -27,12 +27,12 @@ discard block |
||
27 | 27 | * @param int | \EE_Event $event |
28 | 28 | * @return bool |
29 | 29 | */ |
30 | -function is_espresso_event( $event = NULL ) { |
|
31 | - if ( can_use_espresso_conditionals( __FUNCTION__ )) { |
|
30 | +function is_espresso_event($event = NULL) { |
|
31 | + if (can_use_espresso_conditionals(__FUNCTION__)) { |
|
32 | 32 | // extract EE_Event object from passed param regardless of what it is (within reason of course) |
33 | - $event = EEH_Event_View::get_event( $event ); |
|
33 | + $event = EEH_Event_View::get_event($event); |
|
34 | 34 | // do we have a valid event ? |
35 | - return $event instanceof EE_Event ? TRUE : FALSE; |
|
35 | + return $event instanceof EE_Event ? TRUE : FALSE; |
|
36 | 36 | } |
37 | 37 | return FALSE; |
38 | 38 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | * @return bool |
45 | 45 | */ |
46 | 46 | function is_espresso_event_single() { |
47 | - if ( can_use_espresso_conditionals( __FUNCTION__ )) { |
|
47 | + if (can_use_espresso_conditionals(__FUNCTION__)) { |
|
48 | 48 | global $wp_query; |
49 | 49 | // return conditionals set by CPTs |
50 | 50 | return $wp_query instanceof WP_Query ? $wp_query->is_espresso_event_single : FALSE; |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | * @return bool |
60 | 60 | */ |
61 | 61 | function is_espresso_event_archive() { |
62 | - if ( can_use_espresso_conditionals( __FUNCTION__ )) { |
|
62 | + if (can_use_espresso_conditionals(__FUNCTION__)) { |
|
63 | 63 | global $wp_query; |
64 | 64 | return $wp_query instanceof WP_Query ? $wp_query->is_espresso_event_archive : FALSE; |
65 | 65 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | * @return bool |
74 | 74 | */ |
75 | 75 | function is_espresso_event_taxonomy() { |
76 | - if ( can_use_espresso_conditionals( __FUNCTION__ )) { |
|
76 | + if (can_use_espresso_conditionals(__FUNCTION__)) { |
|
77 | 77 | global $wp_query; |
78 | 78 | return $wp_query instanceof WP_Query ? $wp_query->is_espresso_event_taxonomy : FALSE; |
79 | 79 | } |
@@ -87,10 +87,10 @@ discard block |
||
87 | 87 | * @param int | \EE_Venue $venue |
88 | 88 | * @return bool |
89 | 89 | */ |
90 | -function is_espresso_venue( $venue = NULL ) { |
|
91 | - if ( can_use_espresso_conditionals( __FUNCTION__ )) { |
|
90 | +function is_espresso_venue($venue = NULL) { |
|
91 | + if (can_use_espresso_conditionals(__FUNCTION__)) { |
|
92 | 92 | // extract EE_Venue object from passed param regardless of what it is (within reason of course) |
93 | - $venue = EEH_Venue_View::get_venue( $venue, FALSE ); |
|
93 | + $venue = EEH_Venue_View::get_venue($venue, FALSE); |
|
94 | 94 | // do we have a valid event ? |
95 | 95 | return $venue instanceof EE_Venue ? TRUE : FALSE; |
96 | 96 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | * @return bool |
105 | 105 | */ |
106 | 106 | function is_espresso_venue_single() { |
107 | - if ( can_use_espresso_conditionals( __FUNCTION__ )) { |
|
107 | + if (can_use_espresso_conditionals(__FUNCTION__)) { |
|
108 | 108 | global $wp_query; |
109 | 109 | return $wp_query instanceof WP_Query ? $wp_query->is_espresso_venue_single : FALSE; |
110 | 110 | } |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | * @return bool |
119 | 119 | */ |
120 | 120 | function is_espresso_venue_archive() { |
121 | - if ( can_use_espresso_conditionals( __FUNCTION__ )) { |
|
121 | + if (can_use_espresso_conditionals(__FUNCTION__)) { |
|
122 | 122 | global $wp_query; |
123 | 123 | return $wp_query instanceof WP_Query ? $wp_query->is_espresso_venue_archive : FALSE; |
124 | 124 | } |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | * @return bool |
133 | 133 | */ |
134 | 134 | function is_espresso_venue_taxonomy() { |
135 | - if ( can_use_espresso_conditionals( __FUNCTION__ )) { |
|
135 | + if (can_use_espresso_conditionals(__FUNCTION__)) { |
|
136 | 136 | global $wp_query; |
137 | 137 | return $wp_query instanceof WP_Query ? $wp_query->is_espresso_venue_taxonomy : FALSE; |
138 | 138 | } |
@@ -146,12 +146,12 @@ discard block |
||
146 | 146 | * @param $conditional_tag |
147 | 147 | * @return bool |
148 | 148 | */ |
149 | -function can_use_espresso_conditionals( $conditional_tag ) { |
|
150 | - if ( ! did_action( 'AHEE__EE_System__initialize' )) { |
|
149 | +function can_use_espresso_conditionals($conditional_tag) { |
|
150 | + if ( ! did_action('AHEE__EE_System__initialize')) { |
|
151 | 151 | EE_Error::doing_it_wrong( |
152 | 152 | __FUNCTION__, |
153 | 153 | sprintf( |
154 | - __( 'The "%s" conditional tag can not be used until after the "init" hook has run, but works best when used within a theme\'s template files.','event_espresso'), |
|
154 | + __('The "%s" conditional tag can not be used until after the "init" hook has run, but works best when used within a theme\'s template files.', 'event_espresso'), |
|
155 | 155 | $conditional_tag |
156 | 156 | ), |
157 | 157 | '4.4.0' |
@@ -166,13 +166,13 @@ discard block |
||
166 | 166 | |
167 | 167 | /*************************** Event Queries ***************************/ |
168 | 168 | |
169 | -if ( ! function_exists( 'espresso_get_events' )) { |
|
169 | +if ( ! function_exists('espresso_get_events')) { |
|
170 | 170 | /** |
171 | 171 | * espresso_get_events |
172 | 172 | * @param array $params |
173 | 173 | * @return array |
174 | 174 | */ |
175 | - function espresso_get_events( $params = array() ) { |
|
175 | + function espresso_get_events($params = array()) { |
|
176 | 176 | //set default params |
177 | 177 | $default_espresso_events_params = array( |
178 | 178 | 'limit' => 10, |
@@ -183,18 +183,18 @@ discard block |
||
183 | 183 | 'sort' => 'ASC' |
184 | 184 | ); |
185 | 185 | // allow the defaults to be filtered |
186 | - $default_espresso_events_params = apply_filters( 'espresso_get_events__default_espresso_events_params', $default_espresso_events_params ); |
|
186 | + $default_espresso_events_params = apply_filters('espresso_get_events__default_espresso_events_params', $default_espresso_events_params); |
|
187 | 187 | // grab params and merge with defaults, then extract |
188 | - $params = array_merge( $default_espresso_events_params, $params ); |
|
188 | + $params = array_merge($default_espresso_events_params, $params); |
|
189 | 189 | // run the query |
190 | - $events_query = new EE_Event_List_Query( $params ); |
|
190 | + $events_query = new EE_Event_List_Query($params); |
|
191 | 191 | // assign results to a variable so we can return it |
192 | 192 | $events = $events_query->have_posts() ? $events_query->posts : array(); |
193 | 193 | // but first reset the query and postdata |
194 | 194 | wp_reset_query(); |
195 | 195 | wp_reset_postdata(); |
196 | 196 | EED_Events_Archive::remove_all_events_archive_filters(); |
197 | - unset( $events_query ); |
|
197 | + unset($events_query); |
|
198 | 198 | return $events; |
199 | 199 | } |
200 | 200 | } |
@@ -208,32 +208,32 @@ discard block |
||
208 | 208 | * espresso_load_ticket_selector |
209 | 209 | */ |
210 | 210 | function espresso_load_ticket_selector() { |
211 | - EE_Registry::instance()->load_file( EE_MODULES . 'ticket_selector', 'EED_Ticket_Selector', 'module' ); |
|
211 | + EE_Registry::instance()->load_file(EE_MODULES.'ticket_selector', 'EED_Ticket_Selector', 'module'); |
|
212 | 212 | } |
213 | 213 | |
214 | -if ( ! function_exists( 'espresso_ticket_selector' )) { |
|
214 | +if ( ! function_exists('espresso_ticket_selector')) { |
|
215 | 215 | /** |
216 | 216 | * espresso_ticket_selector |
217 | 217 | * @param null $event |
218 | 218 | */ |
219 | - function espresso_ticket_selector( $event = NULL ) { |
|
220 | - if ( ! apply_filters( 'FHEE_disable_espresso_ticket_selector', FALSE ) ) { |
|
219 | + function espresso_ticket_selector($event = NULL) { |
|
220 | + if ( ! apply_filters('FHEE_disable_espresso_ticket_selector', FALSE)) { |
|
221 | 221 | espresso_load_ticket_selector(); |
222 | - echo EED_Ticket_Selector::display_ticket_selector( $event ); |
|
222 | + echo EED_Ticket_Selector::display_ticket_selector($event); |
|
223 | 223 | } |
224 | 224 | } |
225 | 225 | } |
226 | 226 | |
227 | 227 | |
228 | - if ( ! function_exists( 'espresso_view_details_btn' )) { |
|
228 | + if ( ! function_exists('espresso_view_details_btn')) { |
|
229 | 229 | /** |
230 | 230 | * espresso_view_details_btn |
231 | 231 | * @param null $event |
232 | 232 | */ |
233 | - function espresso_view_details_btn( $event = NULL ) { |
|
234 | - if ( ! apply_filters( 'FHEE_disable_espresso_view_details_btn', FALSE ) ) { |
|
233 | + function espresso_view_details_btn($event = NULL) { |
|
234 | + if ( ! apply_filters('FHEE_disable_espresso_view_details_btn', FALSE)) { |
|
235 | 235 | espresso_load_ticket_selector(); |
236 | - echo EED_Ticket_Selector::display_ticket_selector( $event, TRUE ); |
|
236 | + echo EED_Ticket_Selector::display_ticket_selector($event, TRUE); |
|
237 | 237 | } |
238 | 238 | } |
239 | 239 | } |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | |
244 | 244 | /*************************** EEH_Event_View ***************************/ |
245 | 245 | |
246 | -if ( ! function_exists( 'espresso_load_event_list_assets' )) { |
|
246 | +if ( ! function_exists('espresso_load_event_list_assets')) { |
|
247 | 247 | /** |
248 | 248 | * espresso_load_event_list_assets |
249 | 249 | * ensures that event list styles and scripts are loaded |
@@ -252,13 +252,13 @@ discard block |
||
252 | 252 | */ |
253 | 253 | function espresso_load_event_list_assets() { |
254 | 254 | $event_list = EED_Events_Archive::instance(); |
255 | - add_action( 'AHEE__EE_System__initialize_last', array( $event_list, 'load_event_list_assets' ), 10 ); |
|
256 | - add_filter( 'FHEE_enable_default_espresso_css', '__return_true' ); |
|
255 | + add_action('AHEE__EE_System__initialize_last', array($event_list, 'load_event_list_assets'), 10); |
|
256 | + add_filter('FHEE_enable_default_espresso_css', '__return_true'); |
|
257 | 257 | } |
258 | 258 | } |
259 | 259 | |
260 | 260 | |
261 | -if ( ! function_exists( 'espresso_event_reg_button' )) { |
|
261 | +if ( ! function_exists('espresso_event_reg_button')) { |
|
262 | 262 | /** |
263 | 263 | * espresso_event_reg_button |
264 | 264 | * returns the "Register Now" button if event is active, |
@@ -270,9 +270,9 @@ discard block |
||
270 | 270 | * @param bool $EVT_ID |
271 | 271 | * @return string |
272 | 272 | */ |
273 | - function espresso_event_reg_button( $btn_text_if_active = NULL, $btn_text_if_inactive = FALSE, $EVT_ID = FALSE ) { |
|
274 | - $event_status = EEH_Event_View::event_active_status( $EVT_ID ); |
|
275 | - switch ( $event_status ) { |
|
273 | + function espresso_event_reg_button($btn_text_if_active = NULL, $btn_text_if_inactive = FALSE, $EVT_ID = FALSE) { |
|
274 | + $event_status = EEH_Event_View::event_active_status($EVT_ID); |
|
275 | + switch ($event_status) { |
|
276 | 276 | case EE_Datetime::sold_out : |
277 | 277 | $btn_text = __('Sold Out', 'event_espresso'); |
278 | 278 | $class = 'ee-pink'; |
@@ -288,10 +288,10 @@ discard block |
||
288 | 288 | case EE_Datetime::upcoming : |
289 | 289 | case EE_Datetime::active : |
290 | 290 | default : |
291 | - $btn_text =! empty( $btn_text_if_active ) ? $btn_text_if_active : __( 'Register Now', 'event_espresso' ); |
|
291 | + $btn_text = ! empty($btn_text_if_active) ? $btn_text_if_active : __('Register Now', 'event_espresso'); |
|
292 | 292 | $class = 'ee-green'; |
293 | 293 | } |
294 | - if ( $event_status < 1 && ! empty( $btn_text_if_inactive )) { |
|
294 | + if ($event_status < 1 && ! empty($btn_text_if_inactive)) { |
|
295 | 295 | $btn_text = $btn_text_if_inactive; |
296 | 296 | $class = 'ee-grey'; |
297 | 297 | } |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | |
306 | 306 | |
307 | 307 | |
308 | -if ( ! function_exists( 'espresso_display_ticket_selector' )) { |
|
308 | +if ( ! function_exists('espresso_display_ticket_selector')) { |
|
309 | 309 | /** |
310 | 310 | * espresso_display_ticket_selector |
311 | 311 | * whether or not to display the Ticket Selector for an event |
@@ -313,14 +313,14 @@ discard block |
||
313 | 313 | * @param bool $EVT_ID |
314 | 314 | * @return boolean |
315 | 315 | */ |
316 | - function espresso_display_ticket_selector( $EVT_ID = FALSE ) { |
|
317 | - return EEH_Event_View::display_ticket_selector( $EVT_ID ); |
|
316 | + function espresso_display_ticket_selector($EVT_ID = FALSE) { |
|
317 | + return EEH_Event_View::display_ticket_selector($EVT_ID); |
|
318 | 318 | } |
319 | 319 | } |
320 | 320 | |
321 | 321 | |
322 | 322 | |
323 | -if ( ! function_exists( 'espresso_event_status_banner' )) { |
|
323 | +if ( ! function_exists('espresso_event_status_banner')) { |
|
324 | 324 | /** |
325 | 325 | * espresso_event_status |
326 | 326 | * returns a banner showing the event status if it is sold out, expired, or inactive |
@@ -328,13 +328,13 @@ discard block |
||
328 | 328 | * @param bool $EVT_ID |
329 | 329 | * @return string |
330 | 330 | */ |
331 | - function espresso_event_status_banner( $EVT_ID = FALSE ) { |
|
332 | - return EEH_Event_View::event_status( $EVT_ID ); |
|
331 | + function espresso_event_status_banner($EVT_ID = FALSE) { |
|
332 | + return EEH_Event_View::event_status($EVT_ID); |
|
333 | 333 | } |
334 | 334 | } |
335 | 335 | |
336 | 336 | |
337 | -if ( ! function_exists( 'espresso_event_status' )) { |
|
337 | +if ( ! function_exists('espresso_event_status')) { |
|
338 | 338 | /** |
339 | 339 | * espresso_event_status |
340 | 340 | * returns the event status if it is sold out, expired, or inactive |
@@ -343,17 +343,17 @@ discard block |
||
343 | 343 | * @param bool $echo |
344 | 344 | * @return string |
345 | 345 | */ |
346 | - function espresso_event_status( $EVT_ID = 0, $echo = TRUE ) { |
|
347 | - if ( $echo ) { |
|
348 | - echo EEH_Event_View::event_active_status( $EVT_ID ); |
|
346 | + function espresso_event_status($EVT_ID = 0, $echo = TRUE) { |
|
347 | + if ($echo) { |
|
348 | + echo EEH_Event_View::event_active_status($EVT_ID); |
|
349 | 349 | return ''; |
350 | 350 | } |
351 | - return EEH_Event_View::event_active_status( $EVT_ID ); |
|
351 | + return EEH_Event_View::event_active_status($EVT_ID); |
|
352 | 352 | } |
353 | 353 | } |
354 | 354 | |
355 | 355 | |
356 | -if ( ! function_exists( 'espresso_event_categories' )) { |
|
356 | +if ( ! function_exists('espresso_event_categories')) { |
|
357 | 357 | /** |
358 | 358 | * espresso_event_categories |
359 | 359 | * returns the terms associated with an event |
@@ -363,17 +363,17 @@ discard block |
||
363 | 363 | * @param bool $echo |
364 | 364 | * @return string |
365 | 365 | */ |
366 | - function espresso_event_categories( $EVT_ID = 0, $hide_uncategorized = TRUE, $echo = TRUE ) { |
|
367 | - if ( $echo ) { |
|
368 | - echo EEH_Event_View::event_categories( $EVT_ID, $hide_uncategorized ); |
|
366 | + function espresso_event_categories($EVT_ID = 0, $hide_uncategorized = TRUE, $echo = TRUE) { |
|
367 | + if ($echo) { |
|
368 | + echo EEH_Event_View::event_categories($EVT_ID, $hide_uncategorized); |
|
369 | 369 | return ''; |
370 | 370 | } |
371 | - return EEH_Event_View::event_categories( $EVT_ID, $hide_uncategorized ); |
|
371 | + return EEH_Event_View::event_categories($EVT_ID, $hide_uncategorized); |
|
372 | 372 | } |
373 | 373 | } |
374 | 374 | |
375 | 375 | |
376 | -if ( ! function_exists( 'espresso_event_tickets_available' )) { |
|
376 | +if ( ! function_exists('espresso_event_tickets_available')) { |
|
377 | 377 | /** |
378 | 378 | * espresso_event_tickets_available |
379 | 379 | * returns the ticket types available for purchase for an event |
@@ -383,26 +383,26 @@ discard block |
||
383 | 383 | * @param bool $format |
384 | 384 | * @return string |
385 | 385 | */ |
386 | - function espresso_event_tickets_available( $EVT_ID = 0, $echo = TRUE, $format = TRUE ) { |
|
387 | - $tickets = EEH_Event_View::event_tickets_available( $EVT_ID ); |
|
388 | - if ( is_array( $tickets ) && ! empty( $tickets )) { |
|
386 | + function espresso_event_tickets_available($EVT_ID = 0, $echo = TRUE, $format = TRUE) { |
|
387 | + $tickets = EEH_Event_View::event_tickets_available($EVT_ID); |
|
388 | + if (is_array($tickets) && ! empty($tickets)) { |
|
389 | 389 | // if formatting then $html will be a string, else it will be an array of ticket objects |
390 | - $html = $format ? '<ul id="ee-event-tickets-ul-' . $EVT_ID . '" class="ee-event-tickets-ul">' : array(); |
|
391 | - foreach ( $tickets as $ticket ) { |
|
392 | - if ( $ticket instanceof EE_Ticket ) { |
|
393 | - if ( $format ) { |
|
394 | - $html .= '<li id="ee-event-tickets-li-' . $ticket->ID() . '" class="ee-event-tickets-li">'; |
|
395 | - $html .= $ticket->name() . ' ' . EEH_Template::format_currency( $ticket->get_ticket_total_with_taxes() ); |
|
390 | + $html = $format ? '<ul id="ee-event-tickets-ul-'.$EVT_ID.'" class="ee-event-tickets-ul">' : array(); |
|
391 | + foreach ($tickets as $ticket) { |
|
392 | + if ($ticket instanceof EE_Ticket) { |
|
393 | + if ($format) { |
|
394 | + $html .= '<li id="ee-event-tickets-li-'.$ticket->ID().'" class="ee-event-tickets-li">'; |
|
395 | + $html .= $ticket->name().' '.EEH_Template::format_currency($ticket->get_ticket_total_with_taxes()); |
|
396 | 396 | $html .= '</li>'; |
397 | 397 | } else { |
398 | 398 | $html[] = $ticket; |
399 | 399 | } |
400 | 400 | } |
401 | 401 | } |
402 | - if ( $format ) { |
|
402 | + if ($format) { |
|
403 | 403 | $html .= '</ul>'; |
404 | 404 | } |
405 | - if ( $echo && ! $format ) { |
|
405 | + if ($echo && ! $format) { |
|
406 | 406 | echo $html; |
407 | 407 | return ''; |
408 | 408 | } |
@@ -412,7 +412,7 @@ discard block |
||
412 | 412 | } |
413 | 413 | } |
414 | 414 | |
415 | -if ( ! function_exists( 'espresso_event_date_obj' )) { |
|
415 | +if ( ! function_exists('espresso_event_date_obj')) { |
|
416 | 416 | /** |
417 | 417 | * espresso_event_date_obj |
418 | 418 | * returns the primary date object for an event |
@@ -420,13 +420,13 @@ discard block |
||
420 | 420 | * @param bool $EVT_ID |
421 | 421 | * @return object |
422 | 422 | */ |
423 | - function espresso_event_date_obj( $EVT_ID = FALSE ) { |
|
424 | - return EEH_Event_View::get_primary_date_obj( $EVT_ID ); |
|
423 | + function espresso_event_date_obj($EVT_ID = FALSE) { |
|
424 | + return EEH_Event_View::get_primary_date_obj($EVT_ID); |
|
425 | 425 | } |
426 | 426 | } |
427 | 427 | |
428 | 428 | |
429 | -if ( ! function_exists( 'espresso_event_date' )) { |
|
429 | +if ( ! function_exists('espresso_event_date')) { |
|
430 | 430 | /** |
431 | 431 | * espresso_event_date |
432 | 432 | * returns the primary date for an event |
@@ -437,22 +437,22 @@ discard block |
||
437 | 437 | * @param bool $echo |
438 | 438 | * @return string |
439 | 439 | */ |
440 | - function espresso_event_date( $date_format = '', $time_format = '', $EVT_ID = FALSE, $echo = TRUE ) { |
|
441 | - $date_format = ! empty( $date_format ) ? $date_format : get_option( 'date_format' ); |
|
442 | - $time_format = ! empty( $time_format ) ? $time_format : get_option( 'time_format' ); |
|
443 | - $date_format = apply_filters( 'FHEE__espresso_event_date__date_format', $date_format ); |
|
444 | - $time_format = apply_filters( 'FHEE__espresso_event_date__time_format', $time_format ); |
|
445 | - if($echo){ |
|
446 | - echo EEH_Event_View::the_event_date( $date_format, $time_format, $EVT_ID ); |
|
440 | + function espresso_event_date($date_format = '', $time_format = '', $EVT_ID = FALSE, $echo = TRUE) { |
|
441 | + $date_format = ! empty($date_format) ? $date_format : get_option('date_format'); |
|
442 | + $time_format = ! empty($time_format) ? $time_format : get_option('time_format'); |
|
443 | + $date_format = apply_filters('FHEE__espresso_event_date__date_format', $date_format); |
|
444 | + $time_format = apply_filters('FHEE__espresso_event_date__time_format', $time_format); |
|
445 | + if ($echo) { |
|
446 | + echo EEH_Event_View::the_event_date($date_format, $time_format, $EVT_ID); |
|
447 | 447 | return ''; |
448 | 448 | } |
449 | - return EEH_Event_View::the_event_date( $date_format, $time_format, $EVT_ID ); |
|
449 | + return EEH_Event_View::the_event_date($date_format, $time_format, $EVT_ID); |
|
450 | 450 | |
451 | 451 | } |
452 | 452 | } |
453 | 453 | |
454 | 454 | |
455 | -if ( ! function_exists( 'espresso_list_of_event_dates' )) { |
|
455 | +if ( ! function_exists('espresso_list_of_event_dates')) { |
|
456 | 456 | /** |
457 | 457 | * espresso_list_of_event_dates |
458 | 458 | * returns a unordered list of dates for an event |
@@ -467,53 +467,53 @@ discard block |
||
467 | 467 | * @param null $limit |
468 | 468 | * @return string |
469 | 469 | */ |
470 | - function espresso_list_of_event_dates( $EVT_ID = 0, $date_format = '', $time_format = '', $echo = TRUE, $show_expired = NULL, $format = TRUE, $add_breaks = TRUE, $limit = NULL ) { |
|
471 | - $date_format = ! empty( $date_format ) ? $date_format : get_option( 'date_format' ); |
|
472 | - $time_format = ! empty( $time_format ) ? $time_format : get_option( 'time_format' ); |
|
473 | - $date_format = apply_filters( 'FHEE__espresso_list_of_event_dates__date_format', $date_format ); |
|
474 | - $time_format = apply_filters( 'FHEE__espresso_list_of_event_dates__time_format', $time_format ); |
|
475 | - $datetimes = EEH_Event_View::get_all_date_obj( $EVT_ID, $show_expired, FALSE, $limit ); |
|
476 | - if ( ! $format ) { |
|
477 | - return apply_filters( 'FHEE__espresso_list_of_event_dates__datetimes', $datetimes ); |
|
470 | + function espresso_list_of_event_dates($EVT_ID = 0, $date_format = '', $time_format = '', $echo = TRUE, $show_expired = NULL, $format = TRUE, $add_breaks = TRUE, $limit = NULL) { |
|
471 | + $date_format = ! empty($date_format) ? $date_format : get_option('date_format'); |
|
472 | + $time_format = ! empty($time_format) ? $time_format : get_option('time_format'); |
|
473 | + $date_format = apply_filters('FHEE__espresso_list_of_event_dates__date_format', $date_format); |
|
474 | + $time_format = apply_filters('FHEE__espresso_list_of_event_dates__time_format', $time_format); |
|
475 | + $datetimes = EEH_Event_View::get_all_date_obj($EVT_ID, $show_expired, FALSE, $limit); |
|
476 | + if ( ! $format) { |
|
477 | + return apply_filters('FHEE__espresso_list_of_event_dates__datetimes', $datetimes); |
|
478 | 478 | } |
479 | 479 | //d( $datetimes ); |
480 | - if ( is_array( $datetimes ) && ! empty( $datetimes )) { |
|
480 | + if (is_array($datetimes) && ! empty($datetimes)) { |
|
481 | 481 | global $post; |
482 | - $html = $format ? '<ul id="ee-event-datetimes-ul-' . $post->ID . '" class="ee-event-datetimes-ul ee-clearfix">' : ''; |
|
483 | - foreach ( $datetimes as $datetime ) { |
|
484 | - if ( $datetime instanceof EE_Datetime ) { |
|
485 | - $html .= '<li id="ee-event-datetimes-li-' . $datetime->ID(); |
|
486 | - $html .= '" class="ee-event-datetimes-li ee-event-datetimes-li-' . $datetime->get_active_status() . '">'; |
|
482 | + $html = $format ? '<ul id="ee-event-datetimes-ul-'.$post->ID.'" class="ee-event-datetimes-ul ee-clearfix">' : ''; |
|
483 | + foreach ($datetimes as $datetime) { |
|
484 | + if ($datetime instanceof EE_Datetime) { |
|
485 | + $html .= '<li id="ee-event-datetimes-li-'.$datetime->ID(); |
|
486 | + $html .= '" class="ee-event-datetimes-li ee-event-datetimes-li-'.$datetime->get_active_status().'">'; |
|
487 | 487 | |
488 | 488 | $datetime_name = $datetime->name(); |
489 | - if (!empty( $datetime_name )) { |
|
490 | - $html .= '<strong class="ee-event-datetime-name'.($add_breaks ? ' ee-break-after' : '').'">' . $datetime_name . '</strong>'; |
|
489 | + if ( ! empty($datetime_name)) { |
|
490 | + $html .= '<strong class="ee-event-datetime-name'.($add_breaks ? ' ee-break-after' : '').'">'.$datetime_name.'</strong>'; |
|
491 | 491 | } |
492 | 492 | |
493 | 493 | $html .= '<span class="ee-event-datetime-date">'; |
494 | - $html .= '<span class="dashicons dashicons-calendar"></span>' . $datetime->date_range( $date_format ); |
|
494 | + $html .= '<span class="dashicons dashicons-calendar"></span>'.$datetime->date_range($date_format); |
|
495 | 495 | $html .= '</span>'; |
496 | 496 | |
497 | 497 | $html .= '<span class="ee-event-datetime-time">'; |
498 | - $html .= '<span class="dashicons dashicons-clock"></span>' . $datetime->time_range( $time_format ); |
|
498 | + $html .= '<span class="dashicons dashicons-clock"></span>'.$datetime->time_range($time_format); |
|
499 | 499 | $html .= '</span>'; |
500 | 500 | |
501 | 501 | $datetime_description = $datetime->description(); |
502 | - if (!empty( $datetime_description )) { |
|
502 | + if ( ! empty($datetime_description)) { |
|
503 | 503 | $html .= '<span class="ee-event-datetime-description'.($add_breaks ? ' ee-break-before' : '').'">'; |
504 | - $html .= ' - ' . $datetime_description; |
|
504 | + $html .= ' - '.$datetime_description; |
|
505 | 505 | $html .= '</span>'; |
506 | 506 | } |
507 | 507 | |
508 | - $html = apply_filters( 'FHEE__espresso_list_of_event_dates__datetime_html', $html, $datetime ); |
|
508 | + $html = apply_filters('FHEE__espresso_list_of_event_dates__datetime_html', $html, $datetime); |
|
509 | 509 | $html .= '</li>'; |
510 | 510 | } |
511 | 511 | } |
512 | 512 | $html .= $format ? '</ul>' : ''; |
513 | 513 | } else { |
514 | - $html = $format ? '<p><span class="dashicons dashicons-marker pink-text"></span>' . __( 'There are no upcoming dates for this event.', 'event_espresso' ) . '</p><br/>' : ''; |
|
514 | + $html = $format ? '<p><span class="dashicons dashicons-marker pink-text"></span>'.__('There are no upcoming dates for this event.', 'event_espresso').'</p><br/>' : ''; |
|
515 | 515 | } |
516 | - if ( $echo ) { |
|
516 | + if ($echo) { |
|
517 | 517 | echo $html; |
518 | 518 | return ''; |
519 | 519 | } |
@@ -522,7 +522,7 @@ discard block |
||
522 | 522 | } |
523 | 523 | |
524 | 524 | |
525 | -if ( ! function_exists( 'espresso_event_end_date' )) { |
|
525 | +if ( ! function_exists('espresso_event_end_date')) { |
|
526 | 526 | /** |
527 | 527 | * espresso_event_end_date |
528 | 528 | * returns the last date for an event |
@@ -533,20 +533,20 @@ discard block |
||
533 | 533 | * @param bool $echo |
534 | 534 | * @return string |
535 | 535 | */ |
536 | - function espresso_event_end_date( $date_format = '', $time_format = '', $EVT_ID = FALSE, $echo = TRUE ) { |
|
537 | - $date_format = ! empty( $date_format ) ? $date_format : get_option( 'date_format' ); |
|
538 | - $time_format = ! empty( $time_format ) ? $time_format : get_option( 'time_format' ); |
|
539 | - $date_format = apply_filters( 'FHEE__espresso_event_end_date__date_format', $date_format ); |
|
540 | - $time_format = apply_filters( 'FHEE__espresso_event_end_date__time_format', $time_format ); |
|
541 | - if($echo){ |
|
542 | - echo EEH_Event_View::the_event_end_date( $date_format, $time_format, $EVT_ID ); |
|
536 | + function espresso_event_end_date($date_format = '', $time_format = '', $EVT_ID = FALSE, $echo = TRUE) { |
|
537 | + $date_format = ! empty($date_format) ? $date_format : get_option('date_format'); |
|
538 | + $time_format = ! empty($time_format) ? $time_format : get_option('time_format'); |
|
539 | + $date_format = apply_filters('FHEE__espresso_event_end_date__date_format', $date_format); |
|
540 | + $time_format = apply_filters('FHEE__espresso_event_end_date__time_format', $time_format); |
|
541 | + if ($echo) { |
|
542 | + echo EEH_Event_View::the_event_end_date($date_format, $time_format, $EVT_ID); |
|
543 | 543 | return ''; |
544 | 544 | } |
545 | - return EEH_Event_View::the_event_end_date( $date_format, $time_format, $EVT_ID ); |
|
545 | + return EEH_Event_View::the_event_end_date($date_format, $time_format, $EVT_ID); |
|
546 | 546 | } |
547 | 547 | } |
548 | 548 | |
549 | -if ( ! function_exists( 'espresso_event_date_range' )) { |
|
549 | +if ( ! function_exists('espresso_event_date_range')) { |
|
550 | 550 | /** |
551 | 551 | * espresso_event_date_range |
552 | 552 | * returns the first and last chronologically ordered dates for an event (if different) |
@@ -559,31 +559,31 @@ discard block |
||
559 | 559 | * @param bool $echo |
560 | 560 | * @return string |
561 | 561 | */ |
562 | - function espresso_event_date_range( $date_format = '', $time_format = '', $single_date_format = '', $single_time_format = '', $EVT_ID = FALSE, $echo = TRUE ) { |
|
562 | + function espresso_event_date_range($date_format = '', $time_format = '', $single_date_format = '', $single_time_format = '', $EVT_ID = FALSE, $echo = TRUE) { |
|
563 | 563 | // set and filter date and time formats when a range is returned |
564 | - $date_format = ! empty( $date_format ) ? $date_format : get_option( 'date_format' ); |
|
565 | - $date_format = apply_filters( 'FHEE__espresso_event_date_range__date_format', $date_format ); |
|
564 | + $date_format = ! empty($date_format) ? $date_format : get_option('date_format'); |
|
565 | + $date_format = apply_filters('FHEE__espresso_event_date_range__date_format', $date_format); |
|
566 | 566 | // get the start and end date with NO time portion |
567 | - $the_event_date = EEH_Event_View::the_earliest_event_date( $date_format, '', $EVT_ID ); |
|
568 | - $the_event_end_date = EEH_Event_View::the_latest_event_date( $date_format, '', $EVT_ID ); |
|
567 | + $the_event_date = EEH_Event_View::the_earliest_event_date($date_format, '', $EVT_ID); |
|
568 | + $the_event_end_date = EEH_Event_View::the_latest_event_date($date_format, '', $EVT_ID); |
|
569 | 569 | // now we can determine if date range spans more than one day |
570 | - if ( $the_event_date != $the_event_end_date ) { |
|
571 | - $time_format = ! empty( $time_format ) ? $time_format : get_option( 'time_format' ); |
|
572 | - $time_format = apply_filters( 'FHEE__espresso_event_date_range__time_format', $time_format ); |
|
570 | + if ($the_event_date != $the_event_end_date) { |
|
571 | + $time_format = ! empty($time_format) ? $time_format : get_option('time_format'); |
|
572 | + $time_format = apply_filters('FHEE__espresso_event_date_range__time_format', $time_format); |
|
573 | 573 | $html = sprintf( |
574 | - __( '%1$s - %2$s', 'event_espresso' ), |
|
575 | - EEH_Event_View::the_earliest_event_date( $date_format, $time_format, $EVT_ID ), |
|
576 | - EEH_Event_View::the_latest_event_date( $date_format, $time_format, $EVT_ID ) |
|
574 | + __('%1$s - %2$s', 'event_espresso'), |
|
575 | + EEH_Event_View::the_earliest_event_date($date_format, $time_format, $EVT_ID), |
|
576 | + EEH_Event_View::the_latest_event_date($date_format, $time_format, $EVT_ID) |
|
577 | 577 | ); |
578 | 578 | } else { |
579 | 579 | // set and filter date and time formats when only a single datetime is returned |
580 | - $single_date_format = ! empty( $single_date_format ) ? $single_date_format : get_option( 'date_format' ); |
|
581 | - $single_time_format = ! empty( $single_time_format ) ? $single_time_format : get_option( 'time_format' ); |
|
582 | - $single_date_format = apply_filters( 'FHEE__espresso_event_date_range__single_date_format', $single_date_format ); |
|
583 | - $single_time_format = apply_filters( 'FHEE__espresso_event_date_range__single_time_format', $single_time_format ); |
|
584 | - $html = EEH_Event_View::the_earliest_event_date( $single_date_format, $single_time_format, $EVT_ID ); |
|
580 | + $single_date_format = ! empty($single_date_format) ? $single_date_format : get_option('date_format'); |
|
581 | + $single_time_format = ! empty($single_time_format) ? $single_time_format : get_option('time_format'); |
|
582 | + $single_date_format = apply_filters('FHEE__espresso_event_date_range__single_date_format', $single_date_format); |
|
583 | + $single_time_format = apply_filters('FHEE__espresso_event_date_range__single_time_format', $single_time_format); |
|
584 | + $html = EEH_Event_View::the_earliest_event_date($single_date_format, $single_time_format, $EVT_ID); |
|
585 | 585 | } |
586 | - if ( $echo ) { |
|
586 | + if ($echo) { |
|
587 | 587 | echo $html; |
588 | 588 | return ''; |
589 | 589 | } |
@@ -592,7 +592,7 @@ discard block |
||
592 | 592 | } |
593 | 593 | |
594 | 594 | |
595 | -if ( ! function_exists( 'espresso_event_date_as_calendar_page' )) { |
|
595 | +if ( ! function_exists('espresso_event_date_as_calendar_page')) { |
|
596 | 596 | /** |
597 | 597 | * espresso_event_date_as_calendar_page |
598 | 598 | * returns the primary date for an event, stylized to appear as the page of a calendar |
@@ -600,15 +600,15 @@ discard block |
||
600 | 600 | * @param bool $EVT_ID |
601 | 601 | * @return string |
602 | 602 | */ |
603 | - function espresso_event_date_as_calendar_page( $EVT_ID = FALSE ) { |
|
604 | - EEH_Event_View::event_date_as_calendar_page( $EVT_ID ); |
|
603 | + function espresso_event_date_as_calendar_page($EVT_ID = FALSE) { |
|
604 | + EEH_Event_View::event_date_as_calendar_page($EVT_ID); |
|
605 | 605 | } |
606 | 606 | } |
607 | 607 | |
608 | 608 | |
609 | 609 | |
610 | 610 | |
611 | -if ( ! function_exists( 'espresso_event_link_url' )) { |
|
611 | +if ( ! function_exists('espresso_event_link_url')) { |
|
612 | 612 | /** |
613 | 613 | * espresso_event_link_url |
614 | 614 | * |
@@ -616,18 +616,18 @@ discard block |
||
616 | 616 | * @param bool $echo |
617 | 617 | * @return string |
618 | 618 | */ |
619 | - function espresso_event_link_url( $EVT_ID = 0, $echo = TRUE ) { |
|
620 | - if ( $echo ) { |
|
621 | - echo EEH_Event_View::event_link_url( $EVT_ID ); |
|
619 | + function espresso_event_link_url($EVT_ID = 0, $echo = TRUE) { |
|
620 | + if ($echo) { |
|
621 | + echo EEH_Event_View::event_link_url($EVT_ID); |
|
622 | 622 | return ''; |
623 | 623 | } |
624 | - return EEH_Event_View::event_link_url( $EVT_ID ); |
|
624 | + return EEH_Event_View::event_link_url($EVT_ID); |
|
625 | 625 | } |
626 | 626 | } |
627 | 627 | |
628 | 628 | |
629 | 629 | |
630 | -if ( ! function_exists( 'espresso_event_has_content_or_excerpt' )) { |
|
630 | +if ( ! function_exists('espresso_event_has_content_or_excerpt')) { |
|
631 | 631 | /** |
632 | 632 | * espresso_event_has_content_or_excerpt |
633 | 633 | * |
@@ -635,15 +635,15 @@ discard block |
||
635 | 635 | * @param bool $EVT_ID |
636 | 636 | * @return boolean |
637 | 637 | */ |
638 | - function espresso_event_has_content_or_excerpt( $EVT_ID = FALSE ) { |
|
639 | - return EEH_Event_View::event_has_content_or_excerpt( $EVT_ID ); |
|
638 | + function espresso_event_has_content_or_excerpt($EVT_ID = FALSE) { |
|
639 | + return EEH_Event_View::event_has_content_or_excerpt($EVT_ID); |
|
640 | 640 | } |
641 | 641 | } |
642 | 642 | |
643 | 643 | |
644 | 644 | |
645 | 645 | |
646 | -if ( ! function_exists( 'espresso_event_content_or_excerpt' )) { |
|
646 | +if ( ! function_exists('espresso_event_content_or_excerpt')) { |
|
647 | 647 | /** |
648 | 648 | * espresso_event_content_or_excerpt |
649 | 649 | * |
@@ -652,18 +652,18 @@ discard block |
||
652 | 652 | * @param bool $echo |
653 | 653 | * @return string |
654 | 654 | */ |
655 | - function espresso_event_content_or_excerpt( $num_words = 55, $more = NULL, $echo = TRUE ) { |
|
656 | - if ( $echo ) { |
|
657 | - echo EEH_Event_View::event_content_or_excerpt( $num_words, $more ); |
|
655 | + function espresso_event_content_or_excerpt($num_words = 55, $more = NULL, $echo = TRUE) { |
|
656 | + if ($echo) { |
|
657 | + echo EEH_Event_View::event_content_or_excerpt($num_words, $more); |
|
658 | 658 | return ''; |
659 | 659 | } |
660 | - return EEH_Event_View::event_content_or_excerpt( $num_words, $more ); |
|
660 | + return EEH_Event_View::event_content_or_excerpt($num_words, $more); |
|
661 | 661 | } |
662 | 662 | } |
663 | 663 | |
664 | 664 | |
665 | 665 | |
666 | -if ( ! function_exists( 'espresso_event_phone' )) { |
|
666 | +if ( ! function_exists('espresso_event_phone')) { |
|
667 | 667 | /** |
668 | 668 | * espresso_event_phone |
669 | 669 | * |
@@ -671,18 +671,18 @@ discard block |
||
671 | 671 | * @param bool $echo |
672 | 672 | * @return string |
673 | 673 | */ |
674 | - function espresso_event_phone( $EVT_ID = 0, $echo = TRUE ) { |
|
675 | - if ( $echo ) { |
|
676 | - echo EEH_Event_View::event_phone( $EVT_ID ); |
|
674 | + function espresso_event_phone($EVT_ID = 0, $echo = TRUE) { |
|
675 | + if ($echo) { |
|
676 | + echo EEH_Event_View::event_phone($EVT_ID); |
|
677 | 677 | return ''; |
678 | 678 | } |
679 | - return EEH_Event_View::event_phone( $EVT_ID ); |
|
679 | + return EEH_Event_View::event_phone($EVT_ID); |
|
680 | 680 | } |
681 | 681 | } |
682 | 682 | |
683 | 683 | |
684 | 684 | |
685 | -if ( ! function_exists( 'espresso_edit_event_link' )) { |
|
685 | +if ( ! function_exists('espresso_edit_event_link')) { |
|
686 | 686 | /** |
687 | 687 | * espresso_edit_event_link |
688 | 688 | * returns a link to edit an event |
@@ -691,39 +691,39 @@ discard block |
||
691 | 691 | * @param bool $echo |
692 | 692 | * @return string |
693 | 693 | */ |
694 | - function espresso_edit_event_link( $EVT_ID = 0, $echo = TRUE ) { |
|
695 | - if ( $echo ) { |
|
696 | - echo EEH_Event_View::edit_event_link( $EVT_ID ); |
|
694 | + function espresso_edit_event_link($EVT_ID = 0, $echo = TRUE) { |
|
695 | + if ($echo) { |
|
696 | + echo EEH_Event_View::edit_event_link($EVT_ID); |
|
697 | 697 | return ''; |
698 | 698 | } |
699 | - return EEH_Event_View::edit_event_link( $EVT_ID ); |
|
699 | + return EEH_Event_View::edit_event_link($EVT_ID); |
|
700 | 700 | } |
701 | 701 | } |
702 | 702 | |
703 | 703 | |
704 | -if ( ! function_exists( 'espresso_organization_name' )) { |
|
704 | +if ( ! function_exists('espresso_organization_name')) { |
|
705 | 705 | /** |
706 | 706 | * espresso_organization_name |
707 | 707 | * @param bool $echo |
708 | 708 | * @return string |
709 | 709 | */ |
710 | 710 | function espresso_organization_name($echo = TRUE) { |
711 | - if($echo){ |
|
712 | - echo EE_Registry::instance()->CFG->organization->get_pretty( 'name' ); |
|
711 | + if ($echo) { |
|
712 | + echo EE_Registry::instance()->CFG->organization->get_pretty('name'); |
|
713 | 713 | return ''; |
714 | 714 | } |
715 | - return EE_Registry::instance()->CFG->organization->get_pretty( 'name' ); |
|
715 | + return EE_Registry::instance()->CFG->organization->get_pretty('name'); |
|
716 | 716 | } |
717 | 717 | } |
718 | 718 | |
719 | -if ( ! function_exists( 'espresso_organization_address' )) { |
|
719 | +if ( ! function_exists('espresso_organization_address')) { |
|
720 | 720 | /** |
721 | 721 | * espresso_organization_address |
722 | 722 | * @param string $type |
723 | 723 | * @return string |
724 | 724 | */ |
725 | - function espresso_organization_address( $type = 'inline' ) { |
|
726 | - if ( EE_Registry::instance()->CFG->organization instanceof EE_Organization_Config ) { |
|
725 | + function espresso_organization_address($type = 'inline') { |
|
726 | + if (EE_Registry::instance()->CFG->organization instanceof EE_Organization_Config) { |
|
727 | 727 | $address = new EventEspresso\core\domain\entities\GenericAddress( |
728 | 728 | EE_Registry::instance()->CFG->organization->address_1, |
729 | 729 | EE_Registry::instance()->CFG->organization->address_2, |
@@ -732,129 +732,129 @@ discard block |
||
732 | 732 | EE_Registry::instance()->CFG->organization->zip, |
733 | 733 | EE_Registry::instance()->CFG->organization->CNT_ISO |
734 | 734 | ); |
735 | - return EEH_Address::format( $address, $type ); |
|
735 | + return EEH_Address::format($address, $type); |
|
736 | 736 | } |
737 | 737 | return ''; |
738 | 738 | } |
739 | 739 | } |
740 | 740 | |
741 | -if ( ! function_exists( 'espresso_organization_email' )) { |
|
741 | +if ( ! function_exists('espresso_organization_email')) { |
|
742 | 742 | /** |
743 | 743 | * espresso_organization_email |
744 | 744 | * @param bool $echo |
745 | 745 | * @return string |
746 | 746 | */ |
747 | - function espresso_organization_email( $echo = TRUE ) { |
|
748 | - if($echo){ |
|
749 | - echo EE_Registry::instance()->CFG->organization->get_pretty( 'email' ); |
|
747 | + function espresso_organization_email($echo = TRUE) { |
|
748 | + if ($echo) { |
|
749 | + echo EE_Registry::instance()->CFG->organization->get_pretty('email'); |
|
750 | 750 | return ''; |
751 | 751 | } |
752 | - return EE_Registry::instance()->CFG->organization->get_pretty( 'email' ); |
|
752 | + return EE_Registry::instance()->CFG->organization->get_pretty('email'); |
|
753 | 753 | } |
754 | 754 | } |
755 | 755 | |
756 | -if ( ! function_exists( 'espresso_organization_logo_url' )) { |
|
756 | +if ( ! function_exists('espresso_organization_logo_url')) { |
|
757 | 757 | /** |
758 | 758 | * espresso_organization_logo_url |
759 | 759 | * @param bool $echo |
760 | 760 | * @return string |
761 | 761 | */ |
762 | - function espresso_organization_logo_url( $echo = TRUE ) { |
|
763 | - if($echo){ |
|
764 | - echo EE_Registry::instance()->CFG->organization->get_pretty( 'logo_url' ); |
|
762 | + function espresso_organization_logo_url($echo = TRUE) { |
|
763 | + if ($echo) { |
|
764 | + echo EE_Registry::instance()->CFG->organization->get_pretty('logo_url'); |
|
765 | 765 | return ''; |
766 | 766 | } |
767 | - return EE_Registry::instance()->CFG->organization->get_pretty( 'logo_url' ); |
|
767 | + return EE_Registry::instance()->CFG->organization->get_pretty('logo_url'); |
|
768 | 768 | } |
769 | 769 | } |
770 | 770 | |
771 | -if ( ! function_exists( 'espresso_organization_facebook' )) { |
|
771 | +if ( ! function_exists('espresso_organization_facebook')) { |
|
772 | 772 | /** |
773 | 773 | * espresso_organization_facebook |
774 | 774 | * @param bool $echo |
775 | 775 | * @return string |
776 | 776 | */ |
777 | - function espresso_organization_facebook( $echo = TRUE ) { |
|
778 | - if($echo){ |
|
779 | - echo EE_Registry::instance()->CFG->organization->get_pretty( 'facebook' ); |
|
777 | + function espresso_organization_facebook($echo = TRUE) { |
|
778 | + if ($echo) { |
|
779 | + echo EE_Registry::instance()->CFG->organization->get_pretty('facebook'); |
|
780 | 780 | return ''; |
781 | 781 | } |
782 | - return EE_Registry::instance()->CFG->organization->get_pretty( 'facebook' ); |
|
782 | + return EE_Registry::instance()->CFG->organization->get_pretty('facebook'); |
|
783 | 783 | } |
784 | 784 | } |
785 | 785 | |
786 | -if ( ! function_exists( 'espresso_organization_twitter' )) { |
|
786 | +if ( ! function_exists('espresso_organization_twitter')) { |
|
787 | 787 | /** |
788 | 788 | * espresso_organization_twitter |
789 | 789 | * @param bool $echo |
790 | 790 | * @return string |
791 | 791 | */ |
792 | - function espresso_organization_twitter( $echo = TRUE ) { |
|
793 | - if($echo){ |
|
794 | - echo EE_Registry::instance()->CFG->organization->get_pretty( 'twitter' ); |
|
792 | + function espresso_organization_twitter($echo = TRUE) { |
|
793 | + if ($echo) { |
|
794 | + echo EE_Registry::instance()->CFG->organization->get_pretty('twitter'); |
|
795 | 795 | return ''; |
796 | 796 | } |
797 | - return EE_Registry::instance()->CFG->organization->get_pretty( 'twitter' ); |
|
797 | + return EE_Registry::instance()->CFG->organization->get_pretty('twitter'); |
|
798 | 798 | } |
799 | 799 | } |
800 | 800 | |
801 | -if ( ! function_exists( 'espresso_organization_linkedin' )) { |
|
801 | +if ( ! function_exists('espresso_organization_linkedin')) { |
|
802 | 802 | /** |
803 | 803 | * espresso_organization_linkedin |
804 | 804 | * @param bool $echo |
805 | 805 | * @return string |
806 | 806 | */ |
807 | - function espresso_organization_linkedin( $echo = TRUE ) { |
|
808 | - if($echo){ |
|
809 | - echo EE_Registry::instance()->CFG->organization->get_pretty( 'linkedin' ); |
|
807 | + function espresso_organization_linkedin($echo = TRUE) { |
|
808 | + if ($echo) { |
|
809 | + echo EE_Registry::instance()->CFG->organization->get_pretty('linkedin'); |
|
810 | 810 | return ''; |
811 | 811 | } |
812 | - return EE_Registry::instance()->CFG->organization->get_pretty( 'linkedin' ); |
|
812 | + return EE_Registry::instance()->CFG->organization->get_pretty('linkedin'); |
|
813 | 813 | } |
814 | 814 | } |
815 | 815 | |
816 | -if ( ! function_exists( 'espresso_organization_pinterest' )) { |
|
816 | +if ( ! function_exists('espresso_organization_pinterest')) { |
|
817 | 817 | /** |
818 | 818 | * espresso_organization_pinterest |
819 | 819 | * @param bool $echo |
820 | 820 | * @return string |
821 | 821 | */ |
822 | - function espresso_organization_pinterest( $echo = TRUE ) { |
|
823 | - if($echo){ |
|
824 | - echo EE_Registry::instance()->CFG->organization->get_pretty( 'pinterest' ); |
|
822 | + function espresso_organization_pinterest($echo = TRUE) { |
|
823 | + if ($echo) { |
|
824 | + echo EE_Registry::instance()->CFG->organization->get_pretty('pinterest'); |
|
825 | 825 | return ''; |
826 | 826 | } |
827 | - return EE_Registry::instance()->CFG->organization->get_pretty( 'pinterest' ); |
|
827 | + return EE_Registry::instance()->CFG->organization->get_pretty('pinterest'); |
|
828 | 828 | } |
829 | 829 | } |
830 | 830 | |
831 | -if ( ! function_exists( 'espresso_organization_google' )) { |
|
831 | +if ( ! function_exists('espresso_organization_google')) { |
|
832 | 832 | /** |
833 | 833 | * espresso_organization_google |
834 | 834 | * @param bool $echo |
835 | 835 | * @return string |
836 | 836 | */ |
837 | - function espresso_organization_google( $echo = TRUE ) { |
|
838 | - if($echo){ |
|
839 | - echo EE_Registry::instance()->CFG->organization->get_pretty( 'google' ); |
|
837 | + function espresso_organization_google($echo = TRUE) { |
|
838 | + if ($echo) { |
|
839 | + echo EE_Registry::instance()->CFG->organization->get_pretty('google'); |
|
840 | 840 | return ''; |
841 | 841 | } |
842 | - return EE_Registry::instance()->CFG->organization->get_pretty( 'google' ); |
|
842 | + return EE_Registry::instance()->CFG->organization->get_pretty('google'); |
|
843 | 843 | } |
844 | 844 | } |
845 | 845 | |
846 | -if ( ! function_exists( 'espresso_organization_instagram' )) { |
|
846 | +if ( ! function_exists('espresso_organization_instagram')) { |
|
847 | 847 | /** |
848 | 848 | * espresso_organization_instagram |
849 | 849 | * @param bool $echo |
850 | 850 | * @return string |
851 | 851 | */ |
852 | - function espresso_organization_instagram( $echo = TRUE ) { |
|
853 | - if($echo){ |
|
854 | - echo EE_Registry::instance()->CFG->organization->get_pretty( 'instagram' ); |
|
852 | + function espresso_organization_instagram($echo = TRUE) { |
|
853 | + if ($echo) { |
|
854 | + echo EE_Registry::instance()->CFG->organization->get_pretty('instagram'); |
|
855 | 855 | return ''; |
856 | 856 | } |
857 | - return EE_Registry::instance()->CFG->organization->get_pretty( 'instagram' ); |
|
857 | + return EE_Registry::instance()->CFG->organization->get_pretty('instagram'); |
|
858 | 858 | } |
859 | 859 | } |
860 | 860 | |
@@ -864,7 +864,7 @@ discard block |
||
864 | 864 | |
865 | 865 | |
866 | 866 | |
867 | -if ( ! function_exists( 'espresso_event_venues' )) { |
|
867 | +if ( ! function_exists('espresso_event_venues')) { |
|
868 | 868 | /** |
869 | 869 | * espresso_event_venues |
870 | 870 | * |
@@ -878,7 +878,7 @@ discard block |
||
878 | 878 | |
879 | 879 | |
880 | 880 | |
881 | -if ( ! function_exists( 'espresso_venue_id' )) { |
|
881 | +if ( ! function_exists('espresso_venue_id')) { |
|
882 | 882 | /** |
883 | 883 | * espresso_venue_name |
884 | 884 | * |
@@ -886,15 +886,15 @@ discard block |
||
886 | 886 | * @param int $EVT_ID |
887 | 887 | * @return string |
888 | 888 | */ |
889 | - function espresso_venue_id( $EVT_ID = 0 ) { |
|
890 | - $venue = EEH_Venue_View::get_venue( $EVT_ID ); |
|
889 | + function espresso_venue_id($EVT_ID = 0) { |
|
890 | + $venue = EEH_Venue_View::get_venue($EVT_ID); |
|
891 | 891 | return $venue instanceof EE_Venue ? $venue->ID() : 0; |
892 | 892 | } |
893 | 893 | } |
894 | 894 | |
895 | 895 | |
896 | 896 | |
897 | -if ( ! function_exists( 'espresso_is_venue_private' ) ) { |
|
897 | +if ( ! function_exists('espresso_is_venue_private')) { |
|
898 | 898 | /** |
899 | 899 | * Return whether a venue is private or not. |
900 | 900 | * @see EEH_Venue_View::get_venue() for more info on expected return results. |
@@ -903,45 +903,45 @@ discard block |
||
903 | 903 | * |
904 | 904 | * @return bool | null |
905 | 905 | */ |
906 | - function espresso_is_venue_private( $VNU_ID = 0 ) { |
|
907 | - return EEH_Venue_View::is_venue_private( $VNU_ID ); |
|
906 | + function espresso_is_venue_private($VNU_ID = 0) { |
|
907 | + return EEH_Venue_View::is_venue_private($VNU_ID); |
|
908 | 908 | } |
909 | 909 | } |
910 | 910 | |
911 | 911 | |
912 | 912 | |
913 | -if ( ! function_exists( 'espresso_venue_is_password_protected' ) ) { |
|
913 | +if ( ! function_exists('espresso_venue_is_password_protected')) { |
|
914 | 914 | /** |
915 | 915 | * returns true or false if a venue is password protected or not |
916 | 916 | * |
917 | 917 | * @param int $VNU_ID optional, the venue id to check. |
918 | 918 | * @return string |
919 | 919 | */ |
920 | - function espresso_venue_is_password_protected( $VNU_ID = 0 ) { |
|
921 | - EE_Registry::instance()->load_helper( 'Venue_View' ); |
|
922 | - return EEH_Venue_View::is_venue_password_protected( $VNU_ID ); |
|
920 | + function espresso_venue_is_password_protected($VNU_ID = 0) { |
|
921 | + EE_Registry::instance()->load_helper('Venue_View'); |
|
922 | + return EEH_Venue_View::is_venue_password_protected($VNU_ID); |
|
923 | 923 | } |
924 | 924 | } |
925 | 925 | |
926 | 926 | |
927 | 927 | |
928 | -if ( ! function_exists( 'espresso_password_protected_venue_form' ) ) { |
|
928 | +if ( ! function_exists('espresso_password_protected_venue_form')) { |
|
929 | 929 | /** |
930 | 930 | * Returns a password form if venue is password protected. |
931 | 931 | * |
932 | 932 | * @param int $VNU_ID optional, the venue id to check. |
933 | 933 | * @return string |
934 | 934 | */ |
935 | - function espresso_password_protected_venue_form( $VNU_ID = 0 ) { |
|
936 | - EE_Registry::instance()->load_helper( 'Venue_View' ); |
|
937 | - return EEH_Venue_View::password_protected_venue_form( $VNU_ID ); |
|
935 | + function espresso_password_protected_venue_form($VNU_ID = 0) { |
|
936 | + EE_Registry::instance()->load_helper('Venue_View'); |
|
937 | + return EEH_Venue_View::password_protected_venue_form($VNU_ID); |
|
938 | 938 | } |
939 | 939 | } |
940 | 940 | |
941 | 941 | |
942 | 942 | |
943 | 943 | |
944 | -if ( ! function_exists( 'espresso_venue_name' )) { |
|
944 | +if ( ! function_exists('espresso_venue_name')) { |
|
945 | 945 | /** |
946 | 946 | * espresso_venue_name |
947 | 947 | * |
@@ -951,19 +951,19 @@ discard block |
||
951 | 951 | * @param bool $echo |
952 | 952 | * @return string |
953 | 953 | */ |
954 | - function espresso_venue_name( $VNU_ID = 0, $link_to = 'details', $echo = TRUE ) { |
|
955 | - if($echo){ |
|
956 | - echo EEH_Venue_View::venue_name( $link_to, $VNU_ID ); |
|
954 | + function espresso_venue_name($VNU_ID = 0, $link_to = 'details', $echo = TRUE) { |
|
955 | + if ($echo) { |
|
956 | + echo EEH_Venue_View::venue_name($link_to, $VNU_ID); |
|
957 | 957 | return ''; |
958 | 958 | } |
959 | - return EEH_Venue_View::venue_name( $link_to, $VNU_ID ); |
|
959 | + return EEH_Venue_View::venue_name($link_to, $VNU_ID); |
|
960 | 960 | } |
961 | 961 | } |
962 | 962 | |
963 | 963 | |
964 | 964 | |
965 | 965 | |
966 | -if ( ! function_exists( 'espresso_venue_link' )) { |
|
966 | +if ( ! function_exists('espresso_venue_link')) { |
|
967 | 967 | /** |
968 | 968 | * espresso_venue_link |
969 | 969 | * |
@@ -972,14 +972,14 @@ discard block |
||
972 | 972 | * @param string $text |
973 | 973 | * @return string |
974 | 974 | */ |
975 | - function espresso_venue_link( $VNU_ID = 0, $text = '' ) { |
|
976 | - return EEH_Venue_View::venue_details_link( $VNU_ID, $text ); |
|
975 | + function espresso_venue_link($VNU_ID = 0, $text = '') { |
|
976 | + return EEH_Venue_View::venue_details_link($VNU_ID, $text); |
|
977 | 977 | } |
978 | 978 | } |
979 | 979 | |
980 | 980 | |
981 | 981 | |
982 | -if ( ! function_exists( 'espresso_venue_description' )) { |
|
982 | +if ( ! function_exists('espresso_venue_description')) { |
|
983 | 983 | /** |
984 | 984 | * espresso_venue_description |
985 | 985 | * |
@@ -988,17 +988,17 @@ discard block |
||
988 | 988 | * @param bool $echo |
989 | 989 | * @return string |
990 | 990 | */ |
991 | - function espresso_venue_description( $VNU_ID = FALSE, $echo = TRUE ) { |
|
992 | - if($echo){ |
|
993 | - echo EEH_Venue_View::venue_description( $VNU_ID ); |
|
991 | + function espresso_venue_description($VNU_ID = FALSE, $echo = TRUE) { |
|
992 | + if ($echo) { |
|
993 | + echo EEH_Venue_View::venue_description($VNU_ID); |
|
994 | 994 | return ''; |
995 | 995 | } |
996 | - return EEH_Venue_View::venue_description( $VNU_ID ); |
|
996 | + return EEH_Venue_View::venue_description($VNU_ID); |
|
997 | 997 | } |
998 | 998 | } |
999 | 999 | |
1000 | 1000 | |
1001 | -if ( ! function_exists( 'espresso_venue_excerpt' )) { |
|
1001 | +if ( ! function_exists('espresso_venue_excerpt')) { |
|
1002 | 1002 | /** |
1003 | 1003 | * espresso_venue_excerpt |
1004 | 1004 | * |
@@ -1007,18 +1007,18 @@ discard block |
||
1007 | 1007 | * @param bool $echo |
1008 | 1008 | * @return string |
1009 | 1009 | */ |
1010 | - function espresso_venue_excerpt( $VNU_ID = 0, $echo = TRUE ) { |
|
1011 | - if ( $echo ) { |
|
1012 | - echo EEH_Venue_View::venue_excerpt( $VNU_ID ); |
|
1010 | + function espresso_venue_excerpt($VNU_ID = 0, $echo = TRUE) { |
|
1011 | + if ($echo) { |
|
1012 | + echo EEH_Venue_View::venue_excerpt($VNU_ID); |
|
1013 | 1013 | return ''; |
1014 | 1014 | } |
1015 | - return EEH_Venue_View::venue_excerpt( $VNU_ID ); |
|
1015 | + return EEH_Venue_View::venue_excerpt($VNU_ID); |
|
1016 | 1016 | } |
1017 | 1017 | } |
1018 | 1018 | |
1019 | 1019 | |
1020 | 1020 | |
1021 | -if ( ! function_exists( 'espresso_venue_categories' )) { |
|
1021 | +if ( ! function_exists('espresso_venue_categories')) { |
|
1022 | 1022 | /** |
1023 | 1023 | * espresso_venue_categories |
1024 | 1024 | * returns the terms associated with a venue |
@@ -1028,17 +1028,17 @@ discard block |
||
1028 | 1028 | * @param bool $echo |
1029 | 1029 | * @return string |
1030 | 1030 | */ |
1031 | - function espresso_venue_categories( $VNU_ID = 0, $hide_uncategorized = TRUE, $echo = TRUE ) { |
|
1032 | - if ( $echo ) { |
|
1033 | - echo EEH_Venue_View::venue_categories( $VNU_ID, $hide_uncategorized ); |
|
1031 | + function espresso_venue_categories($VNU_ID = 0, $hide_uncategorized = TRUE, $echo = TRUE) { |
|
1032 | + if ($echo) { |
|
1033 | + echo EEH_Venue_View::venue_categories($VNU_ID, $hide_uncategorized); |
|
1034 | 1034 | return ''; |
1035 | 1035 | } |
1036 | - return EEH_Venue_View::venue_categories( $VNU_ID, $hide_uncategorized ); |
|
1036 | + return EEH_Venue_View::venue_categories($VNU_ID, $hide_uncategorized); |
|
1037 | 1037 | } |
1038 | 1038 | } |
1039 | 1039 | |
1040 | 1040 | |
1041 | -if ( ! function_exists( 'espresso_venue_address' )) { |
|
1041 | +if ( ! function_exists('espresso_venue_address')) { |
|
1042 | 1042 | /** |
1043 | 1043 | * espresso_venue_address |
1044 | 1044 | * returns a formatted block of html for displaying a venue's address |
@@ -1048,17 +1048,17 @@ discard block |
||
1048 | 1048 | * @param bool $echo |
1049 | 1049 | * @return string |
1050 | 1050 | */ |
1051 | - function espresso_venue_address( $type = 'multiline', $VNU_ID = 0, $echo = TRUE ) { |
|
1052 | - if ( $echo ) { |
|
1053 | - echo EEH_Venue_View::venue_address( $type, $VNU_ID ); |
|
1051 | + function espresso_venue_address($type = 'multiline', $VNU_ID = 0, $echo = TRUE) { |
|
1052 | + if ($echo) { |
|
1053 | + echo EEH_Venue_View::venue_address($type, $VNU_ID); |
|
1054 | 1054 | return ''; |
1055 | 1055 | } |
1056 | - return EEH_Venue_View::venue_address( $type, $VNU_ID ); |
|
1056 | + return EEH_Venue_View::venue_address($type, $VNU_ID); |
|
1057 | 1057 | } |
1058 | 1058 | } |
1059 | 1059 | |
1060 | 1060 | |
1061 | -if ( ! function_exists( 'espresso_venue_raw_address' )) { |
|
1061 | +if ( ! function_exists('espresso_venue_raw_address')) { |
|
1062 | 1062 | /** |
1063 | 1063 | * espresso_venue_address |
1064 | 1064 | * returns an UN-formatted string containing a venue's address |
@@ -1068,17 +1068,17 @@ discard block |
||
1068 | 1068 | * @param bool $echo |
1069 | 1069 | * @return string |
1070 | 1070 | */ |
1071 | - function espresso_venue_raw_address( $type = 'multiline', $VNU_ID = 0, $echo = TRUE ) { |
|
1072 | - if ( $echo ) { |
|
1073 | - echo EEH_Venue_View::venue_address( $type, $VNU_ID, FALSE, FALSE ); |
|
1071 | + function espresso_venue_raw_address($type = 'multiline', $VNU_ID = 0, $echo = TRUE) { |
|
1072 | + if ($echo) { |
|
1073 | + echo EEH_Venue_View::venue_address($type, $VNU_ID, FALSE, FALSE); |
|
1074 | 1074 | return ''; |
1075 | 1075 | } |
1076 | - return EEH_Venue_View::venue_address( $type, $VNU_ID, FALSE, FALSE ); |
|
1076 | + return EEH_Venue_View::venue_address($type, $VNU_ID, FALSE, FALSE); |
|
1077 | 1077 | } |
1078 | 1078 | } |
1079 | 1079 | |
1080 | 1080 | |
1081 | -if ( ! function_exists( 'espresso_venue_has_address' )) { |
|
1081 | +if ( ! function_exists('espresso_venue_has_address')) { |
|
1082 | 1082 | /** |
1083 | 1083 | * espresso_venue_has_address |
1084 | 1084 | * returns TRUE or FALSE if a Venue has address information |
@@ -1086,13 +1086,13 @@ discard block |
||
1086 | 1086 | * @param int $VNU_ID |
1087 | 1087 | * @return bool |
1088 | 1088 | */ |
1089 | - function espresso_venue_has_address( $VNU_ID = 0 ) { |
|
1090 | - return EEH_Venue_View::venue_has_address( $VNU_ID ); |
|
1089 | + function espresso_venue_has_address($VNU_ID = 0) { |
|
1090 | + return EEH_Venue_View::venue_has_address($VNU_ID); |
|
1091 | 1091 | } |
1092 | 1092 | } |
1093 | 1093 | |
1094 | 1094 | |
1095 | -if ( ! function_exists( 'espresso_venue_gmap' )) { |
|
1095 | +if ( ! function_exists('espresso_venue_gmap')) { |
|
1096 | 1096 | /** |
1097 | 1097 | * espresso_venue_gmap |
1098 | 1098 | * returns a google map for the venue address |
@@ -1103,17 +1103,17 @@ discard block |
||
1103 | 1103 | * @param bool $echo |
1104 | 1104 | * @return string |
1105 | 1105 | */ |
1106 | - function espresso_venue_gmap( $VNU_ID = 0, $map_ID = FALSE, $gmap = array(), $echo = TRUE ) { |
|
1107 | - if ( $echo ) { |
|
1108 | - echo EEH_Venue_View::venue_gmap( $VNU_ID, $map_ID, $gmap ); |
|
1106 | + function espresso_venue_gmap($VNU_ID = 0, $map_ID = FALSE, $gmap = array(), $echo = TRUE) { |
|
1107 | + if ($echo) { |
|
1108 | + echo EEH_Venue_View::venue_gmap($VNU_ID, $map_ID, $gmap); |
|
1109 | 1109 | return ''; |
1110 | 1110 | } |
1111 | - return EEH_Venue_View::venue_gmap( $VNU_ID, $map_ID, $gmap ); |
|
1111 | + return EEH_Venue_View::venue_gmap($VNU_ID, $map_ID, $gmap); |
|
1112 | 1112 | } |
1113 | 1113 | } |
1114 | 1114 | |
1115 | 1115 | |
1116 | -if ( ! function_exists( 'espresso_venue_phone' )) { |
|
1116 | +if ( ! function_exists('espresso_venue_phone')) { |
|
1117 | 1117 | /** |
1118 | 1118 | * espresso_venue_phone |
1119 | 1119 | * |
@@ -1121,18 +1121,18 @@ discard block |
||
1121 | 1121 | * @param bool $echo |
1122 | 1122 | * @return string |
1123 | 1123 | */ |
1124 | - function espresso_venue_phone( $VNU_ID = 0, $echo = TRUE ) { |
|
1125 | - if ( $echo ) { |
|
1126 | - echo EEH_Venue_View::venue_phone( $VNU_ID ); |
|
1124 | + function espresso_venue_phone($VNU_ID = 0, $echo = TRUE) { |
|
1125 | + if ($echo) { |
|
1126 | + echo EEH_Venue_View::venue_phone($VNU_ID); |
|
1127 | 1127 | return ''; |
1128 | 1128 | } |
1129 | - return EEH_Venue_View::venue_phone( $VNU_ID ); |
|
1129 | + return EEH_Venue_View::venue_phone($VNU_ID); |
|
1130 | 1130 | } |
1131 | 1131 | } |
1132 | 1132 | |
1133 | 1133 | |
1134 | 1134 | |
1135 | -if ( ! function_exists( 'espresso_venue_website' )) { |
|
1135 | +if ( ! function_exists('espresso_venue_website')) { |
|
1136 | 1136 | /** |
1137 | 1137 | * espresso_venue_website |
1138 | 1138 | * |
@@ -1140,18 +1140,18 @@ discard block |
||
1140 | 1140 | * @param bool $echo |
1141 | 1141 | * @return string |
1142 | 1142 | */ |
1143 | - function espresso_venue_website( $VNU_ID = 0, $echo = TRUE ) { |
|
1144 | - if ( $echo ) { |
|
1145 | - echo EEH_Venue_View::venue_website_link( $VNU_ID ); |
|
1143 | + function espresso_venue_website($VNU_ID = 0, $echo = TRUE) { |
|
1144 | + if ($echo) { |
|
1145 | + echo EEH_Venue_View::venue_website_link($VNU_ID); |
|
1146 | 1146 | return ''; |
1147 | 1147 | } |
1148 | - return EEH_Venue_View::venue_website_link( $VNU_ID ); |
|
1148 | + return EEH_Venue_View::venue_website_link($VNU_ID); |
|
1149 | 1149 | } |
1150 | 1150 | } |
1151 | 1151 | |
1152 | 1152 | |
1153 | 1153 | |
1154 | -if ( ! function_exists( 'espresso_edit_venue_link' )) { |
|
1154 | +if ( ! function_exists('espresso_edit_venue_link')) { |
|
1155 | 1155 | /** |
1156 | 1156 | * espresso_edit_venue_link |
1157 | 1157 | * |
@@ -1159,12 +1159,12 @@ discard block |
||
1159 | 1159 | * @param bool $echo |
1160 | 1160 | * @return string |
1161 | 1161 | */ |
1162 | - function espresso_edit_venue_link( $VNU_ID = 0, $echo = TRUE ) { |
|
1163 | - if($echo){ |
|
1164 | - echo EEH_Venue_View::edit_venue_link( $VNU_ID ); |
|
1162 | + function espresso_edit_venue_link($VNU_ID = 0, $echo = TRUE) { |
|
1163 | + if ($echo) { |
|
1164 | + echo EEH_Venue_View::edit_venue_link($VNU_ID); |
|
1165 | 1165 | return ''; |
1166 | 1166 | } |
1167 | - return EEH_Venue_View::edit_venue_link( $VNU_ID ); |
|
1167 | + return EEH_Venue_View::edit_venue_link($VNU_ID); |
|
1168 | 1168 | } |
1169 | 1169 | } |
1170 | 1170 |