mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-15 07:05:37 +01:00
If comment type is empty set it to 'comment'. see #7635
git-svn-id: http://svn.automattic.com/wordpress/trunk@9039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ec4ce0db91
commit
d0ae9b2196
@ -470,6 +470,8 @@ function &separate_comments(&$comments) {
|
|||||||
$count = count($comments);
|
$count = count($comments);
|
||||||
for ( $i = 0; $i < $count; $i++ ) {
|
for ( $i = 0; $i < $count; $i++ ) {
|
||||||
$type = $comments[$i]->comment_type;
|
$type = $comments[$i]->comment_type;
|
||||||
|
if ( empty($type) )
|
||||||
|
$type = 'comment';
|
||||||
$comments_by_type[$type][] = &$comments[$i];
|
$comments_by_type[$type][] = &$comments[$i];
|
||||||
if ( 'trackback' == $type || 'pingback' == $type )
|
if ( 'trackback' == $type || 'pingback' == $type )
|
||||||
$comments_by_type['pings'][] = &$comments[$i];
|
$comments_by_type['pings'][] = &$comments[$i];
|
||||||
|
Loading…
Reference in New Issue
Block a user