function themekey_comment_cid2nid in ThemeKey 6.2
Same name and namespace in other branches
- 6.4 modules/themekey.comment.inc \themekey_comment_cid2nid()
- 6 modules/themekey.comment.inc \themekey_comment_cid2nid()
- 6.3 modules/themekey.comment.inc \themekey_comment_cid2nid()
- 7.3 modules/themekey.comment.inc \themekey_comment_cid2nid()
- 7 modules/themekey.comment.inc \themekey_comment_cid2nid()
- 7.2 modules/themekey.comment.inc \themekey_comment_cid2nid()
ThemeKey mapping function to set a ThemeKey property's value (destination) with the aid of another ThemeKey property (source).
src: comment:cid dst: node:nid
Parameters
$nid: a comment id
Return value
a node id or NULL if no value could be mapped
1 string reference to 'themekey_comment_cid2nid'
- themekey_comment_themekey_properties in modules/
themekey.comment.inc - Implements hook_themekey_properties().
File
- modules/
themekey.comment.inc, line 66 - Provides some comment attributes as ThemeKey properties.
Code
function themekey_comment_cid2nid($cid) {
$nid = db_result(db_query('SELECT nid FROM {comments} WHERE cid = %d', $cid));
return $nid ? $nid : NULL;
}