Merge pull request #423 from Squidly271/master

Allow plugins to use font awesome for icons
This commit is contained in:
tom mortensen
2019-01-05 11:11:48 -08:00
committed by GitHub
6 changed files with 23 additions and 6 deletions
@@ -63,11 +63,20 @@ foreach (glob($plugins,GLOB_NOSORT) as $plugin_link) {
}
}
//link/icon
$icon = icon($name);
if ($launch = plugin('launch',$plugin_file))
$link = "<a href='/$launch'><img src='/$icon' class='list'></a>";
else
$link = "<img src='/$icon' class='list'>";
$launch = plugin('launch',$plugin_file);
if ( $icon = plugin("icon",$plugin_file) ) {
$iconDisplay = substr($icon,0,5) == "icon-" ? "<i class='$icon list'></i>" : "<i class='fa fa-$icon list'></i>";
if ( $launch )
$link = "<a href='/$launch' class='list'>$iconDisplay</a>";
else
$link = $iconDisplay;
} else {
$icon = icon($name);
if ( $launch )
$link = "<a href='/$launch' class='list'><img src='/$icon' class='list'></a>";
else
$link = "<img src='/$icon' class='list'>";
}
//description
$readme = "plugins/{$name}/README.md";
if (file_exists($readme))