You are here

function hook_rb_misc_node_clone_reset_properties_alter in Rules Bonus Pack 7

Adds node properties that should be reset when cloning nodes with rb_misc.

This hook is useful for removing node properties set by contrib modules, that should be cleaned up when cloning a node to avoid weird effects. For example, 'nid' is removed this way (by rb_misc itself).

Parameters

<array> $properties_to_alter: An array containing the node properties to remove. All properties should be represented by a value in $node->{property}. This property will be set to NULL, if it exists.

1 function implements hook_rb_misc_node_clone_reset_properties_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

rb_misc_rb_misc_node_clone_reset_properties_alter in ./rb_misc.rules.inc
Implements hook_rb_misc_clone_reset_properties_alter().
1 invocation of hook_rb_misc_node_clone_reset_properties_alter()
rb_misc_action_node_clone in ./rb_misc.rules.inc
The 'rb_misc_action_node_clone' action.

File

./rb_misc.api.php, line 20
Description and documentation of API functions included in rb_misc.

Code

function hook_rb_misc_node_clone_reset_properties_alter(&$properties_to_alter) {

  // Remove any time stamp for recent comments.
  $properties_to_alter += array(
    'last_comment_timestamp',
  );
}