[wp-hackers] Filter hook to selectively show comments for a post

Korey Atterberry korey99 at yahoo.com
Tue Apr 18 18:19:35 GMT 2006


Hi all-

  First of all, I'm new to this mailing list and I apologize if I
shouldn't be posting here.  I'm looking forward to contributing to the
Wordpress world a little bit by improving a plugin of mine, but I need
a little push in the right direction.  I didn't hear anything from the
general population on the Wordpress support forum, but if there's a
more appropriate resource I would appreciate the suggestion.

  What I want to know is, is there a filter or action hook somewhere
that I could use to selectively display comments on a given post?  

  In my Lazy-K Gallery plugin (htpp://plugins.atterberry.net), I host
an image gallery in one Wordpress Page.  The gallery plugin looks at
the "file" parameter in the query string to determine what image or
folder to display.  My users want to be able to comment individually on
each image.  What I figured I'd do is when a users posts a comment,
insert the image name into the text of the comment (since every image's
comments will be stored under one Page) prior to saving the comment
into the db.  When I display my page, including all the comments, I
would then look at the text of each comment and determine whether it
applies to the image currently being shown.  I haven't found a hook for
that just yet.  I found hooks to let me edit the content, author, etc.,
but not to remove a comment altogether.

Thanks in advance for any direction.  By the way, thanks for all the
work you have done on Wordpress.

Korey Atterberry



More information about the wp-hackers mailing list