';
maizzy_the_theme_svg('calendar');
echo $posted_on; // WPCS: XSS OK.
echo '
';
}
}
endif;
if( !function_exists('maizzy_posted_by') ) :
/**
* Prints HTML with meta information for the current author.
*/
function maizzy_posted_by(){
$maizzy_default = maizzy_get_default_theme_options();
$ed_post_author = absint( get_theme_mod( 'ed_post_author',$maizzy_default['ed_post_author'] ) );
if( $ed_post_author ){
echo '';
/* translators: 1: list of categories. */
foreach( $categories as $category ){
$cat_name = $category->name;
$cat_slug = $category->slug;
$cat_url = get_category_link( $category->term_id ); ?>
';
}
if( $tags && $ed_post_tags ){
/* translators: used between list items, there is a space after the comma */
$tags_list = get_the_tag_list('', esc_html_x(', ', 'list item separator', 'maizzy'));
if( $tags_list ){
echo '
';
maizzy_the_theme_svg('tag');
echo '';
esc_html_e('In', 'maizzy');
echo '';
/* translators: 1: list of tags. */
echo '';
echo wp_kses_post($tags_list) . ''; // WPCS: XSS OK.
echo '
';
}
}
if( $edits ){
edit_post_link(
sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers */
__('Edit
%s', 'maizzy'),
array(
'span' => array(
'class' => array(),
),
)
),
get_the_title()
),
'
',
''
);
}
}
}
endif;
if( !function_exists('maizzy_is_comment_by_post_author') ):
/**
* Comments
*/
/**
* Check if the specified comment is written by the author of the post commented on.
*
* @param object $comment Comment data.
*
* @return bool
*/
function maizzy_is_comment_by_post_author( $comment = null ){
if( is_object($comment) && $comment->user_id > 0 ){
$user = get_userdata($comment->user_id);
$post = get_post($comment->comment_post_ID);
if (!empty($user) && !empty($post)) {
return $comment->user_id === $post->post_author;
}
}
return false;
}
endif;
add_filter( 'get_the_archive_title','maizzy_archive_title_callback');
if( !function_exists('maizzy_archive_title_callback') ) :
/**
* Maizzy Archive title filter
*/
function maizzy_archive_title_callback($comment = null){
$title = '';
if ( is_category() ) {
$title = single_cat_title( '', false );
} elseif ( is_tag() ) {
$title = single_tag_title( '', false );
} elseif ( is_author() ) {
$title = get_the_author();
} elseif ( is_year() ) {
$title = get_the_date( 'Y' );
} elseif ( is_month() ) {
$title = get_the_date( 'F Y' );
} elseif ( is_day() ) {
$title = get_the_date( 'F j, Y' );
} elseif ( is_tax( 'post_format' ) ) {
if ( is_tax( 'post_format', 'post-format-aside' ) ) {
$title = esc_html__( 'Asides','maizzy' );
} elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) {
$title = esc_html__( 'Galleries', 'maizzy' );
} elseif ( is_tax( 'post_format', 'post-format-image' ) ) {
$title = esc_html__( 'Images', 'maizzy' );
} elseif ( is_tax( 'post_format', 'post-format-video' ) ) {
$title = esc_html__( 'Videos', 'maizzy' );
} elseif ( is_tax( 'post_format', 'post-format-quote' ) ) {
$title = esc_html__( 'Quotes', 'maizzy' );
} elseif ( is_tax( 'post_format', 'post-format-link' ) ) {
$title = esc_html__( 'Links', 'maizzy' );
} elseif ( is_tax( 'post_format', 'post-format-status' ) ) {
$title = esc_html__( 'Statuses', 'maizzy' );
} elseif ( is_tax( 'post_format', 'post-format-audio' ) ) {
$title = esc_html__( 'Audio', 'maizzy' );
} elseif ( is_tax( 'post_format', 'post-format-chat' ) ) {
$title = esc_html__( 'Chats', 'maizzy' );
}
} elseif ( is_post_type_archive() ) {
$title = post_type_archive_title( '', false );
} elseif ( is_tax() ) {
$title = single_term_title( '', false );
}
return $title;
}
endif;
if( !function_exists('maizzy_archive_title') ) :
/**
* Maizzy Breadcrumb
*/
function maizzy_archive_title($comment = null){
if( is_search() ){ ?>
';
breadcrumb_trail();
echo '
';
}
endif;