You are here

function _nodeblock_node_title in Nodeblock 7

Helper function to get the Node title.

3 calls to _nodeblock_node_title()
nodeblock_node_load in ./nodeblock.module
Implements hook_node_load().
nodeblock_node_presave in ./nodeblock.module
Implements hook_node_presave().
_nodeblock_block_title in ./nodeblock.module
Helper function to get the Node Block block title.

File

./nodeblock.module, line 520
Enables use of specified node types as custom blocks.

Code

function _nodeblock_node_title($node, $langcode) {

  // Support for the title module.
  if (module_exists('title')) {
    drupal_static_reset('title_entity_sync');
    $node_clone = clone $node;
    title_entity_sync('node', $node_clone, $langcode);
    return $node_clone->title;
  }
  return $node->title;
}