[wp-trac] Re: [WordPress Trac] #4073: get_posts: add query hooks (but only apply to non-admin user)

WordPress Trac wp-trac at lists.automattic.com
Wed Apr 4 05:00:23 GMT 2007


#4073: get_posts: add query hooks (but only apply to non-admin user)
---------------------------------+------------------------------------------
 Reporter:  kevinB               |        Owner:  markjaquith
     Type:  enhancement          |       Status:  new        
 Priority:  normal               |    Milestone:  2.2        
Component:  General              |      Version:             
 Severity:  normal               |   Resolution:             
 Keywords:  get_posts has-patch  |  
---------------------------------+------------------------------------------
Comment (by kevinB):

 Please disregard my ignorant question about (int) casting the query
 values.  I realize now it's to filter out null or non-numeric arguments.

 Also, I'm going to leave this proposed patch with ( ! is_admin() ) as the
 criteria for applying hooks.  In the existing code, I don't find any
 precedent for requiring the administrator role, and none of the existing
 caps quite fit.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4073#comment:4>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list