'image' ]);
}
}
if (!function_exists('aemi_featured_image'))
{
function aemi_featured_image()
{
$single_attachment = is_enabled('aemi_post_single_attachment',1);
$no_img = get_theme_mod('aemi_post_layout','cover') == 'no_img';
if (has_post_thumbnail() && (is_singular() && $single_attachment || !$no_img))
{
?>
%1$s%3$s • %2$s',
sprintf(
'%s ',
esc_html__('Published on', 'aemi')
),
sprintf(
'%1$s %2$s',
esc_attr__('Updated on', 'aemi'),
esc_attr(get_the_modified_time('j F Y - g:i a'))
),
esc_html(get_the_date('j F Y'))
);
}
else
{
printf(
'%1$s%3$s
',
sprintf(
'%s ',
esc_html__('Published on', 'aemi')
),
sprintf(
'%1$s %2$s',
esc_attr__('Updated on', 'aemi'),
esc_attr(get_the_modified_time('j F Y - g:i a'))
),
esc_html(get_the_date('j F Y'))
);
}
}
else if ($upt)
{
printf(
'%1$s%2$s
',
sprintf(
'%1$s %2$s • ',
esc_html__('Published on', 'aemi'),
esc_html(get_the_date('j F Y'))
),
sprintf(
'%1$s %2$s',
esc_attr__('Updated on', 'aemi'),
esc_attr(get_the_modified_time('j F Y - g:i a'))
)
);
}
}
}
if (!function_exists('aemi_info_author'))
{
function aemi_info_author()
{
$author_mod = get_theme_mod(aemi_type('author'), 'both');
$author_both = $author_mod == 'both';
$author_none = $author_mod == 'none';
$author_single = $author_mod == 'single';
$author_loop = $author_mod == 'loop';
$singular = is_singular();
if (!$author_none && ($author_both || ($singular && $author_single || !$singular && $author_loop)))
{
$tag = 'div';
$screader = ' screen-reader-text';
$href_attr = '';
if ($singular)
{
$tag = 'a';
$screader = '';
$href_attr = ' href="'. esc_url(get_author_posts_url(get_the_author_meta('ID'))) .'"';
}
printf(
'<%1$s class="post-author"%2$s>%3$s%4$s%1$s>',
$tag,
$href_attr,
sprintf(
'%2$s',
$screader,
esc_html__('Written by ','aemi')
),
sprintf(
'%s',
esc_html(get_the_author_meta('display_name'))
)
);
}
}
}
if (!function_exists('aemi_sticky_badge'))
{
function aemi_sticky_badge($post_type)
{
if ($post_type == 'post')
{
$singular = is_singular();
$in_loop = !$singular;
$is_sticky = is_sticky();
$sticky_mod = get_theme_mod(aemi_type('show_sticky_badge'), 'both');
$sticky_both = $sticky_mod == 'both';
$sticky_single = $sticky_mod == 'single';
$sticky_loop = $sticky_mod == 'loop';
$sticky_none = $sticky_mod == 'none';
if ($is_sticky && !$sticky_none && ($sticky_both || ($singular && $sticky_single || !$singular && $sticky_loop)))
{
return true;
}
}
return false;
}
}
if (!function_exists('aemi_show_excerpt'))
{
function aemi_show_excerpt($post_type)
{
if (!is_singular())
{
if ($post_type == 'post')
{
$is_sticky = is_sticky();
$excerpt_mod = get_theme_mod(aemi_type('show_excerpt'), 'sticky_only');
$excerpt_both = $excerpt_mod == 'both';
$excerpt_sticky = $excerpt_mod == 'sticky_only';
$excerpt_non_sticky = $excerpt_mod == 'non_sticky_only';
$excerpt_none = $excerpt_mod == 'none';
if (!$excerpt_none && ($excerpt_both || ($is_sticky && $excerpt_sticky || !$is_sticky && $excerpt_non_sticky)))
{
return true;
}
}
else if (get_theme_mod(aemi_type('show_excerpt'), 0))
{
return true;
}
}
return false;
}
}
if (!function_exists('aemi_meta_header'))
{
function aemi_meta_header()
{
$p_type = get_post_type();
$singular = is_singular();
$categories = 'post' === $p_type && $singular && get_the_category_list() && get_theme_mod(aemi_type('category'), 1) == 1;
$excerpt = aemi_show_excerpt($p_type);
$sticky = aemi_sticky_badge($p_type);
$edit_link = get_edit_post_link();
if ($categories || $excerpt || $sticky || $edit_link)
{
?>');
}
?> 0)
{
$meta_occ = [];
$one_meta = false;
foreach ($metas as $meta) {
if (get_the_term_list($post->ID,$meta) != '' ) {
$one_meta = true;
$meta_occ[$meta] = true;
}
}
if ($one_meta) {
?>
ID, $meta, '', '', '' ); ?>