[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
Fri Jan 22 18:44:44 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 pampfelimetten):

 Okay, I tried and tested it, seems to work, even with an array now
 (usefull for enabling different authors to cooperate, what is what we want
 to do as well)

 {{{
         if ( !empty($userid) ) {
             if(!is_array($userid)) {
                         $query .= "AND p.post_author = '$userid' ";
                 } else {
                         $query .= "AND p.post_author IN ('".implode("',
 '", $userid)."') ";
                 }
         }
 }}}

 It has one flaw: the total count still includes all of the comments, and
 paging also is including pages for all comments, and returning empty pages
 if going back too far.

 I don't know anything about svn, sadly, can you test it and include a new
 patch file?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11329#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list