[wp-hackers] Downloading with media_sideload_image

Alex Dunae alex at dunae.ca
Thu Feb 18 17:56:37 UTC 2010

On Feb 17, 8:41 pm, Andrew Nacin <w... at andrewnacin.com> wrote:
> Since you know the post ID, you can fetch that post's attachments, ordered
> by post_date descending, and grab the attachment ID that way.

Thanks Andrew.  I kept looking for a pure way to do this (so I
wouldn't have to trust that the sideloaded image was the most recent
in a high volume setting) but grabbing the latest attachment is simple
and should work just fine.

Much appreciated.

More information about the wp-hackers mailing list