[wp-hackers] Hiding Child's Template Theme
Chris Jean
gaarai at gaarai.com
Mon Mar 30 13:46:15 GMT 2009
I'm starting to play around with child themes and wondered if it is
possible to hide the parent or template theme of a child theme in Manage
Themes.
Looking through the code, it looks like the only way to have a theme
removed is if it is broken (missing parent theme, missing index.php or
style.css, etc). Even then, it lists them as broken themes.
My reasoning for wanting to hide the parent theme is simple: I don't
want a user to activate the parent theme if the child theme was the one
customized or built for their needs. Looking at almost any information
about building child themes has a note about not activating the parent
instead of the child. So, I can't be the only one that sees the listing
of parent themes problematic.
I'm thinking of building a patch for core that allows for an entry in
the theme information that tells WordPress to hide the theme from
activation on Manage Themes. For example:
Theme Name: Parent Theme
Theme URI: http://wordpress.org
Author: Chris
Author URI: http://site.com
Version: 1.0
Description: This is a parent theme and should not be used.
*Hidden: yes*
Of course, a different option could be used instead of "Hidden:", and
I'm open to suggestions.
I'm passing this by the list first to see 1) how many other developers
are interested in my proposal and 2) if any other developers have any
suggestions or recommendations.
--
Chris Jean
http://gaarai.com/
http://wp-roadmap.com/
http://dnsyogi.com/
More information about the wp-hackers
mailing list