function pathologic_test_pathologic_alter in Pathologic 8
Implements hook_pathologic_alter(), for testing that functionality.
File
- tests/
modules/ pathologic_test/ pathologic_test.module, line 6
Code
function pathologic_test_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'] = [];
}
$url_params['options']['query']['foo'] = 'bar';
}
elseif ($parts['qparts']['test'] === 'use_original') {
$url_params['options']['use_original'] = TRUE;
}
}
}