/**
 * Checks if a plugin is enabled.
 *
 * @param   string  $type    The plugin type, relates to the subdirectory in the plugins directory.
 * @param   string  $plugin  The plugin name.
 *
 * @return  boolean
 *
 * @since   1.5
 */
public static function isEnabled($type, $plugin = null)
{
    $result = static::getPlugin($type, $plugin);
    return !empty($result);
}