{$label} END; } if(is_plugin_enabled('profile')) { // Is there a page owner? $owner = page_owner_entity(); if ($owner instanceof ElggGroup || ($owner instanceof ElggUser && $owner->getGUID() != get_loggedin_userid()) ) { $icon = elgg_view('profile/icon', array('entity' => $owner, 'size' => 'tiny')); $owner_url = $owner->getURL(); $display = "
$icon
"; $display .= '
'; $display .= "

{$owner->name}

"; if ($owner->briefdescription) { $display .= "

{$owner->briefdescription}

"; } $location = elgg_view('output/tags', array('value' => $owner->location)); $display .= "

$location

"; // Trigger owner block menu $params = array('owner' => $owner); $links = trigger_plugin_hook('profile_menu', 'profile', $params, array()); if (is_array($links) && !empty($links)) { // sort the links by name usort($links, create_function( '$a, $b', 'return strnatcasecmp($a[\'text\'], $b[\'text\']);' )); $display .= '
'; } // Allow plugins to extend the owner block contents $display .= elgg_view('owner_block/profile_extend'); // close owner_block_content $display .= '
'; $contents .= "
$display
"; } } $contents .= elgg_view('owner_block/extend'); // Have we been asked to inject any content? If so, display it if (isset($vars['content'])) $contents .= $vars['content']; // Initialise the current tool/page submenu (plugins can add to the submenu) $submenu = elgg_get_submenu(); if (!empty($submenu)) $contents .= $submenu; if (!empty($contents)) { echo $contents; }