[wp-hackers] Themes Switcher
Ryan Boren
ryan at boren.nu
Mon Sep 27 06:09:46 UTC 2004
On Sun, 2004-09-26 at 21:28 -0700, Craig Hartel wrote:
> If a theme has a stylesheet for NN4 and maybe a couple of IE versions, as well
> as one for printing, would there have to be another field(s) to import those
> style sheets?
Currently, bloginfo('stylsheet_url') resolves to the currently active
stylesheet. Let us take a theme named "Leather and Red Licorice" as an
example. stylesheet_url might resolve as:
http://steadylovinman.com/bodypress/wp-
content/themes/leatherandredlicorice/style.css
Now, if the "Leather and Red Licorice" theme also wants to provide
ie4masochists.css and foxybrowser.css, we might want to add a
stylesheet_dir setting to bloginfo that resolves to
http://steadylovinman.com/bodypress/wp-
content/themes/leatherandredlicorice/. The index.php for the theme
could then import bloginfo('stylesheet_directory')/ie4masochists.css and
bloginfo('stylesheet_directory')/foxybrowser.css. If someone decides
that the LaRL theme is too heavy and creates a lighter, slicker theme
called "Water Based Lubricant" which uses the templates from LaRL, the
WBL theme would provide replacements for style.css, ie4masochists.css,
and foxybrowser.css. Once this theme is active, stylesheet_url will
resolve to http://steadylovinman.com/bodypress/wp-
content/themes/waterbasedlubricant/style.css and stylesheet_directory
will resolve to http://steadylovinman.com/bodypress/wp-
content/themes/waterbasedlubricant. Thus, the templates from LaRL will
automagically pick up all of the stylesheets from WBL.
So, we just need to add bloginfo('stylesheet_directory').
And someone needs to create Leather and Red Licorice and Water Based
Lubricant themes for Kubrick. :-)
Ryan
More information about the hackers
mailing list