You are here

function themekey_ui_set_node_theme in ThemeKey 6

Function themekey_ui_set_node_theme().

1 call to themekey_ui_set_node_theme()
_themekey_ui_nodeapi in ./themekey_ui_admin.inc
Function _themekey_ui_nodeapi().

File

./themekey_ui_helper.inc, line 15

Code

function themekey_ui_set_node_theme($nid, $theme = 'default') {
  $item = array(
    'property' => 'node:nid',
    'value' => $nid,
    'theme' => $theme,
  );
  if ($id = db_result(db_query('SELECT id FROM {themekey_properties} WHERE property = \'node:nid\' AND value = \'%s\'', $nid))) {
    $item['id'] = $id;
  }
  _themekey_properties_set($item);
}