[wp-trac] [WordPress Trac] #20948: Unnecessary post type check in wp_get_attachment_url

WordPress Trac noreply at wordpress.org
Sun Dec 16 23:21:48 UTC 2012


#20948: Unnecessary post type check in wp_get_attachment_url
------------------------------------+------------------------------
 Reporter:  jfarthing84             |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Media                   |     Version:  3.4
 Severity:  normal                  |  Resolution:
 Keywords:  dev-feedback has-patch  |
------------------------------------+------------------------------

Comment (by jfarthing84):

 That's not true, it can also be public, and it can be done
 programmatically otherwise.


 So, what about this check in wp_insert_attachment?
 {{{
 if ( ! in_array( $post_status, array( 'inherit', 'private' ) ) )
         $post_status = 'inherit';
 }}}

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


More information about the wp-trac mailing list