πͺπΈSpain juampynr
For reference, in Workbench Moderation 7.x-2.x-dev, this worked to me to unpublish a node:
$node = node_load(218821);
$node->status = NODE_NOT_PUBLISHED;
$node->event = 'to_unpublished';
node_save($node);
πͺπΈSpain juampynr
Here is an updated version which fixes the following warning:
Warning: array_reverse() expects parameter 1 to be array, null given in _conditional_fields_field_parent_bundle() (line 2061 of conditional_fields.module)