You are here

function rules_admin_element_filter in Rules 6

This is used for filtering the rules, sets, action and conditions that should be shown. Rules and sets are filtered when they are fixed and the variable 'rules_show_fixed' is not set to on. Actions and conditions are filtered out if they are marked as being hidden.

Return value

TRUE, when the element should be kept. Else FALSE.

9 string references to 'rules_admin_element_filter'
rules_admin_export_by_category in rules_admin/rules_admin.export.inc
Adds in the rule items for the given tags.
rules_admin_form_add_action in rules_admin/rules_admin.rule_forms.inc
Returns the form for the first action add page
rules_admin_form_add_condition in rules_admin/rules_admin.rule_forms.inc
Returns the form for the first condition add page
rules_admin_get_categories in rules_admin/rules_admin.inc
Returns an array of all existing categories
rules_admin_get_grouped_labels in rules_admin/rules_admin.inc
Gets an array of element labels grouped by modules

... See full list

File

rules_admin/rules_admin.inc, line 93

Code

function rules_admin_element_filter($element) {
  if (!variable_get('rules_show_fixed', FALSE)) {
    if (isset($element['#status']) && $element['#status'] == 'fixed') {
      return FALSE;
    }
    if (isset($element['status']) && $element['status'] == 'fixed') {
      return FALSE;
    }
  }
  if (isset($element['hidden']) && $element['hidden']) {
    return FALSE;
  }
  return TRUE;
}