( AWESOMEPRESS_SUPPORT_FONTAWESOME ) ? '' : '',
'category' => ( AWESOMEPRESS_SUPPORT_FONTAWESOME ) ? '' : '',
'date' => ( AWESOMEPRESS_SUPPORT_FONTAWESOME ) ? '' : '',
'author' => get_avatar( get_the_author_meta( 'ID' ), 50 ),
);
if ( is_tag() ) {
the_archive_title( '
' . $icons['tag'], '
' );
} elseif ( is_category() ) {
the_archive_title( ' ' . $icons['tag'], '
' );
} elseif ( is_date() ) {
the_archive_title( ' ' . $icons['tag'], '
' );
} elseif ( is_author() ) {
the_archive_title( ' ' . $icons['author'], '
' );
} else {
the_archive_title( '', '
' );
}
}
endif;
/**
* Date Meta
*/
if ( ! function_exists( 'the_awesomepress_meta_date' ) ) :
function the_awesomepress_meta_date( $echo = true, $show_date_text = true ) {
ob_start();
?>
%2$s';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = '';
}
$time_string = sprintf( $time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
);
?>
%s', 'awesomepress' ), $tags_list ); ?>
', 'awesomepress' ), array( 'span' => array( 'class' => array() ) ) ), get_the_title() ) );
?>
post_author, 35 ); ?>
'ids',
'hide_empty' => 1,
// We only need to know if there is more than one category.
'number' => 2,
) );
// Count the number of categories that are attached to the posts.
$all_the_cool_cats = count( $all_the_cool_cats );
set_transient( 'awesomepress_categories', $all_the_cool_cats );
}
if ( $all_the_cool_cats > 1 ) {
// This blog has more than 1 category so awesomepress_categorized_blog should return true.
return true;
} else {
// This blog has only 1 category so awesomepress_categorized_blog should return false.
return false;
}
}
endif;
/**
* Flush out the transients
*/
if ( ! function_exists( 'awesomepress_category_transient_flusher' ) ) :
/**
* Flush out the transients used in awesomepress_categorized_blog.
*/
function awesomepress_category_transient_flusher() {
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
return;
}
// Like, beat it. Dig?
delete_transient( 'awesomepress_categories' );
}
add_action( 'edit_category', 'awesomepress_category_transient_flusher' );
add_action( 'save_post', 'awesomepress_category_transient_flusher' );
endif;