[wp-trac] [WordPress Trac] #39997: Bundled Themes: Pass theme version number to wp_enqueue_style()

WordPress Trac noreply at wordpress.org
Thu Apr 18 16:17:02 UTC 2019

#39997: Bundled Themes: Pass theme version number to wp_enqueue_style()
 Reporter:  parsmizban               |       Owner:  desrosj
     Type:  defect (bug)             |      Status:  reopened
 Priority:  normal                   |   Milestone:  5.2
Component:  Bundled Theme            |     Version:  4.7.2
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-refresh  |     Focuses:
Changes (by ianbelanger):

 * keywords:  has-patch needs-refresh close => has-patch needs-refresh


 Here's one issue with requiring child themes to enqueue there own
 stylesheets. By default, when using a child theme, the `style.css` is
 loaded from the child theme automatically by core, without having to
 enqueue it. When you do enqueue it, you end up loading your child theme
 `style.css` twice. This point was made by @parsmizban 2 years ago. This is
 why I pursued a fix for this.

 > When you use a child theme, WordPress loads the child style.css
 automatically without using any extra code!
 > if you use wp_enqueue_style to include child style.css, It double loads
 this file

 I personally think that we need to do something besides hardcoding
 versions, or if that is the chosen route, maybe we need to look at how
 child theme `style.css` is automatically enqueued.

Ticket URL: <https://core.trac.wordpress.org/ticket/39997#comment:41>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list