|
@@ 1963-1970 (lines=8) @@
|
| 1960 |
|
$comments = (array) $comments; |
| 1961 |
|
if ( empty($comments) ) |
| 1962 |
|
return; |
| 1963 |
|
if ( 'all' != $r['type'] ) { |
| 1964 |
|
$comments_by_type = separate_comments($comments); |
| 1965 |
|
if ( empty($comments_by_type[$r['type']]) ) |
| 1966 |
|
return; |
| 1967 |
|
$_comments = $comments_by_type[$r['type']]; |
| 1968 |
|
} else { |
| 1969 |
|
$_comments = $comments; |
| 1970 |
|
} |
| 1971 |
|
} else { |
| 1972 |
|
/* |
| 1973 |
|
* If 'page' or 'per_page' has been passed, and does not match what's in $wp_query, |
|
@@ 2002-2011 (lines=10) @@
|
| 1999 |
|
|
| 2000 |
|
$comments = get_comments( $comment_args ); |
| 2001 |
|
|
| 2002 |
|
if ( 'all' != $r['type'] ) { |
| 2003 |
|
$comments_by_type = separate_comments( $comments ); |
| 2004 |
|
if ( empty( $comments_by_type[ $r['type'] ] ) ) { |
| 2005 |
|
return; |
| 2006 |
|
} |
| 2007 |
|
|
| 2008 |
|
$_comments = $comments_by_type[ $r['type'] ]; |
| 2009 |
|
} else { |
| 2010 |
|
$_comments = $comments; |
| 2011 |
|
} |
| 2012 |
|
} |
| 2013 |
|
|
| 2014 |
|
// Otherwise, fall back on the comments from `$wp_query->comments`. |