[wp-trac] [WordPress Trac] #11329: Allow _wp_get_comment_list() to return comments only for specific users
WordPress Trac
wp-trac at lists.automattic.com
Wed Jan 20 21:15:20 UTC 2010
#11329: Allow _wp_get_comment_list() to return comments only for specific users
----------------------------+-----------------------------------------------
Reporter: pampfelimetten | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.0
Component: Accessibility | Version: 2.8.5
Severity: normal | Keywords: has-patch needs-testing
----------------------------+-----------------------------------------------
Comment(by cnorris23):
I made and tested the patch on trunk, as it's highly unlikely that it will
get committed to the 2.9 branch. I just tested the patch on 2.9.1 and
XAMPP, and it worked fine. I used your exact function, and since my test
site doesn't have a user with an ID of '17', I got "No results found"
instead of a comment list. Is this what you got? Using an existing user ID
on my test site, the patch worked and returned results from only that
user.
What do you mean by "as well as hardcoded?" The function you have above
has the ID hardcoded already. Did you hardcode in template.php (if so,
where)?
It may somehow be conflicting with another plugin you have installed. Try
the code below, and see if that works. It's what I initially used to test
the filter. All it does is get the ID of the user you used to log into
WordPress, then passes it to the filter.
{{{
function cba_get_comment_list_by_user($userid) {
global $user_ID;
return $user_ID;
};
add_filter('get_comment_list_by_user', 'cba_get_comment_list_by_user');
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11329#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list