', esc_url(get_day_link($mp_artwork_archive_year, $mp_artwork_archive_month, $mp_artwork_archive_day)), esc_attr(get_the_time()), esc_attr(get_the_date('c')), esc_html(get_the_date()));
} else {
printf('', esc_attr(get_the_date('c')), esc_html(get_the_date()));
}
}
/*
* Gety meta information for the current post-date/time and author. *
*/
function mp_artwork_posted_on_meta($mp_artwork_post) {
?>
' . $mp_artwork_term->name . '';
if ($mp_artwork_term != end($term_list)) :
echo ", ";
endif;
}
}
/*
* Post Category
*/
function mp_artwork_post_category($mp_artwork_post) {
if (get_theme_mod(mp_artwork_get_prefix() . 'show_categories', '1') === '1' || get_theme_mod(mp_artwork_get_prefix() . 'show_categories')):
if (strcmp(get_post_type($mp_artwork_post), 'post') === 0) :
?>
, ', 'multiple', $mp_artwork_post->ID); ?>
/
ID, $mp_artwork_postTypeSlugName, array("fields" => "all"));
?>
/
term_id) . '" title="' . sprintf(__("View all posts in %s", 'artwork-lite'), $mp_artwork_category[0]->name) . '" ' . ' class="category-wrapper">' . $mp_artwork_category[0]->name . ' ';
}
}
/*
* Post Tag
*/
function mp_artwork_post_tag($mp_artwork_post) {
if (get_theme_mod(mp_artwork_get_prefix() . 'show_tags', '1') === '1' || get_theme_mod(mp_artwork_get_prefix() . 'show_tags')):
if (strcmp(get_post_type($mp_artwork_post), 'post') === 0) :
the_tags('/' . __('Tagged with', 'artwork-lite') . ' ', ', ', '');
else:
$mp_artwork_postTypeSlug = mp_artwork_get_post_type_slug();
if ($mp_artwork_postTypeSlug):
$mp_artwork_postTypeSlugName = 'post_tag_' . $mp_artwork_postTypeSlug;
$mp_artwork_term_list = wp_get_post_terms($mp_artwork_post->ID, $mp_artwork_postTypeSlugName, array("fields" => "all"));
if (!empty($mp_artwork_term_list)) :
?>
/
post_content));
$mp_artwork_embeds = get_media_embedded_in_content($mp_artwork_content);
if (!empty($mp_artwork_embeds)) {
return '
' . $mp_artwork_embeds[0] . '
';
} else {
return false;
}
}
/*
* Post content
*/
function mp_artwork_get_content_theme($mp_artwork_content_length) {
?>
(.*?)<\/(script|style)>/is', '', $mp_artwork_content);
if (strlen($mp_artwork_content) > $mp_artwork_content_length) {
$mp_artwork_content = extension_loaded('mbstring') ? mb_substr($mp_artwork_content, 0, $mp_artwork_content_length) . '...' : substr($mp_artwork_content, 0, $mp_artwork_content_length) . '...';
}
echo $mp_artwork_content;
?>
/i', $post->post_content, $mp_artwork_matches);
if (!empty($mp_artwork_matches[1])) {
$mp_artwork_first_img = $mp_artwork_matches[1][0];
if (empty($mp_artwork_first_img)) {
$mp_artwork_first_img = "";
}
}
return $mp_artwork_first_img;
}
function mp_artwork_posttype_name_sanitize_text($mp_artwork_txt) {
$mp_artwork_txt = strip_tags($mp_artwork_txt, '');
$mp_artwork_txt = preg_replace("/[^a-zA-Z0-9-]+/", "", $mp_artwork_txt);
$mp_artwork_txt = substr(strtolower($mp_artwork_txt), 0, 19);
return wp_kses_post(force_balance_tags($mp_artwork_txt));
}
/*
* Get post type slug
*
* @return string
*/
function mp_artwork_get_post_type_slug() {
$mp_artwork_post_type_slug = '';
if (is_plugin_active('mp-artwork/mp-artwork.php')) {
$mp_artwork_post_type_slug = mp_artwork_posttype_name_sanitize_text(get_option(mp_artwork_get_prefix() . 'post_type_slug'));
}
if ($mp_artwork_post_type_slug) {
return $mp_artwork_post_type_slug;
} else {
if (has_post_format('work')) {
return '';
}
}
}
/**
* Artwork page menu.
*
* Show pages of site.
*
* @since Artwork 1.0
*/
function mp_artwork_page_menu() {
echo '
';
}
/**
* Artwork post gallery.
*
* Show post gallery.
*
* @since Artwork 1.0
*/
function mp_artwork_get_post_gallery($mp_artwork_post, $mp_artwork_page_template) {
$mp_artwork_galleryPost = new MP_Artwork_Gallery(mp_artwork_get_prefix());
$mp_artwork_galleryPost->get_post_gallery($mp_artwork_post, $mp_artwork_page_template);
}
/**
* Artwork post related posts.
*
* Show post related posts.
*
* @since Artwork 1.0
*/
function mp_artwork_get_related_posts() {
$mp_artwork_relatedPost = new MP_Artwork_Related(mp_artwork_get_prefix());
$mp_artwork_relatedPost->related_posts();
}
/*
* Post thumbnail
* @since Artwork 1.0
*/
function mp_artwork_post_thumbnail($mp_artwork_post, $mp_artwork_page_template) {
?>