function node_class_attributes in Node Class 7
Same name and namespace in other branches
- 6.2 node_class.module \node_class_attributes()
- 6 node_class.module \node_class_attributes()
2 calls to node_class_attributes()
File
- ./
node_class.module, line 25
Code
function node_class_attributes($node) {
// dev note:
// Get css attribute information ONLY if node already existed.
// if we're here the $form[#node] object will have already been
// created but it won't have an nid because it hasn't been saved
if (!isset($node->nid)) {
return "";
}
return db_query('SELECT css_class FROM {node_class} WHERE nid = :nid', array(
':nid' => $node->nid,
))
->fetchField();
}