' . get_avatar( get_the_author_meta( 'ID' ) , 30 ) . '' ); echo ' ' . $byline . ''; // WPCS: XSS OK. } endif; if ( ! function_exists( 'ikreate_themes_posted_on' ) ) : function ikreate_themes_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() ), esc_attr( get_the_modified_date( DATE_W3C ) ), esc_html( get_the_modified_date() ) ); $posted_on = sprintf( '' . $time_string . '' ); echo ' - On ' . $time_string . ''; // WPCS: XSS OK. } endif; if ( ! function_exists( 'ikreate_themes_comments' ) ) : function ikreate_themes_comments() { echo ''; } endif; if( !function_exists('ikreate_themes_estimated_reading_time')){ function ikreate_themes_estimated_reading_time() { global $post; $the_content = $post->post_content; $words = str_word_count( strip_tags( $the_content ) ); $minute = floor( $words / 200 ); $second = floor( $words % 200 / ( 200 / 60 ) ); $estimate = $minute . ' min' . ( $minute == 1 ? '' : 's' ) . ', ' . $second . ' ' . ( $second == 1 ? '' : 's' ); $output = '- ' . $estimate . ''; return $output; } } if ( ! function_exists( 'ikreate_themes_category' ) ) : function ikreate_themes_category() { $categories_list = get_the_category_list( esc_html__( ', ', 'business-roy' ) ); if ( $categories_list ) { printf( '' . '%1$s' . '', $categories_list ); } } endif; if ( ! function_exists( 'ikreate_themes_entry_footer' ) ) : function ikreate_themes_entry_footer() { if ( 'post' === get_post_type() ) { $categories_list = get_the_category_list( esc_html__( ', ', 'business-roy' ) ); if ( $categories_list ) { printf( '' . esc_html__( 'Posted in %1$s', 'business-roy' ) . '', $categories_list ); } $tags_list = get_the_tag_list( '', esc_html_x( ', ', 'list item separator', 'business-roy' ) ); if ( $tags_list ) { printf( '' . esc_html__( 'Tagged %1$s', 'business-roy' ) . '', $tags_list ); } } if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo ''; comments_popup_link( sprintf( wp_kses( __( 'Leave a Comment on %1$s', 'business-roy' ), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ) ); echo ''; } edit_post_link( sprintf( wp_kses( __( 'Edit %s', 'business-roy' ), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ), '', '' ); } endif; function ikreate_themes_excerpt_length( $length ) { $excerpt_length = get_theme_mod( 'businessroy_post_excerpt_length', 20 ); if( is_admin() ){ return $length; }elseif( is_front_page() ){ return 20; }else{ return $excerpt_length; } } add_filter( 'excerpt_length', 'ikreate_themes_excerpt_length', 999 ); function ikreate_themes_excerpt_more($text){ if(is_admin()){ return $text; } return '…'; } add_filter( 'excerpt_more', 'ikreate_themes_excerpt_more' );