function apachesolr_search_get_taxonomy_term_title in Apache Solr Search 6.3
Same name and namespace in other branches
- 8 apachesolr_search.module \apachesolr_search_get_taxonomy_term_title()
- 7 apachesolr_search.module \apachesolr_search_get_taxonomy_term_title()
Used as a callback function to generate a title for the taxonomy term depending on the input in the configuration screen
Parameters
integer $search_page_id:
integer $value:
Return value
String
1 string reference to 'apachesolr_search_get_taxonomy_term_title'
- apachesolr_search_load_all_search_types in ./
apachesolr_search.module - Function that loads all the search types
File
- ./
apachesolr_search.module, line 290 - Provides a content search implementation for node content for use with the Apache Solr search application.
Code
function apachesolr_search_get_taxonomy_term_title($search_page_id = NULL, $value = NULL) {
$page_title = 'Search results for %value';
if (isset($value) && isset($search_page_id)) {
$search_page = apachesolr_search_page_load($search_page_id);
$page_title = str_replace('%value', '!value', $search_page['page_title']);
$term = taxonomy_get_term($value);
if (!$term) {
return;
}
$title = $term->name;
}
return t($page_title, array(
'!value' => $title,
));
}