function themekey_compat_themekey_properties in ThemeKey 7.3
Same name and namespace in other branches
- 7 themekey_compat.module \themekey_compat_themekey_properties()
- 7.2 themekey_compat.module \themekey_compat_themekey_properties()
Implements hook_themekey_properties().
Provides additional properties for the ThemeKey module: themekey_compat:module_MODULE_triggers_theme
Return value
array of themekey properties
File
- ./
themekey_compat.module, line 42 - Integration of different theme switching modules into ThemeKey and its theme switching rule chain.
Code
function themekey_compat_themekey_properties() {
// Attributes for properties
$attributes = array();
// Mapping functions
$maps = array();
foreach (variable_get('themekey_compat_modules_enabled', array()) as $module) {
$property_name = 'themekey_compat:module_' . $module . '_triggers_theme';
$module_info = system_get_info('module', $module);
$attributes[$property_name] = array(
'description' => t('The property %property could not be selected from the property drop-down. You got this static property by activating the %module module at the ThemeKey Compatibility !settings_link. You can move the property to any position in the rule chain.', array(
'%property' => $property_name,
'%module' => $module_info['name'],
'!settings_link' => l(t('settings'), 'admin/config/user-interface/themekey/settings/compat'),
)),
'page cache' => THEMEKEY_PAGECACHE_SUPPORTED,
'static' => TRUE,
);
$maps[] = array(
'src' => 'system:dummy',
'dst' => $property_name,
'callback' => 'themekey_compat_dummy2theme',
'args' => array(
'module' => $module,
),
);
}
return array(
'attributes' => $attributes,
'maps' => $maps,
);
}