function skinr_ui_element_is_skinable in Skinr 7.2
Same name and namespace in other branches
- 8.2 skinr_ui/skinr_ui.module \skinr_ui_element_is_skinable()
Fetch all theme_hooks that are compatible with active skins.
2 calls to skinr_ui_element_is_skinable()
- skinr_ui_preprocess in ./
skinr_ui.module - Implements hook_preprocess().
- skinr_ui_test_skinable_element in tests/
skinr_ui_test_skinable/ skinr_ui_test_skinable.module
File
- ./
skinr_ui.module, line 292 - Handles Skinr UI functionality allowing users to apply skins to their site.
Code
function skinr_ui_element_is_skinable($module, $element) {
$theme_hooks = skinr_theme_hooks($module, $element);
$skinable_hooks = skinr_ui_get_skinable_hooks();
if (isset($skinable_hooks['*'])) {
// Skins exist that apply to any hook.
return TRUE;
}
$theme_hooks = skinr_theme_hooks($module, $element);
list($element_base) = explode('__', $element, 2);
foreach ($theme_hooks as $theme_hook) {
if (isset($skinable_hooks[$theme_hook])) {
return TRUE;
}
}
return FALSE;
}