You are here

function contactinfo_get_contactinfo in Contact Info 7

Helper function to return saved contact information.

Return value

array All contact information saved from the settings form.

3 calls to contactinfo_get_contactinfo()
contactinfo_admin_settings in ./contactinfo.form.inc
Contact Info settings form.
contactinfo_block_view in ./contactinfo.module
Implements hook_block_view().
contactinfo_tokens in ./contactinfo.tokens.inc
Implements hook_tokens().

File

./contactinfo.module, line 268
Collects contact information and displays it in an hCard block.

Code

function contactinfo_get_contactinfo() {

  // Get variable defaults.
  $default = contactinfo_defaults();

  // Get saved contact information.
  $contactinfo = variable_get('contactinfo', $default);

  // Merge default values and saved data to ensure all array keys are present.
  return array_merge($default, $contactinfo);
}