search api autocomplet t() for transmlate term name
This commit is contained in:
parent
2155a66eb1
commit
3eb20676ca
@ -211,12 +211,12 @@ function materio_admin_getSimplenewsNodeBodyTemplate($cat){
|
||||
return file_get_contents(drupal_get_path('module', 'materio_admin').'/templates/simplenews_'.$cat.'_node.html');
|
||||
}
|
||||
|
||||
function materio_admin_process_html(&$vars)
|
||||
{
|
||||
foreach (array('head', 'styles', 'scripts') as $replace) {
|
||||
if (!isset($vars[$replace])) {
|
||||
continue;
|
||||
}
|
||||
$vars[$replace] = preg_replace('/(src|href|@import )(url\(|=)(")http(s?):/', '$1$2$3', $vars[$replace]);
|
||||
// http://stackoverflow.com/questions/19202449/change-drupal-7-compiled-css-and-js-includes-to-use-https-as-opposed-to-http
|
||||
function materio_admin_process_html(&$vars){
|
||||
foreach (array('head', 'styles', 'scripts') as $replace) {
|
||||
if (!isset($vars[$replace])) {
|
||||
continue;
|
||||
}
|
||||
$vars[$replace] = preg_replace('/(src|href|@import )(url\(|=)(")http(s?):/', '$1$2$3', $vars[$replace]);
|
||||
}
|
||||
}
|
||||
|
@ -100,7 +100,8 @@ function materio_search_api_autocomplete_searchapi($typed = ''){
|
||||
//$term_matches[$item->tid] = check_plain($item->name);
|
||||
// $term_matches[check_plain($item->name)] = check_plain($item->name);
|
||||
// TODO: leave tags with nodes
|
||||
$term_matches[trim(implode(' ', $adv_search_q[0]).' "'.$last[1].$item->name).'"'] = check_plain($item->name);
|
||||
$itemname = t($item->name);
|
||||
$term_matches[trim(implode(' ', $adv_search_q[0]).' "'.$last[1].$itemname).'"'] = check_plain($itemname);
|
||||
|
||||
$delta++;
|
||||
if($delta > 15)
|
||||
|
Loading…
x
Reference in New Issue
Block a user