[wp-trac] [WordPress Trac] #42863: Wrong default-value for $size in get_the_post_thumbnail_url()

WordPress Trac noreply at wordpress.org
Mon Dec 11 02:16:09 UTC 2017


#42863: Wrong default-value for $size in get_the_post_thumbnail_url()
-----------------------------+----------------------
 Reporter:  souri_wpaustria  |       Owner:
     Type:  defect (bug)     |      Status:  closed
 Priority:  normal           |   Milestone:
Component:  Media            |     Version:  4.9.1
 Severity:  normal           |  Resolution:  invalid
 Keywords:                   |     Focuses:
-----------------------------+----------------------
Changes (by joemcgill):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 Hi @souri_wpaustria,

 Thanks for the report. In this case, `post-thumbnail` is the intended
 default size since the function `get_the_post_thumbnail_url()` is meant to
 return the `post-thumbnail` size set when a theme declares post thumbnail
 support and uses `set_post_thumbnail_size()` to set the size for the
 `post-thumbnail` image.

 At this point, the function has defaulted to the `post-thumbnail` size
 since it was introduced in 4.4, so changing the default value would result
 in backwards compatibility issues for any themes that are expecting the
 current default size.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42863#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list