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

26 lines
992 B
PHP
Raw Normal View History

2020-01-22 07:15:24 -05:00
<?php
add_action('mep_event_faq', 'mep_faq_part');
2020-04-28 06:37:33 -04:00
function mep_faq_part($event_id){
2020-03-19 08:34:31 -04:00
ob_start();
2020-04-28 06:37:33 -04:00
$mep_event_faq = get_post_meta($event_id, 'mep_event_faq', true) ? get_post_meta($event_id, 'mep_event_faq', true) : '';
2020-01-22 07:15:24 -05:00
if ($mep_event_faq) {
?>
<div class="mep-event-faq-part">
<h3 class="ex-sec-title"><?php _e('Event F.A.Q', 'mage-eventpress'); ?></h3>
<div id='mep-event-accordion' class="">
<?php
foreach ($mep_event_faq as $field) {
?>
<h3><?php if ($field['mep_faq_title'] != '') echo esc_attr($field['mep_faq_title']); ?></h3>
<p><?php if ($field['mep_faq_content'] != '') echo esc_attr($field['mep_faq_content']); ?></p>
<?php
}
?>
</div>
</div>
<?php
2020-04-28 06:37:33 -04:00
}
2020-03-19 08:34:31 -04:00
$content = ob_get_clean();
2020-04-28 06:37:33 -04:00
echo apply_filters('mage_event_faq_list', $content,$event_id);
2020-01-22 07:15:24 -05:00
}