%2$s'; $time_string = sprintf( $time_string, esc_attr( get_the_date( DATE_W3C ) ), esc_html( get_the_date() ) ); $posted_on = '' . $time_string . ''; echo '' . $posted_on . ''; // WPCS: XSS OK. } } endif; if ( ! function_exists( 'octane_post_posted_by' ) ) : /** * Prints HTML with meta information for the current author. */ function octane_post_posted_by() { $enable = Octane_Theme_Options::get_option( 'field-blog-author-enable' ); if ( ! empty( $enable ) && ! empty( get_the_author() ) ) { echo '' . esc_html( get_the_author() ) . ''; // WPCS: XSS OK. } } endif; if ( ! function_exists( 'octane_post_category_links' ) ) : /** * Prints Category for Current Post */ function octane_post_category_links() { // Hide category and tag text for pages. if ( 'post' === get_post_type() ) { $tags = Octane_Theme_Options::get_option( 'field-blog-tag-enable' ); if ( ! empty( $tags ) ) { /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', ', ' ); if ( $tags_list ) { echo '' . $tags_list . ''; // WPCS: XSS OK. } } $cats = Octane_Theme_Options::get_option( 'field-blog-category-enable' ); if ( ! empty( $cats ) ) { /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list( ', ' ); if ( $categories_list ) { echo '' . $categories_list . ''; // WPCS: XSS OK. } } } } endif; if ( ! function_exists( 'octane_post_leave_comment' ) ) : /** * Prints Comment string on post */ function octane_post_leave_comment() { $comments = Octane_Theme_Options::get_option( 'field-blog-comments-enable' ); if ( ! empty( $comments ) ) { 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', 'octane' ), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ) ); echo ''; } } } endif; if ( ! function_exists( 'octane_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 octane_post_thumbnail() { if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) { return; } if ( is_singular() ) : ?>