function scheduler_remove_publish_date_action in Scheduler 7
Remove the publish_on date for the node.
Parameters
object $node: The node object from which to remove the publish_on date.
1 string reference to 'scheduler_remove_publish_date_action'
File
- ./
scheduler.rules.inc, line 168 - Scheduler rules functions.
Code
function scheduler_remove_publish_date_action($node) {
if (variable_get('scheduler_publish_enable_' . $node->type, 0)) {
$node->publish_on = 0;
scheduler_node_presave($node);
scheduler_node_update($node);
}
else {
$type_name = node_type_get_name($node->type);
watchdog('scheduler', 'Scheduled publishing is not enabled for %type content. To prevent this message add the condition "Scheduled publishing is enabled" to your Rule, or enable the Scheduler options via the %type content type settings.', array(
'%type' => $type_name,
), WATCHDOG_WARNING, l(t('@type settings', array(
'@type' => $type_name,
)), 'admin/structure/types/manage/' . $node->type));
}
}