From 7086111ad4dd997e12a3220e1ee60c9b9bcf0bb8 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 7 Jan 2020 13:06:14 +0100 Subject: Added wordpress --- .../classes/class-twentytwenty-walker-comment.php | 142 +++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 srcs/wordpress/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-comment.php (limited to 'srcs/wordpress/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-comment.php') diff --git a/srcs/wordpress/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-comment.php b/srcs/wordpress/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-comment.php new file mode 100644 index 0000000..1472d0b --- /dev/null +++ b/srcs/wordpress/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-comment.php @@ -0,0 +1,142 @@ + + < id="comment-" has_children ? 'parent' : '', $comment ); ?>> +
+
+
+ ', $comment_author_url ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped --Escaped in https://developer.wordpress.org/reference/functions/get_comment_author_url/ + echo wp_kses_post( $avatar ); + } + } + + printf( + '%1$s%2$s', + esc_html( $comment_author ), + __( 'says:', 'twentytwenty' ) + ); + + if ( ! empty( $comment_author_url ) ) { + echo ''; + } + ?> +
+ + + +
+ +
+ + comment_approved ) { + ?> +

+ + +
+ + 'div-comment', + 'depth' => $depth, + 'max_depth' => $args['max_depth'], + 'before' => '', + 'after' => '', + ) + ) + ); + + $by_post_author = twentytwenty_is_comment_by_post_author( $comment ); + + if ( $comment_reply_link || $by_post_author ) { + ?> + +
+ + ' . __( 'By Post Author', 'twentytwenty' ) . ''; + } + ?> + +
+ + + +
+ +