Use a switch. props jdub, see #13812.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8fcdf9a979
commit
4e15eaa830
|
@ -351,8 +351,10 @@ if ( ! function_exists( 'twentyten_comment' ) ) :
|
||||||
* @since Twenty Ten 1.0
|
* @since Twenty Ten 1.0
|
||||||
*/
|
*/
|
||||||
function twentyten_comment( $comment, $args, $depth ) {
|
function twentyten_comment( $comment, $args, $depth ) {
|
||||||
$GLOBALS['comment'] = $comment; ?>
|
$GLOBALS['comment'] = $comment;
|
||||||
<?php if ( '' == $comment->comment_type ) : ?>
|
switch ( $comment->comment_type ) :
|
||||||
|
case '' :
|
||||||
|
?>
|
||||||
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
|
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
|
||||||
<div id="comment-<?php comment_ID(); ?>">
|
<div id="comment-<?php comment_ID(); ?>">
|
||||||
<div class="comment-author vcard">
|
<div class="comment-author vcard">
|
||||||
|
@ -378,10 +380,16 @@ function twentyten_comment( $comment, $args, $depth ) {
|
||||||
</div><!-- .reply -->
|
</div><!-- .reply -->
|
||||||
</div><!-- #comment-## -->
|
</div><!-- #comment-## -->
|
||||||
|
|
||||||
<?php elseif ( in_array($comment->comment_type, array('pingback', 'trackback')) ) : ?>
|
<?php
|
||||||
|
break;
|
||||||
|
case 'pingback' :
|
||||||
|
case 'trackback' :
|
||||||
|
?>
|
||||||
<li class="post pingback">
|
<li class="post pingback">
|
||||||
<p><?php _e( 'Pingback:', 'twentyten' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __('(Edit)', 'twentyten'), ' ' ); ?></p>
|
<p><?php _e( 'Pingback:', 'twentyten' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __('(Edit)', 'twentyten'), ' ' ); ?></p>
|
||||||
<?php endif;
|
<?php
|
||||||
|
break;
|
||||||
|
endswitch;
|
||||||
}
|
}
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue