[wp-hackers] get_template function

Robert Deaton false.hopes at gmail.com
Mon Mar 20 00:54:46 GMT 2006


On 3/19/06, Sam Angove <sam at rephrase.net> wrote:
> I realize it's in the current functions too, but is there a good
> reason to fall back on the default theme if the file isn't found? I
> mean, as an end-user, I don't have a perception that the default theme
> is any different than any other theme, so it's pretty unexpected
> behaviour. (Maybe I deleted 'sidebar.php' because I decided that I
> didn't want a sidebar at all?)
>
> So my vote goes for something like:
>
>         function get_template($type) {
>                 if ( $template = get_query_template($type) )
>                         load_template($template);
>         }
>
>

-1, this would introduce possibly the largest backwards compatiblity
break in the history of all software, I'd estimate around 80-90% of
themes would stop working with a change like this, the reason that the
current behavior exists is so that a theme developer does not have to
write 20 files to get a simple theme working. I think the behavior is
perfectly fine as it is.

As for using one function to load all the files, I'm indifferent.

--
--Robert Deaton
http://somethingunpredictable.com


More information about the wp-hackers mailing list