[wp-trac] [WordPress Trac] #11993: Add post thumbnail from url
WordPress Trac
wp-trac at lists.automattic.com
Sat May 12 21:11:44 UTC 2012
#11993: Add post thumbnail from url
-----------------------------+-----------------------------
Reporter: paradox460 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Post Thumbnails | Version: 2.9.1
Severity: normal | Resolution:
Keywords: thumbnail post |
-----------------------------+-----------------------------
Comment (by lgedeon):
media_sideload_image() can be extended to either:
1. optionally return the attachment id (instead of html) so we can
set_post_thumbnail( $post, $id ) with the results
1. or we could include set_post_thumbnail( $post, $id ) in the function
and add a boolean that says to make it the featured image
1. or we could extract getting the attachment id into another function and
make this function only responsible for building the html. Then if all I
need is the id, I can call the extracted function instead.
I would love to write this patch, but would like to get your thoughts on
preferred approach.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11993#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list