2020-07-12 10:42:13 +00:00
|
|
|
<?php
|
2020-05-24 08:17:41 +00:00
|
|
|
if (!defined('ABSPATH')) {
|
|
|
|
die;
|
|
|
|
} // Cannot access pages directly.
|
|
|
|
|
2020-07-12 10:42:13 +00:00
|
|
|
add_action('mep_event_organizer', 'mep_ev_org');
|
2020-05-24 08:17:41 +00:00
|
|
|
if (!function_exists('mep_ev_org')) {
|
2023-07-25 02:16:45 +00:00
|
|
|
function mep_ev_org($event_id)
|
2020-07-12 10:42:13 +00:00
|
|
|
{
|
|
|
|
global $post, $author_terms;
|
|
|
|
ob_start();
|
|
|
|
if ($author_terms) {
|
2023-07-25 02:16:45 +00:00
|
|
|
$org = get_the_terms($event_id, 'mep_org');
|
2020-07-12 10:42:13 +00:00
|
|
|
require(mep_template_file_path('single/organizer.php'));
|
2022-02-03 10:11:51 +00:00
|
|
|
|
2020-07-12 10:42:13 +00:00
|
|
|
}
|
|
|
|
$content = ob_get_clean();
|
2023-07-25 02:16:45 +00:00
|
|
|
echo apply_filters('mage_event_single_org_name', $content, $event_id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
add_action('mep_event_organizer_name', 'mep_ev_org_name');
|
|
|
|
if (!function_exists('mep_ev_org_name')) {
|
|
|
|
function mep_ev_org_name()
|
|
|
|
{
|
|
|
|
global $post, $author_terms;
|
|
|
|
ob_start();
|
|
|
|
$org = get_the_terms(get_the_id(), 'mep_org');
|
|
|
|
$names = [];
|
|
|
|
if(sizeof($org) > 0){
|
|
|
|
foreach ($org as $key => $value) {
|
|
|
|
$names[] = $value->name;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
echo esc_html(join($names,', '));
|
|
|
|
$content = ob_get_clean();
|
2020-07-12 10:42:13 +00:00
|
|
|
echo apply_filters('mage_event_single_org_name', $content, $post->ID);
|
|
|
|
}
|
2022-02-17 03:29:12 +00:00
|
|
|
}
|