Is there a function in wordpress that grabs all the users(user ids) who have commented on a post? I have the post id available.
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
The get_comments() answer by Poulomi Nag is correct. This will be somewhat more efficient.
Another alternative is to use WP_Comment_Query http://core.trac.wordpress.org/browser/branches/3.2/wp-includes/comment.php#L186 |
|||||||||
|
|
The following snippet is one way of doing it:
The user IDs of course should be used for better use than just |
||||
|
|