[wp-trac] [WordPress Trac] #30819: Getting info on default theme(s)
WordPress Trac
noreply at wordpress.org
Mon Dec 29 15:41:30 UTC 2014
#30819: Getting info on default theme(s)
-------------------------+------------------------------
Reporter: donutz | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+------------------------------
Comment (by nacin):
The sole purpose of `$default_themes` is to resolve conflicts when a
default theme directory is copied or moved, and the theme name isn't
changed. The name of such a "pretender" theme is appended with the
directory name. It's otherwise not something that warrants any kind of
exposure. If we weren't so picky about little details like this, it
wouldn't exist.
I definitely wouldn't want to introduce a `get_default()` method with so
much parameter complexity. I could perhaps go for a `get_default_themes()`
method, but I'd question why. Someone using `get_default_themes()` may
want to know that themes are allowed in a subdirectory, including default
themes, so for example on wordpress.org, you'd be looking at
`core/twentyfifteen`.
Of course, the alternative is people hardcode in a search for "twenty*"
which isn't any better.
I suppose I just don't understand the use case. I needed access to
$default_themes just last week, and then I realized I was doing something
kind of stupid and shouldn't do that.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30819#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list