| Versionen | |
|---|---|
| drupal6 – drupal7 | search_query_insert($keys, $option, $value = '') |
Return a query with the given module-specific search option inserted in. e.g. 'type:book'.
modules/
<?php
function search_query_insert($keys, $option, $value = '') {
if (search_query_extract($keys, $option)) {
$keys = trim(preg_replace('/(^| )' . $option . ':[^ ]*/i', '', $keys));
}
if ($value != '') {
$keys .= ' ' . $option . ':' . $value;
}
return $keys;
}
?>
Kommentare
Kommentar hinzufügen