function purl_pair::remove in Persistent URL 6
Same name and namespace in other branches
- 7 includes/purl_pair.inc \purl_pair::remove()
Removes specific modifier pair from a query string.
Parameters
$q: The current path.
$element: a purl_path_element object
Return value
path string with the pair removed.
Overrides purl_path::remove
File
- includes/
purl_pair.inc, line 52
Class
- purl_pair
- Pair pair prefixer.
Code
function remove($q, $element) {
$args = explode('/', $q);
array_splice($args, array_search($element->value, $args), 2);
return implode('/', $args);
}