[wp-trac] [WordPress Trac] #21184: $comment global var is not set when wp_list_comments is called with callback function
WordPress Trac
wp-trac at lists.automattic.com
Sat Jul 7 19:28:53 UTC 2012
#21184: $comment global var is not set when wp_list_comments is called with
callback function
--------------------------+-----------------------------
Reporter: sirzooro | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version: 2.7
Severity: normal | Keywords: has-patch
--------------------------+-----------------------------
Many comments-related functions (mainly template ones) uses comment object
stored in global variable `$comment`, when they are called without
parameters. However when you try to use `wp_list_comments()` with custom
callback function, this is not true. Currently template authors have to
either set this global var in their callback functions, or explicitly pass
comment object to functions like `comment_text()`. Attached path fixes
this.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21184>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list