%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 = sprintf( /* translators: %s: post date. */ esc_html_x( ' %s', 'post date', 'mag-lite' ), '' . $time_string . '' ); echo '' . $posted_on . ''; // WPCS: XSS OK. } endif; if ( ! function_exists( 'mag_lite_posted_by' ) ) : /** * Prints HTML with meta information for the current post-date/time and author. */ function mag_lite_posted_by() { $byline = sprintf( /* translators: %s: post author. */ esc_html_x( 'By %s', 'post author', 'mag-lite' ), '' . esc_html( get_the_author() ) . '' ); echo ' ' . $byline . ''; // WPCS: XSS OK. } endif; if ( ! function_exists( 'mag_lite_entry_categories' ) ) : /** * Prints HTML with meta information for the categories, tags and comments. */ function mag_lite_entry_categories() { global $post; $post_id = $post->ID; $categories_list = get_the_category( $post_id ); if ( ! empty( $categories_list ) ) { ?>
name; $cat_id = $cat_data->term_id; $cat_link = get_category_link( $cat_id ); ?>
' . esc_html__( 'Tagged %1$s', 'mag-lite' ) . '', $tags_list ); // WPCS: XSS OK. } } } endif; if ( ! function_exists( 'mag_lite_entry_footer' ) ) : /** * Prints HTML with meta information for the categories, tags and comments. */ function mag_lite_entry_footer() { 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', 'mag-lite' ), 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', 'mag-lite' ), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ), '', '' ); } endif; if( ! function_exists( 'mag_lite_time_ago' ) ): /** * Prints HTML with meta information for the number of views * */ function mag_lite_time_ago(){ $time_diff = human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago'; echo '' . $time_diff .' '; // WPCS: XSS OK. } endif;