*
*/
function get_the_dates($_post=null){
global $EventPost, $post;
if(!$_post){
$_post = $post;
}
return $EventPost->print_date($_post);
}
}
if(!function_exists('the_dates')){
/**
* Outputs the HTML generated by `get_the_dates`
*
* @param mixte $post
*/
function the_dates($post=null){
echo wp_kses(get_the_dates($post), EventPost()->kses_tags);
}
}
if(!function_exists('get_the_date_start')){
/**
* Returns the HTML of the start date of an event
*
* @param type $post
*
* @global \EventPost $EventPost
*
* @return string
*/
function get_the_date_start($post=null){
global $EventPost;
$event = $EventPost->retreive($post);
return $EventPost->human_date($event->time_start, $EventPost->settings['dateformat']);
}
}
if(!function_exists('the_date_start')){
/**
* Outputs the HTML of the start date of an event
*
* @param type $post
*/
function the_date_start($post=null){
echo wp_kses(get_the_date_start($post), EventPost()->kses_tags);
}
}
if(!function_exists('get_the_date_end')){
/**
* Returns the HTML of the end date of an event
*
* @param type $post
*
* @global \EventPost $EventPost
*
* @return string
*/
function get_the_date_end($post=null){
global $EventPost;
$event = $EventPost->retreive($post);
return $EventPost->human_date($event->time_end, $EventPost->settings['dateformat']);
}
}
if(!function_exists('the_date_end')){
/**
* Outputs the HTML of the start date of an event
*
* @param type $post
*
* @global \EventPost $EventPost
*
* @return string
*/
function the_date_end($post=null){
echo wp_kses(get_the_date_end($post), EventPost()->kses_tags);
}
}
if(!function_exists('get_the_location')){
/**
* Returns the HTML of the location date of an event
*
* @param type $post
*
* @global \EventPost $EventPost
*
* @return string
*/
function get_the_location($post=null){
global $EventPost;
return $EventPost->print_location($post);
}
}
if(!function_exists('the_location')){
/**
* Outputs the HTML of the location date of an event
*
* @param type $post
*/
function the_location($post=null){
echo wp_kses(get_the_location($post), EventPost()->kses_tags);
}
}