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

21 lines
1.0 KiB
PHP
Raw Normal View History

2020-04-28 06:37:33 -04:00
<?php
2020-05-24 04:17:41 -04:00
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
2020-04-28 06:37:33 -04:00
/**
* This Function will hooked up with the speaker action hook mep_event_speakers_list to display the Event Speaker List
*/
2020-07-12 06:42:13 -04:00
add_action('mep_event_speakers_list', 'mep_display_speaker_list');
if (!function_exists('mep_display_speaker_list')) {
function mep_display_speaker_list($event_id)
{
$speakers_id = get_post_meta($event_id, 'mep_event_speakers_list', true) ? maybe_unserialize(get_post_meta($event_id, 'mep_event_speakers_list', true)) : array();
$speaker_icon = get_post_meta($event_id, 'mep_event_speaker_icon', true) ? get_post_meta($event_id, 'mep_event_speaker_icon', true) : 'fa fa-microphone';
$speaker_label = get_post_meta($event_id, 'mep_speaker_title', true) ? get_post_meta($event_id, 'mep_speaker_title', true) : __("Speaker's", "mage-eventpress");
if (is_array($speakers_id) && sizeof($speakers_id) > 0) {
require(mep_template_file_path('single/speaker-list.php'));
2020-04-28 06:37:33 -04:00
}
}
2020-05-24 04:17:41 -04:00
}