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.


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


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;