';
}
echo '';
else:
do_action('be_page_posts_formats_thumbnail');
endif;
}
endif;
add_action( 'be_page_posts_formats_gallery', 'be_page_posts_formats_gallery' );
if ( ! function_exists( 'be_page_posts_blog_media' ) ) :
/**
* Post be_page_posts_blog_media
*
* @since 1.0.0
*/
function be_page_posts_blog_media() {
$formats = get_post_format(get_the_ID());
switch ( $formats ) {
default:
do_action('be_page_posts_formats_thumbnail');
break;
case 'gallery':
do_action('be_page_posts_formats_gallery');
break;
case 'audio':
do_action('be_page_posts_formats_audio');
break;
case 'video':
do_action('be_page_posts_formats_video');
break;
}
}
endif;
add_action( 'be_page_posts_blog_media', 'be_page_posts_blog_media' );
if ( ! function_exists( 'be_page_short_excerpt' ) ) :
/**
* Filter the except length to 20 words.
*
* @param int $length Excerpt length.
* @return int (Maybe) modified excerpt length.
*/
function be_page_short_excerpt( $length ){
if ( is_admin() ) {
return $length;
}
return absint( get_theme_mod( 'excerpt_length', 160 ) );
}
add_filter( 'excerpt_length', 'be_page_short_excerpt', 999 );
endif;
if ( ! function_exists( 'be_page_posted_on' ) ) :
/**
* Prints HTML with meta information for the current post-date/time.
*/
function be_page_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( DATE_W3C ) ),
esc_html( get_the_date() )
);
$posted_on = sprintf(
/* translators: %s: post date. */
esc_html_x( 'Posted on %s', 'post date', 'be-page' ),
'' . $time_string . ''
);
echo '
';
echo '' . $posted_on . ''; // WPCS: XSS OK.
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( esc_html__( ', ', 'be-page' ) );
if ( $categories_list ) {
/* translators: 1: list of categories. */
printf( '' . esc_html__( 'in %1$s', 'be-page' ) . '', $categories_list ); // WPCS: XSS OK.
}
if( get_theme_mod( 'blog_content_type', 'excerpt' ) == 'content' ) :
printf( ' %1$s %3$s', esc_html__( 'by ', 'be-page' ), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_html( get_the_author() ) );
endif;
echo '
';
}
endif;
if ( ! function_exists( 'be_page_posted_author' ) ) :
/**
* Prints author link for excerpt type content.
*/
function be_page_posted_author() {
printf( '