Hotaru Docs

 [həʊdɒks]

Function Reference/isActive

Description

Checks whether a plugin is installed and enabled

Usage

<?php isActive( $type ) ?>

Parameters

$type | string

$type represents the type or folder name of the plugin. The function will check the type of plugin first before checking the name of plugin.

If no type is given this function will use the value of the $h->plugin->folder setting to check for an enabled plugin.

Return Values

boolean true | false

Examples

If the Plugin you are calling has already displayed on the page then you do not need to use the require_once(PLUGINS . $plugin_folder . '/' . $plugin_name); line

<?php
     if ( $h->isActive( $plugin_folder ) ) {
         require_once(PLUGINS . $plugin_folder . '/' . $plugin_name);
         $plugin = new Plugin();
         $data = $plugin->method($h);
     }
?>

Source File

addPost() is located in content/hotaru.php which calls the PluginFunctions.php file from the LIBS folder.

Related