You are here

function _nodeblock_node_languages in Nodeblock 7

Helper function to return the nodes languages.

2 calls to _nodeblock_node_languages()
nodeblock_node_load in ./nodeblock.module
Implements hook_node_load().
nodeblock_node_presave in ./nodeblock.module
Implements hook_node_presave().

File

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

Code

function _nodeblock_node_languages($node) {
  $langcodes = array();

  // Determine the languages of this node.
  if (module_exists('entity_translation') && !empty($node->translations->data)) {
    $langcodes = array_keys($node->translations->data);
  }
  else {
    $langcodes[] = $node->language;
  }
  return $langcodes;
}