search_data
- Versions
- 4.6 – 7
search_data($keys = NULL, $type = 'node')
Perform a standard search on the given keys, and return the formatted results.
Related topics
Code
modules/search.module, line 677
<?php
function search_data($keys = NULL, $type = 'node') {
$output = '';
if (isset($keys)) {
if (module_hook($type, 'search')) {
$results = module_invoke($type, 'search', 'search', $keys);
if (is_array($results) && count($results)) {
$output .= '<dl class="search-results">';
foreach ($results as $entry) {
$output .= theme('search_item', $entry, $type);
}
$output .= '</dl>';
$output .= theme('pager', NULL, 15, 0);
}
}
}
return $output;
}
?>Login or register to post comments 