follow-up to Moshe's patch at #407570: Let modules alter sort links - we should look globally at using the ability of theme() to take a list of possible hooks to eliminate theme functions that are just wrappers for core theme functions.
return array('subject' => t('Sort by'),
- 'content' => theme('apachesolr_sort_list', $sort_links));
+ 'content' => theme(array('apachesolr_sort_list', 'item_list'), $sort_links_themed));
default:
break;
}
@@ -972,9 +978,6 @@
'apachesolr_facet_list' => array(
'arguments' => array('items' => NULL),
),
- 'apachesolr_sort_list' => array(
- 'arguments' => array('items' => NULL),
- ),
'apachesolr_sort_link' => array(
'arguments' => array('text' => NULL, 'path' => NULL, 'querystring' => '', 'active' => FALSE, 'direction' => ''),
),
@@ -1039,8 +1042,3 @@
}
return theme('item_list', $items) . $admin_link;
}
-
-function theme_apachesolr_sort_list($items) {
- return theme('item_list', $items);
-}
-
Comments
Comment #1
jpmckinney commenteditem_list expects a numerically indexed array. apachesolr_sort_list is given an array indexed by Solr field names. I've never made use of these indices in my implementations of apachesolr_sort_list, but I can imagine a use for them.