It seems costly to query the DB every time a subfilter is selected.
Rather is would be nicer to select filters on the screen and then do a query.
So, I wrote a different one. After picking my way through the form API tricks and tracing down map keys, etc.
I came up with the following, (no claim to an optimal solution):
{One more note: I used a string substitution for the top level checkbox state, where it should have probably been handled with #default_value. But, this code works for now.}
/**
* List node administration filters that can be applied.
*/
function node_filters() {
// Regular filters
$filteroptions = array();;
$filteroptions['status-1'] = t('published');
$filteroptions['status-0'] = t('not published');
if ( module_hook('publisher','fromstatic') ) {
$filteroptions['static_out-1'] = t('static');
$filteroptions['static_out-0'] = t('dynamic');
}
$filteroptions['promote-1'] = t('promoted');
$filteroptions['promote-0'] = t('not promoted');
$filteroptions['sticky-1'] = t('sticky');
$filteroptions['sticky-0'] = t('not sticky');
$filters['status'] = array('title' => t('status'),
'options' => $filteroptions
);
$filters['type'] = array('title' => t('type'), 'options' => node_get_types('names'));
// The taxonomy filter
if ($taxonomies = module_invoke('taxonomy', 'form_all', 1)) {