[wp-trac] [WordPress Trac] #27273: thumbnail size aliases returning mixed results
WordPress Trac
noreply at wordpress.org
Tue Mar 4 19:27:14 UTC 2014
#27273: thumbnail size aliases returning mixed results
-----------------------------+-----------------------------
Reporter: jadpm | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Post Thumbnails | Version: trunk
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
Not sure if this has been discussed elsewhere, I could not find it.
In the Post thumbnail documentation it is stated that "thumb" and "post-
thumbnail" are both aliases of the "thumbnail" size. But
{{{
get_the_post_thumbnail( $id, "thumb" );
}}}
and
{{{
get_the_post_thumbnail( $id, "thumbnail" );
}}}
produce different results. "thumbnail" returns the img tag filled with the
resized image src and correct width and height attributes, while "thumb"
returns the img tag with the full image src and cropped with and height
attributes.
My take is that the aliases are not really aliases in a lot of the media
related functions. For example, in wp-includes/media.php line 46 inside
image_constrain_size_for_editor() only "thumb" is used as alias. Most of
the times, only "thumbnail" is being used.
Tested with the latest trunk version coming from the beta tested plugin
and TwentyTwelve.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27273>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list