%1$s%3$s',
sprintf( '%s ', _x( 'Format', 'Used before post format.', 'alchemist' ) ),
esc_url( get_post_format_link( $format ) ),
get_post_format_string( $format )
);
}
if ( 'post' === get_post_type() ) {
alchemist_entry_taxonomies();
}
if ( ! is_singular() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
echo '';
comments_popup_link( sprintf( __( 'Leave a comment on %s', 'alchemist' ), get_the_title() ) );
echo '';
}
}
endif;
if ( ! function_exists( 'alchemist_entry_posted_on' ) ) :
/**
* Prints HTML with date information for current post.
*
* Create your own alchemist_entry_posted_on() function to override in a child theme.
*
* @since Alchemist 1.0
*/
function alchemist_entry_posted_on() {
$time_string = '';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = '';
}
$time_string = sprintf( $time_string,
esc_attr( get_the_date( 'c' ) ),
get_the_date(),
esc_attr( get_the_modified_date( 'c' ) ),
get_the_modified_date()
);
printf( '' . '%1$s%3$s',
_x( 'Posted on', 'Used before publish date.', 'alchemist' ),
esc_url( get_permalink() ),
$time_string
);
}
endif;
if ( ! function_exists( 'alchemist_entry_taxonomies' ) ) :
/**
* Prints HTML with category and tags for current post.
*
* Create your own alchemist_entry_taxonomies() function to override in a child theme.
*
* @since Alchemist 1.0
*/
function alchemist_entry_taxonomies() {
alchemist_entry_category();
alchemist_entry_tags();
}
endif;
if ( ! function_exists( 'alchemist_entry_category_date' ) ) :
/**
* Prints HTML with category and tags for current post.
*
* Create your own alchemist_entry_category_date() function to override in a child theme.
*
* @since Alchemist 1.0
*/
function alchemist_entry_category_date() {
echo '
';
}
endif;
if ( ! function_exists( 'alchemist_entry_header' ) ) :
/**
* Prints HTML with meta information for the date and author
*
* Create your own alchemist_entry_header() function to override in a child theme.
*
* @since Alchemist 1.0
*/
function alchemist_entry_header() {
echo '
';
$portfolio_categories_list = get_the_term_list( get_the_ID(), 'jetpack-portfolio-type', '', esc_html_x( ', ', 'Used between list items, there is a space after the comma.', 'alchemist' ), '' );
if ( 'jetpack-portfolio' === get_post_type() ) {
printf( '%1$s: %2$s',
sprintf( _x( 'Categories', 'Used before category names.', 'alchemist' ) ),
$portfolio_categories_list
);
}
$categories_list = get_the_category_list( _x( ' ', 'Used between list items, there is a space after the comma.', 'alchemist' ) );
if ( $categories_list && alchemist_categorized_blog( ) ) {
printf( '%1$s%2$s',
sprintf( _x( 'Categories', 'Used before category names.', 'alchemist' ) ),
$categories_list
);
}
// Get the author name; wrap it in a link.
printf(
/* translators: %s: post author */
__( 'By %s', 'alchemist' ),
'' . get_the_author() . ''
);
// Comments.
if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
echo '';
comments_popup_link( sprintf( __( 'Leave a comment on %s', 'alchemist' ), get_the_title() ) );
echo '';
}
echo '
';
}
endif;
if ( ! function_exists( 'alchemist_entry_category' ) ) :
/**
* Prints HTML with category for current post.
*/
function alchemist_entry_category() {
$portfolio_categories_list = get_the_term_list( get_the_ID(), 'jetpack-portfolio-type', '', esc_html_x( ', ', 'Used between list items, there is a space after the comma.', 'alchemist' ), '' );
if ( 'jetpack-portfolio' === get_post_type() ) {
printf( '' . alchemist_get_svg( array( 'icon' => 'folder' ) ) . '' . '%1$s: %2$s',
sprintf( _x( 'Categories', 'Used before category names.', 'alchemist' ) ),
$portfolio_categories_list
);
}
$categories_list = get_the_category_list( _x( ' ', 'Used between list items, there is a space after the comma.', 'alchemist' ) );
if ( $categories_list && alchemist_categorized_blog( ) ) {
printf( '' . alchemist_get_svg( array( 'icon' => 'folder' ) ) . '' . '%1$s%2$s',
sprintf( _x( 'Categories', 'Used before category names.', 'alchemist' ) ),
$categories_list
);
}
}
endif;
if ( ! function_exists( 'alchemist_home_entry_category' ) ) :
/**
* Prints HTML with category for current post for home page.
*/
function alchemist_home_entry_category() {
$portfolio_categories_list = get_the_term_list( get_the_ID(), 'jetpack-portfolio-type', '', esc_html_x( ', ', 'Used between list items, there is a space after the comma.', 'alchemist' ), '' );
if ( 'jetpack-portfolio' === get_post_type() ) {
printf( '' . alchemist_get_svg( array( 'icon' => 'folder' ) ) . '' . '%1$s: %2$s',
sprintf( _x( 'Categories', 'Used before category names.', 'alchemist' ) ),
$portfolio_categories_list
);
}
$categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'alchemist' ) );
if ( $categories_list && alchemist_categorized_blog( ) ) {
printf( 'in%1$s%2$s',
sprintf( _x( 'Categories', 'Used before category names.', 'alchemist' ) ),
$categories_list
);
}
}
endif;
if ( ! function_exists( 'alchemist_slider_entry_category' ) ) :
/**
* Prints HTML with category and tags for current post.
*
* Create your own alchemist_entry_category_date() function to override in a child theme.
*
* @since Alchemist 1.0
*/
function alchemist_slider_entry_category() {
$meta = '
';
return $meta;
}
endif;
if ( ! function_exists( 'alchemist_entry_date_author' ) ) :
/**
* Prints HTML with category and tags for current post.
*
* Create your own alchemist_entry_category_date() function to override in a child theme.
*
* @since Alchemist 1.0
*/
function alchemist_entry_date_author() {
$meta = '
';
return $meta;
}
endif;
if ( ! function_exists( 'alchemist_entry_tags' ) ) :
/**
* Prints HTML with tags for current post.
*/
function alchemist_entry_tags() {
$tags_list = get_the_tag_list( '', _x( ' ', 'Used between list items, there is a space after the comma.', 'alchemist' ) );
if ( $tags_list ) {
printf( '' . alchemist_get_svg( array( 'icon' => 'tag' ) ) . '' . '%1$s: %2$s',
_x( 'Tags', 'Used before tag names.', 'alchemist' ),
$tags_list
);
}
}
endif;
if ( ! function_exists( 'alchemist_entry_footer' ) ) :
/**
* Prints HTML with meta information for the categories, tags and comments.
*/
function alchemist_entry_footer() {
// We don't want to output .entry-footer if it will be empty, so make sure its not.
if ( has_tag() || ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) || get_edit_post_link() ) {
echo ' ';
}
}
endif;
if ( ! function_exists( 'alchemist_edit_link' ) ) :
/**
* Returns an accessibility-friendly link to edit a post or page.
*
* This also gives us a little context about what exactly we're editing
* (post or page?) so that users understand a bit more where they are in terms
* of the template hierarchy and their content. Helpful when/if the single-page
* layout with multiple posts/pages shown gets confusing.
*/
function alchemist_edit_link() {
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
__( 'Edit "%s"', 'alchemist' ),
get_the_title()
),
'',
''
);
}
endif;
if ( ! function_exists( 'alchemist_post_thumbnail' ) ) :
/**
* Displays an optional post thumbnail.
*
* Wraps the post thumbnail in an anchor element on index views, or a div
* element when on single views.
*
* Create your own alchemist_post_thumbnail() function to override in a child theme.
*
* @since Alchemist 1.0
*/
function alchemist_post_thumbnail( $size = 'post-thumbnail' ) {
if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {
return;
}
if ( is_singular() ) :
?>
';
echo $footer_content;
}
add_action( 'alchemist_credits', 'alchemist_footer_content', 10 );
if ( ! function_exists( 'alchemist_comment' ) ) :
/**
* Template for comments and pingbacks.
* Used as a callback by wp_list_comments() for displaying the comments.
*/
function alchemist_comment( $comment, $args, $depth ) {
if ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) : ?>