function themekey_ui_set_path_theme in ThemeKey 7
Same name and namespace in other branches
- 6.4 themekey_ui_helper.inc \themekey_ui_set_path_theme()
 - 6 themekey_ui_helper.inc \themekey_ui_set_path_theme()
 - 6.2 themekey_ui_helper.inc \themekey_ui_set_path_theme()
 - 6.3 themekey_ui_helper.inc \themekey_ui_set_path_theme()
 - 7.3 themekey_ui_helper.inc \themekey_ui_set_path_theme()
 - 7.2 themekey_ui_helper.inc \themekey_ui_set_path_theme()
 
Saves a theme assigned to a path alias as ThemeKey rule
Parameters
$path: Drupal path alias as string
$theme: assigned Drupal theme as string
$id: the id of an existing rule if this one should be modified
See also
1 call to themekey_ui_set_path_theme()
- themekey_ui_pathalias_submit in ./
themekey_ui_admin.inc  - Form submission handler for themekey_ui_pathalias().
 
File
- ./
themekey_ui_helper.inc, line 76  
Code
function themekey_ui_set_path_theme($path, $theme = 'default', $id = 0) {
  $item = array(
    'property' => 'drupal:path',
    'value' => $path,
    'theme' => $theme,
    'enabled' => 1,
  );
  if ($id > 0) {
    $item['id'] = $id;
  }
  themekey_rule_set($item);
}