[wp-trac] [WordPress Trac] #20948: Unnecessary post type check in wp_get_attachment_url
WordPress Trac
noreply at wordpress.org
Sat May 24 15:35:56 UTC 2014
#20948: Unnecessary post type check in wp_get_attachment_url
------------------------------------+------------------------------
Reporter: jfarthing84 | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 3.4
Severity: normal | Resolution: wontfix
Keywords: dev-feedback has-patch | Focuses:
------------------------------------+------------------------------
Changes (by ericlewis):
* status: new => closed
* resolution: => wontfix
Comment:
Replying to [comment:4 nacin]:
> if we do this, we are essentially saying we will always support
attachment-specific functions to work on non-attachments, and that is just
not something I think we should be guaranteeing. It requires us to support
something we don't really care to support. We'll either find a situation
where we can't, or we'll break the paradigm accidentally later on. So it's
not really fair to either of us.
This greatly outweighs the counter-argument being made here.
If one wanted to make their own post type with similar functionality to
attachments, you can by all means create your own functions that do
exactly what you want them to do, copying and editing where the
attachments API doesn't fit your model. You're not limited by WordPress,
you just won't benefit from WordPress (in this respect) because of your
use-case.
Closing out as wontfix.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/20948#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list