You are here

function _prev_next_node_types in Previous/Next API 7.2

Same name and namespace in other branches
  1. 6 prev_next.module \_prev_next_node_types()
  2. 7 prev_next.module \_prev_next_node_types()

Helper function to return an array of node types to index.

Return value

array()

3 calls to _prev_next_node_types()
prev_next_node_insert in ./prev_next.module
Implements hook_node_insert().
prev_next_node_update in ./prev_next.module
Implements hook_node_update().
_prev_next_node_types_sql in ./prev_next.module
Helper function to return a SQL clause for types to be indexed

File

./prev_next.module, line 431
The previous next module indexes the previous and next nodes based upon user-selectable criteria and stores this index in the database for faster retrieval later.

Code

function _prev_next_node_types() {
  $types = array();
  foreach (node_type_get_types() as $type => $name) {
    if (variable_get(PREV_NEXT_NODE_TYPE . $type, 0)) {
      $types[] = $type;
    }
  }
  return $types;
}