I have a theme. It depends on a plugin. If you try to activate the theme and the plugin isn't installed, then I want to
switch_theme() to some other (random**) theme in the
I can get the
$template value from the key of the array returned by
search_theme_directories(). But I can't seem to sort out how to get the
Also, given this approach, what's the best way to check if a theme is child or a parent? Without getting into details I would prefer to pick parent theme as a default.
Perhaps there's a better way to do this? I would presume WP has something similar built in but I can seem to pin point that either. In short, I'm listenin' if you got ideas :)
I was not able to tag this with:
search_theme_directories(). That tag doesn't exist and I don't have the rep to add it. Could someone with some juice add it to the list of valid tags? Thanks.
Note: I'm first going to check for twentytwelve and twentyeleven and then if necessary pick one if they aren't around.