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

24 lines
1.0 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
add_action('mep_event_extra_service', 'mep_ev_extra_serv');
2020-05-24 04:17:41 -04:00
if (!function_exists('mep_ev_extra_serv')) {
function mep_ev_extra_serv($post_id)
{
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);
2020-05-24 04:17:41 -04:00
ob_start();
if (sizeof($mep_events_extra_prices) > 0) {
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
}