Purpose
Check if a plugin is active, with a redirect back to the Plugin Manager if not [optional]
Location
users/helpers/us_helpers.php
Parameters
# |
Parameter |
Data Type |
Required |
Description |
1 |
$plugin |
string |
Yes |
Reserved name for plugin |
2 |
$checkOnly = false |
bool |
No |
Prevent redirect if this is a code only check and you are not hooking into the Plugin Manager |
Returns
Data Type |
Description of Returned Data |
bool |
true/false |
Example
pluginActive('localhostlogin', true)
Further Documentation:
if(pluginActive('localhostlogin', true)) {
echo "You'll be able to login via localhostlogin on the login page";
} else {
echo "You won't be able to login via localhostlogin on the login page";
}