[wp-trac] [WordPress Trac] #22380: Consolidate the API hooks comment
WordPress Trac
noreply at wordpress.org
Wed Nov 7 17:00:16 UTC 2012
#22380: Consolidate the API hooks comment
-------------------------------------+--------------------------
Reporter: momo360modena | Type: defect (bug)
Status: new | Priority: normal
Milestone: Awaiting Review | Component: Comments
Version: trunk | Severity: minor
Keywords: has-patch needs-testing |
-------------------------------------+--------------------------
Many functions of API comments have hooks unusable because they do not
provide parameters that provides the function.
In general, these functions provides a $comment_ID argument, but it's not
present in the hook...
Sample
{{{
function comment_author( $comment_ID = 0 ) {
$author = apply_filters('comment_author', get_comment_author(
$comment_ID ) );
echo $author;
}
}}}
Fixed sample :
{{{
function comment_author( $comment_ID = 0 ) {
$author = apply_filters('comment_author', get_comment_author(
$comment_ID ), $comment_ID );
echo $author;
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22380>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list