diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index ec7aa4ce7e..787609eeac 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -1244,11 +1244,11 @@ class Walker_Comment extends Walker { case 'div': break; case 'ol': - echo "
    \n"; + echo '
      ' . "\n"; break; default: case 'ul': - echo "
    \n"; + echo "
\n"; break; default: case 'ul': - echo "\n"; + echo "\n"; break; } } @@ -1330,50 +1330,18 @@ class Walker_Comment extends Walker { $GLOBALS['comment_depth'] = $depth; $GLOBALS['comment'] = $comment; - if ( !empty($args['callback']) ) { - call_user_func($args['callback'], $comment, $args, $depth); + if ( !empty( $args['callback'] ) ) { + call_user_func( $args['callback'], $comment, $args, $depth ); return; } - extract($args, EXTR_SKIP); - - if ( 'div' == $args['style'] ) { - $tag = 'div'; - $add_below = 'comment'; + if ( ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) && $args['short_ping'] ) { + $this->ping( $comment, $depth, $args ); + } elseif ( 'html5' === $args['format'] ) { + $this->html5_comment( $comment, $depth, $args ); } else { - $tag = 'li'; - $add_below = 'div-comment'; + $this->comment( $comment, $depth, $args ); } -?> - < id="comment-"> - -
- -
- - %s says:'), get_comment_author_link()) ?> -
-comment_approved == '0') : ?> - -
- - -
- -
- - - -
- $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?> -
- -
- -\n"; + echo "\n"; else - echo "\n"; + echo "\n"; } + /** + * @since 3.6 + * @access protected + * + * @param object $comment + * @param int $depth Depth of comment. + * @param array $args + */ + protected function ping( $comment, $depth, $args ) { + $tag = ( 'div' == $args['style'] ) ? 'div' : 'li'; +?> + < id="comment-" > +
+ ', '' ); ?> +
+ + < id="comment-"> + +
+ +
+ + %s says:' ), get_comment_author_link() ); ?> +
+ comment_approved ) : ?> + +
+ + +
+ +
+ + + +
+ $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?> +
+ +
+ + + < id="comment-" > +
+ + +
+ +
+ +
+ 'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?> +
+
+ null, 'max_depth' => '', 'style' => 'ul', 'callback' => null, 'end-callback' => null, 'type' => 'all', - 'page' => '', 'per_page' => '', 'avatar_size' => 32, 'reverse_top_level' => null, 'reverse_children' => ''); + $defaults = array( + 'walker' => null, + 'max_depth' => '', + 'style' => 'ul', + 'callback' => null, + 'end-callback' => null, + 'type' => 'all', + 'page' => '', + 'per_page' => '', + 'avatar_size' => 32, + 'reverse_top_level' => null, + 'reverse_children' => '', + 'format' => 'xhtml', // or html5 + 'short_ping' => false, + ); $r = wp_parse_args( $args, $defaults );