array(
'alt' => array(),
'src' => array(),
'srcset' => array(),
'class' => array(),
'height' => array(),
'width' => array()
)
));
?>
the_title_attribute(array(
'echo' => false,
)),
));
?>
';
echo '';
echo wp_kses($categories_list, array('a' => array('href' => array(), 'rel' => array())));
echo '';
}
}
}
if (!function_exists('bigmart_single_tag')) {
function bigmart_single_tag() {
$tags_list = get_the_tag_list('', ', ');
if ($tags_list) {
echo '';
echo "";
echo wp_kses($tags_list, array('a' => array('href' => array(), 'rel' => array())));
echo '
';
}
}
}
/** Blog Post Excerpt */
if (!function_exists('bigmart_blog_post_excerpt')) {
function bigmart_blog_post_excerpt($content = '', $excerpt_length = 250) {
if (!$content) {
return '';
}
return substr(strip_tags(strip_shortcodes($content)), 0, $excerpt_length) . '...';
}
}
/** Get Attachment Alt Tag using attachment url or attachment id */
if (!function_exists('bigmart_get_altofimage')) {
function bigmart_get_altofimage($attachment) {
$alt_text = '';
$attachment_id = '';
if ($attachment) {
if (is_string($attachment)) {
$attachment_id = attachment_url_to_postid($attachment);
} elseif (is_int($attachment)) {
$attachment_id = $attachment;
}
return get_post_meta($attachment_id, '_wp_attachment_image_alt', true);
}
}
}
/** Post Feature Image */
if (!function_exists('bigmart_post_feature_image')) {
function bigmart_post_feature_image($size = 'full') {
if (has_post_thumbnail()) {
$img = wp_get_attachment_image_src(get_post_thumbnail_id(), $size);
?>