You are here

function name_get_format_by_machine_name in Name Field 6

Same name and namespace in other branches
  1. 8 name.module \name_get_format_by_machine_name()
  2. 7 name.module \name_get_format_by_machine_name()
2 calls to name_get_format_by_machine_name()
theme_name_formatter_default in ./name.module
Theme function all name field formatters.
_name_token_values in includes/name.token.inc
Implementation of hook_token_values().

File

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

Code

function name_get_format_by_machine_name($machine_name) {
  if ($machine_name == 'default') {
    return name_settings('default_format');
  }
  $sql = "SELECT format FROM {name_custom_format} WHERE machine_name = '%s'";
  return (string) db_result(db_query($sql, $machine_name));
}