[wp-trac] [WordPress Trac] #11571: Provide easy way to return url of thumbnail image
WordPress Trac
wp-trac at lists.automattic.com
Fri Sep 2 21:20:55 UTC 2011
#11571: Provide easy way to return url of thumbnail image
-------------------------------------------------+-------------------------
Reporter: braindrain | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future
Component: Post Thumbnails | Release
Severity: normal | Version: 2.9
Keywords: 3.2-early has-patch needs-testing | Resolution:
gsoc |
-------------------------------------------------+-------------------------
Comment (by nacin):
A few things to tweak for commit:
No need for the logic on line 112. get_post_thumbnail_id() can take the
default null. Likewise we can remove that code from
get_the_post_thumbnail().
Docblock needs `@return string|bool Image src, or false if the post does
not have a thumbnail`.
We can bail with false, rather than the if/else, then the code can become
un-indented a bit.
I question the lack of a need for filters. Seems to me like we may even
want to duplicate the begin/end_fetch_post_thumbnail_html hooks.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11571#comment:12>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list