[wp-trac] [WordPress Trac] #39272: Twenty Seventeen: Incorrect $content_width

WordPress Trac noreply at wordpress.org
Wed Dec 14 01:59:18 UTC 2016


#39272: Twenty Seventeen: Incorrect $content_width
------------------------------+-------------------------
 Reporter:  celloexpressions  |      Owner:
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  4.7.1
Component:  Bundled Theme     |    Version:  4.7
 Severity:  major             |   Keywords:  needs-patch
  Focuses:                    |
------------------------------+-------------------------
 Twenty Seventeen defines a wider content width on the front page in
 `twentyseventeen_content_width()`:
 {{{
 $content_width = 700;

 if ( twentyseventeen_is_frontpage() ) {
         $content_width = 1120;
 }
 }}}

 But the front page does not use a different content width than other
 pages. The only case I can think of where it might change is when the one
 column layout option is used.

 Also, I'm not seeing an actual content width of 700px anywhere. Depending
 on screen size, it looks like it's roughly 520px (+/- 5px).

 Incorrectly setting the `$content_width` causes media embeds to end up
 with the wrong aspect ratio, potentially among other issues. I'm surprised
 that this was not picked up sooner; I hadn't looked closely through
 functions.php but noticed this in passing while working on adding some
 inline docs there.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39272>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list