#11215 closed enhancement (wontfix)
Improve naming of child/parent theme functions
Reported by: | westi | Owned by: | westi |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.9 |
Component: | Themes | Keywords: | |
Focuses: | Cc: |
Description
We have confusing naming for child/parent theme functions.
We have references to stylesheet/template instead of child/parent which makes it unclear which function should be being used.
In #11033 we introduced a function for loading the child themes textdomain with a clear name.
We should look at deprecating the stylesheet/template nomenclature and use child/parent instead.
Attachments (1)
Change History (16)
#2
@
15 years ago
- Cc johnjamesjacoby added
I know the way phpBB does it is with template/style, but I'm not sure if a phpBB style allows PHP code to override, or if it's just a stylesheet thing.
I think because the terms theme and template have become synonymous, it's hard to say which direction to take. To me, theme/stye are basically the same thing.
Template - HTML
Theme/style - CSS/images
For the purpose of WordPress, parent/child probably makes the most sense, since it isn't template/theme/style specific in any way.
#3
@
15 years ago
it's wordpress themes (not styles nor templates), I think that's the term set, so +1 for what filosofo writes.
westi, can you give examples of the function names you seem unfit and provide a suggestions how to rename them?
@
15 years ago
code refactored in functions get_current_theme, get_themes and get_theme_roots (bit off-topic, stumbled over it while reviewing the ticket)
#4
@
15 years ago
I looked into this a bit more. The naming for theme/template/stylesheet related sutff are more simple/consistent than I first thought:
- theme (see current_theme options, example:
"WordPress Classic"
) - template (see template option, example:
"classic"
, the actual string based identifier for 1.) theme .) - stylesheet (see stylesheet option, example:
"classic"
, for a definition what a stylesheet is, please see function get_stylesheet(), Quote: "the template name and the stylesheet name are going to be the same for most cases")
So I wonder where actually the reporter sees confusing function names. It would be good to name those so that a fix can be provided. I see the problem here that we only think function names are mixed up, infact they are not. The terms child/parent -theme might be new but the concept is not, right?
#5
@
15 years ago
The confusing part is to people who do not understand what the Template and Stylsheet are, Yet know what the Parent and the Child are.
Most theme developers refer to them as Parent and Child themes, infact, most developers do too.
So the deal is, We should stop refering to them as Stylesheet and Template, and instead, refer to them as Parent and Child, a name that is clear cut and obvious to people (Instead of scratching your head, and thinking, now, is the child the template or the stylsheet...)
#6
@
15 years ago
- Keywords dev-feedback added
Well then some clarification would be great. Can anyone tell me which of those are right or wrong?
- template is child
- stylesheet is child
- template is parent
- stylesheet is parent
- theme is child
- theme is parent
- theme can be parent or child
- template is child or parent
- stylesheet is child or parent
Clarification would be gratefull appreceated. Confirmation by core-devs much helpfull.
#7
@
15 years ago
- Keywords dev-feedback removed
if no child, then template and stylesheet are parent; if child, then template is parent and stylesheet is child.
#14
@
11 years ago
- Milestone Future Release deleted
- Resolution set to wontfix
- Status changed from new to closed
That ship sailed a long time ago.
I know you're not referring to this directly, but I think changes should keep the theme/template distinction in that a "theme" describes the overall set of functionality (e.g. the "Classic" theme), but "template" describes its individual files (e.g. "single.php", "author.php", "page.php").