[theme-reviewers] Child themes discussion

Philip M. Hofer (Frumph) philip at frumph.net
Sat Jan 22 19:12:31 UTC 2011


function get_theme_file($filename = '') {
 if (empty($filename)) return;
 if (is_child_theme() && file_exists(get_stylesheet_directory.$filename)) 
return get_stylesheet_directory_uri().$filename;
 return get_template_directory_uri().$filename;
}



----- Original Message ----- 
From: "Justin Tadlock" <justin at justintadlock.com>
To: <theme-reviewers at lists.wordpress.org>
Sent: Sunday, January 23, 2011 10:58 AM
Subject: Re: [theme-reviewers] Child themes discussion


> No, that'd probably break some stuff.  "Stylesheet" and "template" refer 
> to very specific directories.  "Stylesheet" refers to the directory with 
> the stylesheet in it (the currently active theme).  And, "template" refers 
> to the directory with the templates (the parent theme).
>
> It's not really complex stuff.
>
> If anything, WP could use a get_theme_file() (example name) for getting 
> theme files with the URI rather than the path.
>
> On 1/22/2011 12:50 PM, Simon Prosser wrote:
>> On 01/22/11 18:46, Chip Bennett wrote:
>>> See, this is what I thought. I didn't think that get_stylesheet_ had a
>>> fallback routine like get_template_part() has.
>> maybe if were going to embrace child themes it should be changed in
>> core, so get_stylesheet_ always falls back to get_template_ ?
>>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
> 




More information about the theme-reviewers mailing list