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

WordPress Trac wp-trac at lists.automattic.com
Thu Jun 14 11:21:37 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):

 Well, I have a custom post type for user uploads. This post type should be
 treated exactly like an attachment. I want all attachment functions (such
 as the one being discussed) to work for it.

 Why don't I just use the attachment post type? Well, there's a few reasons
 for that. The main reason is because you can't assign any post status to
 an attachment. WordPress forces it to be "inherit" or "private".

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


More information about the wp-trac mailing list