%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() ) ); echo '' . $time_string . ''; // WPCS: XSS OK. } if ( ! function_exists( 'digimag_lite_posted_by' ) ) : /** * Prints HTML with meta information for the current author. * * @param bool $text whether to print string Posted by. */ function digimag_lite_posted_by( $text = 'default' ) { if ( 'default' === $text ) { $text = esc_html__( 'Posted by: ', 'digimag-lite' ); } elseif ( false === $text ) { $text = ''; } $byline = sprintf( /* translators: %s: post author. */ esc_html_x( '%1$s%2$s', 'post author', 'digimag-lite' ), esc_html( $text ), '' ); echo ''; // WPCS: XSS OK. } endif; /** * Prints HTML with meta information for the comment number. */ function digimag_lite_print_comment_link() { $comment_number = get_comments_number(); if ( in_the_loop() && ! is_single() && ! $comment_number ) { return; } if ( ! post_password_required() && ( comments_open() || $comment_number ) ) { $comment_number_output = '' . $comment_number; echo ''; comments_popup_link( $comment_number_output, $comment_number_output, $comment_number_output ); echo ''; } } /** * Get single category * * @param boolean $has_background background or not. */ function digimag_lite_print_single_category( $has_background = false ) { $categories = get_the_category(); $link = get_category_link( $categories[0]->term_id ); $name = $categories[0]->name; $color = get_term_meta( $categories[0]->term_id, 'category_color', true ); $html = ''; $background = ''; if ( ! empty( $color ) && ! $has_background ) { $html = ''; } elseif ( ! empty( $color ) && $has_background ) { $background = 'style="background-color:' . esc_attr( $color ) . '"'; } printf( ' %s %s ', wp_kses_post( $background ), wp_kses_post( $html ), esc_url( $link ), esc_html( $name ) ); } /** * Prints HTML with meta information for the categories. */ function digimag_lite_print_categories_list() { $categories_list = get_the_category_list( esc_html__( ', ', 'digimag-lite' ) ); if ( $categories_list ) { printf( '%s', wp_kses_post( $categories_list ) ); } } if ( ! function_exists( 'digimag_lite_entry_footer' ) ) : /** * Prints HTML with meta information for the tags and comments. */ function digimag_lite_entry_footer() { // Hide category and tag text for pages. 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( '', $tags_list ); // WPCS: XSS OK. } } digimag_lite_edit_link(); } endif; /** * Edit Link. */ function digimag_lite_edit_link() { edit_post_link( sprintf( wp_kses( /* translators: %s: Name of current post. Only visible to screen readers */ __( 'Edit %s', 'digimag-lite' ), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ), '', '' ); } /** * Footer Widgets Area */ function digimag_lite_footer_widget_area() { if ( ! is_active_sidebar( 'footer1' ) && ! is_active_sidebar( 'footer2' ) && ! is_active_sidebar( 'footer3' ) ) { return; } ?>
'; $permalink .= ''; /* translators: permalink. */ printf( '