You are here

function quickedit_node_view_alter in Quick Edit 7

Implements hook_node_view_alter().

For in-place editing, it's necessary for contextual links to always exist, even when the node is being displayed on its own page.

File

./quickedit.module, line 565
Provides in-place content editing functionality for fields.

Code

function quickedit_node_view_alter(&$build) {
  if (!isset($build['#contextual_links']['node'])) {
    $build['#contextual_links']['node'] = array(
      'node',
      array(
        $build['#node']->nid,
      ),
    );
  }
}