[wp-trac] [WordPress Trac] #16349: return list of images actually being used in post
WordPress Trac
wp-trac at lists.automattic.com
Thu Oct 4 23:33:19 UTC 2012
#16349: return list of images actually being used in post
-----------------------------+------------------------------
Reporter: mcmasterp | Owner:
Type: feature request | Status: reopened
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 3.0.4
Severity: normal | Resolution:
Keywords: close |
-----------------------------+------------------------------
Comment (by scribu):
Replying to [comment:18 MikeSchinkel]:
> Let me give you two examples from core that are both very similar. They
both have the same attributes you claimed meant they shouldn't be in core:
>
> - '''oEmbed''' - There are lots of possibilities for how someone wants
to retrieve the information via oEmbed.
No, there aren't; you do a GET request to the endpoint. The oEmbed
provider is the one responsible for returning something useful.
> - '''WP_Http''' - The are numerous possibilities for how a server might
be able to process an HTTP call, and implementing this class is hard.
When you use WP_Http, you want to make a HTTP request; regardless of the
transport the server employs, the effect of the request is the same: you
get back a response object.
In contrast, with the proposed get_attached_images() function, how the
images are associated to the post ''does'' affect what you can do with
them. For example, you won't be able to manipulate an 'external' image the
same way you could an 'attached' one.
Therefore, it's a leaky abstraction.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16349#comment:21>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list