You can ask for the activation of the theme. You can get the value of the options values template
and stylesheet
. The stylesheet
get the active style, a benefit if the user use an child theme. As example if ( 'my_theme' === get_option( 'stylesheet' ) ) ...
.
Also you can use the hooks for template and stylesheet, also s small exmaple.
add_filter( 'option_template', 'fb_theme' );
add_filter( 'option_stylesheet', 'fb_theme' );
function fb_theme( $template="" ) {
if ( 'my_theme' === $template ) {
echo 'TRUE';
}
return $template;
}