function ctools_content_admin_icon in Chaos Tool Suite (ctools) 7
Same name and namespace in other branches
- 6 includes/content.inc \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 - Contains the tools to handle pluggable content that can be used by other applications such as Panels or Dashboard.
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;
}