You are here

function linkedin_profile_block in LinkedIn Integration 6

File

linkedin_profile/linkedin_profile.module, line 156
Main hooks implementation for LinkedIn Profile module

Code

function linkedin_profile_block($op = 'list', $delta = 0, $edit = array()) {
  if (variable_get('linkedin_profile_user_page_enabled', '0') == 3) {
    switch ($op) {
      case 'list':
        $blocks[0]['info'] = t('LinkedIn Profile');
        return $blocks;
      case 'view':
        if (arg(0) == 'user' && is_numeric(arg(1))) {
          $account = user_load(arg(1));
          if (linkedin_profile_display_access($account)) {
            $block['subject'] = t('Linkedin Profile');
            $block['content'] = theme('linkedin_profile_user_page', $account->linkedin);
            return $block;
          }
        }
    }
  }
}