function ctools_content_admin_icon
Get the proper icon path to use, falling back to default icons if no icon exists.
$subtype The loaded subtype info.
1 call to ctools_content_admin_icon()
- ctools_content_process in includes/
content.inc - Provide defaults for a content type.
File
-
includes/
content.inc, line 421
Code
function ctools_content_admin_icon($subtype) {
$icon = '';
if (isset($subtype['icon'])) {
$icon = $subtype['icon'];
if (!file_exists($icon)) {
$icon = $subtype['path'] . '/' . $icon;
}
}
if (empty($icon) || !file_exists($icon)) {
$icon = ctools_image_path('no-icon.png');
}
return $icon;
}