[wp-trac] [WordPress Trac] #19373: wp_insert_post() should not contain current_user_can() checks

WordPress Trac wp-trac at lists.automattic.com
Tue Nov 29 09:22:05 UTC 2011


#19373: wp_insert_post() should not contain current_user_can() checks
---------------------------------+-----------------------------
 Reporter:  alexkingorg          |       Owner:
     Type:  enhancement          |      Status:  new
 Priority:  normal               |   Milestone:  Future Release
Component:  Taxonomy             |     Version:  3.0
 Severity:  major                |  Resolution:
 Keywords:  3.4-early has-patch  |
---------------------------------+-----------------------------

Comment (by scribu):

 Then I think the third parameter should be a boolean, {{{$sanitize =
 true}}}.

 Otherwise, you'd get inconsistent results, with some cap check from the
 current user and others from the user you passed in.

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


More information about the wp-trac mailing list