@@ -1,18 +1,18 @@ |
||
1 | 1 | <p><strong><?php esc_html_e('Message Filters', 'event_espresso'); ?></strong></p> |
2 | 2 | <p> |
3 | 3 | <?php esc_html_e( |
4 | - 'Filters are a way to show message templates that fall into certain criteria.', |
|
5 | - 'event_espresso' |
|
6 | - ); ?> |
|
4 | + 'Filters are a way to show message templates that fall into certain criteria.', |
|
5 | + 'event_espresso' |
|
6 | + ); ?> |
|
7 | 7 | <br /> |
8 | 8 | </p> |
9 | 9 | <ul> |
10 | 10 | <li> |
11 | 11 | <strong><?php esc_html_e('Filter by Messengers', 'event_espresso'); ?></strong><br /> |
12 | 12 | <?php esc_html_e( |
13 | - 'Select a messenger type and then click the button to enable that filter.', |
|
14 | - 'event_espresso' |
|
15 | - ); ?> |
|
13 | + 'Select a messenger type and then click the button to enable that filter.', |
|
14 | + 'event_espresso' |
|
15 | + ); ?> |
|
16 | 16 | </li> |
17 | 17 | <li> |
18 | 18 | <strong><?php esc_html_e('Filter by Message Types', 'event_espresso'); ?></strong><br /> |
@@ -3,25 +3,25 @@ |
||
3 | 3 | </p> |
4 | 4 | <p> |
5 | 5 | <?php |
6 | - printf( |
|
7 | - esc_html__( |
|
8 | - 'Message Templates are the %1$sformat%2$s of the messages going out. Think of them as a “form letter”. Templates tell the Messages system how to style your messages and the content (information) they will have when they are delivered.', |
|
9 | - 'event_espresso' |
|
10 | - ), |
|
11 | - '<em>', |
|
12 | - '</em>' |
|
13 | - ); |
|
14 | - ?> |
|
6 | + printf( |
|
7 | + esc_html__( |
|
8 | + 'Message Templates are the %1$sformat%2$s of the messages going out. Think of them as a “form letter”. Templates tell the Messages system how to style your messages and the content (information) they will have when they are delivered.', |
|
9 | + 'event_espresso' |
|
10 | + ), |
|
11 | + '<em>', |
|
12 | + '</em>' |
|
13 | + ); |
|
14 | + ?> |
|
15 | 15 | </p> |
16 | 16 | <p> |
17 | 17 | <?php esc_html_e( |
18 | - 'There is a template created for each Messenger / Message Type and context combination. For example, messages that are sent for Payment Confirmation have a template for Event Administrator and a different one for Primary Registrant. Whereas, messages that are sent for the Registration confirmation have 3 templates: one for Event Administrator, one for the Primary Registrant, and another for each additional Registrant(s).', |
|
19 | - 'event_espresso' |
|
20 | - ); ?> |
|
18 | + 'There is a template created for each Messenger / Message Type and context combination. For example, messages that are sent for Payment Confirmation have a template for Event Administrator and a different one for Primary Registrant. Whereas, messages that are sent for the Registration confirmation have 3 templates: one for Event Administrator, one for the Primary Registrant, and another for each additional Registrant(s).', |
|
19 | + 'event_espresso' |
|
20 | + ); ?> |
|
21 | 21 | </p> |
22 | 22 | <p> |
23 | 23 | <?php esc_html_e( |
24 | - 'With the Event Espresso Messages system, every Messenger, Message Type, and context will have a global template created with some default content on creation. You have the ability to edit the global template that will be used for all events you create. Additionally, you have the ability to create custom templates for each event on the edit event page for the event (in a metabox labelled "Notifications").', |
|
25 | - 'event_espresso' |
|
26 | - ); ?> |
|
24 | + 'With the Event Espresso Messages system, every Messenger, Message Type, and context will have a global template created with some default content on creation. You have the ability to edit the global template that will be used for all events you create. Additionally, you have the ability to create custom templates for each event on the edit event page for the event (in a metabox labelled "Notifications").', |
|
25 | + 'event_espresso' |
|
26 | + ); ?> |
|
27 | 27 | </p> |
28 | 28 | \ No newline at end of file |
@@ -3,7 +3,7 @@ |
||
3 | 3 | </p> |
4 | 4 | <p> |
5 | 5 | <?php esc_html_e( |
6 | - 'Bulk actions allow you to perform an action to multiple Message Types at once. The following bulk actions are supported: Move to Trash. To use the bulk action feature, place a checkmark next to the message types that you want to include. Then select a bulk action from the menu and click on the Apply button.', |
|
7 | - 'event_espresso' |
|
8 | - ); ?> |
|
6 | + 'Bulk actions allow you to perform an action to multiple Message Types at once. The following bulk actions are supported: Move to Trash. To use the bulk action feature, place a checkmark next to the message types that you want to include. Then select a bulk action from the menu and click on the Apply button.', |
|
7 | + 'event_espresso' |
|
8 | + ); ?> |
|
9 | 9 | </p> |
10 | 10 | \ No newline at end of file |
@@ -3,7 +3,7 @@ |
||
3 | 3 | </p> |
4 | 4 | <p> |
5 | 5 | <?php esc_html_e( |
6 | - 'There may be times where you want to deactivate (or activate new) Message Types for a particular messenger. The messages system makes it easy to do so. To deactivate a Message Type, drag the message type box from the "active area" into the "inactive" area in the right sidebar. To re-activate, simply reverse your steps. Remember that when you deactivate a message type, if that message type has any settings, the settings will be lost. However, any message templates that match the messenger and message type you deactivated will be preserved, they are just marked "inactive" in the database.', |
|
7 | - 'event_espresso' |
|
8 | - ); ?> |
|
6 | + 'There may be times where you want to deactivate (or activate new) Message Types for a particular messenger. The messages system makes it easy to do so. To deactivate a Message Type, drag the message type box from the "active area" into the "inactive" area in the right sidebar. To re-activate, simply reverse your steps. Remember that when you deactivate a message type, if that message type has any settings, the settings will be lost. However, any message templates that match the messenger and message type you deactivated will be preserved, they are just marked "inactive" in the database.', |
|
7 | + 'event_espresso' |
|
8 | + ); ?> |
|
9 | 9 | </p> |
10 | 10 | \ No newline at end of file |
@@ -3,48 +3,48 @@ |
||
3 | 3 | </p> |
4 | 4 | <p> |
5 | 5 | <?php esc_html_e( |
6 | - 'The Messages Preview page can be accessed by clicking the Preview button while editing a message template. This feature has been created as a way of previewing what the final generated messages will look like when received by a recipient. Here\'s how the preview is prepared:', |
|
7 | - 'event_espresso' |
|
8 | - ); ?> |
|
6 | + 'The Messages Preview page can be accessed by clicking the Preview button while editing a message template. This feature has been created as a way of previewing what the final generated messages will look like when received by a recipient. Here\'s how the preview is prepared:', |
|
7 | + 'event_espresso' |
|
8 | + ); ?> |
|
9 | 9 | </p> |
10 | 10 | <p> |
11 | 11 | <strong> |
12 | 12 | <?php esc_html_e( |
13 | - '1. The system retrieves the appropriate template based on the given messenger, message type, and context', |
|
14 | - 'event_espresso' |
|
15 | - ); ?> |
|
13 | + '1. The system retrieves the appropriate template based on the given messenger, message type, and context', |
|
14 | + 'event_espresso' |
|
15 | + ); ?> |
|
16 | 16 | </strong> |
17 | 17 | </p> |
18 | 18 | <p> |
19 | 19 | <?php esc_html_e( |
20 | - 'When you click the preview button, the messages system remembers what template is being "previewed" based on the messenger, message_type, context and event (if this is a custom event template).', |
|
21 | - 'event_espresso' |
|
22 | - ); ?> |
|
20 | + 'When you click the preview button, the messages system remembers what template is being "previewed" based on the messenger, message_type, context and event (if this is a custom event template).', |
|
21 | + 'event_espresso' |
|
22 | + ); ?> |
|
23 | 23 | </p> |
24 | 24 | <p> |
25 | 25 | <strong><?php esc_html_e('2. Setup data', 'event_espresso'); ?></strong> |
26 | 26 | </p> |
27 | 27 | <p> |
28 | 28 | <?php esc_html_e( |
29 | - 'Before any shortcodes in the template can be parsed, the previewer needs to know what data to use for the shortcodes. Some of the data is dummy data that the previewer generates, but wherever possible the previewer will use actual data from your database. For example, all the organization shortcodes will use actual data you\'ve setup for your organization. For global template previews, the previewer will obtain the first active event from your database and use data from it. If you are previewing a custom event template then THAT event will be used for the preview. The only data that is dummy data is typically data that would be entered by a person registering for an event.', |
|
30 | - 'event_espresso' |
|
31 | - ); ?> |
|
29 | + 'Before any shortcodes in the template can be parsed, the previewer needs to know what data to use for the shortcodes. Some of the data is dummy data that the previewer generates, but wherever possible the previewer will use actual data from your database. For example, all the organization shortcodes will use actual data you\'ve setup for your organization. For global template previews, the previewer will obtain the first active event from your database and use data from it. If you are previewing a custom event template then THAT event will be used for the preview. The only data that is dummy data is typically data that would be entered by a person registering for an event.', |
|
30 | + 'event_espresso' |
|
31 | + ); ?> |
|
32 | 32 | </p> |
33 | 33 | <p> |
34 | 34 | <strong><?php esc_html_e('3. Parse shortcodes', 'event_espresso'); ?></strong> |
35 | 35 | </p> |
36 | 36 | <p> |
37 | 37 | <?php esc_html_e( |
38 | - 'The previewer then goes through all the shortcodes in the template being previewed and replaces them using the prepared data. This is a good way of making sure that the shortcodes are working as you expect, and also clearly seeing what is being displayed for that shortcode when someone receives that message.', |
|
39 | - 'event_espresso' |
|
40 | - ); ?> |
|
38 | + 'The previewer then goes through all the shortcodes in the template being previewed and replaces them using the prepared data. This is a good way of making sure that the shortcodes are working as you expect, and also clearly seeing what is being displayed for that shortcode when someone receives that message.', |
|
39 | + 'event_espresso' |
|
40 | + ); ?> |
|
41 | 41 | </p> |
42 | 42 | <p> |
43 | 43 | <strong><?php esc_html_e('4. Display the preview', 'event_espresso'); ?></strong> |
44 | 44 | </p> |
45 | 45 | <p> |
46 | 46 | <?php esc_html_e( |
47 | - 'An important thing to remember about the previewer is that for the most part, the previewer uses the same underlying system that will be used for actual outgoing messages, so you can be certain that what you see in the preview is what users will see when they receive the message. It is yet another tool provided to make it easier for you to customize the look of your outgoing messages.', |
|
48 | - 'event_espresso' |
|
49 | - ); ?> |
|
47 | + 'An important thing to remember about the previewer is that for the most part, the previewer uses the same underlying system that will be used for actual outgoing messages, so you can be certain that what you see in the preview is what users will see when they receive the message. It is yet another tool provided to make it easier for you to customize the look of your outgoing messages.', |
|
48 | + 'event_espresso' |
|
49 | + ); ?> |
|
50 | 50 | </p> |
51 | 51 | \ No newline at end of file |
@@ -1,13 +1,13 @@ |
||
1 | 1 | <p><strong><?php esc_html_e('Messengers', 'event_espresso'); ?></strong></p> |
2 | 2 | <p> |
3 | 3 | <?php |
4 | - printf( |
|
5 | - esc_html__( |
|
6 | - 'Messengers are the vehicles that deliver messages to individuals (recipients). By default, every install of Event Espresso has the %sEmail%s messenger active. The Email messenger is a vehicle for delivering messages. Other possible vehicles might be any social media applications, 3rd party API\'s etc.', |
|
7 | - 'event_espresso' |
|
8 | - ), |
|
9 | - '<strong>', |
|
10 | - '</strong>' |
|
11 | - ); |
|
12 | - ?> |
|
4 | + printf( |
|
5 | + esc_html__( |
|
6 | + 'Messengers are the vehicles that deliver messages to individuals (recipients). By default, every install of Event Espresso has the %sEmail%s messenger active. The Email messenger is a vehicle for delivering messages. Other possible vehicles might be any social media applications, 3rd party API\'s etc.', |
|
7 | + 'event_espresso' |
|
8 | + ), |
|
9 | + '<strong>', |
|
10 | + '</strong>' |
|
11 | + ); |
|
12 | + ?> |
|
13 | 13 | </p> |
14 | 14 | \ No newline at end of file |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | */ |
146 | 146 | function can_use_espresso_conditionals($conditional_tag) |
147 | 147 | { |
148 | - if (! did_action('AHEE__EE_System__initialize')) { |
|
148 | + if ( ! did_action('AHEE__EE_System__initialize')) { |
|
149 | 149 | EE_Error::doing_it_wrong( |
150 | 150 | __FUNCTION__, |
151 | 151 | sprintf( |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | |
166 | 166 | /*************************** Event Queries ***************************/ |
167 | 167 | |
168 | -if (! function_exists('espresso_get_events')) { |
|
168 | +if ( ! function_exists('espresso_get_events')) { |
|
169 | 169 | /** |
170 | 170 | * espresso_get_events |
171 | 171 | * |
@@ -215,10 +215,10 @@ discard block |
||
215 | 215 | */ |
216 | 216 | function espresso_load_ticket_selector() |
217 | 217 | { |
218 | - EE_Registry::instance()->load_file(EE_MODULES . 'ticket_selector', 'EED_Ticket_Selector', 'module'); |
|
218 | + EE_Registry::instance()->load_file(EE_MODULES.'ticket_selector', 'EED_Ticket_Selector', 'module'); |
|
219 | 219 | } |
220 | 220 | |
221 | -if (! function_exists('espresso_ticket_selector')) { |
|
221 | +if ( ! function_exists('espresso_ticket_selector')) { |
|
222 | 222 | /** |
223 | 223 | * espresso_ticket_selector |
224 | 224 | * |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | */ |
229 | 229 | function espresso_ticket_selector($event = null) |
230 | 230 | { |
231 | - if (! apply_filters('FHEE_disable_espresso_ticket_selector', false)) { |
|
231 | + if ( ! apply_filters('FHEE_disable_espresso_ticket_selector', false)) { |
|
232 | 232 | espresso_load_ticket_selector(); |
233 | 233 | EED_Ticket_Selector::set_definitions(); |
234 | 234 | echo EED_Ticket_Selector::display_ticket_selector($event); // already escaped |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | } |
238 | 238 | |
239 | 239 | |
240 | -if (! function_exists('espresso_view_details_btn')) { |
|
240 | +if ( ! function_exists('espresso_view_details_btn')) { |
|
241 | 241 | /** |
242 | 242 | * espresso_view_details_btn |
243 | 243 | * |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | */ |
248 | 248 | function espresso_view_details_btn($event = null) |
249 | 249 | { |
250 | - if (! apply_filters('FHEE_disable_espresso_view_details_btn', false)) { |
|
250 | + if ( ! apply_filters('FHEE_disable_espresso_view_details_btn', false)) { |
|
251 | 251 | espresso_load_ticket_selector(); |
252 | 252 | echo EED_Ticket_Selector::display_ticket_selector($event, true); // already escaped |
253 | 253 | } |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | |
258 | 258 | /*************************** EEH_Event_View ***************************/ |
259 | 259 | |
260 | -if (! function_exists('espresso_load_event_list_assets')) { |
|
260 | +if ( ! function_exists('espresso_load_event_list_assets')) { |
|
261 | 261 | /** |
262 | 262 | * espresso_load_event_list_assets |
263 | 263 | * ensures that event list styles and scripts are loaded |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | } |
274 | 274 | |
275 | 275 | |
276 | -if (! function_exists('espresso_event_reg_button')) { |
|
276 | +if ( ! function_exists('espresso_event_reg_button')) { |
|
277 | 277 | /** |
278 | 278 | * espresso_event_reg_button |
279 | 279 | * returns the "Register Now" button if event is active, |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | function espresso_event_reg_button($btn_text_if_active = null, $btn_text_if_inactive = false, $EVT_ID = false) |
291 | 291 | { |
292 | 292 | $event = EEH_Event_View::get_event($EVT_ID); |
293 | - if (! $event instanceof EE_Event) { |
|
293 | + if ( ! $event instanceof EE_Event) { |
|
294 | 294 | return; |
295 | 295 | } |
296 | 296 | $event_status = $event->get_active_status(); |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | } |
337 | 337 | |
338 | 338 | |
339 | -if (! function_exists('espresso_display_ticket_selector')) { |
|
339 | +if ( ! function_exists('espresso_display_ticket_selector')) { |
|
340 | 340 | /** |
341 | 341 | * espresso_display_ticket_selector |
342 | 342 | * whether or not to display the Ticket Selector for an event |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | } |
354 | 354 | |
355 | 355 | |
356 | -if (! function_exists('espresso_event_status_banner')) { |
|
356 | +if ( ! function_exists('espresso_event_status_banner')) { |
|
357 | 357 | /** |
358 | 358 | * espresso_event_status |
359 | 359 | * returns a banner showing the event status if it is sold out, expired, or inactive |
@@ -370,7 +370,7 @@ discard block |
||
370 | 370 | } |
371 | 371 | |
372 | 372 | |
373 | -if (! function_exists('espresso_event_status')) { |
|
373 | +if ( ! function_exists('espresso_event_status')) { |
|
374 | 374 | /** |
375 | 375 | * espresso_event_status |
376 | 376 | * returns the event status if it is sold out, expired, or inactive |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | } |
389 | 389 | |
390 | 390 | |
391 | -if (! function_exists('espresso_event_categories')) { |
|
391 | +if ( ! function_exists('espresso_event_categories')) { |
|
392 | 392 | /** |
393 | 393 | * espresso_event_categories |
394 | 394 | * returns the terms associated with an event |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | } |
412 | 412 | |
413 | 413 | |
414 | -if (! function_exists('espresso_event_tickets_available')) { |
|
414 | +if ( ! function_exists('espresso_event_tickets_available')) { |
|
415 | 415 | /** |
416 | 416 | * espresso_event_tickets_available |
417 | 417 | * returns the ticket types available for purchase for an event |
@@ -429,14 +429,14 @@ discard block |
||
429 | 429 | if (is_array($tickets) && ! empty($tickets)) { |
430 | 430 | // if formatting then $html will be a string, else it will be an array of ticket objects |
431 | 431 | $html = |
432 | - $format ? '<ul id="ee-event-tickets-ul-' . esc_attr($EVT_ID) . '" class="ee-event-tickets-ul">' : []; |
|
432 | + $format ? '<ul id="ee-event-tickets-ul-'.esc_attr($EVT_ID).'" class="ee-event-tickets-ul">' : []; |
|
433 | 433 | foreach ($tickets as $ticket) { |
434 | 434 | if ($ticket instanceof EE_Ticket) { |
435 | 435 | if ($format) { |
436 | 436 | $html .= '<li id="ee-event-tickets-li-' |
437 | 437 | . esc_attr($ticket->ID()) |
438 | 438 | . '" class="ee-event-tickets-li">'; |
439 | - $html .= esc_html($ticket->name()) . ' '; |
|
439 | + $html .= esc_html($ticket->name()).' '; |
|
440 | 440 | $html .= EEH_Template::format_currency( |
441 | 441 | $ticket->get_ticket_total_with_taxes() |
442 | 442 | ); // already escaped |
@@ -459,7 +459,7 @@ discard block |
||
459 | 459 | } |
460 | 460 | } |
461 | 461 | |
462 | -if (! function_exists('espresso_event_date_obj')) { |
|
462 | +if ( ! function_exists('espresso_event_date_obj')) { |
|
463 | 463 | /** |
464 | 464 | * espresso_event_date_obj |
465 | 465 | * returns the primary date object for an event |
@@ -476,7 +476,7 @@ discard block |
||
476 | 476 | } |
477 | 477 | |
478 | 478 | |
479 | -if (! function_exists('espresso_event_date')) { |
|
479 | +if ( ! function_exists('espresso_event_date')) { |
|
480 | 480 | /** |
481 | 481 | * espresso_event_date |
482 | 482 | * returns the primary date for an event |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | } |
506 | 506 | |
507 | 507 | |
508 | -if (! function_exists('espresso_list_of_event_dates')) { |
|
508 | +if ( ! function_exists('espresso_list_of_event_dates')) { |
|
509 | 509 | /** |
510 | 510 | * espresso_list_of_event_dates |
511 | 511 | * returns a unordered list of dates for an event |
@@ -538,14 +538,14 @@ discard block |
||
538 | 538 | $date_format = apply_filters('FHEE__espresso_list_of_event_dates__date_format', $date_format); |
539 | 539 | $time_format = apply_filters('FHEE__espresso_list_of_event_dates__time_format', $time_format); |
540 | 540 | $datetimes = EEH_Event_View::get_all_date_obj($EVT_ID, $show_expired, false, $limit); |
541 | - if (! $format) { |
|
541 | + if ( ! $format) { |
|
542 | 542 | return apply_filters('FHEE__espresso_list_of_event_dates__datetimes', $datetimes); |
543 | 543 | } |
544 | 544 | $newline = $add_breaks ? '<br />' : ''; |
545 | 545 | if (is_array($datetimes) && ! empty($datetimes)) { |
546 | 546 | global $post; |
547 | 547 | $html = |
548 | - '<ul id="ee-event-datetimes-ul-' . esc_attr($post->ID) . '" class="ee-event-datetimes-ul ee-clearfix">'; |
|
548 | + '<ul id="ee-event-datetimes-ul-'.esc_attr($post->ID).'" class="ee-event-datetimes-ul ee-clearfix">'; |
|
549 | 549 | foreach ($datetimes as $datetime) { |
550 | 550 | if ($datetime instanceof EE_Datetime) { |
551 | 551 | |
@@ -553,7 +553,7 @@ discard block |
||
553 | 553 | $datetime_html = ! empty($datetime_name) |
554 | 554 | ? ' |
555 | 555 | <strong class="ee-event-datetimes-li-date-name"> |
556 | - ' . esc_html($datetime_name) . ' |
|
556 | + ' . esc_html($datetime_name).' |
|
557 | 557 | </strong>' . $newline |
558 | 558 | : ''; |
559 | 559 | |
@@ -561,16 +561,16 @@ discard block |
||
561 | 561 | $datetime_html .= ! empty($datetime_description) |
562 | 562 | ? ' |
563 | 563 | <span class="ee-event-datetimes-li-date-desc"> |
564 | - ' . wp_kses($datetime_description, $allowedtags) . ' |
|
564 | + ' . wp_kses($datetime_description, $allowedtags).' |
|
565 | 565 | </span>' . $newline |
566 | 566 | : ''; |
567 | 567 | |
568 | 568 | $datetime_html .= ' |
569 | 569 | <span class="dashicons dashicons-calendar"></span> |
570 | - <span class="ee-event-datetimes-li-daterange">' . $datetime->date_range($date_format) . '</span> |
|
570 | + <span class="ee-event-datetimes-li-daterange">' . $datetime->date_range($date_format).'</span> |
|
571 | 571 | <br/> |
572 | 572 | <span class="dashicons dashicons-clock"></span> |
573 | - <span class="ee-event-datetimes-li-timerange">' . $datetime->time_range($time_format) . '</span> |
|
573 | + <span class="ee-event-datetimes-li-timerange">' . $datetime->time_range($time_format).'</span> |
|
574 | 574 | '; |
575 | 575 | |
576 | 576 | $datetime_html = apply_filters( |
@@ -580,11 +580,11 @@ discard block |
||
580 | 580 | ); |
581 | 581 | |
582 | 582 | $DTD_ID = esc_attr($datetime->ID()); |
583 | - $active_status = esc_attr(' ee-event-datetimes-li-' . $datetime->get_active_status()); |
|
583 | + $active_status = esc_attr(' ee-event-datetimes-li-'.$datetime->get_active_status()); |
|
584 | 584 | |
585 | 585 | $html .= ' |
586 | - <li id="ee-event-datetimes-li-' . $DTD_ID . '" class="ee-event-datetimes-li' . $active_status . '"> |
|
587 | - ' . $datetime_html . ' |
|
586 | + <li id="ee-event-datetimes-li-' . $DTD_ID.'" class="ee-event-datetimes-li'.$active_status.'"> |
|
587 | + ' . $datetime_html.' |
|
588 | 588 | </li>'; |
589 | 589 | } |
590 | 590 | } |
@@ -597,7 +597,7 @@ discard block |
||
597 | 597 | ' . esc_html__( |
598 | 598 | 'There are no upcoming dates for this event.', |
599 | 599 | 'event_espresso' |
600 | - ) . ' |
|
600 | + ).' |
|
601 | 601 | </p> |
602 | 602 | <br/>'; |
603 | 603 | } |
@@ -610,7 +610,7 @@ discard block |
||
610 | 610 | } |
611 | 611 | |
612 | 612 | |
613 | -if (! function_exists('espresso_event_end_date')) { |
|
613 | +if ( ! function_exists('espresso_event_end_date')) { |
|
614 | 614 | /** |
615 | 615 | * espresso_event_end_date |
616 | 616 | * returns the last date for an event |
@@ -637,7 +637,7 @@ discard block |
||
637 | 637 | } |
638 | 638 | } |
639 | 639 | |
640 | -if (! function_exists('espresso_event_date_range')) { |
|
640 | +if ( ! function_exists('espresso_event_date_range')) { |
|
641 | 641 | /** |
642 | 642 | * espresso_event_date_range |
643 | 643 | * returns the first and last chronologically ordered dates for an event (if different) |
@@ -695,7 +695,7 @@ discard block |
||
695 | 695 | } |
696 | 696 | } |
697 | 697 | |
698 | -if (! function_exists('espresso_next_upcoming_datetime_obj')) { |
|
698 | +if ( ! function_exists('espresso_next_upcoming_datetime_obj')) { |
|
699 | 699 | /** |
700 | 700 | * espresso_next_upcoming_datetime_obj |
701 | 701 | * returns the next upcoming datetime object for an event |
@@ -710,7 +710,7 @@ discard block |
||
710 | 710 | } |
711 | 711 | } |
712 | 712 | |
713 | -if (! function_exists('espresso_next_upcoming_datetime')) { |
|
713 | +if ( ! function_exists('espresso_next_upcoming_datetime')) { |
|
714 | 714 | /** |
715 | 715 | * espresso_next_upcoming_datetime |
716 | 716 | * returns the start date and time for the next upcoming event. |
@@ -732,11 +732,11 @@ discard block |
||
732 | 732 | $time_format = ! empty($time_format) ? $time_format : get_option('time_format'); |
733 | 733 | $time_format = apply_filters('FHEE__espresso_next_upcoming_datetime__time_format', $time_format); |
734 | 734 | |
735 | - $datetime_format = trim($date_format . ' ' . $time_format); |
|
735 | + $datetime_format = trim($date_format.' '.$time_format); |
|
736 | 736 | |
737 | 737 | $datetime = espresso_next_upcoming_datetime_obj($EVT_ID); |
738 | 738 | |
739 | - if (! $datetime instanceof EE_Datetime) { |
|
739 | + if ( ! $datetime instanceof EE_Datetime) { |
|
740 | 740 | return ''; |
741 | 741 | } |
742 | 742 | if ($echo) { |
@@ -747,7 +747,7 @@ discard block |
||
747 | 747 | } |
748 | 748 | } |
749 | 749 | |
750 | -if (! function_exists('espresso_event_date_as_calendar_page')) { |
|
750 | +if ( ! function_exists('espresso_event_date_as_calendar_page')) { |
|
751 | 751 | /** |
752 | 752 | * espresso_event_date_as_calendar_page |
753 | 753 | * returns the primary date for an event, stylized to appear as the page of a calendar |
@@ -764,7 +764,7 @@ discard block |
||
764 | 764 | } |
765 | 765 | |
766 | 766 | |
767 | -if (! function_exists('espresso_event_link_url')) { |
|
767 | +if ( ! function_exists('espresso_event_link_url')) { |
|
768 | 768 | /** |
769 | 769 | * espresso_event_link_url |
770 | 770 | * |
@@ -785,7 +785,7 @@ discard block |
||
785 | 785 | } |
786 | 786 | |
787 | 787 | |
788 | -if (! function_exists('espresso_event_has_content_or_excerpt')) { |
|
788 | +if ( ! function_exists('espresso_event_has_content_or_excerpt')) { |
|
789 | 789 | /** |
790 | 790 | * espresso_event_has_content_or_excerpt |
791 | 791 | * |
@@ -802,7 +802,7 @@ discard block |
||
802 | 802 | } |
803 | 803 | |
804 | 804 | |
805 | -if (! function_exists('espresso_event_content_or_excerpt')) { |
|
805 | +if ( ! function_exists('espresso_event_content_or_excerpt')) { |
|
806 | 806 | /** |
807 | 807 | * espresso_event_content_or_excerpt |
808 | 808 | * |
@@ -822,7 +822,7 @@ discard block |
||
822 | 822 | } |
823 | 823 | |
824 | 824 | |
825 | -if (! function_exists('espresso_event_phone')) { |
|
825 | +if ( ! function_exists('espresso_event_phone')) { |
|
826 | 826 | /** |
827 | 827 | * espresso_event_phone |
828 | 828 | * |
@@ -843,7 +843,7 @@ discard block |
||
843 | 843 | } |
844 | 844 | |
845 | 845 | |
846 | -if (! function_exists('espresso_edit_event_link')) { |
|
846 | +if ( ! function_exists('espresso_edit_event_link')) { |
|
847 | 847 | /** |
848 | 848 | * espresso_edit_event_link |
849 | 849 | * returns a link to edit an event |
@@ -865,7 +865,7 @@ discard block |
||
865 | 865 | } |
866 | 866 | |
867 | 867 | |
868 | -if (! function_exists('espresso_organization_name')) { |
|
868 | +if ( ! function_exists('espresso_organization_name')) { |
|
869 | 869 | /** |
870 | 870 | * espresso_organization_name |
871 | 871 | * |
@@ -883,7 +883,7 @@ discard block |
||
883 | 883 | } |
884 | 884 | } |
885 | 885 | |
886 | -if (! function_exists('espresso_organization_address')) { |
|
886 | +if ( ! function_exists('espresso_organization_address')) { |
|
887 | 887 | /** |
888 | 888 | * espresso_organization_address |
889 | 889 | * |
@@ -907,7 +907,7 @@ discard block |
||
907 | 907 | } |
908 | 908 | } |
909 | 909 | |
910 | -if (! function_exists('espresso_organization_email')) { |
|
910 | +if ( ! function_exists('espresso_organization_email')) { |
|
911 | 911 | /** |
912 | 912 | * espresso_organization_email |
913 | 913 | * |
@@ -925,7 +925,7 @@ discard block |
||
925 | 925 | } |
926 | 926 | } |
927 | 927 | |
928 | -if (! function_exists('espresso_organization_logo_url')) { |
|
928 | +if ( ! function_exists('espresso_organization_logo_url')) { |
|
929 | 929 | /** |
930 | 930 | * espresso_organization_logo_url |
931 | 931 | * |
@@ -943,7 +943,7 @@ discard block |
||
943 | 943 | } |
944 | 944 | } |
945 | 945 | |
946 | -if (! function_exists('espresso_organization_facebook')) { |
|
946 | +if ( ! function_exists('espresso_organization_facebook')) { |
|
947 | 947 | /** |
948 | 948 | * espresso_organization_facebook |
949 | 949 | * |
@@ -961,7 +961,7 @@ discard block |
||
961 | 961 | } |
962 | 962 | } |
963 | 963 | |
964 | -if (! function_exists('espresso_organization_twitter')) { |
|
964 | +if ( ! function_exists('espresso_organization_twitter')) { |
|
965 | 965 | /** |
966 | 966 | * espresso_organization_twitter |
967 | 967 | * |
@@ -979,7 +979,7 @@ discard block |
||
979 | 979 | } |
980 | 980 | } |
981 | 981 | |
982 | -if (! function_exists('espresso_organization_linkedin')) { |
|
982 | +if ( ! function_exists('espresso_organization_linkedin')) { |
|
983 | 983 | /** |
984 | 984 | * espresso_organization_linkedin |
985 | 985 | * |
@@ -997,7 +997,7 @@ discard block |
||
997 | 997 | } |
998 | 998 | } |
999 | 999 | |
1000 | -if (! function_exists('espresso_organization_pinterest')) { |
|
1000 | +if ( ! function_exists('espresso_organization_pinterest')) { |
|
1001 | 1001 | /** |
1002 | 1002 | * espresso_organization_pinterest |
1003 | 1003 | * |
@@ -1015,7 +1015,7 @@ discard block |
||
1015 | 1015 | } |
1016 | 1016 | } |
1017 | 1017 | |
1018 | -if (! function_exists('espresso_organization_google')) { |
|
1018 | +if ( ! function_exists('espresso_organization_google')) { |
|
1019 | 1019 | /** |
1020 | 1020 | * espresso_organization_google |
1021 | 1021 | * |
@@ -1033,7 +1033,7 @@ discard block |
||
1033 | 1033 | } |
1034 | 1034 | } |
1035 | 1035 | |
1036 | -if (! function_exists('espresso_organization_instagram')) { |
|
1036 | +if ( ! function_exists('espresso_organization_instagram')) { |
|
1037 | 1037 | /** |
1038 | 1038 | * espresso_organization_instagram |
1039 | 1039 | * |
@@ -1055,7 +1055,7 @@ discard block |
||
1055 | 1055 | /*************************** EEH_Venue_View ***************************/ |
1056 | 1056 | |
1057 | 1057 | |
1058 | -if (! function_exists('espresso_event_venues')) { |
|
1058 | +if ( ! function_exists('espresso_event_venues')) { |
|
1059 | 1059 | /** |
1060 | 1060 | * espresso_event_venues |
1061 | 1061 | * |
@@ -1070,7 +1070,7 @@ discard block |
||
1070 | 1070 | } |
1071 | 1071 | |
1072 | 1072 | |
1073 | -if (! function_exists('espresso_venue_id')) { |
|
1073 | +if ( ! function_exists('espresso_venue_id')) { |
|
1074 | 1074 | /** |
1075 | 1075 | * espresso_venue_name |
1076 | 1076 | * |
@@ -1088,7 +1088,7 @@ discard block |
||
1088 | 1088 | } |
1089 | 1089 | |
1090 | 1090 | |
1091 | -if (! function_exists('espresso_is_venue_private')) { |
|
1091 | +if ( ! function_exists('espresso_is_venue_private')) { |
|
1092 | 1092 | /** |
1093 | 1093 | * Return whether a venue is private or not. |
1094 | 1094 | * |
@@ -1106,7 +1106,7 @@ discard block |
||
1106 | 1106 | } |
1107 | 1107 | |
1108 | 1108 | |
1109 | -if (! function_exists('espresso_venue_is_password_protected')) { |
|
1109 | +if ( ! function_exists('espresso_venue_is_password_protected')) { |
|
1110 | 1110 | /** |
1111 | 1111 | * returns true or false if a venue is password protected or not |
1112 | 1112 | * |
@@ -1123,7 +1123,7 @@ discard block |
||
1123 | 1123 | } |
1124 | 1124 | |
1125 | 1125 | |
1126 | -if (! function_exists('espresso_password_protected_venue_form')) { |
|
1126 | +if ( ! function_exists('espresso_password_protected_venue_form')) { |
|
1127 | 1127 | /** |
1128 | 1128 | * Returns a password form if venue is password protected. |
1129 | 1129 | * |
@@ -1140,7 +1140,7 @@ discard block |
||
1140 | 1140 | } |
1141 | 1141 | |
1142 | 1142 | |
1143 | -if (! function_exists('espresso_venue_name')) { |
|
1143 | +if ( ! function_exists('espresso_venue_name')) { |
|
1144 | 1144 | /** |
1145 | 1145 | * espresso_venue_name |
1146 | 1146 | * |
@@ -1163,7 +1163,7 @@ discard block |
||
1163 | 1163 | } |
1164 | 1164 | |
1165 | 1165 | |
1166 | -if (! function_exists('espresso_venue_link')) { |
|
1166 | +if ( ! function_exists('espresso_venue_link')) { |
|
1167 | 1167 | /** |
1168 | 1168 | * espresso_venue_link |
1169 | 1169 | * |
@@ -1181,7 +1181,7 @@ discard block |
||
1181 | 1181 | } |
1182 | 1182 | |
1183 | 1183 | |
1184 | -if (! function_exists('espresso_venue_description')) { |
|
1184 | +if ( ! function_exists('espresso_venue_description')) { |
|
1185 | 1185 | /** |
1186 | 1186 | * espresso_venue_description |
1187 | 1187 | * |
@@ -1203,7 +1203,7 @@ discard block |
||
1203 | 1203 | } |
1204 | 1204 | |
1205 | 1205 | |
1206 | -if (! function_exists('espresso_venue_excerpt')) { |
|
1206 | +if ( ! function_exists('espresso_venue_excerpt')) { |
|
1207 | 1207 | /** |
1208 | 1208 | * espresso_venue_excerpt |
1209 | 1209 | * |
@@ -1225,7 +1225,7 @@ discard block |
||
1225 | 1225 | } |
1226 | 1226 | |
1227 | 1227 | |
1228 | -if (! function_exists('espresso_venue_categories')) { |
|
1228 | +if ( ! function_exists('espresso_venue_categories')) { |
|
1229 | 1229 | /** |
1230 | 1230 | * espresso_venue_categories |
1231 | 1231 | * returns the terms associated with a venue |
@@ -1248,7 +1248,7 @@ discard block |
||
1248 | 1248 | } |
1249 | 1249 | |
1250 | 1250 | |
1251 | -if (! function_exists('espresso_venue_address')) { |
|
1251 | +if ( ! function_exists('espresso_venue_address')) { |
|
1252 | 1252 | /** |
1253 | 1253 | * espresso_venue_address |
1254 | 1254 | * returns a formatted block of html for displaying a venue's address |
@@ -1271,7 +1271,7 @@ discard block |
||
1271 | 1271 | } |
1272 | 1272 | |
1273 | 1273 | |
1274 | -if (! function_exists('espresso_venue_raw_address')) { |
|
1274 | +if ( ! function_exists('espresso_venue_raw_address')) { |
|
1275 | 1275 | /** |
1276 | 1276 | * espresso_venue_address |
1277 | 1277 | * returns an UN-formatted string containing a venue's address |
@@ -1294,7 +1294,7 @@ discard block |
||
1294 | 1294 | } |
1295 | 1295 | |
1296 | 1296 | |
1297 | -if (! function_exists('espresso_venue_has_address')) { |
|
1297 | +if ( ! function_exists('espresso_venue_has_address')) { |
|
1298 | 1298 | /** |
1299 | 1299 | * espresso_venue_has_address |
1300 | 1300 | * returns TRUE or FALSE if a Venue has address information |
@@ -1311,7 +1311,7 @@ discard block |
||
1311 | 1311 | } |
1312 | 1312 | |
1313 | 1313 | |
1314 | -if (! function_exists('espresso_venue_gmap')) { |
|
1314 | +if ( ! function_exists('espresso_venue_gmap')) { |
|
1315 | 1315 | /** |
1316 | 1316 | * espresso_venue_gmap |
1317 | 1317 | * returns a google map for the venue address |
@@ -1335,7 +1335,7 @@ discard block |
||
1335 | 1335 | } |
1336 | 1336 | |
1337 | 1337 | |
1338 | -if (! function_exists('espresso_venue_phone')) { |
|
1338 | +if ( ! function_exists('espresso_venue_phone')) { |
|
1339 | 1339 | /** |
1340 | 1340 | * espresso_venue_phone |
1341 | 1341 | * |
@@ -1356,7 +1356,7 @@ discard block |
||
1356 | 1356 | } |
1357 | 1357 | |
1358 | 1358 | |
1359 | -if (! function_exists('espresso_venue_website')) { |
|
1359 | +if ( ! function_exists('espresso_venue_website')) { |
|
1360 | 1360 | /** |
1361 | 1361 | * espresso_venue_website |
1362 | 1362 | * |
@@ -1377,7 +1377,7 @@ discard block |
||
1377 | 1377 | } |
1378 | 1378 | |
1379 | 1379 | |
1380 | -if (! function_exists('espresso_edit_venue_link')) { |
|
1380 | +if ( ! function_exists('espresso_edit_venue_link')) { |
|
1381 | 1381 | /** |
1382 | 1382 | * espresso_edit_venue_link |
1383 | 1383 | * |
@@ -19,13 +19,13 @@ discard block |
||
19 | 19 | */ |
20 | 20 | function is_espresso_event($event = null) |
21 | 21 | { |
22 | - if (can_use_espresso_conditionals(__FUNCTION__)) { |
|
23 | - // extract EE_Event object from passed param regardless of what it is (within reason of course) |
|
24 | - $event = EEH_Event_View::get_event($event); |
|
25 | - // do we have a valid event ? |
|
26 | - return $event instanceof EE_Event; |
|
27 | - } |
|
28 | - return false; |
|
22 | + if (can_use_espresso_conditionals(__FUNCTION__)) { |
|
23 | + // extract EE_Event object from passed param regardless of what it is (within reason of course) |
|
24 | + $event = EEH_Event_View::get_event($event); |
|
25 | + // do we have a valid event ? |
|
26 | + return $event instanceof EE_Event; |
|
27 | + } |
|
28 | + return false; |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
@@ -36,12 +36,12 @@ discard block |
||
36 | 36 | */ |
37 | 37 | function is_espresso_event_single() |
38 | 38 | { |
39 | - if (can_use_espresso_conditionals(__FUNCTION__)) { |
|
40 | - global $wp_query; |
|
41 | - // return conditionals set by CPTs |
|
42 | - return $wp_query instanceof WP_Query ? $wp_query->is_espresso_event_single : false; |
|
43 | - } |
|
44 | - return false; |
|
39 | + if (can_use_espresso_conditionals(__FUNCTION__)) { |
|
40 | + global $wp_query; |
|
41 | + // return conditionals set by CPTs |
|
42 | + return $wp_query instanceof WP_Query ? $wp_query->is_espresso_event_single : false; |
|
43 | + } |
|
44 | + return false; |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
@@ -52,11 +52,11 @@ discard block |
||
52 | 52 | */ |
53 | 53 | function is_espresso_event_archive() |
54 | 54 | { |
55 | - if (can_use_espresso_conditionals(__FUNCTION__)) { |
|
56 | - global $wp_query; |
|
57 | - return $wp_query instanceof WP_Query ? $wp_query->is_espresso_event_archive : false; |
|
58 | - } |
|
59 | - return false; |
|
55 | + if (can_use_espresso_conditionals(__FUNCTION__)) { |
|
56 | + global $wp_query; |
|
57 | + return $wp_query instanceof WP_Query ? $wp_query->is_espresso_event_archive : false; |
|
58 | + } |
|
59 | + return false; |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | /** |
@@ -67,11 +67,11 @@ discard block |
||
67 | 67 | */ |
68 | 68 | function is_espresso_event_taxonomy() |
69 | 69 | { |
70 | - if (can_use_espresso_conditionals(__FUNCTION__)) { |
|
71 | - global $wp_query; |
|
72 | - return $wp_query instanceof WP_Query ? $wp_query->is_espresso_event_taxonomy : false; |
|
73 | - } |
|
74 | - return false; |
|
70 | + if (can_use_espresso_conditionals(__FUNCTION__)) { |
|
71 | + global $wp_query; |
|
72 | + return $wp_query instanceof WP_Query ? $wp_query->is_espresso_event_taxonomy : false; |
|
73 | + } |
|
74 | + return false; |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |
@@ -85,13 +85,13 @@ discard block |
||
85 | 85 | */ |
86 | 86 | function is_espresso_venue($venue = null) |
87 | 87 | { |
88 | - if (can_use_espresso_conditionals(__FUNCTION__)) { |
|
89 | - // extract EE_Venue object from passed param regardless of what it is (within reason of course) |
|
90 | - $venue = EEH_Venue_View::get_venue($venue, false); |
|
91 | - // do we have a valid event ? |
|
92 | - return $venue instanceof EE_Venue; |
|
93 | - } |
|
94 | - return false; |
|
88 | + if (can_use_espresso_conditionals(__FUNCTION__)) { |
|
89 | + // extract EE_Venue object from passed param regardless of what it is (within reason of course) |
|
90 | + $venue = EEH_Venue_View::get_venue($venue, false); |
|
91 | + // do we have a valid event ? |
|
92 | + return $venue instanceof EE_Venue; |
|
93 | + } |
|
94 | + return false; |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | /** |
@@ -102,11 +102,11 @@ discard block |
||
102 | 102 | */ |
103 | 103 | function is_espresso_venue_single() |
104 | 104 | { |
105 | - if (can_use_espresso_conditionals(__FUNCTION__)) { |
|
106 | - global $wp_query; |
|
107 | - return $wp_query instanceof WP_Query ? $wp_query->is_espresso_venue_single : false; |
|
108 | - } |
|
109 | - return false; |
|
105 | + if (can_use_espresso_conditionals(__FUNCTION__)) { |
|
106 | + global $wp_query; |
|
107 | + return $wp_query instanceof WP_Query ? $wp_query->is_espresso_venue_single : false; |
|
108 | + } |
|
109 | + return false; |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | /** |
@@ -117,11 +117,11 @@ discard block |
||
117 | 117 | */ |
118 | 118 | function is_espresso_venue_archive() |
119 | 119 | { |
120 | - if (can_use_espresso_conditionals(__FUNCTION__)) { |
|
121 | - global $wp_query; |
|
122 | - return $wp_query instanceof WP_Query ? $wp_query->is_espresso_venue_archive : false; |
|
123 | - } |
|
124 | - return false; |
|
120 | + if (can_use_espresso_conditionals(__FUNCTION__)) { |
|
121 | + global $wp_query; |
|
122 | + return $wp_query instanceof WP_Query ? $wp_query->is_espresso_venue_archive : false; |
|
123 | + } |
|
124 | + return false; |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | /** |
@@ -132,11 +132,11 @@ discard block |
||
132 | 132 | */ |
133 | 133 | function is_espresso_venue_taxonomy() |
134 | 134 | { |
135 | - if (can_use_espresso_conditionals(__FUNCTION__)) { |
|
136 | - global $wp_query; |
|
137 | - return $wp_query instanceof WP_Query ? $wp_query->is_espresso_venue_taxonomy : false; |
|
138 | - } |
|
139 | - return false; |
|
135 | + if (can_use_espresso_conditionals(__FUNCTION__)) { |
|
136 | + global $wp_query; |
|
137 | + return $wp_query instanceof WP_Query ? $wp_query->is_espresso_venue_taxonomy : false; |
|
138 | + } |
|
139 | + return false; |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | /** |
@@ -148,62 +148,62 @@ discard block |
||
148 | 148 | */ |
149 | 149 | function can_use_espresso_conditionals($conditional_tag) |
150 | 150 | { |
151 | - if (! did_action('AHEE__EE_System__initialize')) { |
|
152 | - EE_Error::doing_it_wrong( |
|
153 | - __FUNCTION__, |
|
154 | - sprintf( |
|
155 | - esc_html__( |
|
156 | - '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.', |
|
157 | - 'event_espresso' |
|
158 | - ), |
|
159 | - $conditional_tag |
|
160 | - ), |
|
161 | - '4.4.0' |
|
162 | - ); |
|
163 | - return false; |
|
164 | - } |
|
165 | - return true; |
|
151 | + if (! did_action('AHEE__EE_System__initialize')) { |
|
152 | + EE_Error::doing_it_wrong( |
|
153 | + __FUNCTION__, |
|
154 | + sprintf( |
|
155 | + esc_html__( |
|
156 | + '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.', |
|
157 | + 'event_espresso' |
|
158 | + ), |
|
159 | + $conditional_tag |
|
160 | + ), |
|
161 | + '4.4.0' |
|
162 | + ); |
|
163 | + return false; |
|
164 | + } |
|
165 | + return true; |
|
166 | 166 | } |
167 | 167 | |
168 | 168 | |
169 | 169 | /*************************** Event Queries ***************************/ |
170 | 170 | |
171 | 171 | if (! function_exists('espresso_get_events')) { |
172 | - /** |
|
173 | - * espresso_get_events |
|
174 | - * |
|
175 | - * @param array $params |
|
176 | - * @return array |
|
177 | - */ |
|
178 | - function espresso_get_events($params = []) |
|
179 | - { |
|
180 | - //set default params |
|
181 | - $default_espresso_events_params = [ |
|
182 | - 'limit' => 10, |
|
183 | - 'show_expired' => false, |
|
184 | - 'month' => null, |
|
185 | - 'category_slug' => null, |
|
186 | - 'order_by' => 'start_date', |
|
187 | - 'sort' => 'ASC', |
|
188 | - ]; |
|
189 | - // allow the defaults to be filtered |
|
190 | - $default_espresso_events_params = apply_filters( |
|
191 | - 'espresso_get_events__default_espresso_events_params', |
|
192 | - $default_espresso_events_params |
|
193 | - ); |
|
194 | - // grab params and merge with defaults, then extract |
|
195 | - $params = array_merge($default_espresso_events_params, $params); |
|
196 | - // run the query |
|
197 | - $events_query = new EventEspresso\core\domain\services\wp_queries\EventListQuery($params); |
|
198 | - // assign results to a variable so we can return it |
|
199 | - $events = $events_query->have_posts() ? $events_query->posts : []; |
|
200 | - // but first reset the query and postdata |
|
201 | - wp_reset_query(); |
|
202 | - wp_reset_postdata(); |
|
203 | - EED_Events_Archive::remove_all_events_archive_filters(); |
|
204 | - unset($events_query); |
|
205 | - return $events; |
|
206 | - } |
|
172 | + /** |
|
173 | + * espresso_get_events |
|
174 | + * |
|
175 | + * @param array $params |
|
176 | + * @return array |
|
177 | + */ |
|
178 | + function espresso_get_events($params = []) |
|
179 | + { |
|
180 | + //set default params |
|
181 | + $default_espresso_events_params = [ |
|
182 | + 'limit' => 10, |
|
183 | + 'show_expired' => false, |
|
184 | + 'month' => null, |
|
185 | + 'category_slug' => null, |
|
186 | + 'order_by' => 'start_date', |
|
187 | + 'sort' => 'ASC', |
|
188 | + ]; |
|
189 | + // allow the defaults to be filtered |
|
190 | + $default_espresso_events_params = apply_filters( |
|
191 | + 'espresso_get_events__default_espresso_events_params', |
|
192 | + $default_espresso_events_params |
|
193 | + ); |
|
194 | + // grab params and merge with defaults, then extract |
|
195 | + $params = array_merge($default_espresso_events_params, $params); |
|
196 | + // run the query |
|
197 | + $events_query = new EventEspresso\core\domain\services\wp_queries\EventListQuery($params); |
|
198 | + // assign results to a variable so we can return it |
|
199 | + $events = $events_query->have_posts() ? $events_query->posts : []; |
|
200 | + // but first reset the query and postdata |
|
201 | + wp_reset_query(); |
|
202 | + wp_reset_postdata(); |
|
203 | + EED_Events_Archive::remove_all_events_archive_filters(); |
|
204 | + unset($events_query); |
|
205 | + return $events; |
|
206 | + } |
|
207 | 207 | } |
208 | 208 | |
209 | 209 | |
@@ -218,357 +218,357 @@ discard block |
||
218 | 218 | */ |
219 | 219 | function espresso_load_ticket_selector() |
220 | 220 | { |
221 | - EE_Registry::instance()->load_file(EE_MODULES . 'ticket_selector', 'EED_Ticket_Selector', 'module'); |
|
221 | + EE_Registry::instance()->load_file(EE_MODULES . 'ticket_selector', 'EED_Ticket_Selector', 'module'); |
|
222 | 222 | } |
223 | 223 | |
224 | 224 | if (! function_exists('espresso_ticket_selector')) { |
225 | - /** |
|
226 | - * espresso_ticket_selector |
|
227 | - * |
|
228 | - * @param null $event |
|
229 | - * @throws EE_Error |
|
230 | - * @throws ReflectionException |
|
231 | - */ |
|
232 | - function espresso_ticket_selector($event = null) |
|
233 | - { |
|
234 | - if (! apply_filters('FHEE_disable_espresso_ticket_selector', false)) { |
|
235 | - espresso_load_ticket_selector(); |
|
236 | - EED_Ticket_Selector::set_definitions(); |
|
237 | - echo EED_Ticket_Selector::display_ticket_selector($event); // already escaped |
|
238 | - } |
|
239 | - } |
|
225 | + /** |
|
226 | + * espresso_ticket_selector |
|
227 | + * |
|
228 | + * @param null $event |
|
229 | + * @throws EE_Error |
|
230 | + * @throws ReflectionException |
|
231 | + */ |
|
232 | + function espresso_ticket_selector($event = null) |
|
233 | + { |
|
234 | + if (! apply_filters('FHEE_disable_espresso_ticket_selector', false)) { |
|
235 | + espresso_load_ticket_selector(); |
|
236 | + EED_Ticket_Selector::set_definitions(); |
|
237 | + echo EED_Ticket_Selector::display_ticket_selector($event); // already escaped |
|
238 | + } |
|
239 | + } |
|
240 | 240 | } |
241 | 241 | |
242 | 242 | |
243 | 243 | if (! function_exists('espresso_view_details_btn')) { |
244 | - /** |
|
245 | - * espresso_view_details_btn |
|
246 | - * |
|
247 | - * @param null $event |
|
248 | - * @throws EE_Error |
|
249 | - * @throws ReflectionException |
|
250 | - */ |
|
251 | - function espresso_view_details_btn($event = null) |
|
252 | - { |
|
253 | - if (! apply_filters('FHEE_disable_espresso_view_details_btn', false)) { |
|
254 | - espresso_load_ticket_selector(); |
|
255 | - echo EED_Ticket_Selector::display_ticket_selector($event, true); // already escaped |
|
256 | - } |
|
257 | - } |
|
244 | + /** |
|
245 | + * espresso_view_details_btn |
|
246 | + * |
|
247 | + * @param null $event |
|
248 | + * @throws EE_Error |
|
249 | + * @throws ReflectionException |
|
250 | + */ |
|
251 | + function espresso_view_details_btn($event = null) |
|
252 | + { |
|
253 | + if (! apply_filters('FHEE_disable_espresso_view_details_btn', false)) { |
|
254 | + espresso_load_ticket_selector(); |
|
255 | + echo EED_Ticket_Selector::display_ticket_selector($event, true); // already escaped |
|
256 | + } |
|
257 | + } |
|
258 | 258 | } |
259 | 259 | |
260 | 260 | |
261 | 261 | /*************************** EEH_Event_View ***************************/ |
262 | 262 | |
263 | 263 | if (! function_exists('espresso_load_event_list_assets')) { |
264 | - /** |
|
265 | - * espresso_load_event_list_assets |
|
266 | - * ensures that event list styles and scripts are loaded |
|
267 | - * |
|
268 | - * @return void |
|
269 | - */ |
|
270 | - function espresso_load_event_list_assets() |
|
271 | - { |
|
272 | - $event_list = EED_Events_Archive::instance(); |
|
273 | - add_action('AHEE__EE_System__initialize_last', [$event_list, 'load_event_list_assets'], 10); |
|
274 | - add_filter('FHEE_enable_default_espresso_css', '__return_true'); |
|
275 | - } |
|
264 | + /** |
|
265 | + * espresso_load_event_list_assets |
|
266 | + * ensures that event list styles and scripts are loaded |
|
267 | + * |
|
268 | + * @return void |
|
269 | + */ |
|
270 | + function espresso_load_event_list_assets() |
|
271 | + { |
|
272 | + $event_list = EED_Events_Archive::instance(); |
|
273 | + add_action('AHEE__EE_System__initialize_last', [$event_list, 'load_event_list_assets'], 10); |
|
274 | + add_filter('FHEE_enable_default_espresso_css', '__return_true'); |
|
275 | + } |
|
276 | 276 | } |
277 | 277 | |
278 | 278 | |
279 | 279 | if (! function_exists('espresso_event_reg_button')) { |
280 | - /** |
|
281 | - * espresso_event_reg_button |
|
282 | - * returns the "Register Now" button if event is active, |
|
283 | - * an inactive button like status banner if the event is not active |
|
284 | - * or a "Read More" button if so desired |
|
285 | - * |
|
286 | - * @param null $btn_text_if_active |
|
287 | - * @param bool $btn_text_if_inactive |
|
288 | - * @param bool $EVT_ID |
|
289 | - * @return void |
|
290 | - * @throws EE_Error |
|
291 | - * @throws ReflectionException |
|
292 | - */ |
|
293 | - function espresso_event_reg_button($btn_text_if_active = null, $btn_text_if_inactive = false, $EVT_ID = false) |
|
294 | - { |
|
295 | - $event = EEH_Event_View::get_event($EVT_ID); |
|
296 | - if (! $event instanceof EE_Event) { |
|
297 | - return; |
|
298 | - } |
|
299 | - $event_status = $event->get_active_status(); |
|
300 | - switch ($event_status) { |
|
301 | - case EE_Datetime::sold_out : |
|
302 | - $btn_text = __('Sold Out', 'event_espresso'); |
|
303 | - $class = 'ee-pink'; |
|
304 | - break; |
|
305 | - case EE_Datetime::expired : |
|
306 | - $btn_text = __('Event is Over', 'event_espresso'); |
|
307 | - $class = 'ee-grey'; |
|
308 | - break; |
|
309 | - case EE_Datetime::inactive : |
|
310 | - $btn_text = __('Event Not Active', 'event_espresso'); |
|
311 | - $class = 'ee-grey'; |
|
312 | - break; |
|
313 | - case EE_Datetime::cancelled : |
|
314 | - $btn_text = __('Event was Cancelled', 'event_espresso'); |
|
315 | - $class = 'ee-red'; |
|
316 | - break; |
|
317 | - case EE_Datetime::upcoming : |
|
318 | - case EE_Datetime::active : |
|
319 | - default : |
|
320 | - $btn_text = ! empty($btn_text_if_active) |
|
321 | - ? $btn_text_if_active |
|
322 | - : __('Register Now', 'event_espresso'); |
|
323 | - $class = 'ee-green'; |
|
324 | - } |
|
325 | - if ($event_status < 1 && ! empty($btn_text_if_inactive)) { |
|
326 | - $btn_text = $btn_text_if_inactive; |
|
327 | - $class = 'ee-grey'; |
|
328 | - } |
|
329 | - ?> |
|
280 | + /** |
|
281 | + * espresso_event_reg_button |
|
282 | + * returns the "Register Now" button if event is active, |
|
283 | + * an inactive button like status banner if the event is not active |
|
284 | + * or a "Read More" button if so desired |
|
285 | + * |
|
286 | + * @param null $btn_text_if_active |
|
287 | + * @param bool $btn_text_if_inactive |
|
288 | + * @param bool $EVT_ID |
|
289 | + * @return void |
|
290 | + * @throws EE_Error |
|
291 | + * @throws ReflectionException |
|
292 | + */ |
|
293 | + function espresso_event_reg_button($btn_text_if_active = null, $btn_text_if_inactive = false, $EVT_ID = false) |
|
294 | + { |
|
295 | + $event = EEH_Event_View::get_event($EVT_ID); |
|
296 | + if (! $event instanceof EE_Event) { |
|
297 | + return; |
|
298 | + } |
|
299 | + $event_status = $event->get_active_status(); |
|
300 | + switch ($event_status) { |
|
301 | + case EE_Datetime::sold_out : |
|
302 | + $btn_text = __('Sold Out', 'event_espresso'); |
|
303 | + $class = 'ee-pink'; |
|
304 | + break; |
|
305 | + case EE_Datetime::expired : |
|
306 | + $btn_text = __('Event is Over', 'event_espresso'); |
|
307 | + $class = 'ee-grey'; |
|
308 | + break; |
|
309 | + case EE_Datetime::inactive : |
|
310 | + $btn_text = __('Event Not Active', 'event_espresso'); |
|
311 | + $class = 'ee-grey'; |
|
312 | + break; |
|
313 | + case EE_Datetime::cancelled : |
|
314 | + $btn_text = __('Event was Cancelled', 'event_espresso'); |
|
315 | + $class = 'ee-red'; |
|
316 | + break; |
|
317 | + case EE_Datetime::upcoming : |
|
318 | + case EE_Datetime::active : |
|
319 | + default : |
|
320 | + $btn_text = ! empty($btn_text_if_active) |
|
321 | + ? $btn_text_if_active |
|
322 | + : __('Register Now', 'event_espresso'); |
|
323 | + $class = 'ee-green'; |
|
324 | + } |
|
325 | + if ($event_status < 1 && ! empty($btn_text_if_inactive)) { |
|
326 | + $btn_text = $btn_text_if_inactive; |
|
327 | + $class = 'ee-grey'; |
|
328 | + } |
|
329 | + ?> |
|
330 | 330 | <a class="ee-button ee-register-button <?php echo esc_attr($class); ?>" |
331 | 331 | href="<?php espresso_event_link_url($EVT_ID); ?>" |
332 | 332 | <?php echo EED_Events_Archive::link_target(); // already escaped |
333 | - ?> |
|
333 | + ?> |
|
334 | 334 | > |
335 | 335 | <?php echo esc_html($btn_text); ?> |
336 | 336 | </a> |
337 | 337 | <?php |
338 | - } |
|
338 | + } |
|
339 | 339 | } |
340 | 340 | |
341 | 341 | |
342 | 342 | if (! function_exists('espresso_display_ticket_selector')) { |
343 | - /** |
|
344 | - * espresso_display_ticket_selector |
|
345 | - * whether or not to display the Ticket Selector for an event |
|
346 | - * |
|
347 | - * @param bool $EVT_ID |
|
348 | - * @return boolean |
|
349 | - * @throws EE_Error |
|
350 | - * @throws ReflectionException |
|
351 | - */ |
|
352 | - function espresso_display_ticket_selector($EVT_ID = false) |
|
353 | - { |
|
354 | - return EEH_Event_View::display_ticket_selector($EVT_ID); |
|
355 | - } |
|
343 | + /** |
|
344 | + * espresso_display_ticket_selector |
|
345 | + * whether or not to display the Ticket Selector for an event |
|
346 | + * |
|
347 | + * @param bool $EVT_ID |
|
348 | + * @return boolean |
|
349 | + * @throws EE_Error |
|
350 | + * @throws ReflectionException |
|
351 | + */ |
|
352 | + function espresso_display_ticket_selector($EVT_ID = false) |
|
353 | + { |
|
354 | + return EEH_Event_View::display_ticket_selector($EVT_ID); |
|
355 | + } |
|
356 | 356 | } |
357 | 357 | |
358 | 358 | |
359 | 359 | if (! function_exists('espresso_event_status_banner')) { |
360 | - /** |
|
361 | - * espresso_event_status |
|
362 | - * returns a banner showing the event status if it is sold out, expired, or inactive |
|
363 | - * |
|
364 | - * @param bool $EVT_ID |
|
365 | - * @return string |
|
366 | - * @throws EE_Error |
|
367 | - * @throws ReflectionException |
|
368 | - */ |
|
369 | - function espresso_event_status_banner($EVT_ID = false) |
|
370 | - { |
|
371 | - return EEH_Event_View::event_status($EVT_ID); |
|
372 | - } |
|
360 | + /** |
|
361 | + * espresso_event_status |
|
362 | + * returns a banner showing the event status if it is sold out, expired, or inactive |
|
363 | + * |
|
364 | + * @param bool $EVT_ID |
|
365 | + * @return string |
|
366 | + * @throws EE_Error |
|
367 | + * @throws ReflectionException |
|
368 | + */ |
|
369 | + function espresso_event_status_banner($EVT_ID = false) |
|
370 | + { |
|
371 | + return EEH_Event_View::event_status($EVT_ID); |
|
372 | + } |
|
373 | 373 | } |
374 | 374 | |
375 | 375 | |
376 | 376 | if (! function_exists('espresso_event_status')) { |
377 | - /** |
|
378 | - * espresso_event_status |
|
379 | - * returns the event status if it is sold out, expired, or inactive |
|
380 | - * |
|
381 | - * @param int $EVT_ID |
|
382 | - * @param bool $echo |
|
383 | - * @return string |
|
384 | - * @throws EE_Error |
|
385 | - * @throws ReflectionException |
|
386 | - */ |
|
387 | - function espresso_event_status($EVT_ID = 0, $echo = true) |
|
388 | - { |
|
389 | - return EEH_Event_View::event_active_status($EVT_ID, $echo); |
|
390 | - } |
|
377 | + /** |
|
378 | + * espresso_event_status |
|
379 | + * returns the event status if it is sold out, expired, or inactive |
|
380 | + * |
|
381 | + * @param int $EVT_ID |
|
382 | + * @param bool $echo |
|
383 | + * @return string |
|
384 | + * @throws EE_Error |
|
385 | + * @throws ReflectionException |
|
386 | + */ |
|
387 | + function espresso_event_status($EVT_ID = 0, $echo = true) |
|
388 | + { |
|
389 | + return EEH_Event_View::event_active_status($EVT_ID, $echo); |
|
390 | + } |
|
391 | 391 | } |
392 | 392 | |
393 | 393 | |
394 | 394 | if (! function_exists('espresso_event_categories')) { |
395 | - /** |
|
396 | - * espresso_event_categories |
|
397 | - * returns the terms associated with an event |
|
398 | - * |
|
399 | - * @param int $EVT_ID |
|
400 | - * @param bool $hide_uncategorized |
|
401 | - * @param bool $echo |
|
402 | - * @return string |
|
403 | - * @throws EE_Error |
|
404 | - * @throws ReflectionException |
|
405 | - */ |
|
406 | - function espresso_event_categories($EVT_ID = 0, $hide_uncategorized = true, $echo = true) |
|
407 | - { |
|
408 | - if ($echo) { |
|
409 | - echo EEH_Event_View::event_categories($EVT_ID, $hide_uncategorized); // already escaped |
|
410 | - return ''; |
|
411 | - } |
|
412 | - return EEH_Event_View::event_categories($EVT_ID, $hide_uncategorized); |
|
413 | - } |
|
395 | + /** |
|
396 | + * espresso_event_categories |
|
397 | + * returns the terms associated with an event |
|
398 | + * |
|
399 | + * @param int $EVT_ID |
|
400 | + * @param bool $hide_uncategorized |
|
401 | + * @param bool $echo |
|
402 | + * @return string |
|
403 | + * @throws EE_Error |
|
404 | + * @throws ReflectionException |
|
405 | + */ |
|
406 | + function espresso_event_categories($EVT_ID = 0, $hide_uncategorized = true, $echo = true) |
|
407 | + { |
|
408 | + if ($echo) { |
|
409 | + echo EEH_Event_View::event_categories($EVT_ID, $hide_uncategorized); // already escaped |
|
410 | + return ''; |
|
411 | + } |
|
412 | + return EEH_Event_View::event_categories($EVT_ID, $hide_uncategorized); |
|
413 | + } |
|
414 | 414 | } |
415 | 415 | |
416 | 416 | |
417 | 417 | if (! function_exists('espresso_event_tickets_available')) { |
418 | - /** |
|
419 | - * espresso_event_tickets_available |
|
420 | - * returns the ticket types available for purchase for an event |
|
421 | - * |
|
422 | - * @param int $EVT_ID |
|
423 | - * @param bool $echo |
|
424 | - * @param bool $format |
|
425 | - * @return string |
|
426 | - * @throws EE_Error |
|
427 | - * @throws ReflectionException |
|
428 | - */ |
|
429 | - function espresso_event_tickets_available($EVT_ID = 0, $echo = true, $format = true) |
|
430 | - { |
|
431 | - $tickets = EEH_Event_View::event_tickets_available($EVT_ID); |
|
432 | - if (is_array($tickets) && ! empty($tickets)) { |
|
433 | - // if formatting then $html will be a string, else it will be an array of ticket objects |
|
434 | - $html = |
|
435 | - $format ? '<ul id="ee-event-tickets-ul-' . esc_attr($EVT_ID) . '" class="ee-event-tickets-ul">' : []; |
|
436 | - foreach ($tickets as $ticket) { |
|
437 | - if ($ticket instanceof EE_Ticket) { |
|
438 | - if ($format) { |
|
439 | - $html .= '<li id="ee-event-tickets-li-' |
|
440 | - . esc_attr($ticket->ID()) |
|
441 | - . '" class="ee-event-tickets-li">'; |
|
442 | - $html .= esc_html($ticket->name()) . ' '; |
|
443 | - $html .= EEH_Template::format_currency( |
|
444 | - $ticket->get_ticket_total_with_taxes() |
|
445 | - ); // already escaped |
|
446 | - $html .= '</li>'; |
|
447 | - } else { |
|
448 | - $html[] = $ticket; |
|
449 | - } |
|
450 | - } |
|
451 | - } |
|
452 | - if ($format) { |
|
453 | - $html .= '</ul>'; |
|
454 | - } |
|
455 | - if ($echo && $format) { |
|
456 | - echo wp_kses($html, AllowedTags::getAllowedTags()); |
|
457 | - return ''; |
|
458 | - } |
|
459 | - return $html; |
|
460 | - } |
|
461 | - return ''; |
|
462 | - } |
|
418 | + /** |
|
419 | + * espresso_event_tickets_available |
|
420 | + * returns the ticket types available for purchase for an event |
|
421 | + * |
|
422 | + * @param int $EVT_ID |
|
423 | + * @param bool $echo |
|
424 | + * @param bool $format |
|
425 | + * @return string |
|
426 | + * @throws EE_Error |
|
427 | + * @throws ReflectionException |
|
428 | + */ |
|
429 | + function espresso_event_tickets_available($EVT_ID = 0, $echo = true, $format = true) |
|
430 | + { |
|
431 | + $tickets = EEH_Event_View::event_tickets_available($EVT_ID); |
|
432 | + if (is_array($tickets) && ! empty($tickets)) { |
|
433 | + // if formatting then $html will be a string, else it will be an array of ticket objects |
|
434 | + $html = |
|
435 | + $format ? '<ul id="ee-event-tickets-ul-' . esc_attr($EVT_ID) . '" class="ee-event-tickets-ul">' : []; |
|
436 | + foreach ($tickets as $ticket) { |
|
437 | + if ($ticket instanceof EE_Ticket) { |
|
438 | + if ($format) { |
|
439 | + $html .= '<li id="ee-event-tickets-li-' |
|
440 | + . esc_attr($ticket->ID()) |
|
441 | + . '" class="ee-event-tickets-li">'; |
|
442 | + $html .= esc_html($ticket->name()) . ' '; |
|
443 | + $html .= EEH_Template::format_currency( |
|
444 | + $ticket->get_ticket_total_with_taxes() |
|
445 | + ); // already escaped |
|
446 | + $html .= '</li>'; |
|
447 | + } else { |
|
448 | + $html[] = $ticket; |
|
449 | + } |
|
450 | + } |
|
451 | + } |
|
452 | + if ($format) { |
|
453 | + $html .= '</ul>'; |
|
454 | + } |
|
455 | + if ($echo && $format) { |
|
456 | + echo wp_kses($html, AllowedTags::getAllowedTags()); |
|
457 | + return ''; |
|
458 | + } |
|
459 | + return $html; |
|
460 | + } |
|
461 | + return ''; |
|
462 | + } |
|
463 | 463 | } |
464 | 464 | |
465 | 465 | if (! function_exists('espresso_event_date_obj')) { |
466 | - /** |
|
467 | - * espresso_event_date_obj |
|
468 | - * returns the primary date object for an event |
|
469 | - * |
|
470 | - * @param bool $EVT_ID |
|
471 | - * @return EE_Datetime|null |
|
472 | - * @throws EE_Error |
|
473 | - * @throws ReflectionException |
|
474 | - */ |
|
475 | - function espresso_event_date_obj($EVT_ID = false) |
|
476 | - { |
|
477 | - return EEH_Event_View::get_primary_date_obj($EVT_ID); |
|
478 | - } |
|
466 | + /** |
|
467 | + * espresso_event_date_obj |
|
468 | + * returns the primary date object for an event |
|
469 | + * |
|
470 | + * @param bool $EVT_ID |
|
471 | + * @return EE_Datetime|null |
|
472 | + * @throws EE_Error |
|
473 | + * @throws ReflectionException |
|
474 | + */ |
|
475 | + function espresso_event_date_obj($EVT_ID = false) |
|
476 | + { |
|
477 | + return EEH_Event_View::get_primary_date_obj($EVT_ID); |
|
478 | + } |
|
479 | 479 | } |
480 | 480 | |
481 | 481 | |
482 | 482 | if (! function_exists('espresso_event_date')) { |
483 | - /** |
|
484 | - * espresso_event_date |
|
485 | - * returns the primary date for an event |
|
486 | - * |
|
487 | - * @param string $date_format |
|
488 | - * @param string $time_format |
|
489 | - * @param bool $EVT_ID |
|
490 | - * @param bool $echo |
|
491 | - * @return string |
|
492 | - * @throws EE_Error |
|
493 | - * @throws ReflectionException |
|
494 | - */ |
|
495 | - function espresso_event_date($date_format = '', $time_format = '', $EVT_ID = false, $echo = true) |
|
496 | - { |
|
497 | - $date_format = ! empty($date_format) ? $date_format : get_option('date_format'); |
|
498 | - $time_format = ! empty($time_format) ? $time_format : get_option('time_format'); |
|
499 | - $date_format = apply_filters('FHEE__espresso_event_date__date_format', $date_format); |
|
500 | - $time_format = apply_filters('FHEE__espresso_event_date__time_format', $time_format); |
|
501 | - if ($echo) { |
|
502 | - echo EEH_Event_View::the_event_date($date_format, $time_format, $EVT_ID); // already escaped |
|
503 | - return ''; |
|
504 | - } |
|
505 | - return EEH_Event_View::the_event_date($date_format, $time_format, $EVT_ID); |
|
506 | - |
|
507 | - } |
|
483 | + /** |
|
484 | + * espresso_event_date |
|
485 | + * returns the primary date for an event |
|
486 | + * |
|
487 | + * @param string $date_format |
|
488 | + * @param string $time_format |
|
489 | + * @param bool $EVT_ID |
|
490 | + * @param bool $echo |
|
491 | + * @return string |
|
492 | + * @throws EE_Error |
|
493 | + * @throws ReflectionException |
|
494 | + */ |
|
495 | + function espresso_event_date($date_format = '', $time_format = '', $EVT_ID = false, $echo = true) |
|
496 | + { |
|
497 | + $date_format = ! empty($date_format) ? $date_format : get_option('date_format'); |
|
498 | + $time_format = ! empty($time_format) ? $time_format : get_option('time_format'); |
|
499 | + $date_format = apply_filters('FHEE__espresso_event_date__date_format', $date_format); |
|
500 | + $time_format = apply_filters('FHEE__espresso_event_date__time_format', $time_format); |
|
501 | + if ($echo) { |
|
502 | + echo EEH_Event_View::the_event_date($date_format, $time_format, $EVT_ID); // already escaped |
|
503 | + return ''; |
|
504 | + } |
|
505 | + return EEH_Event_View::the_event_date($date_format, $time_format, $EVT_ID); |
|
506 | + |
|
507 | + } |
|
508 | 508 | } |
509 | 509 | |
510 | 510 | |
511 | 511 | if (! function_exists('espresso_list_of_event_dates')) { |
512 | - /** |
|
513 | - * espresso_list_of_event_dates |
|
514 | - * returns a unordered list of dates for an event |
|
515 | - * |
|
516 | - * @param int $EVT_ID |
|
517 | - * @param string $date_format |
|
518 | - * @param string $time_format |
|
519 | - * @param bool $echo |
|
520 | - * @param null $show_expired |
|
521 | - * @param bool $format |
|
522 | - * @param bool $add_breaks |
|
523 | - * @param null $limit |
|
524 | - * @return string |
|
525 | - * @throws EE_Error |
|
526 | - * @throws ReflectionException |
|
527 | - */ |
|
528 | - function espresso_list_of_event_dates( |
|
529 | - $EVT_ID = 0, |
|
530 | - $date_format = '', |
|
531 | - $time_format = '', |
|
532 | - $echo = true, |
|
533 | - $show_expired = null, |
|
534 | - $format = true, |
|
535 | - $add_breaks = true, |
|
536 | - $limit = null |
|
537 | - ) { |
|
538 | - $allowedtags = AllowedTags::getAllowedTags(); |
|
539 | - $date_format = ! empty($date_format) ? $date_format : get_option('date_format'); |
|
540 | - $time_format = ! empty($time_format) ? $time_format : get_option('time_format'); |
|
541 | - $date_format = apply_filters('FHEE__espresso_list_of_event_dates__date_format', $date_format); |
|
542 | - $time_format = apply_filters('FHEE__espresso_list_of_event_dates__time_format', $time_format); |
|
543 | - $datetimes = EEH_Event_View::get_all_date_obj($EVT_ID, $show_expired, false, $limit); |
|
544 | - if (! $format) { |
|
545 | - return apply_filters('FHEE__espresso_list_of_event_dates__datetimes', $datetimes); |
|
546 | - } |
|
547 | - $newline = $add_breaks ? '<br />' : ''; |
|
548 | - if (is_array($datetimes) && ! empty($datetimes)) { |
|
549 | - global $post; |
|
550 | - $html = |
|
551 | - '<ul id="ee-event-datetimes-ul-' . esc_attr($post->ID) . '" class="ee-event-datetimes-ul ee-clearfix">'; |
|
552 | - foreach ($datetimes as $datetime) { |
|
553 | - if ($datetime instanceof EE_Datetime) { |
|
554 | - |
|
555 | - $datetime_name = $datetime->name(); |
|
556 | - $datetime_html = ! empty($datetime_name) |
|
557 | - ? ' |
|
512 | + /** |
|
513 | + * espresso_list_of_event_dates |
|
514 | + * returns a unordered list of dates for an event |
|
515 | + * |
|
516 | + * @param int $EVT_ID |
|
517 | + * @param string $date_format |
|
518 | + * @param string $time_format |
|
519 | + * @param bool $echo |
|
520 | + * @param null $show_expired |
|
521 | + * @param bool $format |
|
522 | + * @param bool $add_breaks |
|
523 | + * @param null $limit |
|
524 | + * @return string |
|
525 | + * @throws EE_Error |
|
526 | + * @throws ReflectionException |
|
527 | + */ |
|
528 | + function espresso_list_of_event_dates( |
|
529 | + $EVT_ID = 0, |
|
530 | + $date_format = '', |
|
531 | + $time_format = '', |
|
532 | + $echo = true, |
|
533 | + $show_expired = null, |
|
534 | + $format = true, |
|
535 | + $add_breaks = true, |
|
536 | + $limit = null |
|
537 | + ) { |
|
538 | + $allowedtags = AllowedTags::getAllowedTags(); |
|
539 | + $date_format = ! empty($date_format) ? $date_format : get_option('date_format'); |
|
540 | + $time_format = ! empty($time_format) ? $time_format : get_option('time_format'); |
|
541 | + $date_format = apply_filters('FHEE__espresso_list_of_event_dates__date_format', $date_format); |
|
542 | + $time_format = apply_filters('FHEE__espresso_list_of_event_dates__time_format', $time_format); |
|
543 | + $datetimes = EEH_Event_View::get_all_date_obj($EVT_ID, $show_expired, false, $limit); |
|
544 | + if (! $format) { |
|
545 | + return apply_filters('FHEE__espresso_list_of_event_dates__datetimes', $datetimes); |
|
546 | + } |
|
547 | + $newline = $add_breaks ? '<br />' : ''; |
|
548 | + if (is_array($datetimes) && ! empty($datetimes)) { |
|
549 | + global $post; |
|
550 | + $html = |
|
551 | + '<ul id="ee-event-datetimes-ul-' . esc_attr($post->ID) . '" class="ee-event-datetimes-ul ee-clearfix">'; |
|
552 | + foreach ($datetimes as $datetime) { |
|
553 | + if ($datetime instanceof EE_Datetime) { |
|
554 | + |
|
555 | + $datetime_name = $datetime->name(); |
|
556 | + $datetime_html = ! empty($datetime_name) |
|
557 | + ? ' |
|
558 | 558 | <strong class="ee-event-datetimes-li-date-name"> |
559 | 559 | ' . esc_html($datetime_name) . ' |
560 | 560 | </strong>' . $newline |
561 | - : ''; |
|
561 | + : ''; |
|
562 | 562 | |
563 | - $datetime_description = $datetime->description(); |
|
564 | - $datetime_html .= ! empty($datetime_description) |
|
565 | - ? ' |
|
563 | + $datetime_description = $datetime->description(); |
|
564 | + $datetime_html .= ! empty($datetime_description) |
|
565 | + ? ' |
|
566 | 566 | <span class="ee-event-datetimes-li-date-desc"> |
567 | 567 | ' . wp_kses($datetime_description, $allowedtags) . ' |
568 | 568 | </span>' . $newline |
569 | - : ''; |
|
569 | + : ''; |
|
570 | 570 | |
571 | - $datetime_html .= ' |
|
571 | + $datetime_html .= ' |
|
572 | 572 | <span class="dashicons dashicons-calendar"></span> |
573 | 573 | <span class="ee-event-datetimes-li-daterange">' . $datetime->date_range($date_format) . '</span> |
574 | 574 | <br/> |
@@ -576,482 +576,482 @@ discard block |
||
576 | 576 | <span class="ee-event-datetimes-li-timerange">' . $datetime->time_range($time_format) . '</span> |
577 | 577 | '; |
578 | 578 | |
579 | - $datetime_html = apply_filters( |
|
580 | - 'FHEE__espresso_list_of_event_dates__datetime_html', |
|
581 | - $datetime_html, |
|
582 | - $datetime |
|
583 | - ); |
|
579 | + $datetime_html = apply_filters( |
|
580 | + 'FHEE__espresso_list_of_event_dates__datetime_html', |
|
581 | + $datetime_html, |
|
582 | + $datetime |
|
583 | + ); |
|
584 | 584 | |
585 | - $DTD_ID = esc_attr($datetime->ID()); |
|
586 | - $active_status = esc_attr(' ee-event-datetimes-li-' . $datetime->get_active_status()); |
|
585 | + $DTD_ID = esc_attr($datetime->ID()); |
|
586 | + $active_status = esc_attr(' ee-event-datetimes-li-' . $datetime->get_active_status()); |
|
587 | 587 | |
588 | - $html .= ' |
|
588 | + $html .= ' |
|
589 | 589 | <li id="ee-event-datetimes-li-' . $DTD_ID . '" class="ee-event-datetimes-li' . $active_status . '"> |
590 | 590 | ' . $datetime_html . ' |
591 | 591 | </li>'; |
592 | - } |
|
593 | - } |
|
594 | - $html .= '</ul>'; |
|
595 | - } else { |
|
596 | - $html = |
|
597 | - ' |
|
592 | + } |
|
593 | + } |
|
594 | + $html .= '</ul>'; |
|
595 | + } else { |
|
596 | + $html = |
|
597 | + ' |
|
598 | 598 | <p> |
599 | 599 | <span class="dashicons dashicons-marker pink-text"></span> |
600 | 600 | ' . esc_html__( |
601 | - 'There are no upcoming dates for this event.', |
|
602 | - 'event_espresso' |
|
603 | - ) . ' |
|
601 | + 'There are no upcoming dates for this event.', |
|
602 | + 'event_espresso' |
|
603 | + ) . ' |
|
604 | 604 | </p> |
605 | 605 | <br/>'; |
606 | - } |
|
607 | - if ($echo) { |
|
608 | - echo wp_kses($html, AllowedTags::getWithFormTags()); |
|
609 | - return ''; |
|
610 | - } |
|
611 | - return $html; |
|
612 | - } |
|
606 | + } |
|
607 | + if ($echo) { |
|
608 | + echo wp_kses($html, AllowedTags::getWithFormTags()); |
|
609 | + return ''; |
|
610 | + } |
|
611 | + return $html; |
|
612 | + } |
|
613 | 613 | } |
614 | 614 | |
615 | 615 | |
616 | 616 | if (! function_exists('espresso_event_end_date')) { |
617 | - /** |
|
618 | - * espresso_event_end_date |
|
619 | - * returns the last date for an event |
|
620 | - * |
|
621 | - * @param string $date_format |
|
622 | - * @param string $time_format |
|
623 | - * @param bool $EVT_ID |
|
624 | - * @param bool $echo |
|
625 | - * @return string |
|
626 | - * @throws EE_Error |
|
627 | - * @throws ReflectionException |
|
628 | - */ |
|
629 | - function espresso_event_end_date($date_format = '', $time_format = '', $EVT_ID = false, $echo = true) |
|
630 | - { |
|
631 | - $date_format = ! empty($date_format) ? $date_format : get_option('date_format'); |
|
632 | - $time_format = ! empty($time_format) ? $time_format : get_option('time_format'); |
|
633 | - $date_format = apply_filters('FHEE__espresso_event_end_date__date_format', $date_format); |
|
634 | - $time_format = apply_filters('FHEE__espresso_event_end_date__time_format', $time_format); |
|
635 | - if ($echo) { |
|
636 | - echo EEH_Event_View::the_event_end_date($date_format, $time_format, $EVT_ID); // already escaped |
|
637 | - return ''; |
|
638 | - } |
|
639 | - return EEH_Event_View::the_event_end_date($date_format, $time_format, $EVT_ID); |
|
640 | - } |
|
617 | + /** |
|
618 | + * espresso_event_end_date |
|
619 | + * returns the last date for an event |
|
620 | + * |
|
621 | + * @param string $date_format |
|
622 | + * @param string $time_format |
|
623 | + * @param bool $EVT_ID |
|
624 | + * @param bool $echo |
|
625 | + * @return string |
|
626 | + * @throws EE_Error |
|
627 | + * @throws ReflectionException |
|
628 | + */ |
|
629 | + function espresso_event_end_date($date_format = '', $time_format = '', $EVT_ID = false, $echo = true) |
|
630 | + { |
|
631 | + $date_format = ! empty($date_format) ? $date_format : get_option('date_format'); |
|
632 | + $time_format = ! empty($time_format) ? $time_format : get_option('time_format'); |
|
633 | + $date_format = apply_filters('FHEE__espresso_event_end_date__date_format', $date_format); |
|
634 | + $time_format = apply_filters('FHEE__espresso_event_end_date__time_format', $time_format); |
|
635 | + if ($echo) { |
|
636 | + echo EEH_Event_View::the_event_end_date($date_format, $time_format, $EVT_ID); // already escaped |
|
637 | + return ''; |
|
638 | + } |
|
639 | + return EEH_Event_View::the_event_end_date($date_format, $time_format, $EVT_ID); |
|
640 | + } |
|
641 | 641 | } |
642 | 642 | |
643 | 643 | if (! function_exists('espresso_event_date_range')) { |
644 | - /** |
|
645 | - * espresso_event_date_range |
|
646 | - * returns the first and last chronologically ordered dates for an event (if different) |
|
647 | - * |
|
648 | - * @param string $date_format |
|
649 | - * @param string $time_format |
|
650 | - * @param string $single_date_format |
|
651 | - * @param string $single_time_format |
|
652 | - * @param bool $EVT_ID |
|
653 | - * @param bool $echo |
|
654 | - * @return string |
|
655 | - * @throws EE_Error |
|
656 | - * @throws ReflectionException |
|
657 | - */ |
|
658 | - function espresso_event_date_range( |
|
659 | - $date_format = '', |
|
660 | - $time_format = '', |
|
661 | - $single_date_format = '', |
|
662 | - $single_time_format = '', |
|
663 | - $EVT_ID = false, |
|
664 | - $echo = true |
|
665 | - ) { |
|
666 | - // set and filter date and time formats when a range is returned |
|
667 | - $date_format = ! empty($date_format) ? $date_format : get_option('date_format'); |
|
668 | - $date_format = apply_filters('FHEE__espresso_event_date_range__date_format', $date_format); |
|
669 | - // get the start and end date with NO time portion |
|
670 | - $the_event_date = EEH_Event_View::the_earliest_event_date($date_format, '', $EVT_ID); |
|
671 | - $the_event_end_date = EEH_Event_View::the_latest_event_date($date_format, '', $EVT_ID); |
|
672 | - // now we can determine if date range spans more than one day |
|
673 | - if ($the_event_date != $the_event_end_date) { |
|
674 | - $time_format = ! empty($time_format) ? $time_format : get_option('time_format'); |
|
675 | - $time_format = apply_filters('FHEE__espresso_event_date_range__time_format', $time_format); |
|
676 | - $html = sprintf( |
|
677 | - /* translators: 1: first event date, 2: last event date */ |
|
678 | - esc_html__('%1$s - %2$s', 'event_espresso'), |
|
679 | - EEH_Event_View::the_earliest_event_date($date_format, $time_format, $EVT_ID), |
|
680 | - EEH_Event_View::the_latest_event_date($date_format, $time_format, $EVT_ID) |
|
681 | - ); |
|
682 | - } else { |
|
683 | - // set and filter date and time formats when only a single datetime is returned |
|
684 | - $single_date_format = ! empty($single_date_format) ? $single_date_format : get_option('date_format'); |
|
685 | - $single_time_format = ! empty($single_time_format) ? $single_time_format : get_option('time_format'); |
|
686 | - $single_date_format = |
|
687 | - apply_filters('FHEE__espresso_event_date_range__single_date_format', $single_date_format); |
|
688 | - $single_time_format = |
|
689 | - apply_filters('FHEE__espresso_event_date_range__single_time_format', $single_time_format); |
|
690 | - $html = |
|
691 | - EEH_Event_View::the_earliest_event_date($single_date_format, $single_time_format, $EVT_ID); |
|
692 | - } |
|
693 | - if ($echo) { |
|
694 | - echo wp_kses($html, AllowedTags::getAllowedTags()); |
|
695 | - return ''; |
|
696 | - } |
|
697 | - return $html; |
|
698 | - } |
|
644 | + /** |
|
645 | + * espresso_event_date_range |
|
646 | + * returns the first and last chronologically ordered dates for an event (if different) |
|
647 | + * |
|
648 | + * @param string $date_format |
|
649 | + * @param string $time_format |
|
650 | + * @param string $single_date_format |
|
651 | + * @param string $single_time_format |
|
652 | + * @param bool $EVT_ID |
|
653 | + * @param bool $echo |
|
654 | + * @return string |
|
655 | + * @throws EE_Error |
|
656 | + * @throws ReflectionException |
|
657 | + */ |
|
658 | + function espresso_event_date_range( |
|
659 | + $date_format = '', |
|
660 | + $time_format = '', |
|
661 | + $single_date_format = '', |
|
662 | + $single_time_format = '', |
|
663 | + $EVT_ID = false, |
|
664 | + $echo = true |
|
665 | + ) { |
|
666 | + // set and filter date and time formats when a range is returned |
|
667 | + $date_format = ! empty($date_format) ? $date_format : get_option('date_format'); |
|
668 | + $date_format = apply_filters('FHEE__espresso_event_date_range__date_format', $date_format); |
|
669 | + // get the start and end date with NO time portion |
|
670 | + $the_event_date = EEH_Event_View::the_earliest_event_date($date_format, '', $EVT_ID); |
|
671 | + $the_event_end_date = EEH_Event_View::the_latest_event_date($date_format, '', $EVT_ID); |
|
672 | + // now we can determine if date range spans more than one day |
|
673 | + if ($the_event_date != $the_event_end_date) { |
|
674 | + $time_format = ! empty($time_format) ? $time_format : get_option('time_format'); |
|
675 | + $time_format = apply_filters('FHEE__espresso_event_date_range__time_format', $time_format); |
|
676 | + $html = sprintf( |
|
677 | + /* translators: 1: first event date, 2: last event date */ |
|
678 | + esc_html__('%1$s - %2$s', 'event_espresso'), |
|
679 | + EEH_Event_View::the_earliest_event_date($date_format, $time_format, $EVT_ID), |
|
680 | + EEH_Event_View::the_latest_event_date($date_format, $time_format, $EVT_ID) |
|
681 | + ); |
|
682 | + } else { |
|
683 | + // set and filter date and time formats when only a single datetime is returned |
|
684 | + $single_date_format = ! empty($single_date_format) ? $single_date_format : get_option('date_format'); |
|
685 | + $single_time_format = ! empty($single_time_format) ? $single_time_format : get_option('time_format'); |
|
686 | + $single_date_format = |
|
687 | + apply_filters('FHEE__espresso_event_date_range__single_date_format', $single_date_format); |
|
688 | + $single_time_format = |
|
689 | + apply_filters('FHEE__espresso_event_date_range__single_time_format', $single_time_format); |
|
690 | + $html = |
|
691 | + EEH_Event_View::the_earliest_event_date($single_date_format, $single_time_format, $EVT_ID); |
|
692 | + } |
|
693 | + if ($echo) { |
|
694 | + echo wp_kses($html, AllowedTags::getAllowedTags()); |
|
695 | + return ''; |
|
696 | + } |
|
697 | + return $html; |
|
698 | + } |
|
699 | 699 | } |
700 | 700 | |
701 | 701 | if (! function_exists('espresso_next_upcoming_datetime_obj')) { |
702 | - /** |
|
703 | - * espresso_next_upcoming_datetime_obj |
|
704 | - * returns the next upcoming datetime object for an event |
|
705 | - * |
|
706 | - * @param int $EVT_ID |
|
707 | - * @return EE_Datetime|null |
|
708 | - * @throws EE_Error |
|
709 | - */ |
|
710 | - function espresso_next_upcoming_datetime_obj($EVT_ID = 0) |
|
711 | - { |
|
712 | - return EEH_Event_View::get_next_upcoming_date_obj($EVT_ID); |
|
713 | - } |
|
702 | + /** |
|
703 | + * espresso_next_upcoming_datetime_obj |
|
704 | + * returns the next upcoming datetime object for an event |
|
705 | + * |
|
706 | + * @param int $EVT_ID |
|
707 | + * @return EE_Datetime|null |
|
708 | + * @throws EE_Error |
|
709 | + */ |
|
710 | + function espresso_next_upcoming_datetime_obj($EVT_ID = 0) |
|
711 | + { |
|
712 | + return EEH_Event_View::get_next_upcoming_date_obj($EVT_ID); |
|
713 | + } |
|
714 | 714 | } |
715 | 715 | |
716 | 716 | if (! function_exists('espresso_next_upcoming_datetime')) { |
717 | - /** |
|
718 | - * espresso_next_upcoming_datetime |
|
719 | - * returns the start date and time for the next upcoming event. |
|
720 | - * |
|
721 | - * @param string $date_format |
|
722 | - * @param string $time_format |
|
723 | - * @param int $EVT_ID |
|
724 | - * @param bool $echo |
|
725 | - * @return string |
|
726 | - * @throws EE_Error |
|
727 | - * @throws ReflectionException |
|
728 | - */ |
|
729 | - function espresso_next_upcoming_datetime($date_format = '', $time_format = '', $EVT_ID = 0, $echo = true) |
|
730 | - { |
|
731 | - |
|
732 | - $date_format = ! empty($date_format) ? $date_format : get_option('date_format'); |
|
733 | - $date_format = apply_filters('FHEE__espresso_next_upcoming_datetime__date_format', $date_format); |
|
734 | - |
|
735 | - $time_format = ! empty($time_format) ? $time_format : get_option('time_format'); |
|
736 | - $time_format = apply_filters('FHEE__espresso_next_upcoming_datetime__time_format', $time_format); |
|
737 | - |
|
738 | - $datetime_format = trim($date_format . ' ' . $time_format); |
|
739 | - |
|
740 | - $datetime = espresso_next_upcoming_datetime_obj($EVT_ID); |
|
741 | - |
|
742 | - if (! $datetime instanceof EE_Datetime) { |
|
743 | - return ''; |
|
744 | - } |
|
745 | - if ($echo) { |
|
746 | - echo esc_html($datetime->get_i18n_datetime('DTT_EVT_start', $datetime_format)); |
|
747 | - return ''; |
|
748 | - } |
|
749 | - return $datetime->get_i18n_datetime('DTT_EVT_start', $datetime_format); |
|
750 | - } |
|
717 | + /** |
|
718 | + * espresso_next_upcoming_datetime |
|
719 | + * returns the start date and time for the next upcoming event. |
|
720 | + * |
|
721 | + * @param string $date_format |
|
722 | + * @param string $time_format |
|
723 | + * @param int $EVT_ID |
|
724 | + * @param bool $echo |
|
725 | + * @return string |
|
726 | + * @throws EE_Error |
|
727 | + * @throws ReflectionException |
|
728 | + */ |
|
729 | + function espresso_next_upcoming_datetime($date_format = '', $time_format = '', $EVT_ID = 0, $echo = true) |
|
730 | + { |
|
731 | + |
|
732 | + $date_format = ! empty($date_format) ? $date_format : get_option('date_format'); |
|
733 | + $date_format = apply_filters('FHEE__espresso_next_upcoming_datetime__date_format', $date_format); |
|
734 | + |
|
735 | + $time_format = ! empty($time_format) ? $time_format : get_option('time_format'); |
|
736 | + $time_format = apply_filters('FHEE__espresso_next_upcoming_datetime__time_format', $time_format); |
|
737 | + |
|
738 | + $datetime_format = trim($date_format . ' ' . $time_format); |
|
739 | + |
|
740 | + $datetime = espresso_next_upcoming_datetime_obj($EVT_ID); |
|
741 | + |
|
742 | + if (! $datetime instanceof EE_Datetime) { |
|
743 | + return ''; |
|
744 | + } |
|
745 | + if ($echo) { |
|
746 | + echo esc_html($datetime->get_i18n_datetime('DTT_EVT_start', $datetime_format)); |
|
747 | + return ''; |
|
748 | + } |
|
749 | + return $datetime->get_i18n_datetime('DTT_EVT_start', $datetime_format); |
|
750 | + } |
|
751 | 751 | } |
752 | 752 | |
753 | 753 | if (! function_exists('espresso_event_date_as_calendar_page')) { |
754 | - /** |
|
755 | - * espresso_event_date_as_calendar_page |
|
756 | - * returns the primary date for an event, stylized to appear as the page of a calendar |
|
757 | - * |
|
758 | - * @param bool $EVT_ID |
|
759 | - * @return void |
|
760 | - * @throws EE_Error |
|
761 | - * @throws ReflectionException |
|
762 | - */ |
|
763 | - function espresso_event_date_as_calendar_page($EVT_ID = false) |
|
764 | - { |
|
765 | - EEH_Event_View::event_date_as_calendar_page($EVT_ID); |
|
766 | - } |
|
754 | + /** |
|
755 | + * espresso_event_date_as_calendar_page |
|
756 | + * returns the primary date for an event, stylized to appear as the page of a calendar |
|
757 | + * |
|
758 | + * @param bool $EVT_ID |
|
759 | + * @return void |
|
760 | + * @throws EE_Error |
|
761 | + * @throws ReflectionException |
|
762 | + */ |
|
763 | + function espresso_event_date_as_calendar_page($EVT_ID = false) |
|
764 | + { |
|
765 | + EEH_Event_View::event_date_as_calendar_page($EVT_ID); |
|
766 | + } |
|
767 | 767 | } |
768 | 768 | |
769 | 769 | |
770 | 770 | if (! function_exists('espresso_event_link_url')) { |
771 | - /** |
|
772 | - * espresso_event_link_url |
|
773 | - * |
|
774 | - * @param int $EVT_ID |
|
775 | - * @param bool $echo |
|
776 | - * @return string |
|
777 | - * @throws EE_Error |
|
778 | - * @throws ReflectionException |
|
779 | - */ |
|
780 | - function espresso_event_link_url($EVT_ID = 0, $echo = true) |
|
781 | - { |
|
782 | - if ($echo) { |
|
783 | - echo EEH_Event_View::event_link_url($EVT_ID); // already escaped |
|
784 | - return ''; |
|
785 | - } |
|
786 | - return EEH_Event_View::event_link_url($EVT_ID); |
|
787 | - } |
|
771 | + /** |
|
772 | + * espresso_event_link_url |
|
773 | + * |
|
774 | + * @param int $EVT_ID |
|
775 | + * @param bool $echo |
|
776 | + * @return string |
|
777 | + * @throws EE_Error |
|
778 | + * @throws ReflectionException |
|
779 | + */ |
|
780 | + function espresso_event_link_url($EVT_ID = 0, $echo = true) |
|
781 | + { |
|
782 | + if ($echo) { |
|
783 | + echo EEH_Event_View::event_link_url($EVT_ID); // already escaped |
|
784 | + return ''; |
|
785 | + } |
|
786 | + return EEH_Event_View::event_link_url($EVT_ID); |
|
787 | + } |
|
788 | 788 | } |
789 | 789 | |
790 | 790 | |
791 | 791 | if (! function_exists('espresso_event_has_content_or_excerpt')) { |
792 | - /** |
|
793 | - * espresso_event_has_content_or_excerpt |
|
794 | - * |
|
795 | - * @access public |
|
796 | - * @param bool $EVT_ID |
|
797 | - * @return boolean |
|
798 | - * @throws EE_Error |
|
799 | - * @throws ReflectionException |
|
800 | - */ |
|
801 | - function espresso_event_has_content_or_excerpt($EVT_ID = false) |
|
802 | - { |
|
803 | - return EEH_Event_View::event_has_content_or_excerpt($EVT_ID); |
|
804 | - } |
|
792 | + /** |
|
793 | + * espresso_event_has_content_or_excerpt |
|
794 | + * |
|
795 | + * @access public |
|
796 | + * @param bool $EVT_ID |
|
797 | + * @return boolean |
|
798 | + * @throws EE_Error |
|
799 | + * @throws ReflectionException |
|
800 | + */ |
|
801 | + function espresso_event_has_content_or_excerpt($EVT_ID = false) |
|
802 | + { |
|
803 | + return EEH_Event_View::event_has_content_or_excerpt($EVT_ID); |
|
804 | + } |
|
805 | 805 | } |
806 | 806 | |
807 | 807 | |
808 | 808 | if (! function_exists('espresso_event_content_or_excerpt')) { |
809 | - /** |
|
810 | - * espresso_event_content_or_excerpt |
|
811 | - * |
|
812 | - * @param int $num_words |
|
813 | - * @param null $more |
|
814 | - * @param bool $echo |
|
815 | - * @return string |
|
816 | - */ |
|
817 | - function espresso_event_content_or_excerpt($num_words = 55, $more = null, $echo = true) |
|
818 | - { |
|
819 | - if ($echo) { |
|
820 | - echo EEH_Event_View::event_content_or_excerpt($num_words, $more); // already escaped |
|
821 | - return ''; |
|
822 | - } |
|
823 | - return EEH_Event_View::event_content_or_excerpt($num_words, $more); |
|
824 | - } |
|
809 | + /** |
|
810 | + * espresso_event_content_or_excerpt |
|
811 | + * |
|
812 | + * @param int $num_words |
|
813 | + * @param null $more |
|
814 | + * @param bool $echo |
|
815 | + * @return string |
|
816 | + */ |
|
817 | + function espresso_event_content_or_excerpt($num_words = 55, $more = null, $echo = true) |
|
818 | + { |
|
819 | + if ($echo) { |
|
820 | + echo EEH_Event_View::event_content_or_excerpt($num_words, $more); // already escaped |
|
821 | + return ''; |
|
822 | + } |
|
823 | + return EEH_Event_View::event_content_or_excerpt($num_words, $more); |
|
824 | + } |
|
825 | 825 | } |
826 | 826 | |
827 | 827 | |
828 | 828 | if (! function_exists('espresso_event_phone')) { |
829 | - /** |
|
830 | - * espresso_event_phone |
|
831 | - * |
|
832 | - * @param int $EVT_ID |
|
833 | - * @param bool $echo |
|
834 | - * @return string |
|
835 | - * @throws EE_Error |
|
836 | - * @throws ReflectionException |
|
837 | - */ |
|
838 | - function espresso_event_phone($EVT_ID = 0, $echo = true) |
|
839 | - { |
|
840 | - if ($echo) { |
|
841 | - echo EEH_Event_View::event_phone($EVT_ID); // already escaped |
|
842 | - return ''; |
|
843 | - } |
|
844 | - return EEH_Event_View::event_phone($EVT_ID); |
|
845 | - } |
|
829 | + /** |
|
830 | + * espresso_event_phone |
|
831 | + * |
|
832 | + * @param int $EVT_ID |
|
833 | + * @param bool $echo |
|
834 | + * @return string |
|
835 | + * @throws EE_Error |
|
836 | + * @throws ReflectionException |
|
837 | + */ |
|
838 | + function espresso_event_phone($EVT_ID = 0, $echo = true) |
|
839 | + { |
|
840 | + if ($echo) { |
|
841 | + echo EEH_Event_View::event_phone($EVT_ID); // already escaped |
|
842 | + return ''; |
|
843 | + } |
|
844 | + return EEH_Event_View::event_phone($EVT_ID); |
|
845 | + } |
|
846 | 846 | } |
847 | 847 | |
848 | 848 | |
849 | 849 | if (! function_exists('espresso_edit_event_link')) { |
850 | - /** |
|
851 | - * espresso_edit_event_link |
|
852 | - * returns a link to edit an event |
|
853 | - * |
|
854 | - * @param int $EVT_ID |
|
855 | - * @param bool $echo |
|
856 | - * @return string |
|
857 | - * @throws EE_Error |
|
858 | - * @throws ReflectionException |
|
859 | - */ |
|
860 | - function espresso_edit_event_link($EVT_ID = 0, $echo = true) |
|
861 | - { |
|
862 | - if ($echo) { |
|
863 | - echo EEH_Event_View::edit_event_link($EVT_ID); // already escaped |
|
864 | - return ''; |
|
865 | - } |
|
866 | - return EEH_Event_View::edit_event_link($EVT_ID); |
|
867 | - } |
|
850 | + /** |
|
851 | + * espresso_edit_event_link |
|
852 | + * returns a link to edit an event |
|
853 | + * |
|
854 | + * @param int $EVT_ID |
|
855 | + * @param bool $echo |
|
856 | + * @return string |
|
857 | + * @throws EE_Error |
|
858 | + * @throws ReflectionException |
|
859 | + */ |
|
860 | + function espresso_edit_event_link($EVT_ID = 0, $echo = true) |
|
861 | + { |
|
862 | + if ($echo) { |
|
863 | + echo EEH_Event_View::edit_event_link($EVT_ID); // already escaped |
|
864 | + return ''; |
|
865 | + } |
|
866 | + return EEH_Event_View::edit_event_link($EVT_ID); |
|
867 | + } |
|
868 | 868 | } |
869 | 869 | |
870 | 870 | |
871 | 871 | if (! function_exists('espresso_organization_name')) { |
872 | - /** |
|
873 | - * espresso_organization_name |
|
874 | - * |
|
875 | - * @param bool $echo |
|
876 | - * @return string |
|
877 | - * @throws EE_Error |
|
878 | - */ |
|
879 | - function espresso_organization_name($echo = true) |
|
880 | - { |
|
881 | - if ($echo) { |
|
882 | - echo EE_Registry::instance()->CFG->organization->get_pretty('name'); // already escaped |
|
883 | - return ''; |
|
884 | - } |
|
885 | - return EE_Registry::instance()->CFG->organization->get_pretty('name'); |
|
886 | - } |
|
872 | + /** |
|
873 | + * espresso_organization_name |
|
874 | + * |
|
875 | + * @param bool $echo |
|
876 | + * @return string |
|
877 | + * @throws EE_Error |
|
878 | + */ |
|
879 | + function espresso_organization_name($echo = true) |
|
880 | + { |
|
881 | + if ($echo) { |
|
882 | + echo EE_Registry::instance()->CFG->organization->get_pretty('name'); // already escaped |
|
883 | + return ''; |
|
884 | + } |
|
885 | + return EE_Registry::instance()->CFG->organization->get_pretty('name'); |
|
886 | + } |
|
887 | 887 | } |
888 | 888 | |
889 | 889 | if (! function_exists('espresso_organization_address')) { |
890 | - /** |
|
891 | - * espresso_organization_address |
|
892 | - * |
|
893 | - * @param string $type |
|
894 | - * @return string |
|
895 | - */ |
|
896 | - function espresso_organization_address($type = 'inline') |
|
897 | - { |
|
898 | - if (EE_Registry::instance()->CFG->organization instanceof EE_Organization_Config) { |
|
899 | - $address = new EventEspresso\core\domain\entities\GenericAddress( |
|
900 | - EE_Registry::instance()->CFG->organization->address_1, |
|
901 | - EE_Registry::instance()->CFG->organization->address_2, |
|
902 | - EE_Registry::instance()->CFG->organization->city, |
|
903 | - EE_Registry::instance()->CFG->organization->STA_ID, |
|
904 | - EE_Registry::instance()->CFG->organization->zip, |
|
905 | - EE_Registry::instance()->CFG->organization->CNT_ISO |
|
906 | - ); |
|
907 | - return EEH_Address::format($address, $type); |
|
908 | - } |
|
909 | - return ''; |
|
910 | - } |
|
890 | + /** |
|
891 | + * espresso_organization_address |
|
892 | + * |
|
893 | + * @param string $type |
|
894 | + * @return string |
|
895 | + */ |
|
896 | + function espresso_organization_address($type = 'inline') |
|
897 | + { |
|
898 | + if (EE_Registry::instance()->CFG->organization instanceof EE_Organization_Config) { |
|
899 | + $address = new EventEspresso\core\domain\entities\GenericAddress( |
|
900 | + EE_Registry::instance()->CFG->organization->address_1, |
|
901 | + EE_Registry::instance()->CFG->organization->address_2, |
|
902 | + EE_Registry::instance()->CFG->organization->city, |
|
903 | + EE_Registry::instance()->CFG->organization->STA_ID, |
|
904 | + EE_Registry::instance()->CFG->organization->zip, |
|
905 | + EE_Registry::instance()->CFG->organization->CNT_ISO |
|
906 | + ); |
|
907 | + return EEH_Address::format($address, $type); |
|
908 | + } |
|
909 | + return ''; |
|
910 | + } |
|
911 | 911 | } |
912 | 912 | |
913 | 913 | if (! function_exists('espresso_organization_email')) { |
914 | - /** |
|
915 | - * espresso_organization_email |
|
916 | - * |
|
917 | - * @param bool $echo |
|
918 | - * @return string |
|
919 | - * @throws EE_Error |
|
920 | - */ |
|
921 | - function espresso_organization_email($echo = true) |
|
922 | - { |
|
923 | - if ($echo) { |
|
924 | - echo EE_Registry::instance()->CFG->organization->get_pretty('email'); // already escaped |
|
925 | - return ''; |
|
926 | - } |
|
927 | - return EE_Registry::instance()->CFG->organization->get_pretty('email'); |
|
928 | - } |
|
914 | + /** |
|
915 | + * espresso_organization_email |
|
916 | + * |
|
917 | + * @param bool $echo |
|
918 | + * @return string |
|
919 | + * @throws EE_Error |
|
920 | + */ |
|
921 | + function espresso_organization_email($echo = true) |
|
922 | + { |
|
923 | + if ($echo) { |
|
924 | + echo EE_Registry::instance()->CFG->organization->get_pretty('email'); // already escaped |
|
925 | + return ''; |
|
926 | + } |
|
927 | + return EE_Registry::instance()->CFG->organization->get_pretty('email'); |
|
928 | + } |
|
929 | 929 | } |
930 | 930 | |
931 | 931 | if (! function_exists('espresso_organization_logo_url')) { |
932 | - /** |
|
933 | - * espresso_organization_logo_url |
|
934 | - * |
|
935 | - * @param bool $echo |
|
936 | - * @return string |
|
937 | - * @throws EE_Error |
|
938 | - */ |
|
939 | - function espresso_organization_logo_url($echo = true) |
|
940 | - { |
|
941 | - if ($echo) { |
|
942 | - echo EE_Registry::instance()->CFG->organization->get_pretty('logo_url'); // already escaped |
|
943 | - return ''; |
|
944 | - } |
|
945 | - return EE_Registry::instance()->CFG->organization->get_pretty('logo_url'); |
|
946 | - } |
|
932 | + /** |
|
933 | + * espresso_organization_logo_url |
|
934 | + * |
|
935 | + * @param bool $echo |
|
936 | + * @return string |
|
937 | + * @throws EE_Error |
|
938 | + */ |
|
939 | + function espresso_organization_logo_url($echo = true) |
|
940 | + { |
|
941 | + if ($echo) { |
|
942 | + echo EE_Registry::instance()->CFG->organization->get_pretty('logo_url'); // already escaped |
|
943 | + return ''; |
|
944 | + } |
|
945 | + return EE_Registry::instance()->CFG->organization->get_pretty('logo_url'); |
|
946 | + } |
|
947 | 947 | } |
948 | 948 | |
949 | 949 | if (! function_exists('espresso_organization_facebook')) { |
950 | - /** |
|
951 | - * espresso_organization_facebook |
|
952 | - * |
|
953 | - * @param bool $echo |
|
954 | - * @return string |
|
955 | - * @throws EE_Error |
|
956 | - */ |
|
957 | - function espresso_organization_facebook($echo = true) |
|
958 | - { |
|
959 | - if ($echo) { |
|
960 | - echo EE_Registry::instance()->CFG->organization->get_pretty('facebook'); // already escaped |
|
961 | - return ''; |
|
962 | - } |
|
963 | - return EE_Registry::instance()->CFG->organization->get_pretty('facebook'); |
|
964 | - } |
|
950 | + /** |
|
951 | + * espresso_organization_facebook |
|
952 | + * |
|
953 | + * @param bool $echo |
|
954 | + * @return string |
|
955 | + * @throws EE_Error |
|
956 | + */ |
|
957 | + function espresso_organization_facebook($echo = true) |
|
958 | + { |
|
959 | + if ($echo) { |
|
960 | + echo EE_Registry::instance()->CFG->organization->get_pretty('facebook'); // already escaped |
|
961 | + return ''; |
|
962 | + } |
|
963 | + return EE_Registry::instance()->CFG->organization->get_pretty('facebook'); |
|
964 | + } |
|
965 | 965 | } |
966 | 966 | |
967 | 967 | if (! function_exists('espresso_organization_twitter')) { |
968 | - /** |
|
969 | - * espresso_organization_twitter |
|
970 | - * |
|
971 | - * @param bool $echo |
|
972 | - * @return string |
|
973 | - * @throws EE_Error |
|
974 | - */ |
|
975 | - function espresso_organization_twitter($echo = true) |
|
976 | - { |
|
977 | - if ($echo) { |
|
978 | - echo EE_Registry::instance()->CFG->organization->get_pretty('twitter'); // already escaped |
|
979 | - return ''; |
|
980 | - } |
|
981 | - return EE_Registry::instance()->CFG->organization->get_pretty('twitter'); |
|
982 | - } |
|
968 | + /** |
|
969 | + * espresso_organization_twitter |
|
970 | + * |
|
971 | + * @param bool $echo |
|
972 | + * @return string |
|
973 | + * @throws EE_Error |
|
974 | + */ |
|
975 | + function espresso_organization_twitter($echo = true) |
|
976 | + { |
|
977 | + if ($echo) { |
|
978 | + echo EE_Registry::instance()->CFG->organization->get_pretty('twitter'); // already escaped |
|
979 | + return ''; |
|
980 | + } |
|
981 | + return EE_Registry::instance()->CFG->organization->get_pretty('twitter'); |
|
982 | + } |
|
983 | 983 | } |
984 | 984 | |
985 | 985 | if (! function_exists('espresso_organization_linkedin')) { |
986 | - /** |
|
987 | - * espresso_organization_linkedin |
|
988 | - * |
|
989 | - * @param bool $echo |
|
990 | - * @return string |
|
991 | - * @throws EE_Error |
|
992 | - */ |
|
993 | - function espresso_organization_linkedin($echo = true) |
|
994 | - { |
|
995 | - if ($echo) { |
|
996 | - echo EE_Registry::instance()->CFG->organization->get_pretty('linkedin'); // already escaped |
|
997 | - return ''; |
|
998 | - } |
|
999 | - return EE_Registry::instance()->CFG->organization->get_pretty('linkedin'); |
|
1000 | - } |
|
986 | + /** |
|
987 | + * espresso_organization_linkedin |
|
988 | + * |
|
989 | + * @param bool $echo |
|
990 | + * @return string |
|
991 | + * @throws EE_Error |
|
992 | + */ |
|
993 | + function espresso_organization_linkedin($echo = true) |
|
994 | + { |
|
995 | + if ($echo) { |
|
996 | + echo EE_Registry::instance()->CFG->organization->get_pretty('linkedin'); // already escaped |
|
997 | + return ''; |
|
998 | + } |
|
999 | + return EE_Registry::instance()->CFG->organization->get_pretty('linkedin'); |
|
1000 | + } |
|
1001 | 1001 | } |
1002 | 1002 | |
1003 | 1003 | if (! function_exists('espresso_organization_pinterest')) { |
1004 | - /** |
|
1005 | - * espresso_organization_pinterest |
|
1006 | - * |
|
1007 | - * @param bool $echo |
|
1008 | - * @return string |
|
1009 | - * @throws EE_Error |
|
1010 | - */ |
|
1011 | - function espresso_organization_pinterest($echo = true) |
|
1012 | - { |
|
1013 | - if ($echo) { |
|
1014 | - echo EE_Registry::instance()->CFG->organization->get_pretty('pinterest'); // already escaped |
|
1015 | - return ''; |
|
1016 | - } |
|
1017 | - return EE_Registry::instance()->CFG->organization->get_pretty('pinterest'); |
|
1018 | - } |
|
1004 | + /** |
|
1005 | + * espresso_organization_pinterest |
|
1006 | + * |
|
1007 | + * @param bool $echo |
|
1008 | + * @return string |
|
1009 | + * @throws EE_Error |
|
1010 | + */ |
|
1011 | + function espresso_organization_pinterest($echo = true) |
|
1012 | + { |
|
1013 | + if ($echo) { |
|
1014 | + echo EE_Registry::instance()->CFG->organization->get_pretty('pinterest'); // already escaped |
|
1015 | + return ''; |
|
1016 | + } |
|
1017 | + return EE_Registry::instance()->CFG->organization->get_pretty('pinterest'); |
|
1018 | + } |
|
1019 | 1019 | } |
1020 | 1020 | |
1021 | 1021 | if (! function_exists('espresso_organization_google')) { |
1022 | - /** |
|
1023 | - * espresso_organization_google |
|
1024 | - * |
|
1025 | - * @param bool $echo |
|
1026 | - * @return string |
|
1027 | - * @throws EE_Error |
|
1028 | - */ |
|
1029 | - function espresso_organization_google($echo = true) |
|
1030 | - { |
|
1031 | - if ($echo) { |
|
1032 | - echo EE_Registry::instance()->CFG->organization->get_pretty('google'); // already escaped |
|
1033 | - return ''; |
|
1034 | - } |
|
1035 | - return EE_Registry::instance()->CFG->organization->get_pretty('google'); |
|
1036 | - } |
|
1022 | + /** |
|
1023 | + * espresso_organization_google |
|
1024 | + * |
|
1025 | + * @param bool $echo |
|
1026 | + * @return string |
|
1027 | + * @throws EE_Error |
|
1028 | + */ |
|
1029 | + function espresso_organization_google($echo = true) |
|
1030 | + { |
|
1031 | + if ($echo) { |
|
1032 | + echo EE_Registry::instance()->CFG->organization->get_pretty('google'); // already escaped |
|
1033 | + return ''; |
|
1034 | + } |
|
1035 | + return EE_Registry::instance()->CFG->organization->get_pretty('google'); |
|
1036 | + } |
|
1037 | 1037 | } |
1038 | 1038 | |
1039 | 1039 | if (! function_exists('espresso_organization_instagram')) { |
1040 | - /** |
|
1041 | - * espresso_organization_instagram |
|
1042 | - * |
|
1043 | - * @param bool $echo |
|
1044 | - * @return string |
|
1045 | - * @throws EE_Error |
|
1046 | - */ |
|
1047 | - function espresso_organization_instagram($echo = true) |
|
1048 | - { |
|
1049 | - if ($echo) { |
|
1050 | - echo EE_Registry::instance()->CFG->organization->get_pretty('instagram'); // already escaped |
|
1051 | - return ''; |
|
1052 | - } |
|
1053 | - return EE_Registry::instance()->CFG->organization->get_pretty('instagram'); |
|
1054 | - } |
|
1040 | + /** |
|
1041 | + * espresso_organization_instagram |
|
1042 | + * |
|
1043 | + * @param bool $echo |
|
1044 | + * @return string |
|
1045 | + * @throws EE_Error |
|
1046 | + */ |
|
1047 | + function espresso_organization_instagram($echo = true) |
|
1048 | + { |
|
1049 | + if ($echo) { |
|
1050 | + echo EE_Registry::instance()->CFG->organization->get_pretty('instagram'); // already escaped |
|
1051 | + return ''; |
|
1052 | + } |
|
1053 | + return EE_Registry::instance()->CFG->organization->get_pretty('instagram'); |
|
1054 | + } |
|
1055 | 1055 | } |
1056 | 1056 | |
1057 | 1057 | |
@@ -1059,345 +1059,345 @@ discard block |
||
1059 | 1059 | |
1060 | 1060 | |
1061 | 1061 | if (! function_exists('espresso_event_venues')) { |
1062 | - /** |
|
1063 | - * espresso_event_venues |
|
1064 | - * |
|
1065 | - * @return array all venues related to an event |
|
1066 | - * @throws EE_Error |
|
1067 | - * @throws ReflectionException |
|
1068 | - */ |
|
1069 | - function espresso_event_venues() |
|
1070 | - { |
|
1071 | - return EEH_Venue_View::get_event_venues(); |
|
1072 | - } |
|
1062 | + /** |
|
1063 | + * espresso_event_venues |
|
1064 | + * |
|
1065 | + * @return array all venues related to an event |
|
1066 | + * @throws EE_Error |
|
1067 | + * @throws ReflectionException |
|
1068 | + */ |
|
1069 | + function espresso_event_venues() |
|
1070 | + { |
|
1071 | + return EEH_Venue_View::get_event_venues(); |
|
1072 | + } |
|
1073 | 1073 | } |
1074 | 1074 | |
1075 | 1075 | |
1076 | 1076 | if (! function_exists('espresso_venue_id')) { |
1077 | - /** |
|
1078 | - * espresso_venue_name |
|
1079 | - * |
|
1080 | - * @access public |
|
1081 | - * @param int $EVT_ID |
|
1082 | - * @return string |
|
1083 | - * @throws EE_Error |
|
1084 | - * @throws ReflectionException |
|
1085 | - */ |
|
1086 | - function espresso_venue_id($EVT_ID = 0) |
|
1087 | - { |
|
1088 | - $venue = EEH_Venue_View::get_venue($EVT_ID); |
|
1089 | - return $venue instanceof EE_Venue ? $venue->ID() : 0; |
|
1090 | - } |
|
1077 | + /** |
|
1078 | + * espresso_venue_name |
|
1079 | + * |
|
1080 | + * @access public |
|
1081 | + * @param int $EVT_ID |
|
1082 | + * @return string |
|
1083 | + * @throws EE_Error |
|
1084 | + * @throws ReflectionException |
|
1085 | + */ |
|
1086 | + function espresso_venue_id($EVT_ID = 0) |
|
1087 | + { |
|
1088 | + $venue = EEH_Venue_View::get_venue($EVT_ID); |
|
1089 | + return $venue instanceof EE_Venue ? $venue->ID() : 0; |
|
1090 | + } |
|
1091 | 1091 | } |
1092 | 1092 | |
1093 | 1093 | |
1094 | 1094 | if (! function_exists('espresso_is_venue_private')) { |
1095 | - /** |
|
1096 | - * Return whether a venue is private or not. |
|
1097 | - * |
|
1098 | - * @param int $VNU_ID optional, the venue id to check. |
|
1099 | - * |
|
1100 | - * @return bool | null |
|
1101 | - * @throws EE_Error |
|
1102 | - * @throws ReflectionException |
|
1103 | - * @see EEH_Venue_View::get_venue() for more info on expected return results. |
|
1104 | - */ |
|
1105 | - function espresso_is_venue_private($VNU_ID = 0) |
|
1106 | - { |
|
1107 | - return EEH_Venue_View::is_venue_private($VNU_ID); |
|
1108 | - } |
|
1095 | + /** |
|
1096 | + * Return whether a venue is private or not. |
|
1097 | + * |
|
1098 | + * @param int $VNU_ID optional, the venue id to check. |
|
1099 | + * |
|
1100 | + * @return bool | null |
|
1101 | + * @throws EE_Error |
|
1102 | + * @throws ReflectionException |
|
1103 | + * @see EEH_Venue_View::get_venue() for more info on expected return results. |
|
1104 | + */ |
|
1105 | + function espresso_is_venue_private($VNU_ID = 0) |
|
1106 | + { |
|
1107 | + return EEH_Venue_View::is_venue_private($VNU_ID); |
|
1108 | + } |
|
1109 | 1109 | } |
1110 | 1110 | |
1111 | 1111 | |
1112 | 1112 | if (! function_exists('espresso_venue_is_password_protected')) { |
1113 | - /** |
|
1114 | - * returns true or false if a venue is password protected or not |
|
1115 | - * |
|
1116 | - * @param int $VNU_ID optional, the venue id to check. |
|
1117 | - * @return bool |
|
1118 | - * @throws EE_Error |
|
1119 | - * @throws ReflectionException |
|
1120 | - */ |
|
1121 | - function espresso_venue_is_password_protected($VNU_ID = 0) |
|
1122 | - { |
|
1123 | - EE_Registry::instance()->load_helper('Venue_View'); |
|
1124 | - return EEH_Venue_View::is_venue_password_protected($VNU_ID); |
|
1125 | - } |
|
1113 | + /** |
|
1114 | + * returns true or false if a venue is password protected or not |
|
1115 | + * |
|
1116 | + * @param int $VNU_ID optional, the venue id to check. |
|
1117 | + * @return bool |
|
1118 | + * @throws EE_Error |
|
1119 | + * @throws ReflectionException |
|
1120 | + */ |
|
1121 | + function espresso_venue_is_password_protected($VNU_ID = 0) |
|
1122 | + { |
|
1123 | + EE_Registry::instance()->load_helper('Venue_View'); |
|
1124 | + return EEH_Venue_View::is_venue_password_protected($VNU_ID); |
|
1125 | + } |
|
1126 | 1126 | } |
1127 | 1127 | |
1128 | 1128 | |
1129 | 1129 | if (! function_exists('espresso_password_protected_venue_form')) { |
1130 | - /** |
|
1131 | - * Returns a password form if venue is password protected. |
|
1132 | - * |
|
1133 | - * @param int $VNU_ID optional, the venue id to check. |
|
1134 | - * @return string |
|
1135 | - * @throws EE_Error |
|
1136 | - * @throws ReflectionException |
|
1137 | - */ |
|
1138 | - function espresso_password_protected_venue_form($VNU_ID = 0) |
|
1139 | - { |
|
1140 | - EE_Registry::instance()->load_helper('Venue_View'); |
|
1141 | - return EEH_Venue_View::password_protected_venue_form($VNU_ID); |
|
1142 | - } |
|
1130 | + /** |
|
1131 | + * Returns a password form if venue is password protected. |
|
1132 | + * |
|
1133 | + * @param int $VNU_ID optional, the venue id to check. |
|
1134 | + * @return string |
|
1135 | + * @throws EE_Error |
|
1136 | + * @throws ReflectionException |
|
1137 | + */ |
|
1138 | + function espresso_password_protected_venue_form($VNU_ID = 0) |
|
1139 | + { |
|
1140 | + EE_Registry::instance()->load_helper('Venue_View'); |
|
1141 | + return EEH_Venue_View::password_protected_venue_form($VNU_ID); |
|
1142 | + } |
|
1143 | 1143 | } |
1144 | 1144 | |
1145 | 1145 | |
1146 | 1146 | if (! function_exists('espresso_venue_name')) { |
1147 | - /** |
|
1148 | - * espresso_venue_name |
|
1149 | - * |
|
1150 | - * @access public |
|
1151 | - * @param int $VNU_ID |
|
1152 | - * @param string $link_to - options( details, website, none ) whether to turn Venue name into a clickable link to the Venue's details page or website |
|
1153 | - * @param bool $echo |
|
1154 | - * @return string |
|
1155 | - * @throws EE_Error |
|
1156 | - * @throws ReflectionException |
|
1157 | - */ |
|
1158 | - function espresso_venue_name($VNU_ID = 0, $link_to = 'details', $echo = true) |
|
1159 | - { |
|
1160 | - if ($echo) { |
|
1161 | - echo EEH_Venue_View::venue_name($link_to, $VNU_ID); // already escaped |
|
1162 | - return ''; |
|
1163 | - } |
|
1164 | - return EEH_Venue_View::venue_name($link_to, $VNU_ID); |
|
1165 | - } |
|
1147 | + /** |
|
1148 | + * espresso_venue_name |
|
1149 | + * |
|
1150 | + * @access public |
|
1151 | + * @param int $VNU_ID |
|
1152 | + * @param string $link_to - options( details, website, none ) whether to turn Venue name into a clickable link to the Venue's details page or website |
|
1153 | + * @param bool $echo |
|
1154 | + * @return string |
|
1155 | + * @throws EE_Error |
|
1156 | + * @throws ReflectionException |
|
1157 | + */ |
|
1158 | + function espresso_venue_name($VNU_ID = 0, $link_to = 'details', $echo = true) |
|
1159 | + { |
|
1160 | + if ($echo) { |
|
1161 | + echo EEH_Venue_View::venue_name($link_to, $VNU_ID); // already escaped |
|
1162 | + return ''; |
|
1163 | + } |
|
1164 | + return EEH_Venue_View::venue_name($link_to, $VNU_ID); |
|
1165 | + } |
|
1166 | 1166 | } |
1167 | 1167 | |
1168 | 1168 | |
1169 | 1169 | if (! function_exists('espresso_venue_link')) { |
1170 | - /** |
|
1171 | - * espresso_venue_link |
|
1172 | - * |
|
1173 | - * @access public |
|
1174 | - * @param int $VNU_ID |
|
1175 | - * @param string $text |
|
1176 | - * @return string |
|
1177 | - * @throws EE_Error |
|
1178 | - * @throws ReflectionException |
|
1179 | - */ |
|
1180 | - function espresso_venue_link($VNU_ID = 0, $text = '') |
|
1181 | - { |
|
1182 | - return EEH_Venue_View::venue_details_link($VNU_ID, $text); |
|
1183 | - } |
|
1170 | + /** |
|
1171 | + * espresso_venue_link |
|
1172 | + * |
|
1173 | + * @access public |
|
1174 | + * @param int $VNU_ID |
|
1175 | + * @param string $text |
|
1176 | + * @return string |
|
1177 | + * @throws EE_Error |
|
1178 | + * @throws ReflectionException |
|
1179 | + */ |
|
1180 | + function espresso_venue_link($VNU_ID = 0, $text = '') |
|
1181 | + { |
|
1182 | + return EEH_Venue_View::venue_details_link($VNU_ID, $text); |
|
1183 | + } |
|
1184 | 1184 | } |
1185 | 1185 | |
1186 | 1186 | |
1187 | 1187 | if (! function_exists('espresso_venue_description')) { |
1188 | - /** |
|
1189 | - * espresso_venue_description |
|
1190 | - * |
|
1191 | - * @access public |
|
1192 | - * @param bool $VNU_ID |
|
1193 | - * @param bool $echo |
|
1194 | - * @return string |
|
1195 | - * @throws EE_Error |
|
1196 | - * @throws ReflectionException |
|
1197 | - */ |
|
1198 | - function espresso_venue_description($VNU_ID = false, $echo = true) |
|
1199 | - { |
|
1200 | - if ($echo) { |
|
1201 | - echo EEH_Venue_View::venue_description($VNU_ID); // already escaped |
|
1202 | - return ''; |
|
1203 | - } |
|
1204 | - return EEH_Venue_View::venue_description($VNU_ID); |
|
1205 | - } |
|
1188 | + /** |
|
1189 | + * espresso_venue_description |
|
1190 | + * |
|
1191 | + * @access public |
|
1192 | + * @param bool $VNU_ID |
|
1193 | + * @param bool $echo |
|
1194 | + * @return string |
|
1195 | + * @throws EE_Error |
|
1196 | + * @throws ReflectionException |
|
1197 | + */ |
|
1198 | + function espresso_venue_description($VNU_ID = false, $echo = true) |
|
1199 | + { |
|
1200 | + if ($echo) { |
|
1201 | + echo EEH_Venue_View::venue_description($VNU_ID); // already escaped |
|
1202 | + return ''; |
|
1203 | + } |
|
1204 | + return EEH_Venue_View::venue_description($VNU_ID); |
|
1205 | + } |
|
1206 | 1206 | } |
1207 | 1207 | |
1208 | 1208 | |
1209 | 1209 | if (! function_exists('espresso_venue_excerpt')) { |
1210 | - /** |
|
1211 | - * espresso_venue_excerpt |
|
1212 | - * |
|
1213 | - * @access public |
|
1214 | - * @param int $VNU_ID |
|
1215 | - * @param bool $echo |
|
1216 | - * @return string |
|
1217 | - * @throws EE_Error |
|
1218 | - * @throws ReflectionException |
|
1219 | - */ |
|
1220 | - function espresso_venue_excerpt($VNU_ID = 0, $echo = true) |
|
1221 | - { |
|
1222 | - if ($echo) { |
|
1223 | - echo EEH_Venue_View::venue_excerpt($VNU_ID); // already escaped |
|
1224 | - return ''; |
|
1225 | - } |
|
1226 | - return EEH_Venue_View::venue_excerpt($VNU_ID); |
|
1227 | - } |
|
1210 | + /** |
|
1211 | + * espresso_venue_excerpt |
|
1212 | + * |
|
1213 | + * @access public |
|
1214 | + * @param int $VNU_ID |
|
1215 | + * @param bool $echo |
|
1216 | + * @return string |
|
1217 | + * @throws EE_Error |
|
1218 | + * @throws ReflectionException |
|
1219 | + */ |
|
1220 | + function espresso_venue_excerpt($VNU_ID = 0, $echo = true) |
|
1221 | + { |
|
1222 | + if ($echo) { |
|
1223 | + echo EEH_Venue_View::venue_excerpt($VNU_ID); // already escaped |
|
1224 | + return ''; |
|
1225 | + } |
|
1226 | + return EEH_Venue_View::venue_excerpt($VNU_ID); |
|
1227 | + } |
|
1228 | 1228 | } |
1229 | 1229 | |
1230 | 1230 | |
1231 | 1231 | if (! function_exists('espresso_venue_categories')) { |
1232 | - /** |
|
1233 | - * espresso_venue_categories |
|
1234 | - * returns the terms associated with a venue |
|
1235 | - * |
|
1236 | - * @param int $VNU_ID |
|
1237 | - * @param bool $hide_uncategorized |
|
1238 | - * @param bool $echo |
|
1239 | - * @return string |
|
1240 | - * @throws EE_Error |
|
1241 | - * @throws ReflectionException |
|
1242 | - */ |
|
1243 | - function espresso_venue_categories($VNU_ID = 0, $hide_uncategorized = true, $echo = true) |
|
1244 | - { |
|
1245 | - if ($echo) { |
|
1246 | - echo EEH_Venue_View::venue_categories($VNU_ID, $hide_uncategorized); // already escaped |
|
1247 | - return ''; |
|
1248 | - } |
|
1249 | - return EEH_Venue_View::venue_categories($VNU_ID, $hide_uncategorized); |
|
1250 | - } |
|
1232 | + /** |
|
1233 | + * espresso_venue_categories |
|
1234 | + * returns the terms associated with a venue |
|
1235 | + * |
|
1236 | + * @param int $VNU_ID |
|
1237 | + * @param bool $hide_uncategorized |
|
1238 | + * @param bool $echo |
|
1239 | + * @return string |
|
1240 | + * @throws EE_Error |
|
1241 | + * @throws ReflectionException |
|
1242 | + */ |
|
1243 | + function espresso_venue_categories($VNU_ID = 0, $hide_uncategorized = true, $echo = true) |
|
1244 | + { |
|
1245 | + if ($echo) { |
|
1246 | + echo EEH_Venue_View::venue_categories($VNU_ID, $hide_uncategorized); // already escaped |
|
1247 | + return ''; |
|
1248 | + } |
|
1249 | + return EEH_Venue_View::venue_categories($VNU_ID, $hide_uncategorized); |
|
1250 | + } |
|
1251 | 1251 | } |
1252 | 1252 | |
1253 | 1253 | |
1254 | 1254 | if (! function_exists('espresso_venue_address')) { |
1255 | - /** |
|
1256 | - * espresso_venue_address |
|
1257 | - * returns a formatted block of html for displaying a venue's address |
|
1258 | - * |
|
1259 | - * @param string $type 'inline' or 'multiline' |
|
1260 | - * @param int $VNU_ID |
|
1261 | - * @param bool $echo |
|
1262 | - * @return string |
|
1263 | - * @throws EE_Error |
|
1264 | - * @throws ReflectionException |
|
1265 | - */ |
|
1266 | - function espresso_venue_address($type = 'multiline', $VNU_ID = 0, $echo = true) |
|
1267 | - { |
|
1268 | - if ($echo) { |
|
1269 | - echo EEH_Venue_View::venue_address($type, $VNU_ID); // already escaped |
|
1270 | - return ''; |
|
1271 | - } |
|
1272 | - return EEH_Venue_View::venue_address($type, $VNU_ID); |
|
1273 | - } |
|
1255 | + /** |
|
1256 | + * espresso_venue_address |
|
1257 | + * returns a formatted block of html for displaying a venue's address |
|
1258 | + * |
|
1259 | + * @param string $type 'inline' or 'multiline' |
|
1260 | + * @param int $VNU_ID |
|
1261 | + * @param bool $echo |
|
1262 | + * @return string |
|
1263 | + * @throws EE_Error |
|
1264 | + * @throws ReflectionException |
|
1265 | + */ |
|
1266 | + function espresso_venue_address($type = 'multiline', $VNU_ID = 0, $echo = true) |
|
1267 | + { |
|
1268 | + if ($echo) { |
|
1269 | + echo EEH_Venue_View::venue_address($type, $VNU_ID); // already escaped |
|
1270 | + return ''; |
|
1271 | + } |
|
1272 | + return EEH_Venue_View::venue_address($type, $VNU_ID); |
|
1273 | + } |
|
1274 | 1274 | } |
1275 | 1275 | |
1276 | 1276 | |
1277 | 1277 | if (! function_exists('espresso_venue_raw_address')) { |
1278 | - /** |
|
1279 | - * espresso_venue_address |
|
1280 | - * returns an UN-formatted string containing a venue's address |
|
1281 | - * |
|
1282 | - * @param string $type 'inline' or 'multiline' |
|
1283 | - * @param int $VNU_ID |
|
1284 | - * @param bool $echo |
|
1285 | - * @return string |
|
1286 | - * @throws EE_Error |
|
1287 | - * @throws ReflectionException |
|
1288 | - */ |
|
1289 | - function espresso_venue_raw_address($type = 'multiline', $VNU_ID = 0, $echo = true) |
|
1290 | - { |
|
1291 | - if ($echo) { |
|
1292 | - echo EEH_Venue_View::venue_address($type, $VNU_ID, false, false); // already escaped |
|
1293 | - return ''; |
|
1294 | - } |
|
1295 | - return EEH_Venue_View::venue_address($type, $VNU_ID, false, false); |
|
1296 | - } |
|
1278 | + /** |
|
1279 | + * espresso_venue_address |
|
1280 | + * returns an UN-formatted string containing a venue's address |
|
1281 | + * |
|
1282 | + * @param string $type 'inline' or 'multiline' |
|
1283 | + * @param int $VNU_ID |
|
1284 | + * @param bool $echo |
|
1285 | + * @return string |
|
1286 | + * @throws EE_Error |
|
1287 | + * @throws ReflectionException |
|
1288 | + */ |
|
1289 | + function espresso_venue_raw_address($type = 'multiline', $VNU_ID = 0, $echo = true) |
|
1290 | + { |
|
1291 | + if ($echo) { |
|
1292 | + echo EEH_Venue_View::venue_address($type, $VNU_ID, false, false); // already escaped |
|
1293 | + return ''; |
|
1294 | + } |
|
1295 | + return EEH_Venue_View::venue_address($type, $VNU_ID, false, false); |
|
1296 | + } |
|
1297 | 1297 | } |
1298 | 1298 | |
1299 | 1299 | |
1300 | 1300 | if (! function_exists('espresso_venue_has_address')) { |
1301 | - /** |
|
1302 | - * espresso_venue_has_address |
|
1303 | - * returns TRUE or FALSE if a Venue has address information |
|
1304 | - * |
|
1305 | - * @param int $VNU_ID |
|
1306 | - * @return bool |
|
1307 | - * @throws EE_Error |
|
1308 | - * @throws ReflectionException |
|
1309 | - */ |
|
1310 | - function espresso_venue_has_address($VNU_ID = 0) |
|
1311 | - { |
|
1312 | - return EEH_Venue_View::venue_has_address($VNU_ID); |
|
1313 | - } |
|
1301 | + /** |
|
1302 | + * espresso_venue_has_address |
|
1303 | + * returns TRUE or FALSE if a Venue has address information |
|
1304 | + * |
|
1305 | + * @param int $VNU_ID |
|
1306 | + * @return bool |
|
1307 | + * @throws EE_Error |
|
1308 | + * @throws ReflectionException |
|
1309 | + */ |
|
1310 | + function espresso_venue_has_address($VNU_ID = 0) |
|
1311 | + { |
|
1312 | + return EEH_Venue_View::venue_has_address($VNU_ID); |
|
1313 | + } |
|
1314 | 1314 | } |
1315 | 1315 | |
1316 | 1316 | |
1317 | 1317 | if (! function_exists('espresso_venue_gmap')) { |
1318 | - /** |
|
1319 | - * espresso_venue_gmap |
|
1320 | - * returns a google map for the venue address |
|
1321 | - * |
|
1322 | - * @param int $VNU_ID |
|
1323 | - * @param bool $map_ID |
|
1324 | - * @param array $gmap |
|
1325 | - * @param bool $echo |
|
1326 | - * @return string |
|
1327 | - * @throws EE_Error |
|
1328 | - * @throws ReflectionException |
|
1329 | - */ |
|
1330 | - function espresso_venue_gmap($VNU_ID = 0, $map_ID = false, $gmap = [], $echo = true) |
|
1331 | - { |
|
1332 | - if ($echo) { |
|
1333 | - echo EEH_Venue_View::venue_gmap($VNU_ID, $map_ID, $gmap); // already escaped |
|
1334 | - return ''; |
|
1335 | - } |
|
1336 | - return EEH_Venue_View::venue_gmap($VNU_ID, $map_ID, $gmap); |
|
1337 | - } |
|
1318 | + /** |
|
1319 | + * espresso_venue_gmap |
|
1320 | + * returns a google map for the venue address |
|
1321 | + * |
|
1322 | + * @param int $VNU_ID |
|
1323 | + * @param bool $map_ID |
|
1324 | + * @param array $gmap |
|
1325 | + * @param bool $echo |
|
1326 | + * @return string |
|
1327 | + * @throws EE_Error |
|
1328 | + * @throws ReflectionException |
|
1329 | + */ |
|
1330 | + function espresso_venue_gmap($VNU_ID = 0, $map_ID = false, $gmap = [], $echo = true) |
|
1331 | + { |
|
1332 | + if ($echo) { |
|
1333 | + echo EEH_Venue_View::venue_gmap($VNU_ID, $map_ID, $gmap); // already escaped |
|
1334 | + return ''; |
|
1335 | + } |
|
1336 | + return EEH_Venue_View::venue_gmap($VNU_ID, $map_ID, $gmap); |
|
1337 | + } |
|
1338 | 1338 | } |
1339 | 1339 | |
1340 | 1340 | |
1341 | 1341 | if (! function_exists('espresso_venue_phone')) { |
1342 | - /** |
|
1343 | - * espresso_venue_phone |
|
1344 | - * |
|
1345 | - * @param int $VNU_ID |
|
1346 | - * @param bool $echo |
|
1347 | - * @return string |
|
1348 | - * @throws EE_Error |
|
1349 | - * @throws ReflectionException |
|
1350 | - */ |
|
1351 | - function espresso_venue_phone($VNU_ID = 0, $echo = true) |
|
1352 | - { |
|
1353 | - if ($echo) { |
|
1354 | - echo EEH_Venue_View::venue_phone($VNU_ID); // already escaped |
|
1355 | - return ''; |
|
1356 | - } |
|
1357 | - return EEH_Venue_View::venue_phone($VNU_ID); |
|
1358 | - } |
|
1342 | + /** |
|
1343 | + * espresso_venue_phone |
|
1344 | + * |
|
1345 | + * @param int $VNU_ID |
|
1346 | + * @param bool $echo |
|
1347 | + * @return string |
|
1348 | + * @throws EE_Error |
|
1349 | + * @throws ReflectionException |
|
1350 | + */ |
|
1351 | + function espresso_venue_phone($VNU_ID = 0, $echo = true) |
|
1352 | + { |
|
1353 | + if ($echo) { |
|
1354 | + echo EEH_Venue_View::venue_phone($VNU_ID); // already escaped |
|
1355 | + return ''; |
|
1356 | + } |
|
1357 | + return EEH_Venue_View::venue_phone($VNU_ID); |
|
1358 | + } |
|
1359 | 1359 | } |
1360 | 1360 | |
1361 | 1361 | |
1362 | 1362 | if (! function_exists('espresso_venue_website')) { |
1363 | - /** |
|
1364 | - * espresso_venue_website |
|
1365 | - * |
|
1366 | - * @param int $VNU_ID |
|
1367 | - * @param bool $echo |
|
1368 | - * @return string |
|
1369 | - * @throws EE_Error |
|
1370 | - * @throws ReflectionException |
|
1371 | - */ |
|
1372 | - function espresso_venue_website($VNU_ID = 0, $echo = true) |
|
1373 | - { |
|
1374 | - if ($echo) { |
|
1375 | - echo EEH_Venue_View::venue_website_link($VNU_ID); // already escaped |
|
1376 | - return ''; |
|
1377 | - } |
|
1378 | - return EEH_Venue_View::venue_website_link($VNU_ID); |
|
1379 | - } |
|
1363 | + /** |
|
1364 | + * espresso_venue_website |
|
1365 | + * |
|
1366 | + * @param int $VNU_ID |
|
1367 | + * @param bool $echo |
|
1368 | + * @return string |
|
1369 | + * @throws EE_Error |
|
1370 | + * @throws ReflectionException |
|
1371 | + */ |
|
1372 | + function espresso_venue_website($VNU_ID = 0, $echo = true) |
|
1373 | + { |
|
1374 | + if ($echo) { |
|
1375 | + echo EEH_Venue_View::venue_website_link($VNU_ID); // already escaped |
|
1376 | + return ''; |
|
1377 | + } |
|
1378 | + return EEH_Venue_View::venue_website_link($VNU_ID); |
|
1379 | + } |
|
1380 | 1380 | } |
1381 | 1381 | |
1382 | 1382 | |
1383 | 1383 | if (! function_exists('espresso_edit_venue_link')) { |
1384 | - /** |
|
1385 | - * espresso_edit_venue_link |
|
1386 | - * |
|
1387 | - * @param int $VNU_ID |
|
1388 | - * @param bool $echo |
|
1389 | - * @return string |
|
1390 | - * @throws EE_Error |
|
1391 | - * @throws ReflectionException |
|
1392 | - */ |
|
1393 | - function espresso_edit_venue_link($VNU_ID = 0, $echo = true) |
|
1394 | - { |
|
1395 | - if ($echo) { |
|
1396 | - echo EEH_Venue_View::edit_venue_link($VNU_ID); // already escaped |
|
1397 | - return ''; |
|
1398 | - } |
|
1399 | - return EEH_Venue_View::edit_venue_link($VNU_ID); |
|
1400 | - } |
|
1384 | + /** |
|
1385 | + * espresso_edit_venue_link |
|
1386 | + * |
|
1387 | + * @param int $VNU_ID |
|
1388 | + * @param bool $echo |
|
1389 | + * @return string |
|
1390 | + * @throws EE_Error |
|
1391 | + * @throws ReflectionException |
|
1392 | + */ |
|
1393 | + function espresso_edit_venue_link($VNU_ID = 0, $echo = true) |
|
1394 | + { |
|
1395 | + if ($echo) { |
|
1396 | + echo EEH_Venue_View::edit_venue_link($VNU_ID); // already escaped |
|
1397 | + return ''; |
|
1398 | + } |
|
1399 | + return EEH_Venue_View::edit_venue_link($VNU_ID); |
|
1400 | + } |
|
1401 | 1401 | } |
1402 | 1402 | |
1403 | 1403 |
@@ -3,17 +3,17 @@ discard block |
||
3 | 3 | <div class="padding"> |
4 | 4 | <p> |
5 | 5 | <?php printf( |
6 | - esc_html__( |
|
7 | - '%1$sNote:%2$s The %3$s[ESPRESSO_EVENT_ATTENDEES]%4$s shortcode is not used to represent the attendees post type directly, but is instead used to represent the intersection of attendees with events. So it\'s always returning a list of attendees %5$sin relation to%6$s an event.', |
|
8 | - 'event_espresso' |
|
9 | - ), |
|
10 | - '<strong>', |
|
11 | - '</strong>', |
|
12 | - '<code>', |
|
13 | - '</code>', |
|
14 | - '<em>', |
|
15 | - '</em>' |
|
16 | - ); ?> |
|
6 | + esc_html__( |
|
7 | + '%1$sNote:%2$s The %3$s[ESPRESSO_EVENT_ATTENDEES]%4$s shortcode is not used to represent the attendees post type directly, but is instead used to represent the intersection of attendees with events. So it\'s always returning a list of attendees %5$sin relation to%6$s an event.', |
|
8 | + 'event_espresso' |
|
9 | + ), |
|
10 | + '<strong>', |
|
11 | + '</strong>', |
|
12 | + '<code>', |
|
13 | + '</code>', |
|
14 | + '<em>', |
|
15 | + '</em>' |
|
16 | + ); ?> |
|
17 | 17 | </p> |
18 | 18 | |
19 | 19 | <ul> |
@@ -21,9 +21,9 @@ discard block |
||
21 | 21 | <strong>[ESPRESSO_EVENT_ATTENDEES]</strong><br> |
22 | 22 | <p class="description"> |
23 | 23 | <?php esc_html_e( |
24 | - 'With no parameters, this shows the attendees for the earliest active event, or if no active event, the earliest upcoming event. If it is used in Event Description, then it will show the attendees for that event.', |
|
25 | - 'event_espresso' |
|
26 | - ); ?> |
|
24 | + 'With no parameters, this shows the attendees for the earliest active event, or if no active event, the earliest upcoming event. If it is used in Event Description, then it will show the attendees for that event.', |
|
25 | + 'event_espresso' |
|
26 | + ); ?> |
|
27 | 27 | </p> |
28 | 28 | <br> |
29 | 29 | </li> |
@@ -52,20 +52,20 @@ discard block |
||
52 | 52 | <strong>[ESPRESSO_EVENT_ATTENDEES status=RAP]</strong><br> |
53 | 53 | <p class="description"> |
54 | 54 | <?php esc_html_e( |
55 | - 'You can list attendees that have a specific registration status (use status code) or use "all" to return all attendees regardless of status. Default when you don\'t have this parameter set is to only return attendees attached to approved contacts.', |
|
56 | - 'event_espresso' |
|
57 | - ); ?> |
|
55 | + 'You can list attendees that have a specific registration status (use status code) or use "all" to return all attendees regardless of status. Default when you don\'t have this parameter set is to only return attendees attached to approved contacts.', |
|
56 | + 'event_espresso' |
|
57 | + ); ?> |
|
58 | 58 | </p> |
59 | 59 | <p> |
60 | 60 | <?php esc_html_e('The statuses you can use are:', 'event_espresso'); ?> |
61 | 61 | <br> |
62 | 62 | <?php |
63 | - foreach ($reg_status_array as $status_code => $status_label) { |
|
64 | - $status_code = esc_html($status_code); |
|
65 | - $status_label = esc_html($status_label); |
|
66 | - echo "<strong>$status_code</strong>: $status_label<br>"; |
|
67 | - } |
|
68 | - ?> |
|
63 | + foreach ($reg_status_array as $status_code => $status_label) { |
|
64 | + $status_code = esc_html($status_code); |
|
65 | + $status_label = esc_html($status_label); |
|
66 | + echo "<strong>$status_code</strong>: $status_label<br>"; |
|
67 | + } |
|
68 | + ?> |
|
69 | 69 | |
70 | 70 | </p> |
71 | 71 | <br> |
@@ -74,9 +74,9 @@ discard block |
||
74 | 74 | <strong>[ESPRESSO_EVENT_ATTENDEES display_on_archives=true]</strong><br> |
75 | 75 | <p class="description"> |
76 | 76 | <?php esc_html_e( |
77 | - 'Will display the attendees list when events are viewed on archive pages.', |
|
78 | - 'event_espresso' |
|
79 | - ); ?> |
|
77 | + 'Will display the attendees list when events are viewed on archive pages.', |
|
78 | + 'event_espresso' |
|
79 | + ); ?> |
|
80 | 80 | </p> |
81 | 81 | <br> |
82 | 82 | </li> |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | |
118 | 118 | protected function _installation() |
119 | 119 | { |
120 | - $template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH . 'support_admin_details_installation.template.php'; |
|
120 | + $template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH.'support_admin_details_installation.template.php'; |
|
121 | 121 | $this->_template_args['admin_page_content'] = EEH_Template::display_template( |
122 | 122 | $template_path, |
123 | 123 | '', |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | add_meta_box( |
139 | 139 | "espresso_{$box}_settings", |
140 | 140 | $label, |
141 | - function ($post, $metabox) { |
|
141 | + function($post, $metabox) { |
|
142 | 142 | EEH_Template::display_template( |
143 | 143 | $metabox['args']['template_path'], |
144 | 144 | $metabox['args']['template_args'] |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | $box, |
174 | 174 | $label, |
175 | 175 | array( |
176 | - 'template_path' => EE_SUPPORT_ADMIN_TEMPLATE_PATH . "support_admin_details_{$box}.template.php", |
|
176 | + 'template_path' => EE_SUPPORT_ADMIN_TEMPLATE_PATH."support_admin_details_{$box}.template.php", |
|
177 | 177 | 'template_args' => $this->_template_args, |
178 | 178 | ) |
179 | 179 | ); |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | $box, |
206 | 206 | $label, |
207 | 207 | array( |
208 | - 'template_path' => EE_SUPPORT_ADMIN_TEMPLATE_PATH . "support_admin_details_{$box}.template.php", |
|
208 | + 'template_path' => EE_SUPPORT_ADMIN_TEMPLATE_PATH."support_admin_details_{$box}.template.php", |
|
209 | 209 | 'template_args' => $this->_template_args, |
210 | 210 | ) |
211 | 211 | ); |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | $box, |
234 | 234 | $label, |
235 | 235 | array( |
236 | - 'template_path' => EE_SUPPORT_ADMIN_TEMPLATE_PATH . "support_admin_details_{$box}.template.php", |
|
236 | + 'template_path' => EE_SUPPORT_ADMIN_TEMPLATE_PATH."support_admin_details_{$box}.template.php", |
|
237 | 237 | 'template_args' => $this->_template_args, |
238 | 238 | ) |
239 | 239 | ); |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | protected function _developers() |
245 | 245 | { |
246 | 246 | $this->_template_args['admin_page_content'] = EEH_Template::display_template( |
247 | - EE_SUPPORT_ADMIN_TEMPLATE_PATH . 'developers_admin_details.template.php', |
|
247 | + EE_SUPPORT_ADMIN_TEMPLATE_PATH.'developers_admin_details.template.php', |
|
248 | 248 | array(), |
249 | 249 | true |
250 | 250 | ); |
@@ -11,241 +11,241 @@ |
||
11 | 11 | */ |
12 | 12 | class Support_Admin_Page extends EE_Admin_Page |
13 | 13 | { |
14 | - protected function _init_page_props() |
|
15 | - { |
|
16 | - $this->page_slug = EE_SUPPORT_PG_SLUG; |
|
17 | - $this->page_label = esc_html__('Help & Support', 'event_espresso'); |
|
18 | - $this->_admin_base_url = EE_SUPPORT_ADMIN_URL; |
|
19 | - $this->_admin_base_path = EE_SUPPORT_ADMIN; |
|
20 | - } |
|
21 | - |
|
22 | - |
|
23 | - protected function _ajax_hooks() |
|
24 | - { |
|
25 | - } |
|
26 | - |
|
27 | - |
|
28 | - protected function _define_page_props() |
|
29 | - { |
|
30 | - $this->_labels = array(); |
|
31 | - $this->_admin_page_title = $this->page_label; |
|
32 | - } |
|
33 | - |
|
34 | - |
|
35 | - protected function _set_page_routes() |
|
36 | - { |
|
37 | - $this->_page_routes = array( |
|
38 | - 'default' => array( |
|
39 | - 'func' => '_contact_support', |
|
40 | - 'capability' => 'ee_read_ee', |
|
41 | - ), |
|
42 | - 'developers' => array( |
|
43 | - 'func' => '_developers', |
|
44 | - 'capability' => 'ee_read_ee', |
|
45 | - ), |
|
46 | - 'shortcodes' => array( |
|
47 | - 'func' => '_shortcodes', |
|
48 | - 'capability' => 'ee_read_ee', |
|
49 | - ), |
|
50 | - ); |
|
51 | - } |
|
52 | - |
|
53 | - |
|
54 | - protected function _set_page_config() |
|
55 | - { |
|
56 | - $this->_page_config = array( |
|
57 | - 'default' => array( |
|
58 | - 'nav' => array( |
|
59 | - 'label' => esc_html__('Support', 'event_espresso'), |
|
60 | - 'order' => 30, |
|
61 | - ), |
|
62 | - 'metaboxes' => array_merge($this->_default_espresso_metaboxes, array('_support_boxes')), |
|
63 | - 'require_nonce' => false, |
|
64 | - ), |
|
65 | - 'developers' => array( |
|
66 | - 'nav' => array( |
|
67 | - 'label' => esc_html__('Developers', 'event_espresso'), |
|
68 | - 'order' => 50, |
|
69 | - ), |
|
70 | - 'metaboxes' => $this->_default_espresso_metaboxes, |
|
71 | - 'require_nonce' => false, |
|
72 | - ), |
|
73 | - 'shortcodes' => array( |
|
74 | - 'nav' => array( |
|
75 | - 'label' => esc_html__('Shortcodes', 'event_espresso'), |
|
76 | - 'order' => 60, |
|
77 | - ), |
|
78 | - 'metaboxes' => array_merge($this->_default_espresso_metaboxes, array('_shortcodes_boxes')), |
|
79 | - 'require_nonce' => false, |
|
80 | - ), |
|
81 | - ); |
|
82 | - } |
|
83 | - |
|
84 | - |
|
85 | - // none of the below group are currently used for Support pages |
|
86 | - protected function _add_screen_options() |
|
87 | - { |
|
88 | - } |
|
89 | - |
|
90 | - |
|
91 | - protected function _add_feature_pointers() |
|
92 | - { |
|
93 | - } |
|
94 | - |
|
95 | - |
|
96 | - public function admin_init() |
|
97 | - { |
|
98 | - } |
|
99 | - |
|
100 | - |
|
101 | - public function admin_notices() |
|
102 | - { |
|
103 | - } |
|
104 | - |
|
105 | - |
|
106 | - public function admin_footer_scripts() |
|
107 | - { |
|
108 | - } |
|
109 | - |
|
110 | - |
|
111 | - public function load_scripts_styles() |
|
112 | - { |
|
113 | - } |
|
114 | - |
|
115 | - |
|
116 | - protected function _installation() |
|
117 | - { |
|
118 | - $template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH . 'support_admin_details_installation.template.php'; |
|
119 | - $this->_template_args['admin_page_content'] = EEH_Template::display_template( |
|
120 | - $template_path, |
|
121 | - '', |
|
122 | - true |
|
123 | - ); |
|
124 | - $this->display_admin_page_with_sidebar(); |
|
125 | - } |
|
126 | - |
|
127 | - |
|
128 | - protected function _resources() |
|
129 | - { |
|
130 | - $this->display_admin_page_with_sidebar(); |
|
131 | - } |
|
132 | - |
|
133 | - |
|
134 | - protected function _add_settings_metabox($box, $label, array $args) |
|
135 | - { |
|
136 | - add_meta_box( |
|
137 | - "espresso_{$box}_settings", |
|
138 | - $label, |
|
139 | - function ($post, $metabox) { |
|
140 | - EEH_Template::display_template( |
|
141 | - $metabox['args']['template_path'], |
|
142 | - $metabox['args']['template_args'] |
|
143 | - ); |
|
144 | - }, |
|
145 | - $this->_current_screen->id, |
|
146 | - 'normal', |
|
147 | - 'high', |
|
148 | - apply_filters( |
|
149 | - "FHEE__Support_Admin_Page___add_settings_metabox__{$box}_args_array", |
|
150 | - $args |
|
151 | - ) |
|
152 | - ); |
|
153 | - } |
|
154 | - |
|
155 | - |
|
156 | - protected function _resources_boxes() |
|
157 | - { |
|
158 | - $boxes = apply_filters( |
|
159 | - 'FHEE__Support_Admin_Page___resources_boxes__boxes_array', |
|
160 | - array( |
|
161 | - 'favorite_theme_developers' => esc_html__('Favorite Theme Developers', 'event_espresso'), |
|
162 | - 'highly_recommended_themes' => esc_html__('Highly Recommended Themes', 'event_espresso'), |
|
163 | - 'hire_developer' => esc_html__('Hire a Developer', 'event_espresso'), |
|
164 | - 'partners' => esc_html__('Partners', 'event_espresso'), |
|
165 | - 'recommended_plugins' => esc_html__('Recommended Plugins', 'event_espresso'), |
|
166 | - 'other_resources' => esc_html__('Other Resources', 'event_espresso'), |
|
167 | - ) |
|
168 | - ); |
|
169 | - foreach ($boxes as $box => $label) { |
|
170 | - $this->_add_settings_metabox( |
|
171 | - $box, |
|
172 | - $label, |
|
173 | - array( |
|
174 | - 'template_path' => EE_SUPPORT_ADMIN_TEMPLATE_PATH . "support_admin_details_{$box}.template.php", |
|
175 | - 'template_args' => $this->_template_args, |
|
176 | - ) |
|
177 | - ); |
|
178 | - } |
|
179 | - } |
|
180 | - |
|
181 | - |
|
182 | - protected function _shortcodes() |
|
183 | - { |
|
184 | - $this->display_admin_page_with_sidebar(); |
|
185 | - } |
|
186 | - |
|
187 | - |
|
188 | - protected function _shortcodes_boxes() |
|
189 | - { |
|
190 | - $boxes = apply_filters( |
|
191 | - 'FHEE__Support_Admin_Page___shortcodes_boxes__boxes_array', |
|
192 | - array( |
|
193 | - 'shortcodes_event_listings' => esc_html__('Event Listings', 'event_espresso'), |
|
194 | - 'shortcodes_ticket_selector' => esc_html__('Event Ticket Selector', 'event_espresso'), |
|
195 | - 'shortcodes_category' => esc_html__('Event Categories', 'event_espresso'), |
|
196 | - 'shortcodes_attendee' => esc_html__('Event Attendees', 'event_espresso') |
|
197 | - /*'shortcodes_single_events' => esc_html__('Single Events', 'event_espresso'),*/ |
|
198 | - /*'shortcodes_attendee_listings' => esc_html__('Attendee Listings', 'event_espresso'),*/ |
|
199 | - ) |
|
200 | - ); |
|
201 | - foreach ($boxes as $box => $label) { |
|
202 | - $this->_add_settings_metabox( |
|
203 | - $box, |
|
204 | - $label, |
|
205 | - array( |
|
206 | - 'template_path' => EE_SUPPORT_ADMIN_TEMPLATE_PATH . "support_admin_details_{$box}.template.php", |
|
207 | - 'template_args' => $this->_template_args, |
|
208 | - ) |
|
209 | - ); |
|
210 | - } |
|
211 | - } |
|
212 | - |
|
213 | - |
|
214 | - protected function _contact_support() |
|
215 | - { |
|
216 | - $this->display_admin_page_with_sidebar(); |
|
217 | - } |
|
218 | - |
|
219 | - |
|
220 | - protected function _support_boxes() |
|
221 | - { |
|
222 | - $boxes = apply_filters( |
|
223 | - 'FHEE__Support_Admin_Page___support_boxes__boxes_array', |
|
224 | - array( |
|
225 | - 'contact_support' => esc_html__('Contact Support', 'event_espresso'), |
|
226 | - 'important_information' => esc_html__('Important Information', 'event_espresso'), |
|
227 | - ) |
|
228 | - ); |
|
229 | - foreach ($boxes as $box => $label) { |
|
230 | - $this->_add_settings_metabox( |
|
231 | - $box, |
|
232 | - $label, |
|
233 | - array( |
|
234 | - 'template_path' => EE_SUPPORT_ADMIN_TEMPLATE_PATH . "support_admin_details_{$box}.template.php", |
|
235 | - 'template_args' => $this->_template_args, |
|
236 | - ) |
|
237 | - ); |
|
238 | - } |
|
239 | - } |
|
240 | - |
|
241 | - |
|
242 | - protected function _developers() |
|
243 | - { |
|
244 | - $this->_template_args['admin_page_content'] = EEH_Template::display_template( |
|
245 | - EE_SUPPORT_ADMIN_TEMPLATE_PATH . 'developers_admin_details.template.php', |
|
246 | - array(), |
|
247 | - true |
|
248 | - ); |
|
249 | - $this->display_admin_page_with_sidebar(); |
|
250 | - } |
|
14 | + protected function _init_page_props() |
|
15 | + { |
|
16 | + $this->page_slug = EE_SUPPORT_PG_SLUG; |
|
17 | + $this->page_label = esc_html__('Help & Support', 'event_espresso'); |
|
18 | + $this->_admin_base_url = EE_SUPPORT_ADMIN_URL; |
|
19 | + $this->_admin_base_path = EE_SUPPORT_ADMIN; |
|
20 | + } |
|
21 | + |
|
22 | + |
|
23 | + protected function _ajax_hooks() |
|
24 | + { |
|
25 | + } |
|
26 | + |
|
27 | + |
|
28 | + protected function _define_page_props() |
|
29 | + { |
|
30 | + $this->_labels = array(); |
|
31 | + $this->_admin_page_title = $this->page_label; |
|
32 | + } |
|
33 | + |
|
34 | + |
|
35 | + protected function _set_page_routes() |
|
36 | + { |
|
37 | + $this->_page_routes = array( |
|
38 | + 'default' => array( |
|
39 | + 'func' => '_contact_support', |
|
40 | + 'capability' => 'ee_read_ee', |
|
41 | + ), |
|
42 | + 'developers' => array( |
|
43 | + 'func' => '_developers', |
|
44 | + 'capability' => 'ee_read_ee', |
|
45 | + ), |
|
46 | + 'shortcodes' => array( |
|
47 | + 'func' => '_shortcodes', |
|
48 | + 'capability' => 'ee_read_ee', |
|
49 | + ), |
|
50 | + ); |
|
51 | + } |
|
52 | + |
|
53 | + |
|
54 | + protected function _set_page_config() |
|
55 | + { |
|
56 | + $this->_page_config = array( |
|
57 | + 'default' => array( |
|
58 | + 'nav' => array( |
|
59 | + 'label' => esc_html__('Support', 'event_espresso'), |
|
60 | + 'order' => 30, |
|
61 | + ), |
|
62 | + 'metaboxes' => array_merge($this->_default_espresso_metaboxes, array('_support_boxes')), |
|
63 | + 'require_nonce' => false, |
|
64 | + ), |
|
65 | + 'developers' => array( |
|
66 | + 'nav' => array( |
|
67 | + 'label' => esc_html__('Developers', 'event_espresso'), |
|
68 | + 'order' => 50, |
|
69 | + ), |
|
70 | + 'metaboxes' => $this->_default_espresso_metaboxes, |
|
71 | + 'require_nonce' => false, |
|
72 | + ), |
|
73 | + 'shortcodes' => array( |
|
74 | + 'nav' => array( |
|
75 | + 'label' => esc_html__('Shortcodes', 'event_espresso'), |
|
76 | + 'order' => 60, |
|
77 | + ), |
|
78 | + 'metaboxes' => array_merge($this->_default_espresso_metaboxes, array('_shortcodes_boxes')), |
|
79 | + 'require_nonce' => false, |
|
80 | + ), |
|
81 | + ); |
|
82 | + } |
|
83 | + |
|
84 | + |
|
85 | + // none of the below group are currently used for Support pages |
|
86 | + protected function _add_screen_options() |
|
87 | + { |
|
88 | + } |
|
89 | + |
|
90 | + |
|
91 | + protected function _add_feature_pointers() |
|
92 | + { |
|
93 | + } |
|
94 | + |
|
95 | + |
|
96 | + public function admin_init() |
|
97 | + { |
|
98 | + } |
|
99 | + |
|
100 | + |
|
101 | + public function admin_notices() |
|
102 | + { |
|
103 | + } |
|
104 | + |
|
105 | + |
|
106 | + public function admin_footer_scripts() |
|
107 | + { |
|
108 | + } |
|
109 | + |
|
110 | + |
|
111 | + public function load_scripts_styles() |
|
112 | + { |
|
113 | + } |
|
114 | + |
|
115 | + |
|
116 | + protected function _installation() |
|
117 | + { |
|
118 | + $template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH . 'support_admin_details_installation.template.php'; |
|
119 | + $this->_template_args['admin_page_content'] = EEH_Template::display_template( |
|
120 | + $template_path, |
|
121 | + '', |
|
122 | + true |
|
123 | + ); |
|
124 | + $this->display_admin_page_with_sidebar(); |
|
125 | + } |
|
126 | + |
|
127 | + |
|
128 | + protected function _resources() |
|
129 | + { |
|
130 | + $this->display_admin_page_with_sidebar(); |
|
131 | + } |
|
132 | + |
|
133 | + |
|
134 | + protected function _add_settings_metabox($box, $label, array $args) |
|
135 | + { |
|
136 | + add_meta_box( |
|
137 | + "espresso_{$box}_settings", |
|
138 | + $label, |
|
139 | + function ($post, $metabox) { |
|
140 | + EEH_Template::display_template( |
|
141 | + $metabox['args']['template_path'], |
|
142 | + $metabox['args']['template_args'] |
|
143 | + ); |
|
144 | + }, |
|
145 | + $this->_current_screen->id, |
|
146 | + 'normal', |
|
147 | + 'high', |
|
148 | + apply_filters( |
|
149 | + "FHEE__Support_Admin_Page___add_settings_metabox__{$box}_args_array", |
|
150 | + $args |
|
151 | + ) |
|
152 | + ); |
|
153 | + } |
|
154 | + |
|
155 | + |
|
156 | + protected function _resources_boxes() |
|
157 | + { |
|
158 | + $boxes = apply_filters( |
|
159 | + 'FHEE__Support_Admin_Page___resources_boxes__boxes_array', |
|
160 | + array( |
|
161 | + 'favorite_theme_developers' => esc_html__('Favorite Theme Developers', 'event_espresso'), |
|
162 | + 'highly_recommended_themes' => esc_html__('Highly Recommended Themes', 'event_espresso'), |
|
163 | + 'hire_developer' => esc_html__('Hire a Developer', 'event_espresso'), |
|
164 | + 'partners' => esc_html__('Partners', 'event_espresso'), |
|
165 | + 'recommended_plugins' => esc_html__('Recommended Plugins', 'event_espresso'), |
|
166 | + 'other_resources' => esc_html__('Other Resources', 'event_espresso'), |
|
167 | + ) |
|
168 | + ); |
|
169 | + foreach ($boxes as $box => $label) { |
|
170 | + $this->_add_settings_metabox( |
|
171 | + $box, |
|
172 | + $label, |
|
173 | + array( |
|
174 | + 'template_path' => EE_SUPPORT_ADMIN_TEMPLATE_PATH . "support_admin_details_{$box}.template.php", |
|
175 | + 'template_args' => $this->_template_args, |
|
176 | + ) |
|
177 | + ); |
|
178 | + } |
|
179 | + } |
|
180 | + |
|
181 | + |
|
182 | + protected function _shortcodes() |
|
183 | + { |
|
184 | + $this->display_admin_page_with_sidebar(); |
|
185 | + } |
|
186 | + |
|
187 | + |
|
188 | + protected function _shortcodes_boxes() |
|
189 | + { |
|
190 | + $boxes = apply_filters( |
|
191 | + 'FHEE__Support_Admin_Page___shortcodes_boxes__boxes_array', |
|
192 | + array( |
|
193 | + 'shortcodes_event_listings' => esc_html__('Event Listings', 'event_espresso'), |
|
194 | + 'shortcodes_ticket_selector' => esc_html__('Event Ticket Selector', 'event_espresso'), |
|
195 | + 'shortcodes_category' => esc_html__('Event Categories', 'event_espresso'), |
|
196 | + 'shortcodes_attendee' => esc_html__('Event Attendees', 'event_espresso') |
|
197 | + /*'shortcodes_single_events' => esc_html__('Single Events', 'event_espresso'),*/ |
|
198 | + /*'shortcodes_attendee_listings' => esc_html__('Attendee Listings', 'event_espresso'),*/ |
|
199 | + ) |
|
200 | + ); |
|
201 | + foreach ($boxes as $box => $label) { |
|
202 | + $this->_add_settings_metabox( |
|
203 | + $box, |
|
204 | + $label, |
|
205 | + array( |
|
206 | + 'template_path' => EE_SUPPORT_ADMIN_TEMPLATE_PATH . "support_admin_details_{$box}.template.php", |
|
207 | + 'template_args' => $this->_template_args, |
|
208 | + ) |
|
209 | + ); |
|
210 | + } |
|
211 | + } |
|
212 | + |
|
213 | + |
|
214 | + protected function _contact_support() |
|
215 | + { |
|
216 | + $this->display_admin_page_with_sidebar(); |
|
217 | + } |
|
218 | + |
|
219 | + |
|
220 | + protected function _support_boxes() |
|
221 | + { |
|
222 | + $boxes = apply_filters( |
|
223 | + 'FHEE__Support_Admin_Page___support_boxes__boxes_array', |
|
224 | + array( |
|
225 | + 'contact_support' => esc_html__('Contact Support', 'event_espresso'), |
|
226 | + 'important_information' => esc_html__('Important Information', 'event_espresso'), |
|
227 | + ) |
|
228 | + ); |
|
229 | + foreach ($boxes as $box => $label) { |
|
230 | + $this->_add_settings_metabox( |
|
231 | + $box, |
|
232 | + $label, |
|
233 | + array( |
|
234 | + 'template_path' => EE_SUPPORT_ADMIN_TEMPLATE_PATH . "support_admin_details_{$box}.template.php", |
|
235 | + 'template_args' => $this->_template_args, |
|
236 | + ) |
|
237 | + ); |
|
238 | + } |
|
239 | + } |
|
240 | + |
|
241 | + |
|
242 | + protected function _developers() |
|
243 | + { |
|
244 | + $this->_template_args['admin_page_content'] = EEH_Template::display_template( |
|
245 | + EE_SUPPORT_ADMIN_TEMPLATE_PATH . 'developers_admin_details.template.php', |
|
246 | + array(), |
|
247 | + true |
|
248 | + ); |
|
249 | + $this->display_admin_page_with_sidebar(); |
|
250 | + } |
|
251 | 251 | } |