function _node_entity_diff_additional_options_comment in Diff 7.3
Private callback function to render the comment field.
File
- includes/
node.inc, line 181 - Provide diff functions for the node module.
Code
function _node_entity_diff_additional_options_comment($old_node, $new_node, $context) {
if (!module_exists('comment')) {
return array();
}
$row = array(
'#name' => t('Comment setting'),
'#states' => array(),
'#weight' => -1,
'#settings' => array(),
);
$options = array(
COMMENT_NODE_OPEN => t('Open'),
COMMENT_NODE_CLOSED => t('Closed'),
COMMENT_NODE_HIDDEN => t('Hidden'),
);
foreach ($context['states'] as $state) {
$row['#states'][$state] = array(
'#old' => array(
$options[$old_node->comment],
),
'#new' => array(
$options[$new_node->comment],
),
);
}
return $row;
}