function pathologic_pathologic_alter in Pathologic 7.3
Same name and namespace in other branches
- 7.2 pathologic.test \pathologic_pathologic_alter()
Implements hook_pathologic_alter() for testing that functionality.
File
- tests/
pathologic.test, line 292 - Pathologic behavior testing.
Code
function pathologic_pathologic_alter(&$url_params, $parts, $settings) {
if (is_array($parts['qparts']) && isset($parts['qparts']['test'])) {
if ($parts['qparts']['test'] === 'add_foo_qpart') {
// Add a "foo" query part.
if (empty($url_params['options']['query'])) {
$url_params['options']['query'] = array();
}
$url_params['options']['query']['foo'] = 'bar';
}
elseif ($parts['qparts']['test'] === 'use_original') {
$url_params['options']['use_original'] = TRUE;
}
}
}