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

25 lines
665 B
PHP
Raw Permalink 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_faq', 'mep_faq_part');
2020-05-24 04:17:41 -04:00
if (!function_exists('mep_faq_part')) {
function mep_faq_part($event_id)
{
ob_start();
2023-07-24 22:16:45 -04:00
// get_post_meta($event_id, 'mep_event_faq', true);
2020-12-15 07:27:38 -05:00
$mep_event_faq = get_post_meta($event_id, 'mep_event_faq', true) ? maybe_unserialize(get_post_meta($event_id, 'mep_event_faq', true)) : '';
2023-07-24 22:16:45 -04:00
2020-05-24 04:17:41 -04:00
if ($mep_event_faq) {
2020-07-12 06:42:13 -04:00
require(mep_template_file_path('single/faq.php'));
2020-05-24 04:17:41 -04:00
}
2023-07-24 22:16:45 -04:00
2020-05-24 04:17:41 -04:00
$content = ob_get_clean();
2023-07-24 22:16:45 -04:00
2020-05-24 04:17:41 -04:00
echo apply_filters('mage_event_faq_list', $content, $event_id);
}
2020-01-22 07:15:24 -05:00
}