Created
January 18, 2016 23:29
-
-
Save dtbaker/1dec1b842ebf20cc581e to your computer and use it in GitHub Desktop.
Beautiful Watercolor wordpress theme child functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function beautiful_blog_links() { | |
if ( 'post' == get_post_type() ) : ?> | |
<div class="blog_links"> | |
<?php | |
$blog_links = array(); | |
$blog_links ['date'] = beautiful_posted_on( true ); | |
if ( comments_open() ) { | |
ob_start(); | |
comments_popup_link( '<span class="leave-comment"><i class="fa fa-comment"></i> ' . esc_html__( 'Leave a comment' ) . '</span>', wp_kses_post( __( '<i class="fa fa-comment"></i> <strong>1</strong> Comment' ) ), wp_kses_post( __( '<i class="fa fa-comment"></i> <strong>%</strong> Comments' ) ) ); | |
$blog_links['comments'] = ob_get_clean(); | |
} | |
$categories_list = get_the_category_list( esc_html__( ', ' ) ); | |
if ( $categories_list ) { | |
$blog_links['categories'] = sprintf( wp_kses_post( __( '<span class="%1$s"><i class="fa fa-files-o"></i></span> %2$s' ) ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); | |
} | |
$tags_list = get_the_tag_list( '', esc_html__( ', ' ) ); | |
if ( $tags_list ) { | |
$blog_links['tags'] = sprintf( wp_kses_post( __( '<span class="%1$s"><i class="fa fa-tags"></i></span> %2$s' ) ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); | |
} | |
echo implode( ' <span class="blog_links_sep">/</span> ', apply_filters( 'beautiful_blog_links', $blog_links ) ); | |
?> | |
</div> | |
<?php endif; ?> | |
<div class="clear"></div> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment