Skip to content

Commit 1f4f887

Browse files
authored
Merge pull request #494 from pfefferle/html5comment
Check for missing format property
2 parents 5028dc6 + e54e0ec commit 1f4f887

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

includes/class-comment-walker.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ public function start_el( &$output, $data_object, $depth = 0, $args = array(), $
109109
add_filter( 'comment_text', array( $this, 'filter_comment_text' ), 40, 2 );
110110
}
111111

112+
// ClassicPress cut the comment method and defaults to html5. So this will ensure that html5_comment is always called
113+
if ( ! method_exists( $this, 'comment' ) || ! array_key_exists( 'format', $args ) ) {
114+
$args['format'] = 'html5';
115+
}
116+
112117
// Maintain the original pingback and trackback output.
113118
if ( ( 'pingback' === $comment->comment_type || 'trackback' === $comment->comment_type ) && $args['short_ping'] ) {
114119
ob_start();

0 commit comments

Comments
 (0)