name || $post_type_obj->has_archive ) { // Build time string only once. $is_modified = get_the_time( 'U' ) !== get_the_modified_time( 'U' ); if ( $is_modified ) { $time_string = sprintf( '', esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); } else { $time_string = sprintf( '', esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ) ); } // Add permalink only once. $time_string = '' . $time_string . ''; } // Show author only if the post type supports it. if ( post_type_supports( $post_type_obj->name, 'author' ) ) { // Get author ID once. $author_id = $post->post_author; // Get author link once. $author_url = get_author_posts_url( $author_id ); $author_name = get_the_author(); $author_string = sprintf( '%2$s', esc_url( $author_url ), esc_html( $author_name ) ); } // Show parent post only if available and if the post type is 'attachment'. if ( ! empty( $post->post_parent ) && 'attachment' === get_post_type() ) { $parent_string = sprintf( '%2$s', esc_url( get_permalink( $post->post_parent ) ), esc_html( get_the_title( $post->post_parent ) ) ); } ?>
post_author ); $avatar_markup = get_avatar( $author_email, '38' ); /* translators: %s: post author */ if ( $is_buddypress_active ) { echo wp_kses_post( $avatar_markup ); printf( _x( 'Written by %s', 'post author', 'buddyx' ), wp_kses_post( bp_core_get_userlink( $post->post_author ) ) ); } else { echo wp_kses_post( $avatar_markup ); $author_byline = _x( 'Written by %s', 'post author', 'buddyx' ); printf( esc_html( $author_byline ), $author_string // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ); } ?>
', '' ); } ?>