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

▾ 3 functions call search_data()

node_admin_search in modules/node.module
search_view in modules/search.module
Menu callback; presents the search form and/or search results.
user_admin in modules/user.module

Code

modules/search.module, line 1068

<?php
function search_data($keys = NULL, $type = 'node') {
  if (isset($keys)) {
    if (module_hook($type, 'search')) {
      $results = module_invoke($type, 'search', 'search', $keys);
      if (isset($results) && is_array($results) && count($results)) {
        if (module_hook($type, 'search_page')) {
          return module_invoke($type, 'search_page', $results);
        }
        else {
          return theme('search_page', $results, $type);
        }
      }
    }
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.