You are here

function node_filters in Drupal 5

Same name and namespace in other branches
  1. 4 modules/node.module \node_filters()
  2. 6 modules/node/node.admin.inc \node_filters()
  3. 7 modules/node/node.admin.inc \node_filters()

List node administration filters that can be applied.

3 calls to node_filters()
node_build_filter_query in modules/node/node.module
Build query for node administration filters based on session.
node_filter_form in modules/node/node.module
Return form for node administration filters.
node_filter_form_submit in modules/node/node.module
Process result from node administration filter form.

File

modules/node/node.module, line 1413
The core that allows content to be submitted to the site. Modules and scripts may programmatically submit nodes using the usual form API pattern.

Code

function node_filters() {

  // Regular filters
  $filters['status'] = array(
    'title' => t('status'),
    'options' => array(
      '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'),
    ),
  );
  $filters['type'] = array(
    'title' => t('type'),
    'options' => node_get_types('names'),
  );

  // The taxonomy filter
  if ($taxonomy = module_invoke('taxonomy', 'form_all', 1)) {
    $filters['category'] = array(
      'title' => t('category'),
      'options' => $taxonomy,
    );
  }
  return $filters;
}