You are here

function themekey_path_set in ThemeKey 6.2

Same name and namespace in other branches
  1. 6.4 themekey_build.inc \themekey_path_set()
  2. 6.3 themekey_build.inc \themekey_path_set()
  3. 7.3 themekey_build.inc \themekey_path_set()
  4. 7 themekey_build.inc \themekey_path_set()
  5. 7.2 themekey_build.inc \themekey_path_set()

Stores ThemeKey paths created by modules via hook_themekey_paths() in database.

Parameters

$item: reference to an associative array containing a ThemeKey path structure

See also

themekey_rebuild()

1 call to themekey_path_set()
themekey_rebuild in ./themekey_build.inc
Rebuilds all ThemeKey related drupal variables by calling ThemeKey's hooks:

File

./themekey_build.inc, line 172
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_path_set(&$item) {
  $item['callbacks'] = isset($item['callbacks']) && !empty($item['callbacks']) ? $item['callbacks'] : array();
  list($item['fit'], $item['weight'], $item['wildcards']) = themekey_prepare_path($item['path']);
  drupal_write_record('themekey_paths', $item, isset($item['id']) ? 'id' : array());
}