[wp-hackers] Separating Pings from Comments in WordPress 2.7

Matthew Martz matt at sivel.net
Mon Oct 6 19:25:32 GMT 2008


On Mon, Oct 6, 2008 at 2:41 PM, Ryan Boren <ryan at boren.nu> wrote:
> On Mon, Oct 6, 2008 at 10:58 AM, Matthew Martz <matt at sivel.net> wrote:
>> Thanks for the tip Ryan!  I seemed to have overlooked the significance
>> of the callback argument.  I have updated the how to with this and
>> removed the foreach loop.
>
> http://trac.wordpress.org/attachment/ticket/7635/separate_comments.diff
>
> That adds a separate_comments flag to comments_template().  If the
> flag is true, comments_template() will setup comments_by_type.  Seem
> helpful?  Anything else we should add in?  Maybe counts for each type?
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>

I'm not sure counts for each type is really required as you could just
count($comments_by_type[$type]) but someone may find it useful.

The counts would be particularly useful in filtering
get_comments_count, but where comments_by_type is being setup is too
late for that hook to work everywhere.

I'll take some time and think about other useful information that
could be added in.

-- 
Matt Martz
matt at sivel.net


More information about the wp-hackers mailing list