1 contact.module contact_block_view($delta = '', $settings = array(), $contexts = array())

Implements hook_block_view().

File

core/modules/contact/contact.module, line 370
Enables the use of personal and site-wide contact forms.

Code

function contact_block_view($delta = '', $settings = array(), $contexts = array()) {
  $block = array();

  switch ($delta) {
    case 'sitewide':
      if (user_access('access site-wide contact form')) {
        module_load_include('inc', 'contact', 'contact.pages');
        $block['subject'] = t('Contact Us');
        $block['content'] = backdrop_get_form('contact_site_form');
      }
      break;
  }

  return $block;
}