#18204 closed enhancement (wontfix)
Move theme def to index.php
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Themes | Keywords: | |
Focuses: | Cc: |
Description
I propose moving the comment defining the theme from style.css to index.php.
This would allow theme authors to:
- name their stylesheets according to whatever convention they prefer (perhaps with a version number in the filename to avoid caching issues), or
- to keep all css files in a dedicated directory (as I prefer).
It also simplifies the basic theme requirement to a single file.
The transition could be pretty simple:
- look first in the index.php file for the defining comments,
- if not present, look in style.css to maintain backwards compatibility.
Change History (2)
Note: See
TracTickets for help on using
tickets.
This would be a pretty big change.
It also doesn't come without backwards compatibility concerns: while a theme typically needs index.php, a child theme only requires style.css.
There's no requirement for you to use style.css as your stylesheet, technically. You can use it for the headers only, then enqueue your own script out of your theme's css/ directory.
Finally, if you do enqueue styles via wp_enqueue_style, you can bake in your own version numbering for cache-busting. Core supports using query strings for this -- actually renaming files is never really necessary.
I think therefore it is safe to close this as wontfix.