1 node.module _node_search_get_types()

Get the list of node types that are enabled for indexing.

Return value

array: An unindexed array of node type machine names.

File

core/modules/node/node.module, line 2475
The core module that allows content to be submitted to the site.

Code

function _node_search_get_types() {
  $node_types = config_get('search.settings', 'node_types');
  // If no types are in the config file, it means all types are enabled.
  if (empty($node_types)) {
    $node_types = array_keys(node_type_get_names());
  }
  return $node_types;
}