You are here

function profanity_get_lists_flat in Profanity 7

Function to return a flat list array of machine name indexes and label values.

5 calls to profanity_get_lists_flat()
profanity_admin_settings in ./profanity.module
Admin settings form callback.
profanity_token_info in ./profanity.module
Implements hook_token_info().
profanity_views_handler_field::options_form in ./profanity.views.inc
Provide link to node option
profanity_views_handler_search_excerpt::options_form in ./profanity.views.inc
Provide link to node option
_profanity_filter_settings in ./profanity.module
Filter settings callback for profanity filter.
1 string reference to 'profanity_get_lists_flat'
profanity_rules_condition_info in ./profanity.rules.inc
Implements hook_rules_condition_info().

File

./profanity.module, line 281
Main {profanity} file.

Code

function profanity_get_lists_flat() {
  static $flat_lists;
  ctools_include('export');
  if (!isset($flat_lists)) {
    $flat_lists = array();
    $lists = ctools_export_load_object('profanity_list');
    if (!empty($lists)) {
      $options = array();
      foreach ($lists as $list) {
        $flat_lists[$list->name] = check_plain($list->title);
      }
    }
  }
  return $flat_lists;
}