You are here

function themekey_node_nid2language in ThemeKey 6.4

Same name and namespace in other branches
  1. 6.2 modules/themekey.node.inc \themekey_node_nid2language()
  2. 6.3 modules/themekey.node.inc \themekey_node_nid2language()
  3. 7.3 modules/themekey.node.inc \themekey_node_nid2language()
  4. 7 modules/themekey.node.inc \themekey_node_nid2language()
  5. 7.2 modules/themekey.node.inc \themekey_node_nid2language()

ThemeKey mapping function to set a ThemeKey property's value (destination) with the aid of another ThemeKey property (source).

src: node:nid dst: node:language

Parameters

$nid: a node id

Return value

string or NULL if no value could be mapped

1 string reference to 'themekey_node_nid2language'
themekey_node_themekey_properties in modules/themekey.node.inc
Implements hook_themekey_properties().

File

modules/themekey.node.inc, line 258
Provides some node attributes as ThemeKey properties.

Code

function themekey_node_nid2language($nid) {
  $language = themekey_node_get_simple_node_property($nid, 'language');
  if (empty($language)) {
    $language = 'neutral';
  }
  return $language;
}