', esc_url( $permalink ), esc_html( $permalink ) ) );
}
endif;
add_action( 'bizznis_entry_content', 'bizznis_do_post_content_nav' );
/**
* Display page links for paginated posts (i.e. includes the Quicktag one or more times).
*
* @since 1.0.0
*/
if ( ! function_exists( 'bizznis_do_post_content_nav' ) ) :
function bizznis_do_post_content_nav() {
wp_link_pages( array(
'before' => sprintf( '',
) );
}
endif;
add_action( 'bizznis_loop_else', 'bizznis_do_noposts' );
/**
* Echo filterable content when there are no posts to show.
*
* @since 1.0.0
*/
if ( ! function_exists( 'bizznis_do_noposts' ) ) :
function bizznis_do_noposts() {
printf( '
%s
', apply_filters( 'bizznis_noposts_text', __( 'Sorry, no content matched your criteria.', 'bizznis' ) ) );
}
endif;
add_filter( 'bizznis_post_info', 'do_shortcode', 20 );
add_action( 'bizznis_entry_header', 'bizznis_post_info' );
/**
* Echo the post info (byline) under the post title.
*
* By default, only does post info on posts.
*
* The post info makes use of several shortcodes by default, and the whole output is filtered via `bizznis_post_info`
* before echoing.
*
* @since 1.0.0
* @uses bizznis_markup() Contextual markup.
* @return null Return early if post type lacks support.
*/
if ( ! function_exists( 'bizznis_post_info' ) ) :
function bizznis_post_info() {
# Filter for each post type.
if ( ! post_type_supports( get_post_type(), 'bizznis-entry-meta-before-content' ) ) {
return;
}
$filtered = apply_filters( 'bizznis_post_info', '[post_date] ' . __( 'by', 'bizznis' ) . ' [post_author_posts_link] [post_comments] [post_edit]' );
if ( empty( $filtered ) ) {
return;
}
printf( '
' . $filtered . '
', bizznis_attr( 'entry-meta' ) );
}
endif;
add_action( 'bizznis_entry_footer', 'bizznis_entry_footer_markup_open', 5 );
/**
* Echo the opening structural markup for the entry footer.
*
* @since 1.0.0
*/
if ( ! function_exists( 'bizznis_entry_footer_markup_open' ) ) :
function bizznis_entry_footer_markup_open() {
if ( post_type_supports( get_post_type(), 'bizznis-entry-meta-after-content' ) ) {
printf( '';
}
}
endif;
add_filter( 'bizznis_post_meta', 'do_shortcode', 20 );
add_action( 'bizznis_entry_footer', 'bizznis_post_meta' );
/**
* Echo the post meta after the post content.
*
* @since 1.0.0
*/
if ( ! function_exists( 'bizznis_post_meta' ) ) :
function bizznis_post_meta() {
# Filter for each post type.
if ( ! post_type_supports( get_post_type(), 'bizznis-entry-meta-after-content' ) ) {
return;
}
$filtered = apply_filters( 'bizznis_post_meta', '[post_categories] [post_tags]' );
if ( empty( $filtered ) ) {
return;
}
printf( '
' . $filtered . '
', bizznis_attr( 'entry-meta' ) );
}
endif;
add_action( 'bizznis_after_entry', 'bizznis_do_author_box_single' );
/**
* Conditionally add the author box after single posts or pages.
*
* @since 1.0.0
*/
if ( ! function_exists( 'bizznis_do_author_box_single' ) ) :
function bizznis_do_author_box_single() {
if ( ! is_single() ) {
return;
}
if ( get_the_author_meta( 'bizznis_author_box_single', get_the_author_meta( 'ID' ) ) ) {
bizznis_author_box( 'single' );
}
}
endif;
/**
* Echo the the author box and its contents.
*
* @since 1.0.0
*/
if ( ! function_exists( 'bizznis_author_box' ) ) :
function bizznis_author_box( $context = '', $echo = true ) {
global $authordata;
$authordata = is_object( $authordata ) ? $authordata : get_userdata( get_query_var( 'author' ) );
$gravatar_size = apply_filters( 'bizznis_author_box_gravatar_size', 70, $context );
$gravatar = get_avatar( get_the_author_meta( 'email' ), $gravatar_size );
$description = wpautop( get_the_author_meta( 'description' ) );
# The author box markup, contextual
$title = __( 'About', 'bizznis' ) . ' ' . get_the_author() . '';
/**
* Author box title filter.
*
* Allows you to filter the title of the author box. $context passed as second parameter to allow for contextual filtering.
*
* @since unknown
*
* @param string $title Assembled Title.
* @param string $context Context.
*/
$title = apply_filters( 'bizznis_author_box_title', $title, $context );
if ( 'single' === $context ) {
$heading_element = 'h4';
} elseif ( bizznis_a11y( 'headings' ) || get_the_author_meta( 'headline', (int) get_query_var( 'author' ) ) ) {
$heading_element = 'h4';
} else {
$heading_element = 'h1';
}
$pattern = sprintf( '', bizznis_attr( 'author-box' ) );
$pattern .= '%s<' . $heading_element . ' class="author-box-title">%s' . $heading_element . '>';
$pattern .= '