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