I'd like to be able to check if the twentytwelve theme is active. I know if I was checking for an active plugin I'd do something like:
$active_plugins = apply_filters( 'active_plugins', get_option( 'active_plugins' ) );
if ( in_array( 'plugin-folder/plugin-folder.php', $active_plugins ) ) {
//do stuff
} else {
add_action( 'admin_notices', 'create-a-notice' );
}
What's the proper way to check if a theme is active so I can run a function for that theme?