[wp-hackers] Theme Creation on Install ?
nbachiyski at developer.bg
Mon Aug 1 14:17:18 GMT 2005
Matt Mullenweg wrote:
> Jason Bainbridge wrote:
>> I noticed that myself the other day, the changeset that implemented it
>> But that was back in January and I'm sure that theme didn't pop up
>> until recently.
> Part of the problem we noted at the time is that if you change the name
> of your blog and re-upgrade it'll create a new theme. This is still
> unresolved. Maybe we should use the domain instead of the name?
There are some more problems with that automatic theme creation.
If the blog name contains non-ascii characters it is passed to
sanitize_title() to create a string, which is a valid folder name. After
that the theme could not be activated, because the name of theme
(residing in its style.css) is different from the directory name (the
Here we have several options:
- when trying to activate a theme pass the 'template' and 'stylesheet'
parameters to sanitize_title() to ensure our 'non-ascii' theme will
successfully be activated. However thus activation of other themes (for
example these, containg spaces), whose names will change after going
- set the name of theme to be its sanitized name. Beleieve me, I really
do not want my theme to be named: %d0%b1%d0%b0%d0%b1%d0%b0. Actually I
do not want same-named directory also.
- in style.css put not only the theme name, but also the name of the
sub-directory of wp-content/themes it resides in
- do not automatically create local version of the current theme
- the best option, I just couldn't think of, but maybe somebody will ;)
More information about the wp-hackers