[wp-trac] [WordPress Trac] #20409: XML-RPC returns only full-size URL for featured image
WordPress Trac
wp-trac at lists.automattic.com
Thu Apr 19 17:09:50 UTC 2012
#20409: XML-RPC returns only full-size URL for featured image
-------------------------+------------------
Reporter: koke | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.4
Component: XML-RPC | Version: 3.4
Severity: normal | Resolution:
Keywords: |
-------------------------+------------------
Changes (by maxcutler):
* cc: maxcutler (added)
Comment:
Another alternative is to extract most of `wp_getMediaItem` into a
`_prepare_media_item` method and use that for `featured_image` in
`_prepare_post` instead of an ID and a separate additional field.
That way you would have `wp_getMediaItem`, `wp_getMediaLibrary`, and
`_prepare_post` all returning image/attachment data in an identical and
filter-able format. And you'd solve the re-querying performance hit with
`wp_getMediaLibrary`.
We are already doing this for terms in `_prepare_post`.
If others like this, I can draw up a patch and unit tests tonight.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20409#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list