function themekey_rule_get in ThemeKey 6.2
Same name and namespace in other branches
- 6.4 themekey_build.inc \themekey_rule_get()
- 6.3 themekey_build.inc \themekey_rule_get()
- 7.3 themekey_build.inc \themekey_rule_get()
- 7 themekey_build.inc \themekey_rule_get()
- 7.2 themekey_build.inc \themekey_rule_get()
Loads ThemeKey rule from database.
Parameters
$id: id of the rule to be loaded from database
Return value
the rule as associative array or NULL
1 call to themekey_rule_get()
File
- ./
themekey_build.inc, line 389 - The functions in this file are the back end of ThemeKey which should be used only if you configure something but not when ThemeKey switches themes.
Code
function themekey_rule_get($id) {
if ($result = db_query('SELECT * FROM {themekey_properties} WHERE id = %d', $id)) {
if ($item = db_fetch_array($result)) {
if ('drupal:path' == $item['property']) {
themekey_complete_path($item);
}
return $item;
}
}
return NULL;
}