mage-eventpress/inc/template-prts/event_extra_service.php

27 lines
1.2 KiB
PHP
Raw Normal View History

2020-01-22 07:15:24 -05:00
<?php
2020-05-24 04:17:41 -04:00
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
2020-01-22 07:15:24 -05:00
2021-09-03 06:25:05 -04:00
add_action('mep_event_extra_service', 'mep_ev_extra_serv',10,2);
2020-05-24 04:17:41 -04:00
if (!function_exists('mep_ev_extra_serv')) {
2021-09-03 06:25:05 -04:00
function mep_ev_extra_serv($post_id,$extra_service_label)
2020-05-24 04:17:41 -04:00
{
global $post, $product;
$post_id = $post_id;
$count = 1;
$mep_events_extra_prices = get_post_meta($post_id, 'mep_events_extra_prices', true) ? get_post_meta($post_id, 'mep_events_extra_prices', true) : array();
2020-11-05 07:16:20 -05:00
$event_date = get_post_meta($post_id, 'event_start_date', true) . ' ' . get_post_meta($post_id, 'event_start_time', true);
2022-02-22 21:14:20 -05:00
$mep_available_seat = get_post_meta($post_id, 'mep_available_seat', true) ? get_post_meta($post_id, 'mep_available_seat', true) : 'on';
2020-05-24 04:17:41 -04:00
ob_start();
2021-09-03 06:25:05 -04:00
2020-05-24 04:17:41 -04:00
if (sizeof($mep_events_extra_prices) > 0) {
2021-09-03 06:25:05 -04:00
2020-07-12 06:42:13 -04:00
require(mep_template_file_path('single/extra_service_list.php'));
2020-05-24 04:17:41 -04:00
}
$content = ob_get_clean();
$event_meta = get_post_custom($post_id);
2020-11-05 07:16:20 -05:00
echo apply_filters('mage_event_extra_service_list', $content, $post_id, $event_meta,$event_date);
2020-01-22 07:15:24 -05:00
}
2020-05-24 04:17:41 -04:00
}