[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:46:57 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 has- | Focuses:
screenshots |
-------------------------------------------------+-------------------------
Comment (by obenland):
Replying to [comment:41 ianbelanger]:
> By default, when using a child theme, the `style.css` is loaded from the
child theme automatically by core
It's not Core that does it, it's the parent theme being child-theme aware
and enqueuing `get_stylesheet_uri()` rather than using
`get_template_directory_uri()` with a path to their stylesheet. Consider
it a service to make it as easy as possible to make small changes via a
child theme.
> 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.
Correct, you'll want to dequeue the parent's stylesheet in that case.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39997#comment:43>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list