%2$s'; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = ''; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); $posted_on = '' . $time_string . ''; echo '' . esc_html__( ' Posted on ', 'focus-stock' ) . '' . $posted_on . ''; } endif; if ( ! function_exists( 'focus_stock_entry_footer' ) ) : /** * Prints HTML with meta information for the categories, tags and comments. */ function focus_stock_entry_footer() { // Hide category and tag text for pages. if ( 'post' === get_post_type() ) { $categories_list = get_the_category_list( ' ' ); // Separate list by space. if ( $categories_list ) { echo '' . '' . __( 'Categories', 'focus-stock' ) . '' . $categories_list . ''; } $tags_list = get_the_tag_list( '', ' ' ); // Separate list by space. if ( $tags_list ) { echo '' . '' . __( 'Tags', 'focus-stock' ) . ',' . '' . $tags_list . ''; } } if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo ''; comments_popup_link( sprintf( wp_kses( /* translators: %s: post title */ __( 'Leave a Comment on %s', 'focus-stock' ), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ) ); echo ''; } edit_post_link( sprintf( wp_kses( /* translators: %s: Name of current post. Only visible to screen readers */ __( 'Edit %s', 'focus-stock' ), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ), '', '' ); } endif; if ( ! function_exists( 'focus_stock_author_bio' ) ) : /** * Prints HTML with meta information for the author bio. */ function focus_stock_author_bio() { if ( '' !== get_the_author_meta( 'description' ) ) { get_template_part( 'template-parts/biography' ); } } endif; if ( ! function_exists( 'focus_stock_by_line' ) ) : /** * Prints HTML with meta information for the author bio. */ function focus_stock_by_line() { $post_id = get_queried_object_id(); $post_author_id = get_post_field( 'post_author', $post_id ); $byline = ''; $byline .= '' . esc_html( get_the_author_meta( 'nickname', $post_author_id ) ) . ''; echo '' . $byline . ''; } endif; if ( ! function_exists( 'focus_stock_cat_list' ) ) : /** * Prints HTML with meta information for the categories */ function focus_stock_cat_list() { // Hide category and tag text for pages. if ( 'post' === get_post_type() ) { /* translators: used between list items, there is a space after the / */ $categories_list = get_the_category_list( esc_html__( ', ', 'focus-stock' ) ); if ( $categories_list ) { /* translators: 1: list of categories. */ printf( '%1$s %2$s', esc_html__( 'Cat Links', 'focus-stock' ), $categories_list ); // WPCS: XSS OK. } } elseif ( 'jetpack-portfolio' == get_post_type() ) { /* translators: used between list items, there is a space after the / */ $categories_list = get_the_term_list( get_the_ID(), 'jetpack-portfolio-type', '', esc_html__( ' / ', 'focus-stock' ) ); if ( ! is_wp_error( $categories_list ) ) { printf( '%1$s %2$s', esc_html__( 'Cat Links', 'focus-stock' ), $categories_list ); // WPCS: XSS OK. } } elseif ( 'download' == get_post_type() ) { /* translators: used between list items, there is a space after the / */ $categories_list = get_the_term_list( get_the_ID(), 'download_category', '', esc_html__( ', ', 'focus-stock' ) ); if ( ! is_wp_error( $categories_list ) && $categories_list ) { printf( '%1$s %2$s', esc_html__( 'Category: ', 'focus-stock' ), $categories_list ); // WPCS: XSS OK. } } } endif; if ( ! function_exists( 'focus_stock_comments_link' ) ) : /** * Prints HTML with meta information for the comments */ function focus_stock_comments_link() { if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) { echo ''; comments_popup_link( esc_html__( 'Leave a comment', 'focus-stock' ), esc_html__( '1 Comment', 'focus-stock' ), esc_html__( '% Comments', 'focus-stock' ) ); echo ''; } } endif; if ( ! function_exists( 'focus_stock_entry_category_date' ) ) : /** * Prints HTML with category and tags for current post. * * Create your own focus_stock_entry_category_date() function to override in a child theme. * * @since 1.0.0 */ function focus_stock_entry_category_date() { $meta = '
'; $portfolio_categories_list = get_the_term_list( get_the_ID(), 'jetpack-portfolio-type', '', esc_html_x( ', ', 'Used between list items, there is a space after the comma.', 'focus-stock' ), '' ); if ( 'jetpack-portfolio' === get_post_type() ) { $meta .= sprintf( '%1$s%2$s', sprintf( _x( 'Categories: ', 'Used before category names.', 'focus-stock' ) ), $portfolio_categories_list ); } $categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'focus-stock' ) ); if ( $categories_list && focus_stock_categorized_blog() ) { $meta .= sprintf( '%1$s%2$s', sprintf( _x( 'Categories: ', 'Used before category names.', 'focus-stock' ) ), $categories_list ); } $time_string = ''; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = ''; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); $meta .= sprintf( '%1$s%3$s', sprintf( __( 'Posted on ', 'focus-stock' ) ), esc_url( get_permalink() ), $time_string ); $meta .= '
'; return $meta; } endif; if ( ! function_exists( 'focus_stock_categorized_blog' ) ) : /** * Determines whether blog/site has more than one category. * * Create your own focus_stock_categorized_blog() function to override in a child theme. * * @since 1.0.0 * * @return bool True if there is more than one category, false otherwise. */ function focus_stock_categorized_blog() { if ( false === ( $all_the_cool_cats = get_transient( 'focus_stock_categories' ) ) ) { // Create an array of all the categories that are attached to posts. $all_the_cool_cats = get_categories( array( 'fields' => 'ids', // We only need to know if there is more than one category. 'number' => 2, ) ); // Count the number of categories that are attached to the posts. $all_the_cool_cats = count( $all_the_cool_cats ); set_transient( 'focus_stock_categories', $all_the_cool_cats ); } if ( $all_the_cool_cats > 1 ) { // This blog has more than 1 category so focus_stock_categorized_blog should return true. return true; } else { // This blog has only 1 category so focus_stock_categorized_blog should return false. return false; } } endif; /** * Footer Text * * @get footer text from theme options and display them accordingly * @display footer_text * @action focus_stock_footer * * @since 1.0.0 */ function focus_stock_footer_content() { $theme_data = wp_get_theme(); $footer_content = sprintf( _x( 'Copyright © %1$s %2$s %3$s', '1: Year, 2: Site Title with home URL, 3: Privacy Policy Link', 'focus-stock' ), esc_attr( date_i18n( __( 'Y', 'focus-stock' ) ) ), ''. esc_attr( get_bloginfo( 'name', 'display' ) ) . '', function_exists( 'get_the_privacy_policy_link' ) ? get_the_privacy_policy_link() : '' ) . ' | ' . esc_html( $theme_data->get( 'Name' ) ) . ' ' . esc_html__( 'by', 'focus-stock' ) . ' ' . esc_html( $theme_data->get( 'Author' ) ) . ''; echo '
' . $footer_content . '
'; } add_action( 'focus_stock_credits', 'focus_stock_footer_content', 10 ); if ( ! function_exists( 'focus_stock_single_image' ) ) : /** * Display Single Page/Post Image */ function focus_stock_single_image() { $featured_image = get_theme_mod( 'focus_stock_single_layout', 'disabled' ); if ( ! has_post_thumbnail() || 'disabled' == $featured_image ) { echo ''; return false; } else { ?>
comment_type || 'trackback' == $comment->comment_type ) : ?>
  • >
    ', '' ); ?>
  • >
    says:', 'focus-stock' ), sprintf( '%s', get_comment_author_link() ) ); ?> ', '' ); ?>
    comment_approved ) : ?>

    'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'], 'before' => '', 'after' => '', ) ) ); ?>
    is needed. WordPress will know where to add it. */ ?> '; $portfolio_categories_list = get_the_term_list( get_the_ID(), 'jetpack-portfolio-type', '', '', '' ); if ( 'jetpack-portfolio' === get_post_type( ) ) { $meta .= sprintf( '' .'%1$s%2$s', sprintf( _x( 'Categories', 'Used before category names.', 'focus-stock' ) ), $portfolio_categories_list ); } $categories_list = get_the_category_list( ' ' ); if ( $categories_list && focus_stock_categorized_blog( ) ) { $meta .= sprintf( '' . '%1$s%2$s', sprintf( _x( 'Categories', 'Used before category names.', 'focus-stock' ) ), $categories_list ); } $meta .= ''; return $meta; } endif; if ( ! function_exists( 'focus_stock_entry_date_author' ) ) : /** * Prints HTML with category and tags for current post. * * Create your own focus_stock_entry_category_date() function to override in a child theme. * * @since 1.0.0 */ function focus_stock_entry_date_author() { $meta = '
    '; $time_string = ''; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = ''; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); $meta .= sprintf( '%3$s' . '%1$s%4$s', _x( 'Posted on', 'Used before publish date.', 'focus-stock' ), esc_url( get_permalink() ), esc_html__( 'Posted on ', 'focus-stock' ), $time_string ); // Get the author name; wrap it in a link. $byline = sprintf( /* translators: %s: post author */ __( 'By %s', 'focus-stock' ), '' . get_the_author() . '' ); $meta .= sprintf( '', esc_html__( ' By ', 'focus-stock' ), $byline ); $meta .= '
    '; return $meta; } endif; if ( ! function_exists( 'focus_stock_archives_cat_count_span' ) ) : /** * Used to wrap post count in Categories widget with a span tag * * @since 1.0.0 */ function focus_stock_archives_cat_count_span($links) { $links = str_replace(' (', ' (', $links); $links = str_replace(')', ')', $links); return $links; } add_filter( 'wp_list_categories', 'focus_stock_archives_cat_count_span' ); endif; if ( ! function_exists( 'focus_stock_archives_count_span' ) ) : /** * Used to wrap post count in Archives widget with a span tag * * @since 1.0.0 */ function focus_stock_archives_count_span($links) { $links = str_replace(' (', ' (', $links); $links = str_replace(')', ')', $links); return $links; } add_filter( 'get_archives_link', 'focus_stock_archives_count_span' ); endif; if ( ! function_exists( 'focus_stock_section_heading' ) ) : /** * Display/get tagline title and subtitle * * @since 1.0.0 */ function focus_stock_section_heading( $tagline, $title, $description = '', $echo = true ) { $output = ''; if ( $title || $tagline || $description ) { $output .= '
    '; if ( $tagline ){ $output .= ''; } if ( $title ){ $output .= '

    ' . wp_kses_post( $title ) . '

    '; } if ( $description ){ $output .= '

    ' . wp_kses_post( $description ) . '

    '; } $output .= '
    '; } if ( ! $echo ) { return $output; } echo $output; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } endif;