[wp-trac] [WordPress Trac] #2840: Comments RSS does not respect filtering done by the_posts hook

WordPress Trac wp-trac at lists.automattic.com
Tue Jun 20 16:36:16 GMT 2006


#2840: Comments RSS does not respect filtering done by the_posts hook
---------------------+------------------------------------------------------
 Reporter:  coppit   |       Owner:  anonymous
     Type:  defect   |      Status:  new      
 Priority:  normal   |   Milestone:           
Component:  General  |     Version:           
 Severity:  normal   |    Keywords:           
---------------------+------------------------------------------------------
 The comments RSS should only provide comments for posts that are actually
 visible after filtering. To see the problem:

 1. Create a plugin that uses the the_posts hook to filter the list of
 posts. Have it return an empty array.
 2. Look at http://www.example.com/blog/comments/feed/ and you will see all
 your comments for supposedly filtered posts.

 If you don't want to create a plugin, you can use my category access
 plugin: http://www.coppit.org/code/category-access-0.5.3.zip. Just set the
 default access to none to restrict all posts in all categories.

 I believe the solution is to modify the SQL in wp-commentsrss2.php, adding
 a WHERE clause that restricts the query to only those posts that are
 returned from the_posts.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/2840>
WordPress Trac <http://wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list