You are here

function follow_block_view in Follow 7

Same name and namespace in other branches
  1. 5 follow.module \follow_block_view()
  2. 6 follow.module \follow_block_view()
  3. 7.2 follow.module \follow_block_view()

Implementation of hook_block_view().

File

./follow.module, line 214
Allows users to add links to their social network profiles.

Code

function follow_block_view($delta = '') {
  switch ($delta) {
    case 'site':
      if (($content = _follow_block_content()) && (variable_get('follow_site_block_user', TRUE) || !(arg(0) == 'user' && is_numeric(arg(1))))) {
        return array(
          'subject' => _follow_block_subject(),
          'content' => $content,
        );
      }
      break;
    case 'user':
      $uid = arg(1);
      if (arg(0) == 'user' && is_numeric($uid) && ($content = _follow_block_content($uid))) {
        return array(
          'subject' => _follow_block_subject($uid),
          'content' => $content,
        );
      }
      break;
  }
}