Hotaru Docs


Function Reference/isActive


Checks whether a plugin is installed and enabled


<?php isActive( $type ) ?>


$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


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

     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.