You are here

function rules_item_rule_export in Rules 6

Change the status of the rules to default.

File

rules/rules.export.inc, line 45
Provides export functionality and integrates with the features module.

Code

function rules_item_rule_export($rule_name, &$rule, &$export, $module = NULL) {
  static $counter = 0;

  // Be sure the exported rule has the right version specified, which is
  // important if the export is used as default.
  $rule['#version'] = 6003;
  if (!empty($module)) {

    // Change #status to 'default'.
    $rule['#status'] = 'default';

    // Add the module name as category.
    if (empty($rule['#categories']) || !in_array($module, $rule['#categories'])) {
      $rule['#categories'][$module] = $module;
    }
  }
}