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
|
|
|
|
*/
|
|
|
|
|
|
|
|
add_action('mep_event_speakers_list','mep_display_speaker_list');
|
2020-05-24 04:17:41 -04:00
|
|
|
if (!function_exists('mep_display_speaker_list')) {
|
2020-04-28 06:37:33 -04:00
|
|
|
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){
|
|
|
|
?>
|
|
|
|
<h3><?php ?><i class="<?php echo $speaker_icon; ?>"></i> <?php echo $speaker_label; ?></h3>
|
|
|
|
<?php
|
|
|
|
echo '<ul>';
|
|
|
|
foreach($speakers_id as $speakers){
|
|
|
|
?>
|
|
|
|
<li>
|
|
|
|
<a href='<?php echo get_the_permalink($speakers); ?>'><?php if(has_post_thumbnail($speakers)){ echo get_the_post_thumbnail($speakers,'medium'); }else{ echo '<img src="'.plugins_url( '../images/no-photo.jpg' , __DIR__ ).'"/>'; } ?>
|
|
|
|
<h6><?php echo get_the_title($speakers); ?></h6></a>
|
|
|
|
</li>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
echo '</ul>';
|
|
|
|
}
|
2020-05-24 04:17:41 -04:00
|
|
|
}
|
|
|
|
}
|