You are here

function apachesolr_exclude_node_apachesolr_index_node_status_callback in Apache Solr Exclude Node 7

Status callback for ApacheSolr, for nodes.

1 string reference to 'apachesolr_exclude_node_apachesolr_index_node_status_callback'
apachesolr_exclude_node_apachesolr_entity_info_alter in ./apachesolr_exclude_node.module
Implements hook_apachesolr_entity_info_alter().

File

./apachesolr_exclude_node.module, line 153
Module file for the Apache Solr Exclude Node module.

Code

function apachesolr_exclude_node_apachesolr_index_node_status_callback($entity_id, $type) {
  if ($type == 'node') {
    $node = node_load($entity_id, NULL, TRUE);
    if (is_object($node) && variable_get('apachesolr_exclude_node_enable_' . $node->type, 0)) {
      if (isset($node->apachesolr_exclude_node_enabled) && $node->apachesolr_exclude_node_enabled) {
        return 0;
      }
    }
  }
  return 1;
}