From 9d4123cee1867ee7199b06bdc92d40611f547ecc Mon Sep 17 00:00:00 2001 From: Zach van Rijn Date: Wed, 21 Jul 2021 14:54:07 -0500 Subject: Initial unmodified import from Astra (Version: 3.6.5) @ /wp-content/themes/astra/. --- inc/blog/single-blog.php | 277 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 277 insertions(+) create mode 100644 inc/blog/single-blog.php (limited to 'inc/blog/single-blog.php') diff --git a/inc/blog/single-blog.php b/inc/blog/single-blog.php new file mode 100644 index 0000000..97b7acd --- /dev/null +++ b/inc/blog/single-blog.php @@ -0,0 +1,277 @@ +' . $output_str . '', $output_str ); // WPCS: XSS OK. + } + } + if ( $echo ) { + echo $output; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + } else { + return $output; + } + } +} + +/** + * Template for comments and pingbacks. + */ +if ( ! function_exists( 'astra_theme_comment' ) ) { + + /** + * Template for comments and pingbacks. + * + * To override this walker in a child theme without modifying the comments template + * simply create your own astra_theme_comment(), and that function will be used instead. + * + * Used as a callback by wp_list_comments() for displaying the comments. + * + * @param string $comment Comment. + * @param array $args Comment arguments. + * @param number $depth Depth. + * @return mixed Comment markup. + */ + function astra_theme_comment( $comment, $args, $depth ) { + + switch ( $comment->comment_type ) { + + case 'pingback': + case 'trackback': + // Display trackbacks differently than normal comments. + ?> +
  • id="comment-"> +

    ', '' ); ?>

    +
  • + +
  • id="li-comment-"> + +
    +
    +
    + 'ast-comment-meta ast-row ast-comment-author vcard capitalize', + ) + ); + echo '>'; + + printf( + astra_markup_open( + 'ast-comment-cite-wrap', + array( + 'open' => '
    ', + 'class' => 'ast-comment-cite-wrap', + ) + ) . '%1$s %2$s
    ', + get_comment_author_link(), + // If current post author is also comment author, make it known visually. + ( $comment->user_id === $post->post_author ) ? '' : '' + ); + + if ( apply_filters( 'astra_single_post_comment_time_enabled', true ) ) { + printf( + esc_attr( + astra_markup_open( + 'ast-comment-time', + array( + 'open' => '
    ', + 'class' => 'ast-comment-time', + ) + ) + ) . '
    ', + esc_url( get_comment_link( $comment->comment_ID ) ), + esc_attr( get_comment_time( 'c' ) ), + /* translators: 1: date, 2: time */ + esc_html( sprintf( __( '%1$s at %2$s', 'astra' ), get_comment_date(), get_comment_time() ) ) + ); + } + + ?> + + +
    +
    + +
    + ', '' ); ?> + astra_default_strings( 'string-comment-reply-link', false ), + 'add_below' => 'comment', + 'depth' => $depth, + 'max_depth' => $args['max_depth'], + 'before' => '', + 'after' => '', + ) + ) + ); + ?> +
    + comment_approved ) : ?> +

    + +
    + +
    + + labels->singular_name + ); + + $prev_text = sprintf( + astra_default_strings( 'string-single-navigation-previous', false ), + $post_obj->labels->singular_name + ); + /** + * Filter the post pagination markup + */ + the_post_navigation( + apply_filters( + 'astra_single_post_navigation', + array( + 'next_text' => $next_text, + 'prev_text' => $prev_text, + ) + ) + ); + + } + } +} + +add_action( 'astra_entry_after', 'astra_single_post_navigation_markup' ); -- cgit v1.2.3-70-g09d2