You are here

function og_rules_action_add_group_node in Organic groups 6

Same name and namespace in other branches
  1. 6.2 includes/og.rules.inc \og_rules_action_add_group_node()

Action:Add group node settings to content.

File

includes/og.rules.inc, line 154
Rules integration for the og module.

Code

function og_rules_action_add_group_node($node, $settings) {
  if (og_is_group_type($node->type)) {

    // Add og keys to the node.
    foreach ($settings['og_fieldset']['og_settings'] as $key => $value) {
      $node->{$key} = $value;
    }
    return array(
      'node' => $node,
    );
  }
}