[wp-trac] [WordPress Trac] #11880: Avatars in Custom Comment Type
WordPress Trac
wp-trac at lists.automattic.com
Mon Jan 18 05:55:19 UTC 2010
#11880: Avatars in Custom Comment Type
-------------------------+--------------------------------------------------
Reporter: usermrpapa | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.0
Component: Comments | Version: 2.9.1
Severity: normal | Keywords: has-patch, tested
-------------------------+--------------------------------------------------
Comment(by nacin):
Looks good, I would probably split it into two lines of code instead of
wrapping it for clarity. Also, the code currently in core could simply use
!empty(). This logic should work:
{{{
// No avatar for pingbacks or trackbacks
$allowed_comment_types = apply_filters( 'get_avatar_comment_types', array(
'comment' ) );
if ( !empty( $id_or_email->comment_type ) && !in_array(
'get_avatar_comment_types', $allowed_comment_types ) )
return false;
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11880#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list