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

43 lines
1.5 KiB
PHP
Raw Permalink Normal View History

2020-05-24 04:17:41 -04:00
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
add_action('mep_event_details', 'mep_ev_details');
if (!function_exists('mep_ev_details')) {
2023-07-24 22:16:45 -04:00
function mep_ev_details($event_id)
2020-05-24 04:17:41 -04:00
{
global $post, $event_meta;
2023-07-24 22:16:45 -04:00
$content_event = get_post($event_id);
2020-03-19 08:34:31 -04:00
$content = $content_event->post_content;
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]&gt;', $content);
2020-07-12 06:42:13 -04:00
require(mep_template_file_path('single/details.php'));
2023-07-24 22:16:45 -04:00
do_action('mep_after_event_details', $event_id);
2020-05-24 04:17:41 -04:00
}
2020-03-19 08:34:31 -04:00
}
2020-01-22 07:15:24 -05:00
2023-07-24 22:16:45 -04:00
add_action('mep_event_details_only', 'mep_ev_details_only');
if (!function_exists('mep_ev_details_only')) {
function mep_ev_details_only()
{
global $post, $event_meta;
$content_event = get_post($post->ID);
$content = $content_event->post_content;
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]&gt;', $content);
echo $content;
}
}
2020-01-22 07:15:24 -05:00
2020-05-24 04:17:41 -04:00
add_action('mep_after_event_details', 'mep_display_event_daywise_details');
if (!function_exists('mep_display_event_daywise_details')) {
2023-07-24 22:16:45 -04:00
function mep_display_event_daywise_details($event_id)
2020-05-24 04:17:41 -04:00
{
global $post, $event_meta;
2023-07-24 22:16:45 -04:00
$mep_event_day = get_post_meta($event_id, 'mep_event_day', true) ? maybe_unserialize(get_post_meta($event_id, 'mep_event_day', true)) : array();
2020-05-24 04:17:41 -04:00
if (sizeof($mep_event_day) > 0) {
2020-07-12 06:42:13 -04:00
require(mep_template_file_path('single/daywise_details.php'));
2020-03-19 08:34:31 -04:00
}
2020-05-24 04:17:41 -04:00
}
2020-01-22 07:15:24 -05:00
}