aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--views/default/page_elements/owner_block.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/views/default/page_elements/owner_block.php b/views/default/page_elements/owner_block.php
index 7ddc7e55a..158f82ff0 100644
--- a/views/default/page_elements/owner_block.php
+++ b/views/default/page_elements/owner_block.php
@@ -50,6 +50,12 @@ if(is_plugin_enabled('profile')) {
$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 .= '<div><ul>';
foreach ($links as $link) {
$display .= "<li><a href=\"{$link['href']}\">{$link['text']}</a></li>";