function node_field_display_node_alter
Implements hook_field_display_ENTITY_TYPE_alter().
File
-
modules/
node/ node.module, line 239
Code
function node_field_display_node_alter(&$display, $context) {
// Hide field labels in search index.
if ($context['view_mode'] == 'search_index') {
$display['label'] = 'hidden';
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.