1 views_ui.admin.inc | views_ui_autocomplete_tag($string = '') |
Page callback for views tag autocomplete
File
- core/
modules/ views_ui/ views_ui.admin.inc, line 4787 - Admin page callbacks for the Views UI module.
Code
function views_ui_autocomplete_tag($string = '') {
$matches = array();
$views = views_get_all_views();
foreach ($views as $view) {
if (!empty($view->tag) && strpos($view->tag, $string) === 0) {
$matches[$view->tag] = check_plain($view->tag);
if (count($matches) >= 10) {
break;
}
}
}
// Displayed as JSON by delivery callback backdrop_json_deliver().
return $matches;
}