'Regular Sidebar',
'before_widget' => '
',
'before_title' => '',
'after_title' => '
'
));
}
/*
Plugin Name: Separate Comments & Pings
Plugin URI: http://urbangiraffe.com/plugins/separate-comment-pings/
Description: Removes all pings & trackbacks from comments and puts them into $pings.
Author: John Godley
Version: 1.0
Author URI: http://urbangiraffe.com/
*/
function ping_comments ($comments)
{
global $pings, $comment;
// Initialise the variables
$pings = $newcomments = array ();
// Loop through existing comments
foreach ($comments AS $comment)
{
if (get_comment_type () == 'comment')
$newcomments[] = $comment;
else
$pings[] = $comment;
}
// Return the comments without any pings
return $newcomments;
}
// Adjust comments number so comments_number() function is correct
function ping_comments_number ($num)
{
global $pings;
return $num - count ($pings);
}
// Hook into WordPress filters
add_filter ('get_comments_number', 'ping_comments_number');
add_filter ('comments_array', 'ping_comments');
?>