%2$s';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = '';
}
$time_string = sprintf(
$time_string,
esc_attr( get_the_date( DATE_W3C ) ),
esc_html( get_the_date() ),
esc_attr( get_the_modified_date( DATE_W3C ) ),
esc_html( get_the_modified_date() )
);
$posted_on = sprintf(
/* translators: %s: post date. */
esc_html_x( 'Posted on %s', 'post date', 'borax' ),
'' . $time_string . ''
);
echo '' . $posted_on . ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
endif;
if ( ! function_exists( 'borax_posted_by' ) ) :
/**
* Prints HTML with meta information for the current author.
*/
function borax_posted_by() {
$byline = sprintf(
/* translators: %s: post author. */
esc_html_x( 'by %s', 'post author', 'borax' ),
'' . esc_html( get_the_author() ) . ''
);
echo ' ' . $byline . ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
endif;
if ( ! function_exists( 'borax_entry_footer' ) ) :
/**
* Prints HTML with meta information for the categories, tags and comments.
*/
function borax_entry_footer() {
// Hide category and tag text for pages.
if ( 'post' === get_post_type() ) {
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( esc_html__( ', ', 'borax' ) );
if ( $categories_list ) {
/* translators: 1: list of categories. */
printf( '' . esc_html__( 'Posted in %1$s', 'borax' ) . '', $categories_list ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
/* translators: used between list items, there is a space after the comma */
$tags_list = get_the_tag_list( '', esc_html_x( ', ', 'list item separator', 'borax' ) );
if ( $tags_list ) {
/* translators: 1: list of tags. */
printf( '' . esc_html__( 'Tagged %1$s', 'borax' ) . '', $tags_list ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
}
if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
echo '';
}
edit_post_link(
sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers */
__( 'Edit %s', 'borax' ),
array(
'span' => array(
'class' => array(),
),
)
),
wp_kses_post( get_the_title() )
),
'',
''
);
}
endif;
if ( ! function_exists( 'borax_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.
*/
function borax_post_thumbnail() {
if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {
return;
}
if ( is_singular() ) :
?>
the_title_attribute(
array(
'echo' => false,
)
),
)
);
?>
tag.
*
*/
do_action( 'wp_body_open' );
}
endif;
if ( !function_exists( 'borax_site_content_div' ) ) :
/**
* Build footer
*/
add_action( 'borax_after_menu', 'borax_site_content_div' );
function borax_site_content_div() {
?>
' . esc_html__( 'Skip to the content', 'borax' ) . '';
}
add_action( 'wp_body_open', 'borax_skip_link', 5 );
/**
* ----------------------------------------------------------------------------------------
* - Display meta information for a specific post.
* ----------------------------------------------------------------------------------------
*/
if ( !function_exists( 'borax_post_meta' ) ) {
function borax_post_meta() {
// $show_date = borax_option('show_date');
echo '';
printf(
'
%2$s', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), get_the_author()
);
$category_list = get_the_category_list( ', ' );
if ( $category_list ) {
echo '
' . $category_list . ' ';
}
if ( comments_open() ) :
echo '';
endif;
if ( get_post_type() === 'post') {
echo '
' . get_the_date(). ' ';
}
if ( get_post_type() === 'post' ) {
// If the post is sticky, mark it.
if ( !is_single() ) {
$tag_list = get_the_tag_list( '', ', ' );
if ( $tag_list ) {
echo '
' . $tag_list . ' ';
}
}
if ( is_single() ) {
// Edit link.
if ( is_user_logged_in() ) {
edit_post_link( esc_html__( 'Edit', 'borax' ), '
', '' );
}
}
}
echo '
';
}
if ( !function_exists( 'borax_post_meta_left' ) ) {
function borax_post_meta_left() {
echo '';
if ( get_post_type() === 'post' ) {
// Get the post author.
// Comments link.
if ( comments_open() ) :
echo '';
endif;
// Edit link.
if ( is_user_logged_in() ) {
echo '
';
edit_post_link( esc_html__( 'Edit', 'borax' ), '', '' );
echo '
';
}
}
echo '
';
}
}
}
/**
* ----------------------------------------------------------------------------------------
* - Borax link pages
* ----------------------------------------------------------------------------------------
*/
function borax_link_pages() {
$args = array(
'before' => '' . esc_html__( 'More pages: ', 'borax' ) . '',
'after' => '
',
'link_before' => '',
'link_after' => '',
'next_or_number' => 'number',
'separator' => ' ',
'nextpagelink' => esc_html__( 'Next ', 'borax' ) . '',
'previouspagelink' => '' . esc_html__( ' Previous', 'borax' ),
);
wp_link_pages( $args );
}
/**
* Single post footer.
*
* Eventually, some of the functionality here could be replaced by core features.
*
* @package xs
*/
/**
* ----------------------------------------------------------------------------------------
* 7.0 - footer tags with social share
* ----------------------------------------------------------------------------------------
*/
if ( !function_exists( 'borax_single_post_footer' ) ) {
function borax_single_post_footer() {
$show_social = borax_option('show_social');
$tag_list = get_the_tag_list( '', ' ' );
if ( $tag_list || $show_social):
if ( $tag_list ) {
echo '';
echo borax_kses( $tag_list );
echo '
' . "\n";
}
endif;
}
}