Lists node administration filters that can be applied.
An associative array of filters.
function node_filters() {
// Regular filters
$filters['status'] = array(
'title' => t('status'),
'options' => array(
'[any]' => t('any'),
'status-1' => t('published'),
'status-0' => t('not published'),
'promote-1' => t('promoted'),
'promote-0' => t('not promoted'),
'sticky-1' => t('sticky'),
'sticky-0' => t('not sticky'),
),
);
// Include translation states if we have this module enabled
if (module_exists('translation')) {
$filters['status']['options'] += array(
'translate-0' => t('Up to date translation'),
'translate-1' => t('Outdated translation'),
);
}
$filters['type'] = array(
'title' => t('type'),
'options' => array(
'[any]' => t('any'),
) + node_type_get_names(),
);
// Language filter if language support is present.
if (language_multilingual()) {
$languages = language_list(LANGUAGE_ALL);
foreach ($languages as $langcode => $language) {
// Make locked languages appear special in the list.
$language_options[$langcode] = $language->locked ? t('- @name -', array(
'@name' => $language->name,
)) : $language->name;
}
$filters['langcode'] = array(
'title' => t('language'),
'options' => array(
'[any]' => t('- Any -'),
) + $language_options,
);
}
return $filters;
}