You are here

function theme_content_profile_display_link in Content Profile 6

Theme function for the content_profile display as link

1 theme call to theme_content_profile_display_link()
content_profile_show_profiles in ./content_profile.module
Returns an array suitable for use with drupal_render, that shows all content_profiles as configured by the admin.

File

./content_profile.theme.inc, line 21
Theme and template preprocessing code

Code

function theme_content_profile_display_link($element) {
  if ($node = content_profile_load($element['#content_type'], $element['#uid'])) {
    if (node_access('view', $node)) {
      $output = l(node_get_types('name', $node->type), 'node/' . $node->nid);
      if ($element['#edit_link'] && node_access('update', $node)) {
        $output .= ' ' . l('[' . t('edit') . ']', content_profile_get_edit_path($node), array(
          'query' => drupal_get_destination(),
        ));
      }
      return $output;
    }
  }
}