You are here

function node_field_display_node_alter in Drupal 7

Implements hook_field_display_ENTITY_TYPE_alter().

File

modules/node/node.module, line 239
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_field_display_node_alter(&$display, $context) {

  // Hide field labels in search index.
  if ($context['view_mode'] == 'search_index') {
    $display['label'] = 'hidden';
  }
}