[theme-reviewers] Concerning set_post_thumbnail_size and alternatives

Justin Tadlock justin at justintadlock.com
Sat Apr 19 15:06:19 UTC 2014


The recommended practice should be to use set_post_thumbnail_size() for 
custom thumbnail sizes.  This is a wrapper for add_image_size() 
specifically made for theme authors to create a custom post thumbnail 
size.  That, in turn, allows us plugin developers to check if a theme 
has created a custom thumbnail size with easy checks like:

if ( has_image_size( 'post-thumbnail' ) )
     /* do something cool because themes used set_post_thumbnail_size() */

The use of add_image_size() should be used for additional image sizes.

On 4/19/2014 6:16 AM, Chip Bennett wrote:
> set_post_thumbnail_size() is allowed.
>
> I think the *recommended* practice should be to use add_image_size(), 
> but we have no requirement in that regard.
>
>
> On Sat, Apr 19, 2014 at 6:03 AM, carolina poena <myazalea at hotmail.com 
> <mailto:myazalea at hotmail.com>> wrote:
>
>     It was mentioned in a review that set_post_thumbnail_size is not
>     allowed, but I would like some clarification.
>     Is this required or recommended, and what alternative solution
>     should I recommend to authors who are using set_post_thumbnail_size?
>
>     (https://codex.wordpress.org/Function_Reference/set_post_thumbnail_size)
>
>     _______________________________________________
>     theme-reviewers mailing list
>     theme-reviewers at lists.wordpress.org
>     <mailto:theme-reviewers at lists.wordpress.org>
>     http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
>
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20140419/0f26042c/attachment.html>


More information about the theme-reviewers mailing list