You can call is_plugin_active() in templates and from user pages as well, which can be useful for related plugins (i.e. require plugin 'xyz' to operate my new plugin). You need to manually include the plugin.php file as noted in the is_plugin_active() docs on Codex.
Here is a functional example I use in my premium add-on packs to make sure the free base plugin is active before invoking a the add-on object. It requires certain hooks & filters to be available in the base plugin or it will crash.
include_once(ABSPATH.'wp-admin/includes/plugin.php');
if (!function_exists('is_plugin_active') || !is_plugin_active('store-locator-le/store-locator-le.php')) {
return;
}
As an aside, if you are having problems with is_plugin_active() from within an active admin login it is likely because you are testing before admin_init fires. admin_menu fires before admin_init and doing tests in admin_menu has "bitten" me before. The name "admin_init" which seems counter-intuitive to me since admin_menu is already run. I think of init as "first thing to run"... maybe admin_kinda_init() would be better. :)
function_exists('is_plugin_active')
is false when called from the main plugin file if outside of a method but is true when called inside of the method that is called for theactivated_plugin
action.