From c3e6a08b40b0a2a6ad00eee2f936eeae6b7352e9 Mon Sep 17 00:00:00 2001
From: webchick <webchick@24967.no-reply.drupal.org>
Date: Sat, 7 Dec 2013 15:17:23 -0800
Subject: [PATCH] Issue #1946398 by bdgreen, pamatt: Incorrect example in
 function hook_views_data_alter.

---
 core/modules/views/views.api.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/core/modules/views/views.api.php b/core/modules/views/views.api.php
index e78322ee766f..52816e2c42f0 100644
--- a/core/modules/views/views.api.php
+++ b/core/modules/views/views.api.php
@@ -295,12 +295,15 @@ function hook_views_data_alter(array &$data) {
     'title' => t('Example field'),
     'help' => t('Some example content that references a user'),
     'handler' => 'hook_handlers_field_example_field',
+    'field' => array(
+      'id' => 'example_field',
+    ),
   );
 
   // This example changes the handler of the node title field.
   // In this handler you could do stuff, like preview of the node when clicking
   // the node title.
-  $data['node']['title']['handler'] = 'modulename_handlers_field_node_title';
+  $data['node']['title']['field']['id'] = 'node_title';
 
   // This example adds a relationship to table {foo}, so that 'foo' views can
   // add this table using a relationship. Because we don't want to write over
-- 
GitLab