function w3c_validator_node_update in W3C Validator 7
Implements hook_node_update().
File
- ./
w3c_validator.module, line 66
Code
function w3c_validator_node_update($node) {
// If the node is published
if ($node->status == 1) {
// Build the uri
$uri = 'node/' . $node->nid;
// Check if a validation operation is possible
// (user permission + module configration).
$process_mode = variable_get('w3c_validator_options', array(
'w3c_on_run' => 1,
));
if (user_access('use_w3c') && isset($process_mode['w3c_on_run']) && $process_mode['w3c_on_run']) {
// Check the result.
_w3c_validator_full_validation_operation($uri, 1);
}
}
}