You are here

function themekey_abstract_rule_get in ThemeKey 7.3

3 calls to themekey_abstract_rule_get()
themekey_css_rule_get in themekey_css/themekey_css.module
Loads ThemeKey rule from database.
themekey_redirect_rule_get in themekey_redirect/themekey_redirect.module
Loads ThemeKey rule from database.
themekey_rule_get in ./themekey_build.inc
Loads ThemeKey rule from database.

File

./themekey_build.inc, line 505
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_abstract_rule_get($table, $id) {
  if ($result = db_select($table, 'tp')
    ->fields('tp')
    ->condition('id', $id)
    ->execute()) {
    foreach ($result as $item) {
      if ('drupal:path' == $item->property) {
        themekey_complete_path($item);
      }
      return $item;
    }
  }
  return NULL;
}