function themekey_complete_path in ThemeKey 7.3
Same name and namespace in other branches
- 6.4 themekey_build.inc \themekey_complete_path()
- 6.2 themekey_build.inc \themekey_complete_path()
- 6.3 themekey_build.inc \themekey_complete_path()
- 7 themekey_build.inc \themekey_complete_path()
- 7.2 themekey_build.inc \themekey_complete_path()
Named wildcards in ThemeKey rules based on property drupal:path are stored as serialized array in the database.
This function de-serializes those wildcards and injects them back into the value of the rule. This format is needed by ThemeKey's administration interface.
It's the counterpart of these functions:
Parameters
$item: reference to an inject containing a ThemeKey rule as returned directly from database
See also
themekey_prepare_custom_path()
2 calls to themekey_complete_path()
- themekey_abstract_load_rules in ./
themekey_build.inc - Loads all ThemeKey Rules from the database. Therefore, it uses recursion to build the rule chains.
- themekey_abstract_rule_get in ./
themekey_build.inc
File
- ./
themekey_build.inc, line 171 - 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_complete_path($item) {
$item->wildcards = unserialize($item->wildcards);
if (count($item->wildcards)) {
$parts = explode('/', $item->value, MENU_MAX_PARTS);
foreach ($item->wildcards as $index => $wildcard) {
$parts[$index] .= $wildcard;
}
$item->value = implode('/', $parts);
}
}