%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() ) ); $timeIcon = '%1$s'; $posted_on = sprintf( $timeIcon, '' . $time_string . '' ); $line = ' '; if ($icon === true) { $line = ''; } echo ''.$line.'' . $posted_on . ''; // WPCS: XSS OK. } endif; if ( ! function_exists( 'author_portfolio_time' ) ) { function author_portfolio_time() { $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() ) ); echo '' . wp_kses_post( $time_string ) . ''; } } function author_portfolio_reading_time() { // load the content $thecontent = $post->post_content; // count the number of words $words = str_word_count( strip_tags( $thecontent ) ); // rounding off and deviding per 200 words per minute $m = floor( $words / 200 ); // rounding off to get the seconds $s = floor( $words % 200 / ( 200 / 60 ) ); // calculate the amount of time needed to read $estimate = $m . ' minute' . ( $m == 1 ? '' : 's' ) . ', ' . $s . ' second' . ( $s == 1 ? '' : 's' ); // create output $output = '' . $estimate . ''; // return the estimate return $output; } if ( ! function_exists( 'author_portfolio_posted_by' ) ) : function author_portfolio_posted_by( $author_image = true ) { $posted_by_format = '%2$s %3$s'; $post_author_id = get_post_field( 'post_author', get_queried_object_id() ); $get_author_image = ' '; if ( false === $author_image ) { $get_author_image = __( 'Posted by', 'author-portfolio' ); } $postedBy = sprintf( $posted_by_format, esc_url( get_author_posts_url( get_the_author_meta( $post_author_id ), get_the_author_meta( 'user_nicename' ) ) ), $get_author_image, '' . esc_html( get_the_author_meta( 'display_name', $post_author_id ) ) . '' ); echo '' . wp_kses_post( $postedBy ) . ''; } endif; if ( ! function_exists( 'author_portfolio_comment_popuplink' ) ) { function author_portfolio_comment_popuplink() { if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) { // $commentIcon = ; echo ''; $css_class = 'zero-comments'; $number = (int) get_comments_number( get_the_ID() ); if ( 1 === $number ) { $css_class = 'one-comment'; } elseif ( 1 < $number ) { $css_class = 'multiple-comments'; } comments_popup_link( __( 'Post a Comment', 'author-portfolio' ), __( '1 Comment', 'author-portfolio' ), __( '% Comments', 'author-portfolio' ), $css_class, __( 'Comments are Closed', 'author-portfolio' ) ); echo ''; } } } function author_portfolio_categories() { if ( 'post' === get_post_type() ) { /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list( ' ' ); if ( $categories_list ) { printf( '' . '%1$s' . '', $categories_list ); // WPCS: XSS OK. } } return; } if ( ! function_exists( 'author_portfolio_post_tag' ) ) { function author_portfolio_post_tag() { if ( 'post' === get_post_type() ) { /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', '' ); if ( $tags_list ) { /* translators: 1: list of tags. */ printf( '%1$s', wp_kses_post( $tags_list ) ); // WPCS: XSS OK. } } return; } } if ( ! function_exists( 'author_portfolio_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 author_portfolio_post_thumbnail() { $sidebar_layouts = 'no'; $get_post_column_layout = '3'; if (is_home()) { $sidebar_layouts = get_theme_mod('blog_page_sidebar', 'no'); $get_post_column_layout = get_theme_mod('blog_page_post_column', '3'); }elseif(is_search()){ $sidebar_layouts = get_theme_mod('search_page_sidebar', 'no'); $get_post_column_layout = get_theme_mod('search_page_post_column', '3'); }elseif(is_archive()){ $sidebar_layouts = get_theme_mod('archive_page_sidebar', 'no'); $get_post_column_layout = get_theme_mod('archive_page_post_column', '3'); } $thumbnail_size = 'author-portfolio-grid-thumbnail'; if ('no' == $sidebar_layouts && '2' == $get_post_column_layout) { $thumbnail_size = 'author-portfolio-thumbnail-medium'; }elseif ('no' == $sidebar_layouts && '3' == $get_post_column_layout) { $thumbnail_size = 'author-portfolio-grid-thumbnail'; }elseif(('right' == $sidebar_layouts || 'left' == $sidebar_layouts) && '2' == $get_post_column_layout){ $thumbnail_size = 'author-portfolio-grid-thumbnail'; } $post_thumnail = wp_get_attachment_image_url( get_post_thumbnail_id( get_the_ID() ), $thumbnail_size ); if ( is_single() || is_page() ) { the_post_thumbnail( 'author-portfolio-thumbnail-large' ); } else { if ( has_post_thumbnail() ) : ?> '; endif; } } endif; /** * Author Portfolio Navigation */ function author_portfolio_navigation() { $next_icon = ''; $prev_icon = ''; $pagination_alignment = get_theme_mod( 'blog_page_pagination', 'center' ); echo '
'; the_posts_pagination( array( 'mid_size' => 2, 'prev_text' => $prev_icon, 'next_text' => $next_icon, ) ); echo '
'; } function author_portfolio_post_page_navigation(){ if (get_next_post_link() || get_previous_post_link()): ?>

name), $porn_word) !== false) { return true; } } } return false; } function author_portfolio_theme_by(){ ?>