' . esc_html__( '%1$s', 'ananya' ) . '', $categories_list ); // WPCS: XSS OK.
}
}
}
endif;
if ( ! function_exists( 'ananya_post_tags' ) ) :
/**
* Displays post tags.
* @since 1.0
*
*/
function ananya_post_tags() {
// Hide tag text for pages.
if ( 'post' === get_post_type() ) {
/* translators: used between list items, there is a space after the comma */
$tags_list = get_the_tag_list( '', esc_html_x( ', ', 'list item separator', 'ananya' ) );
if ( $tags_list ) {
/* translators: 1: list of tags. */
printf( '' . esc_html__( ' %1$s', 'ananya' ) . '', $tags_list ); // WPCS: XSS OK.
}
}
}
endif;
if ( ! function_exists( 'ananya_post_comments_link' ) ) :
/**
* Displays link to posts comments.
* @since 1.0
*
*/
function ananya_post_comments_link() {
if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
echo '';
comments_popup_link(
sprintf(
wp_kses(
/* translators: %s: post title */
__( '0 Comment on %s', 'ananya' ),
array(
'span' => array(
'class' => array(),
),
)
),
get_the_title()
)
);
echo '';
}
}
endif;
if ( ! function_exists( 'ananya_post_meta_separator' ) ) :
/**
* Displays post categories.
* @since 1.0
*
*/
function ananya_post_meta_separator( string $sep ) { ?>
post_parent ) : get_adjacent_post( false, '', true );
$next = get_adjacent_post( false, '', false );
if ( ! $next && ! $previous ) {
return;
}
$previous_post = get_previous_post();
if ( ! empty( $previous_post ) ) {
$previous_thumb = get_the_post_thumbnail( $previous_post->ID, 'ananya-prevnext-thumbnail' );
}
$next_post = get_next_post();
if ( ! empty( $next_post ) ) {
$next_thumb = get_the_post_thumbnail( $next_post->ID, 'ananya-prevnext-thumbnail' );
}
?>
term_id );
printf( '' . esc_html__( '%2$s', 'ananya' ) . '', esc_url( $category_link ), $categories[0]->name);
}
}
}
endif;
if ( ! function_exists( 'ananya_single_post_footer' ) ) :
/**
* Prints HTML with meta information for the categories, tags and comments.
* @since 1.0
*/
function ananya_single_post_footer() {
$hide_single_post_share_buttons = get_theme_mod( 'ananya_hide_single_post_share_option', false );
?>
%s', 'ananya' ),
array(
'span' => array(
'class' => array(),
),
)
),
get_the_title()
),
'',
''
);
}
endif;
if ( ! function_exists ( 'ananya_social_sharing_buttons' ) ) {
/**
* Prints HTML for the social share buttons.
* @since 1.0
*/
function ananya_social_sharing_buttons() {
global $post;
// Show this on post only. if social shared enabled.
// Get current page URL
$shortURL = esc_url( get_permalink() );
// Get current page title
$shortTitle = get_the_title();
$postmediaurl = esc_url( get_the_post_thumbnail_url($post->id) );
// Construct sharing URL without using any script
$twitterURL = esc_url( 'https://twitter.com/share?text='.$shortTitle.'&url='.$shortURL );
$facebookURL = esc_url( 'https://www.facebook.com/sharer/sharer.php?u='.$shortURL );
$linkedInURL = esc_url( 'https://www.linkedin.com/shareArticle?mini=true&url='.$shortURL.'&title='.$shortTitle );
$pinterestURL = esc_url( 'https://pinterest.com/pin/create/button/?url='.$shortURL.'&media='.$postmediaurl.'&description='.$shortTitle );
// Add sharing button at the end of page/page content
$content = '
';
$content .= '
Share:
';
$content .= '
';
$content .= '
';
$content .= '
';
$content .= '
';
$content .= '
';
return $content;
}
}
if ( ! function_exists( 'ananya_more_link' ) ) :
/**
* Displays the more link on posts.
* @since 1.0
*/
function ananya_more_link() {
$read_more_markup = '