function themekey_dummy2post in ThemeKey 7
Same name and namespace in other branches
- 7.3 modules/themekey.system.inc \themekey_dummy2post()
- 7.2 modules/themekey.system.inc \themekey_dummy2post()
ThemeKey mapping function to set a ThemeKey property's value (destination) with the aid of another ThemeKey property (source).
src: system:dummy dst: system:post
Parameters
$dummy: string containing current value of ThemeKey property system:dummy
Return value
array of system:post values or NULL if no value could be mapped
1 string reference to 'themekey_dummy2post'
- themekey_system_themekey_properties in modules/
themekey.system.inc - Implements hook_themekey_properties().
File
- modules/
themekey.system.inc, line 409 - Provides some ThemeKey properties.
Code
function themekey_dummy2post($dummy) {
$filtered_post = array();
foreach ($_POST as $key => $value) {
$filtered_post[] = $key . (!empty($value) ? '=' . $value : '');
}
return count($filtered_post) ? array_unique($filtered_post) : NULL;
}