You are here

function name_settings in Name Field 6

Same name and namespace in other branches
  1. 7 name.module \name_settings()

Handles the initialization of the Name module settings that are stored in the {variables} table.

5 calls to name_settings()
name_admin_settings_form in ./name.admin.inc
Form builder function for module settings.
name_get_format_by_machine_name in ./name.module
name_list_custom_formats in ./name.admin.inc
Lists the known custom formats.
_name_generate_tokens in includes/name.parser.inc
_name_token_values in includes/name.token.inc
Implementation of hook_token_values().
1 string reference to 'name_settings'
name_uninstall in ./name.install
Implementation of hook_uninstall().

File

./name.module, line 68
Defines an API for displaying and inputing names.

Code

function name_settings($key = NULL) {
  $settings = variable_get('name_settings', array());
  $settings += array(
    'default_format' => '(((((t+ig)+im)+if)+is)+ic)',
    'sep1' => ' ',
    'sep2' => ', ',
    'sep3' => '',
  );
  if ($key) {
    return $settings[$key];
  }
  return $settings;
}